/*
 * Support page (5th slider tab) — Figma reskin: dark-green pill cards on the
 * lobby background, search bar, FAQ accordion (powered by expand_controller),
 * and a chat bottom-sheet with mock messages. Standalone sheet (same pattern
 * as messages-page.css and lobby-dock.css) — keeps Tailwind purge from
 * dropping these visual rules.
 */

/*
 * Height follows content only. The slide scroller (lobby-dock.css) already adds
 * `padding-bottom` for the fixed dock — avoid min-height / margin-top:auto chains
 * that stretched the page to the full slide height and left a scrollable blank band.
 */
.support-page {
  display: flex;
  flex-direction: column;
  width: 100%;
  min-height: 0;
  padding: 16px;
  color: #fbfcfc;
  font-family: "Inter", ui-sans-serif, system-ui, sans-serif;
  box-sizing: border-box;
}

.support-page__header {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  padding: 16px 0 8px;
}

.support-page__header-icon {
  width: 56px;
  height: 56px;
  object-fit: contain;
  flex-shrink: 0;
}

.support-page__title {
  color: #a6d90f;
  font-size: 18px;
  font-weight: 700;
  letter-spacing: 0.01em;
  margin: 0;
}

.support-page__search {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  height: 48px;
  margin-top: 16px;
  padding: 0 16px;
  background: rgba(10, 66, 27, 0.65);
  border: 1px solid rgba(166, 217, 15, 0.25);
  border-radius: 24px;
  box-sizing: border-box;
}

.support-page__search-input {
  flex: 1 1 auto;
  min-width: 0;
  background: transparent;
  border: none;
  outline: none;
  color: #fbfcfc;
  font-size: 14px;
  font-style: italic;
  font-family: inherit;
  padding: 0;
}

.support-page__search-input::placeholder {
  color: rgba(255, 255, 255, 0.6);
  font-style: italic;
}

.support-page__search-icon {
  flex-shrink: 0;
  width: 22px;
  height: 22px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #a6d90f;
}

.support-page__search-icon svg {
  width: 100%;
  height: 100%;
  display: block;
}

.support-page__faq-heading {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 24px 0 12px;
  color: #fbfcfc;
  font-size: 16px;
  font-weight: 700;
}

.support-page__faq-heading-badge {
  flex-shrink: 0;
  width: 28px;
  height: 28px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #a6d90f;
}

.support-page__faq-heading-badge svg {
  width: 100%;
  height: 100%;
  display: block;
}

.support-page__faq-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.support-page__faq-item {
  background: #0a421b;
  border-radius: 16px;
  padding: 12px 16px;
}

.support-page__faq-item.is-expanded {
  padding-bottom: 16px;
}

.support-page__faq-item-trigger {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  width: 100%;
  background: transparent;
  border: none;
  padding: 0;
  margin: 0;
  cursor: pointer;
  color: inherit;
  font-family: inherit;
  text-align: left;
  -webkit-tap-highlight-color: transparent;
}

.support-page__faq-item-trigger:focus-visible {
  outline: 2px solid #a6d90f;
  outline-offset: 4px;
  border-radius: 8px;
}

.support-page__faq-item-question {
  flex: 1 1 auto;
  min-width: 0;
  font-size: 14px;
  transition: color 0.18s ease;
  font-weight: 500;
  color: #fbfcfc;
}

.support-page__faq-item-chevron {
  flex-shrink: 0;
  width: 20px;
  height: 20px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #a6d90f;
  transform: rotate(90deg);
  transition: transform 0.18s ease;
}

.support-page__faq-item-chevron.is-flipped {
  transform: rotate(-90deg);
}

.support-page__faq-item-chevron svg {
  width: 16px;
  height: 16px;
  display: block;
}

.support-page__faq-item.is-expanded .support-page__faq-item-question {
  color: #a6d90f;
}

.support-page__faq-item-answer {
  margin: 10px 0 0;
  font-size: 13px;
  color: #fbfcfc;
  line-height: 1.5;
}

.support-page__contact {
  margin-top: 2rem;
  padding-top: 0;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.support-page__contact-prompt {
  font-size: 14px;
  font-weight: 500;
  color: #fbfcfc;
  line-height: 1.4;
  margin: 0;
}

.support-page__contact-avatars {
  display: flex;
  align-items: center;
}

.support-page__contact-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 2px solid rgba(1, 29, 14, 0.6);
  margin-left: -10px;
  background: #c9d1d9;
  background-size: cover;
  background-position: center;
  flex-shrink: 0;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.25);
}

.support-page__contact-avatar:first-child {
  margin-left: 0;
}

.support-page__contact-status {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  color: #fbfcfc;
}

.support-page__contact-status-dot {
  flex-shrink: 0;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #64b447;
  box-shadow: 0 0 0 3px rgba(100, 180, 71, 0.18);
}

.support-page__send-button {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  width: 100%;
  height: 48px;
  margin-top: 4px;
  padding: 0 20px;
  background: rgba(10, 66, 27, 0.45);
  border: 1px solid rgba(166, 217, 15, 0.4);
  border-radius: 24px;
  color: rgba(255, 255, 255, 0.7);
  font-size: 14px;
  font-family: inherit;
  cursor: pointer;
  transition: border-color 0.18s ease, color 0.18s ease;
}

.support-page__send-button:hover {
  border-color: rgba(166, 217, 15, 0.7);
  color: #fbfcfc;
}

.support-page__send-button-icon {
  flex-shrink: 0;
  width: 22px;
  height: 22px;
  color: #a6d90f;
}

.support-page__send-button-icon svg {
  width: 100%;
  height: 100%;
  display: block;
}

/* Bottom sheet — generic, reusable component (BEM root: bottom-sheet) */
.bottom-sheet {
  position: fixed;
  inset: 0;
  z-index: 70;
  pointer-events: none;
  visibility: hidden;
}

.bottom-sheet[data-open="true"] {
  pointer-events: auto;
  visibility: visible;
}

.bottom-sheet__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.55);
  opacity: 0;
  transition: opacity 0.28s ease;
}

.bottom-sheet[data-open="true"] .bottom-sheet__backdrop {
  opacity: 1;
}

.bottom-sheet__panel {
  position: absolute;
  inset-inline: 0;
  /* Sit above the fixed lobby dock (72px) + iOS safe area, so the chat composer
     is fully visible. */
  bottom: calc(72px + env(safe-area-inset-bottom, 0px));
  height: 75%;
  background: #0a421b;
  border-top-left-radius: 16px;
  border-top-right-radius: 16px;
  display: flex;
  flex-direction: column;
  transform: translateY(calc(100% + 72px + env(safe-area-inset-bottom, 0px)));
  transition: transform 0.28s ease;
  box-shadow: 0 -10px 30px rgba(0, 0, 0, 0.45);
  box-sizing: border-box;
  overflow: hidden;
}

.bottom-sheet[data-open="true"] .bottom-sheet__panel {
  transform: translateY(0);
}

/* Handle bar — drag-to-dismiss target. The visible bar is 40x4 px, but the
   surrounding button has a large invisible tap area (full-width strip on top of
   the panel) so users don't have to be pixel-perfect. */
.bottom-sheet__handle {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 24px;
  margin: 0;
  padding: 0;
  background: transparent;
  border: none;
  cursor: grab;
  touch-action: none;
}

.bottom-sheet__handle:active {
  cursor: grabbing;
}

.bottom-sheet__handle::before {
  content: "";
  display: block;
  width: 40px;
  height: 4px;
  border-radius: 2px;
  background: rgba(255, 255, 255, 0.3);
}

.bottom-sheet__panel.is-dragging {
  transition: none;
}

.bottom-sheet__body {
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  min-height: 0;
}

/* Support chat (lives inside bottom-sheet) */
.support-chat {
  display: flex;
  flex-direction: column;
  height: 100%;
  min-height: 0;
}

.support-chat__header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  flex-shrink: 0;
}

.support-chat__avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: #c9d1d9;
  background-size: cover;
  background-position: center;
  flex-shrink: 0;
}

.support-chat__avatar--message {
  width: 32px;
  height: 32px;
}

.support-chat__header-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.support-chat__header-name {
  color: #fbfcfc;
  font-size: 14px;
  font-weight: 600;
  line-height: 1.2;
}

.support-chat__header-status {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: rgba(251, 252, 252, 0.7);
  line-height: 1.2;
}

.support-chat__header-status-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #64b447;
}

.support-chat__messages {
  flex: 1 1 auto;
  overflow-y: auto;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  min-height: 0;
}

.support-chat__row {
  display: flex;
  align-items: flex-end;
  gap: 8px;
  max-width: 80%;
}

.support-chat__row--theirs {
  align-self: flex-start;
}

.support-chat__row--mine {
  align-self: flex-end;
  flex-direction: row-reverse;
}

.support-chat__bubble {
  padding: 10px 14px;
  border-radius: 18px;
  font-size: 13px;
  line-height: 1.4;
  word-break: break-word;
  border: 1px solid rgba(166, 217, 15, 0.25);
  background: rgba(10, 66, 27, 0.6);
  color: #fbfcfc;
  font-family: inherit;
}

.support-chat__row--theirs .support-chat__bubble {
  border-top-left-radius: 6px;
}

.support-chat__row--mine .support-chat__bubble {
  background: rgba(26, 92, 46, 0.85);
  border-color: rgba(166, 217, 15, 0.4);
  border-top-right-radius: 6px;
}

.support-chat__row--mine .support-chat__avatar--message {
  box-shadow: 0 0 0 2px rgba(166, 217, 15, 0.7);
}

.support-chat__composer {
  position: relative;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 16px 16px;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  flex-shrink: 0;
}

.support-chat__input {
  flex: 1 1 auto;
  height: 44px;
  padding: 0 16px;
  background: rgba(10, 66, 27, 0.6);
  border: 1px solid rgba(166, 217, 15, 0.4);
  border-radius: 24px;
  color: #fbfcfc;
  font-size: 14px;
  font-family: inherit;
  outline: none;
  min-width: 0;
}

.support-chat__input::placeholder {
  color: rgba(255, 255, 255, 0.6);
}

.support-chat__action {
  flex-shrink: 0;
  width: 32px;
  height: 32px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: none;
  cursor: pointer;
  color: #a6d90f;
  padding: 0;
}

.support-chat__action svg {
  width: 24px;
  height: 24px;
  display: block;
}

.support-chat__floating-actions {
  position: absolute;
  right: 56px;
  bottom: calc(100% - 4px);
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 0 4px 12px;
  pointer-events: none;
  opacity: 0;
  transform: translateY(4px);
  transition: opacity 0.18s ease, transform 0.18s ease;
}

.support-chat__floating-actions[data-open="true"] {
  pointer-events: auto;
  opacity: 1;
  transform: translateY(0);
}

.support-chat__floating-action {
  background: rgba(10, 66, 27, 0.95);
  color: #fbfcfc;
  font-size: 14px;
  font-weight: 600;
  font-family: inherit;
  padding: 10px 18px;
  border-radius: 24px;
  border: 1px solid rgba(166, 217, 15, 0.5);
  cursor: pointer;
  white-space: nowrap;
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.35);
}

.support-chat__floating-action:hover {
  border-color: rgba(166, 217, 15, 0.8);
}
