/* ========== FAQ PAGE STYLES ========== */

/* Reserve space for the vertical scrollbar so expanding a FAQ answer
   (which can tip the page into scrollable territory) doesn't yank the
   whole layout ~15px to the left — the right "Still have questions"
   card was visibly sliding on every expand/collapse. */
html {
  scrollbar-gutter: stable;
}

/* ========== FAQ CONTENT ========== */
.faq-content {
  display: flex;
  flex-direction: column;
  gap: 40px;
  align-items: center;
  padding: 16px;
}

/* Header */
.faq-header {
  display: flex;
  flex-direction: column;
  gap: 24px;
  align-items: center;
  width: 405px;
  max-width: 100%;
}
.faq-header-text {
  display: flex;
  flex-direction: column;
  gap: 8px;
  align-items: center;
  text-align: center;
  width: 100%;
}
.faq-title {
  font-size: 24px;
  font-weight: 500;
  line-height: 32px;
}
.faq-subtitle {
  font-size: 14px;
  line-height: 20px;
  color: var(--neutral-400);
}
.faq-badge {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  background: var(--purple-900);
  border: 1px solid var(--purple-800);
  border-radius: 4px;
  padding: 2px 6px 2px 2px;
}
.faq-badge img { 
  width: 16px; 
  height: 16px; 
}
.faq-badge span {
  font-size: 12px;
  line-height: 16px;
  color: var(--purple-400);
}

/* Search */
.faq-search {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--neutral-800);
  border: 1px solid var(--neutral-700);
  border-radius: 8px;
  padding: 8px 16px 8px 8px;
  width: 100%;
}
.faq-search img { 
  width: 16px; 
  height: 16px; 
  flex-shrink: 0; 
}
.faq-search input {
  flex: 1;
  background: none;
  border: none;
  outline: none;
  color: #fff;
  font-family: 'Heebo', sans-serif;
  font-size: 12px;
  line-height: 16px;
}
.faq-search input::placeholder { 
  color: var(--neutral-500); 
}

/* Category tabs */
.faq-tabs {
  display: flex;
  gap: 8px;
  align-items: center;
  justify-content: center;
  width: 100%;
  flex-wrap: wrap;
}
.faq-tab {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 20px 10px 10px;
  border-radius: 40px;
  background: var(--neutral-800);
  border: 1px solid var(--neutral-600);
  cursor: pointer;
  transition: all 0.2s;
  white-space: nowrap;
}
.faq-tab img { 
  width: 20px; 
  height: 20px; 
}
.faq-tab-label {
  font-size: 14px;
  font-weight: 600;
  line-height: 20px;
  color: var(--neutral-400);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.faq-tab-count {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2px 8px;
  border-radius: 14px;
  background: var(--neutral-600);
  font-size: 12px;
  font-weight: 600;
  line-height: 16px;
  color: var(--neutral-400);
}
.faq-tab.active {
  background: #fff;
  border-color: #fff;
}
.faq-tab.active .faq-tab-label { 
  color: #000; 
}
.faq-tab.active .faq-tab-count {
  background: var(--purple-300);
  color: var(--purple-700);
}
/* "All Questions" tab has no count badge */
.faq-tab.all-tab { 
  padding-right: 20px; 
}

/* Main area: accordion + sidebar card */
.faq-main {
  display: flex;
  gap: 24px;
  align-items: flex-start;
  justify-content: center;
  width: 100%;
}

/* Accordion column */
.faq-accordion-col {
  flex: 1;
  /* min-width:0 alone isn't enough — long answer paragraphs can still
     widen the column because flex items measure intrinsic content width
     before shrinking. Pin an explicit max-width so opening any FAQ
     item can never push the right support card sideways. */
  min-width: 0;
  max-width: 760px;
  display: flex;
  flex-direction: column;
  gap: 24px;
}

/* Category sections */
.faq-category-section {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

/* Section header */
.faq-section-header {
  display: flex;
  align-items: center;
  gap: 12px;
}
.faq-section-icon {
  background: var(--purple-900);
  border: 1px solid var(--purple-800);
  border-radius: 12px;
  padding: 12px;
  display: flex;
  align-items: center;
  flex-shrink: 0;
}
.faq-section-icon img { 
  width: 24px; 
  height: 24px; 
}
.faq-section-title {
  font-size: 24px;
  font-weight: 500;
  line-height: 32px;
  color: var(--purple-400);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  flex: 1;
}

/* Accordion items */
.faq-list { 
  display: flex; 
  flex-direction: column; 
}
.faq-item {
  display: flex;
  flex-direction: column;
}
.faq-item-header {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 4px;
  border-bottom: 1px solid var(--neutral-700);
  cursor: pointer;
  transition: border-color 0.2s;
}
.faq-item.open .faq-item-header { 
  border-bottom: none; 
}
.faq-item-question {
  flex: 1;
  font-size: 14px;
  line-height: 20px;
  color: #fff;
}
.faq-item.open .faq-item-question { 
  color: var(--purple-400); 
}
.faq-item-toggle {
  display: flex;
  align-items: center;
  padding: 8px;
  border-radius: 40px;
  flex-shrink: 0;
}
.faq-item-toggle img { 
  width: 16px; 
  height: 16px; 
}
.faq-item-toggle .icon-close { 
  display: none; 
}
.faq-item.open .faq-item-toggle .icon-add { 
  display: none; 
}
.faq-item.open .faq-item-toggle .icon-close { 
  display: block; 
}

/* Answer */
.faq-item-answer {
  display: none;
  padding: 0 4px 8px;
}
.faq-item.open .faq-item-answer { 
  display: block; 
}
.faq-answer-box {
  background: var(--neutral-800);
  border: 1px solid var(--neutral-700);
  border-radius: 12px;
  padding: 12px 16px;
  /* Keep the box bounded by the accordion column — prevents a long
     answer paragraph with a non-breaking URL/word from widening the
     whole column. */
  max-width: 100%;
  min-width: 0;
}
.faq-answer-box p {
  font-size: 12px;
  line-height: 16px;
  color: #fff;
  padding: 8px 0;
  margin: 0;
  /* Break long unbroken strings (URLs, emails) so they can't push
     layout wider than the column. */
  overflow-wrap: anywhere;
  word-break: break-word;
}

/* Last item has no border */
.faq-item:last-child .faq-item-header { 
  border-bottom: none; 
}

/* ========== STILL HAVE QUESTIONS CARD ========== */
.faq-support-card {
  width: 340px;
  min-width: 340px;
  border: 1px solid var(--neutral-700);
  border-radius: 16px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  align-self: flex-start;
  position: sticky;
  top: 16px;
  /* Isolate paint + layout so the card's decoration work
     (absolutely-positioned union graphic, bg image) doesn't affect
     the surrounding flex row's layout timing. */
  contain: layout paint;
}
.faq-support-bg {
  position: absolute;
  inset: 0;
  overflow: hidden;
  border-radius: 16px;
  z-index: 0;
}
.faq-support-bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.faq-support-union {
  position: absolute;
  top: 20%;
  left: -37%;
  right: -37%;
  bottom: -12%;
  display: flex;
  align-items: center;
  justify-content: center;
  mix-blend-mode: plus-lighter;
  z-index: 1;
}
.faq-support-union img {
  width: 418px;
  height: 418px;
  transform: rotate(-45deg);
}
.faq-support-content {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  gap: 24px;
  padding: 24px;
}
.faq-support-text {
  display: flex;
  flex-direction: column;
  gap: 8px;
  color: #fff;
}
.faq-support-text h3 {
  font-size: 24px;
  font-weight: 500;
  line-height: 32px;
  margin: 0;
}
.faq-support-text p {
  font-size: 12px;
  line-height: 16px;
  margin: 0;
}
.faq-support-buttons {
  display: flex;
  gap: 12px;
  align-items: center;
}
.btn-email {
  display: flex;
  align-items: center;
  gap: 10px;
  background: #fff;
  color: #000;
  border: none;
  border-radius: 10px;
  padding: 10px 24px 10px 16px;
  font-family: 'Heebo', sans-serif;
  font-size: 14px;
  font-weight: 600;
  line-height: 20px;
  cursor: pointer;
  box-shadow: 0 2px 20px rgba(255,255,255,0.56);
  white-space: nowrap;
  text-decoration: none;
  transition: transform 0.2s;
}
.btn-email:hover {
  transform: scale(1.03);
}
.btn-email img { 
  width: 20px; 
  height: 20px; 
}
.btn-discord {
  display: flex;
  align-items: center;
  gap: 10px;
  background: transparent;
  color: #fff;
  border: 1px solid #fff;
  border-radius: 10px;
  padding: 10px 24px 10px 16px;
  font-family: 'Heebo', sans-serif;
  font-size: 14px;
  font-weight: 600;
  line-height: 20px;
  cursor: pointer;
  white-space: nowrap;
  text-decoration: none;
  transition: transform 0.2s;
}
.btn-discord:hover {
  transform: scale(1.03);
}
.btn-discord img { 
  width: 20px; 
  height: 20px; 
}

.faq-support-image {
  position: relative;
  z-index: 2;
  height: 450px;
  overflow: hidden;
  display: flex;
  justify-content: center;
  align-items: flex-end;
}
.faq-support-image img {
  width: 289px;
  height: 463px;
  object-fit: cover;
}

/* ========== RESPONSIVE ========== */
/* ========== TABLET (<=1024px) ========== */
@media (max-width: 1024px) {
  .faq-support-card { 
    width: 280px; 
    min-width: 280px; 
  }
  .faq-support-image { 
    height: 350px; 
  }
  .faq-support-image img { 
    width: 240px; 
    height: 385px; 
  }
}

/* ========== MOBILE (<=768px) ========== */
@media (max-width: 768px) {
  .faq-content { 
    padding: 12px; 
    gap: 24px; 
  }
  .faq-header { 
    width: 100%; 
  }

  .faq-tabs { 
    justify-content: flex-start; 
    overflow-x: auto; 
    flex-wrap: nowrap; 
    -webkit-overflow-scrolling: touch; 
    padding-bottom: 4px; 
  }
  .faq-tabs::-webkit-scrollbar { 
    display: none; 
  }

  .faq-main { 
    flex-direction: column; 
  }

  /* Hide the "Still have questions" card on mobile — its absolutely
     positioned background/union layers don't play nicely at small widths
     and the Email/Discord CTAs are already reachable from the footer. */
  .faq-support-card {
    display: none;
  }
}

/* ========== SMALL MOBILE (<=480px) ========== */
@media (max-width: 480px) {
  .faq-tabs { 
    gap: 6px; 
  }
  .faq-tab { 
    padding: 8px 12px 8px 8px; 
  }
}
