/* Legacy-parity text rendering: the old Creditas site sets
 * -webkit-font-smoothing: antialiased globally, which renders type
 * lighter/thinner on macOS. Webflow Code Components live in isolated
 * shadow roots, so this must be declared per-component on :host to
 * inherit into the shadow tree (the property does not cross the
 * shadow boundary). Without it, Blink defaults to subpixel smoothing
 * and identical 400-weight text looks heavier than the old site. */
:host {
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/**
 * Faq (Old) — vertical accordion list of question/answer pairs with an
 * optional "view all" link at the bottom. Visual contract mirrors
 * `creditas-site/src/sections/Faq/`.
 *
 * Class naming: single-class, no BEM `__` separator. Element rules are
 * nested under the `.faq-old` block; the component's own shadow root
 * keeps the short names (`.container`, `.title`, `.link`) collision-free.
 *
 * Token values inlined from @creditas-ui/themes standard:
 *
 *   colors.neutral.0    = #ffffff
 *   colors.neutral.15   = #d6dcd9   (accordion divider)
 *   colors.neutral.90   = #292929   (title border + body text)
 *   colors.primary.60   = #4f9e00   (bottom link)
 *
 *   breakpoints.2xl     = 600px
 *   breakpoints.5xl     = 1024px
 *
 *   typography.heading.lg  → 32px / 40px / 0.5px / Maison Neue Extended / 400
 *   typography.body.lg     → 18px / 26px / 0.3px / Helvetica Now Display / 400
 *   typography.body.md     → 16px / 24px / 0.3px / Helvetica Now Display / 400
 */

.faq-old,
.faq-old *,
.faq-old *::before,
.faq-old *::after {
  box-sizing: border-box;
}

.faq-old {
  position: relative;
  background: #ffffff;
  padding: 64px 20px;
  font-family: 'Helvetica Now Display', 'Helveticanowdisplay', sans-serif;
  color: #292929;

  @media (min-width: 1024px) {
    padding: 164px 20px;
  }

  .container {
    width: 100%;
    max-width: calc(1388px + 40px);
    margin: 0 auto;
  }

  .title {
    padding-bottom: 24px;
    border-bottom: 4px solid #292929;
    font-family: 'Helvetica Now Display', 'Helveticanowdisplay', sans-serif;
    font-weight: 700;
    font-size: 14px;
    line-height: 20px;
    letter-spacing: 1.5px;
    text-transform: uppercase;
  }

  .list {
    display: flex;
    flex-direction: column;

    /* Flatten Webflow's slot wrapper so each FaqQuestion code-island
     * becomes a direct child of the list and the dividers between items
     * lay out correctly. */
    ::slotted(*) {
      display: contents;
    }
  }

  /* ----- bottom "view all" link ----------------------------------- */

  .link {
    display: inline-flex;
    align-items: center;
    margin-top: 40px;
    color: #4f9e00;
    font-weight: 500;
    font-size: 20px;
    line-height: 28px;
    letter-spacing: 0.5px;
    text-decoration: none;
    cursor: pointer;
    transition: opacity 0.2s ease;

    &:hover {
      opacity: 0.75;
    }

    &:focus-visible {
      outline: 2px solid #8edb00;
      outline-offset: 2px;
    }

    .link-icon {
      width: 20px;
      height: 20px;
      margin-left: 8px;
    }
  }
}

/* --- Legacy render (creditas-site) slot-row fix — PROJECT RULE ------ */
/* Questions stack as list rows inside legacy .css-1cnfx1y <ul>; flatten the
   Webflow slot wrapper so each question island is a direct list child (keeps
   the old per-row borders/spacing that target direct children). */
::slotted(*) {
  display: contents !important;
}

