/* =============================================================================
   FYSH — Help centre / FAQ
   CR: fysh-faq-hub-2026-10-10
   Premium, brand-styled consolidated FAQ. Content cards use the 4px radius;
   filter chips are pills. Relies on the global brand tokens (tokens.css).
============================================================================= */

/* ── Hero ─────────────────────────────────────────────────────────────────── */
.faq-hero {
    padding: 3.5rem 0 2.25rem;
    text-align: center;
    background:
        radial-gradient(120% 140% at 50% -20%, rgba(30, 91, 168, 0.10) 0%, rgba(30, 91, 168, 0) 60%),
        var(--white);
    border-bottom: 1px solid var(--border);
}
.faq-hero__eyebrow {
    margin: 0 0 0.5rem;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--blue);
}
.faq-hero__title {
    margin: 0 0 0.75rem;
    font-family: var(--font-display);
    font-size: clamp(2rem, 5vw, 3rem);
    line-height: 1.05;
    color: var(--navy);
}
.faq-hero__title em { font-style: normal; color: var(--gold); }
.faq-hero__sub {
    max-width: 640px;
    margin: 0 auto 1.75rem;
    color: var(--muted);
    font-size: 1.05rem;
    line-height: 1.55;
}

/* ── Search ───────────────────────────────────────────────────────────────── */
.faq-search {
    position: relative;
    display: flex;
    align-items: center;
    max-width: 560px;
    margin: 0 auto;
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: 4px;
    box-shadow: var(--shadow-sm, 0 2px 8px rgba(15, 35, 64, 0.06));
    transition: border-color var(--ease), box-shadow var(--ease);
}
.faq-search:focus-within {
    border-color: var(--blue);
    box-shadow: 0 0 0 3px rgba(30, 91, 168, 0.14);
}
.faq-search__icon {
    flex-shrink: 0;
    margin-left: 1rem;
    font-size: 1.2rem;
    color: var(--muted);
}
.faq-search__input {
    flex: 1;
    min-width: 0;
    border: 0;
    outline: none;
    background: transparent;
    padding: 0.95rem 0.75rem;
    font-size: 1rem;
    color: var(--navy);
}
.faq-search__input::placeholder { color: var(--muted); }
.faq-search__clear {
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    margin-right: 0.5rem;
    border: 0;
    border-radius: 4px;
    background: transparent;
    color: var(--muted);
    cursor: pointer;
    transition: background var(--ease), color var(--ease);
}
.faq-search__clear:hover { background: rgba(15, 35, 64, 0.06); color: var(--navy); }

/* ── Body ─────────────────────────────────────────────────────────────────── */
.faq-body { padding: 2.25rem 0 3.5rem; }

/* Category filter chips */
.faq-filter {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
}
.faq-chip {
    padding: 0.4rem 0.9rem;
    border: 1px solid var(--border);
    border-radius: 999px;
    background: var(--white);
    color: var(--navy);
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    transition: background var(--ease), color var(--ease), border-color var(--ease);
}
.faq-chip:hover { border-color: var(--blue); color: var(--blue); }
.faq-chip.is-active {
    background: var(--navy);
    border-color: var(--navy);
    color: var(--white);
}
.faq-chip:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }

.faq-count {
    margin: 0 0 1rem;
    font-size: 0.85rem;
    color: var(--muted);
}
.faq-empty {
    margin: 1rem 0;
    padding: 1.25rem;
    border: 1px dashed var(--border);
    border-radius: 4px;
    color: var(--muted);
    text-align: center;
}
.faq-empty a { color: var(--blue); text-decoration: underline; text-underline-offset: 2px; }

/* Category section */
.faq-cat { margin-bottom: 2.5rem; }
.faq-cat__head {
    display: flex;
    align-items: flex-start;
    gap: 0.85rem;
    margin-bottom: 1rem;
    padding-bottom: 0.85rem;
    border-bottom: 1px solid var(--border);
}
.faq-cat__icon {
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 4px;
    background: rgba(30, 91, 168, 0.08);
    color: var(--blue);
    font-size: 1.3rem;
}
.faq-cat__title {
    margin: 0 0 0.15rem;
    font-family: var(--font-display);
    font-size: 1.3rem;
    color: var(--navy);
}
.faq-cat__blurb { margin: 0; color: var(--muted); font-size: 0.9rem; line-height: 1.45; }

/* Items */
.faq-cat__list { display: flex; flex-direction: column; gap: 0.6rem; }
.faq-item {
    border: 1px solid var(--border);
    border-radius: 4px;
    background: var(--white);
    overflow: hidden;
    transition: border-color var(--ease), box-shadow var(--ease);
}
.faq-item:hover { border-color: rgba(30, 91, 168, 0.4); }
.faq-item[open] {
    border-color: var(--blue);
    box-shadow: var(--shadow-sm, 0 2px 8px rgba(15, 35, 64, 0.06));
}
.faq-q {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 1rem 1.15rem;
    cursor: pointer;
    list-style: none;
    font-weight: 600;
    color: var(--navy);
}
.faq-q::-webkit-details-marker { display: none; }
.faq-q__text { line-height: 1.4; }
.faq-q__toggle {
    flex-shrink: 0;
    width: 22px;
    height: 22px;
    color: var(--blue);
}
.faq-q__toggle svg { width: 22px; height: 22px; display: block; }
.faq-q__toggle-v { transition: transform var(--ease), opacity var(--ease); transform-origin: center; }
.faq-item[open] .faq-q__toggle-v { transform: scaleY(0); opacity: 0; }

.faq-a {
    padding: 0 1.15rem 1.15rem;
    color: var(--ink, #243143);
    line-height: 1.6;
}
.faq-a p { margin: 0; }
.faq-a__link {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    margin-top: 0.75rem;
    color: var(--blue);
    font-weight: 600;
    font-size: 0.9rem;
    text-decoration: none;
}
.faq-a__link:hover { color: var(--navy); }
.faq-a__link i { transition: transform var(--ease); }
.faq-a__link:hover i { transform: translateX(3px); }

/* Footer prompt */
.faq-more {
    margin-top: 1rem;
    padding: 1.5rem;
    border-radius: 4px;
    background: rgba(30, 91, 168, 0.05);
    text-align: center;
    color: var(--navy);
}
.faq-more a { color: var(--blue); font-weight: 600; text-decoration: underline; text-underline-offset: 2px; }

@media (max-width: 560px) {
    .faq-hero { padding: 2.5rem 0 1.75rem; }
    .faq-q { padding: 0.85rem 1rem; }
    .faq-a { padding: 0 1rem 1rem; }
}
@media (prefers-reduced-motion: reduce) {
    .faq-item, .faq-q__toggle-v, .faq-a__link i, .faq-search { transition: none; }
}

/* ── Answer rating widget ─────────────────────────── CR: fysh-faq-cms-2026-10-10
   Five stars across relevancy, usefulness and accuracy, shown inside an open
   answer. Revealed by faq.js so visitors without JavaScript never see a control
   that cannot submit. Content controls use the 4px radius. */
.faq-rate {
    margin-top: 1.25rem;
    padding-top: 1rem;
    border-top: 1px dashed var(--border, #E2E8F0);
}
.faq-rate__prompt {
    margin: 0 0 0.65rem;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--navy, #0F2340);
}
.faq-rate__rows { display: grid; gap: 0.5rem; }
.faq-rate__row {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-wrap: wrap;
}
.faq-rate__label {
    min-width: 92px;
    font-size: 0.8rem;
    color: var(--muted, #6B7A8D);
}
.faq-rate__stars { display: inline-flex; gap: 2px; }
.faq-star {
    display: inline-flex;
    padding: 2px;
    background: none;
    border: 0;
    line-height: 0;
    cursor: pointer;
    color: #CBD5E1;
    transition: color 0.12s ease;
}
.faq-star svg { width: 20px; height: 20px; fill: currentColor; }
.faq-star.is-on { color: var(--gold, #C9A84C); }
.faq-star:hover,
.faq-star:focus-visible { color: var(--gold, #C9A84C); outline: none; }
.faq-rate__submit {
    margin-top: 0.85rem;
    padding: 0.5rem 0.95rem;
    border: 0;
    border-radius: 4px;
    background: var(--gold, #C9A84C);
    color: var(--navy, #0F2340);
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    transition: opacity 0.12s ease;
}
.faq-rate__submit:hover { opacity: 0.9; }
.faq-rate__submit:disabled { opacity: 0.45; cursor: not-allowed; }
.faq-rate__done {
    margin: 0.75rem 0 0;
    font-size: 0.85rem;
    color: #2C3E50;
}
