/* FAQ Page — colours use CSS custom properties from top-header.css
   so light / dark mode work automatically                           */

.faq-page {
  padding: 60px 40px 80px;
  font-family: 'Inter', sans-serif;
  min-height: calc(100vh - 180px);
}

/* ── Header ── */
.faq-header {
  text-align: center;
  margin-bottom: 56px;
}

.faq-title {
  font-size: 32px;
  font-weight: 700;
  color: var(--Neutralshades-Grey-N700, #000);
  line-height: 1;
  margin: 0 0 20px;
}

.faq-subtitle {
  font-size: 14px;
  font-weight: 500;
  color: var(--Neutralshades-Grey-N400-Body-Text-and-Icons, #8b8b8b);
  line-height: 20px;
  white-space: nowrap;
  margin: 0 auto;
}

@media (max-width: 600px) {
  .faq-subtitle {
    white-space: normal;
    max-width: 280px;
  }
}

/* ── Two-column layout ── */
.faq-layout {
  display: flex;
  align-items: flex-start;
  max-width: 1140px;
  margin: 0 auto;
}

.faq-right {
  flex: 1;
  min-width: 0;
}

/* ── Left: category pills (desktop) ── */
.faq-categories {
  width: 308px;
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 16px;
}

.faq-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 20px;
  border: 1.5px solid var(--Neutralshades-Grey-N100-Outline, #e4e4e4);
  border-radius: 48px;
  background: transparent;
  color: var(--Neutralshades-Grey-N500-Secondary-Text, #5c5c5c);
  font-family: 'Inter', sans-serif;
  font-size: 14px;
  font-weight: 400;
  line-height: 14px;
  cursor: pointer;
  transition: border-color 0.15s, color 0.15s, background 0.15s;
  white-space: nowrap;
}

.faq-pill:focus-visible {
  outline: 2px solid var(--Neutralshades-Grey-N700, #000);
  outline-offset: 2px;
}

.faq-pill:hover:not(.active) {
  border-color: var(--Neutralshades-Grey-N300, #b9b9b9);
  color: var(--Neutralshades-Grey-N700, #000);
}

.faq-pill.active {
  background: var(--Neutralshades-Grey-N700, #000);
  color: var(--Neutralshades-Grey-N000-White, #fff);
  border-color: var(--Neutralshades-Grey-N700, #000);
}

/* ── Vertical divider (desktop) ── */
.faq-divider {
  width: 1px;
  background-color: var(--Neutralshades-Grey-N100-Outline, #e4e4e4);
  align-self: stretch;
  min-height: 400px;
  flex-shrink: 0;
  margin: 0 40px;
}

/* ── Mobile: category dropdown ── */
.faq-dropdown {
  display: none; /* hidden on desktop */
  position: relative;
  margin-bottom: 24px;
}

.faq-dd-toggle {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 20px;
  background: transparent;
  border: 1.5px solid var(--Neutralshades-Grey-N100-Outline, #e4e4e4);
  border-radius: 10px;
  font-family: 'Inter', sans-serif;
  font-size: 14px;
  font-weight: 500;
  color: var(--Neutralshades-Grey-N700, #000);
  cursor: pointer;
  text-align: left;
  transition: border-color 0.15s;
}

.faq-dd-toggle:focus-visible {
  outline: 2px solid var(--Neutralshades-Grey-N700, #000);
  outline-offset: 2px;
}

.faq-dropdown.open .faq-dd-toggle {
  border-color: var(--Neutralshades-Grey-N700, #000);
  border-bottom-left-radius: 0;
  border-bottom-right-radius: 0;
}

.faq-dd-chevron {
  flex-shrink: 0;
  width: 16px;
  height: 16px;
  color: var(--Neutralshades-Grey-N400-Body-Text-and-Icons, #8b8b8b);
  transition: transform 0.2s ease;
}

.faq-dropdown.open .faq-dd-chevron {
  transform: rotate(180deg);
}

.faq-dd-menu {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  list-style: none;
  margin: 0;
  padding: 4px 0;
  background: var(--Neutralshades-Grey-N000-White, #fff);
  border: 1.5px solid var(--Neutralshades-Grey-N700, #000);
  border-top: none;
  border-bottom-left-radius: 10px;
  border-bottom-right-radius: 10px;
  z-index: 100;
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.08);
  overflow: hidden;
}

.faq-dropdown.open .faq-dd-menu {
  display: block;
}

.faq-dd-item {
  padding: 12px 20px;
  font-family: 'Inter', sans-serif;
  font-size: 14px;
  font-weight: 400;
  color: var(--Neutralshades-Grey-N500-Secondary-Text, #5c5c5c);
  cursor: pointer;
  transition: background 0.1s, color 0.1s;
}

.faq-dd-item:hover {
  background: var(--Neutralshades-Grey-N000-BG-01, #f2f2f2);
  color: var(--Neutralshades-Grey-N700, #000);
}

.faq-dd-item.active {
  background: var(--Neutralshades-Grey-N700, #000);
  color: var(--Neutralshades-Grey-N000-White, #fff);
}

/* ── Accordion (shared) ── */
.faq-accordion {
  width: 100%;
}

.faq-item {
  border-bottom: 1px solid var(--Neutralshades-Grey-N100-Outline, #e4e4e4);
}

.faq-question-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  width: 100%;
  padding: 24px 0;
  background: none;
  border: none;
  cursor: pointer;
  text-align: left;
}

.faq-item.open > .faq-question-row {
  padding-bottom: 16px;
}

.faq-question-row:focus-visible {
  outline: 2px solid var(--Neutralshades-Grey-N700, #000);
  outline-offset: 2px;
}

.faq-question-text {
  font-family: 'Inter', sans-serif;
  font-size: 16px;
  font-weight: 600;
  color: var(--Neutralshades-Grey-N700, #000);
  line-height: 16px;
}

.faq-chevron {
  flex-shrink: 0;
  width: 16px;
  height: 16px;
  color: var(--Neutralshades-Grey-N700, #000);
  transition: transform 0.2s ease;
}

.faq-item.open .faq-chevron {
  transform: rotate(180deg);
}

.faq-answer-row {
  display: none;
  font-family: 'Inter', sans-serif;
  font-size: 16px;
  font-weight: 400;
  color: var(--Neutralshades-Grey-N700, #000);
  line-height: 24px;
  padding-bottom: 24px;
}

.faq-answer-row a {
  display: inline;
  color: var(--Secondary-Blue-Link, #2c79f7);
  text-decoration: underline;
  text-underline-offset: 3px;
  cursor: pointer;
}

/* ── Loading state ── */
.faq-loading {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 48px 0;
}

.faq-loading span {
  display: block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--Neutralshades-Grey-N300, #b9b9b9);
  animation: faq-bounce 1.2s infinite ease-in-out;
}

.faq-loading span:nth-child(2) { animation-delay: 0.15s; }
.faq-loading span:nth-child(3) { animation-delay: 0.3s; }

@keyframes faq-bounce {
  0%, 80%, 100% { transform: scale(0.65); opacity: 0.4; }
  40%            { transform: scale(1);    opacity: 1;   }
}

/* ── Error state ── */
.faq-error {
  padding: 40px 0;
  font-size: 14px;
  color: var(--Neutralshades-Grey-N400-Body-Text-and-Icons, #8b8b8b);
}

/* ── Responsive ── */
@media (max-width: 960px) {
  .faq-layout {
    flex-direction: column;
    gap: 0;
  }

  /* Hide desktop pills and divider */
  .faq-categories,
  .faq-divider {
    display: none;
  }

  /* Show mobile dropdown */
  .faq-dropdown {
    display: block;
  }

  .faq-right {
    width: 100%;
  }
}

@media (max-width: 600px) {
  .faq-page {
    padding: 32px 20px 60px;
  }

  .faq-title {
    font-size: 24px;
  }

  .faq-question-text {
    font-size: 15px;
  }

  .faq-answer-row {
    font-size: 15px;
  }
}

.faq-plans-link {
    color: var(--Secondary-Blue-Link, #2c79f7);
    text-decoration: underline;
    cursor: pointer;
}
.faq-plans-link:hover {
    color: #1d4ed8;
}

.faq-answer-row a {
  color: var(--Secondary-Blue-Link, #2c79f7);
  text-decoration: underline;
}

.faq-answer-row ul,
.faq-answer-row ol {
  padding-left: 20px;
  margin: 8px 0 0;
}

.faq-answer-row li {
  margin-bottom: 4px;
}

.faq-answer-row strong {
  font-weight: 600;
}
