/* ============================================================
   FAQ section · vertical stack + beUI Bouncy Accordion
   Exact component: js/pw-faq/beui/bouncy-accordion.tsx
   https://beui.dev/components/motion/bouncy-accordion
   ============================================================ */

/* ---- Layout: vertical (heading → paragraph → accordion) ---- */
.pw-faq-section {
  /* Override the legacy static `.faq_section` z-index above the body-level ambient. */
  position: relative;
  z-index: 1;
  width: 100%;
  padding-top: var(--pw-dial-section-between, 2rem);
  padding-bottom: var(--pw-dial-pad-section-large, 4rem);
}

.pw-faq-stack {
  width: 100%;
  max-width: 54rem;
  margin-inline: auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--pw-faq-stack-gap, 1.65rem);
  padding-inline: 1.25rem;
  box-sizing: border-box;
  text-align: center;
}

.pw-faq-heading {
  margin: 0;
  width: 100%;
  max-width: var(--pw-faq-heading-max, 14ch);
  font-family: var(--font-piwot-sans, "Piwot Sans", system-ui, sans-serif);
  font-size: var(--pw-faq-heading-size, 2rem);
  font-weight: 600;
  letter-spacing: -0.03em;
  line-height: 1.2;
  color: #fff;
  text-align: center;
}

.pw-faq-lead {
  margin: 0;
  width: 100%;
  max-width: var(--pw-faq-lead-max, 34rem);
  font-family: var(--font-piwot-sans, "Piwot Sans", system-ui, sans-serif);
  font-size: var(--pw-faq-lead-size, 1rem);
  font-weight: 500;
  line-height: 1.55;
  letter-spacing: -0.01em;
  color: rgba(255, 255, 255, 0.62);
  text-align: center;
}

.pw-faq-accordion-mount {
  width: 100%;
  margin-inline: auto;
  text-align: left;
}

.pw-faq-browser {
  width: min(100%, 52rem);
  margin-inline: auto;
}

.pw-faq-tabs {
  width: 100%;
}

.pw-faq-tabs__rail {
  position: relative;
  display: flex;
  justify-content: center;
  width: 100%;
  padding-bottom: 0.85rem;
}

.pw-faq-tabs__list {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  max-width: 100%;
  padding: 0.25rem;
  overflow-x: auto;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 9999px;
  background: #141414;
  scrollbar-width: none;
}

.pw-faq-tabs__list::-webkit-scrollbar {
  display: none;
}

.pw-faq-tabs__list > div {
  position: relative;
  flex: 0 0 auto;
}

.pw-faq-tabs__trigger {
  position: relative;
  z-index: 1;
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  justify-content: center;
  padding: 0.55rem 0.9rem;
  border-radius: 9999px;
  white-space: nowrap;
  color: rgba(255, 255, 255, 0.62) !important;
  font-size: 0.875rem;
  font-weight: 500;
  transition: color 0.18s ease;
}

.pw-faq-tabs__trigger[aria-selected="true"] {
  color: #080808 !important;
}

.pw-faq-tabs__indicator {
  position: absolute;
  inset: 0;
  border-radius: 9999px;
  background: #ff4701;
}

.pw-faq-tabs__content {
  width: min(100%, var(--pw-faq-container-max, 29.5rem));
  margin: 1rem auto 0;
}

@media (max-width: 767px) {
  .pw-faq-tabs__rail {
    margin-inline: -0.25rem;
    width: calc(100% + 0.5rem);
  }

  .pw-faq-tabs__list {
    display: flex;
    width: max-content;
    margin-inline: auto;
  }

  .pw-faq-tabs__trigger {
    min-height: 42px;
    padding-inline: 0.75rem;
    font-size: 0.8125rem;
  }
}

/* ---- Tailwind utility shim for exact beUI component classes ---- */
/* Tokens (dark PIWOT card surface) */
.pw-faq-section {
  --background: #080808;
  --foreground: #f5f5f5;
  --card: #141414;
  --card-foreground: #f5f5f5;
  --muted: #1c1c1c;
  --muted-foreground: rgba(255, 255, 255, 0.55);
}

.bg-card { background-color: var(--card); }
.text-card-foreground { color: var(--card-foreground); }
.text-foreground { color: var(--foreground); }
.text-muted-foreground { color: var(--muted-foreground); }
.bg-muted\/25,
.focus-visible\:bg-muted\/25:focus-visible {
  background-color: rgba(255, 255, 255, 0.04);
}

.w-full { width: 100%; }
.min-w-0 { min-width: 0; }
.h-4 { height: 1rem; }
.w-4 { width: 1rem; }
.h-6 { height: 1.5rem; }
.w-6 { width: 1.5rem; }
.h-7 { height: 1.75rem; }
.w-7 { width: 1.75rem; }
.min-h-\[54px\] { min-height: 54px; }

.flex { display: flex; }
.grid { display: grid; }
.flex-1 { flex: 1 1 0%; }
.shrink-0 { flex-shrink: 0; }
.items-center { align-items: center; }
.place-items-center { place-items: center; }
.gap-4 { gap: 1rem; }

.overflow-hidden { overflow: hidden; }
.truncate {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.px-5 { padding-left: 1.25rem; padding-right: 1.25rem; }
.pb-5 { padding-bottom: 1.25rem; }

.text-left { text-align: left; }
.text-\[15px\] { font-size: 15px; }
.font-medium { font-weight: 500; }
/* beUI default leading-6: body answers override below for readability */
.leading-6 { line-height: 1.5rem; }

.outline-none { outline: none; }
.transition-colors {
  transition-property: color, background-color, border-color;
  transition-duration: 0.15s;
  transition-timing-function: ease;
}

.opacity-50 { opacity: 0.5; }
.disabled\:pointer-events-none:disabled { pointer-events: none; }

/* FAQ answer body: Webflow richtext parity */
.pw-faq-section .px-5.pb-5 {
  padding-top: 0.25rem;
  padding-bottom: 1.5rem;
}

.pw-faq-section .text-\[15px\].leading-6.text-muted-foreground,
.pw-faq-section [class*="leading-6"].text-muted-foreground {
  font-size: 0.9375rem;
  line-height: var(--pw-faq-body-line-height, 1.58);
  letter-spacing: -0.005em;
  color: rgba(255, 255, 255, 0.58);
}

/* Same idea as Webflow `.faq_content_text p { margin-bottom: … }` */
.pw-faq-section .pw-faq-richtext {
  max-width: 90ch;
  margin-inline: auto;
  text-align: left;
}

.pw-faq-section .pw-faq-richtext > p.pw-faq-answer-p,
.pw-faq-section .pw-faq-answer-p {
  display: block;
  margin-top: 0 !important;
  margin-bottom: var(--pw-faq-p-margin-bottom, 1.9rem) !important;
  white-space: normal;
  line-height: var(--pw-faq-body-line-height, 1.58);
  text-align: left;
}

.pw-faq-section .pw-faq-answer-list {
  margin: 0 0 var(--pw-faq-p-margin-bottom, 1.9rem);
  padding-left: 1.35rem;
  color: rgba(255, 255, 255, 0.58);
  line-height: var(--pw-faq-body-line-height, 1.58);
  text-align: left;
}

.pw-faq-section .pw-faq-answer-list li {
  margin: 0.2rem 0;
  padding-left: 0.2rem;
}

.pw-faq-section .pw-faq-answer-list li::marker {
  color: rgba(255, 255, 255, 0.58);
  font-weight: 600;
}

/* Last paragraph (or only paragraph): no extra bottom margin */
.pw-faq-section .pw-faq-richtext > p.pw-faq-answer-p:last-child,
.pw-faq-section .pw-faq-answer-p:last-child,
.pw-faq-section .pw-faq-answer-list:last-child {
  margin-bottom: 0 !important;
}

/* Question row title: wrap cleanly, don’t crush into chevron */
.pw-faq-section .min-w-0.flex-1.truncate {
  white-space: normal;
  overflow: visible;
  text-overflow: unset;
  line-height: 1.35;
  padding-block: 0.15rem;
}

.pw-faq-section .pw-faq-richtext strong {
  color: rgba(255, 255, 255, 0.72);
  font-weight: 600;
}

.pw-faq-section .pw-faq-richtext a {
  color: rgba(255, 255, 255, 0.68);
  text-decoration: none;
  transition: color 0.22s ease;
}

.pw-faq-section .pw-faq-richtext a[href*="glassdoor.co.uk"] {
  position: relative;
  top: -0.45em;
  margin-left: 0.12em;
  font-size: 0.62em;
  font-weight: 600;
  line-height: 0;
  white-space: nowrap;
}

.pw-faq-section .pw-faq-richtext a:hover {
  color: rgba(255, 255, 255, 0.86);
}

/* Item border so stacked cards read on pure black */
.pw-faq-section .bg-card {
  border: 1px solid rgba(255, 255, 255, 0.08);
}

/* Buttons reset inside accordion */
.pw-faq-section button {
  font-family: inherit;
  color: inherit;
  background: transparent;
  border: 0;
  cursor: pointer;
}
