/* FAQ page styles. Loaded after centfx.css. */

.faq-page {
    --faq-text: #0b1020;
    --faq-muted: #475569;
    --faq-answer: #334155;
    --faq-num: #94a3b8;
    --faq-card: #fff;
    --faq-card-open: #fff;
    --faq-line: rgba(15, 23, 42, 0.09);
    --faq-line-hover: rgba(11, 155, 204, 0.35);
    --faq-chip: rgba(15, 23, 42, 0.04);
    --faq-chip-line: rgba(15, 23, 42, 0.1);
    --faq-accent: #0b9bcc;
    --faq-accent-soft: rgba(11, 155, 204, 0.1);
    --faq-glow: rgba(21, 206, 255, 0.12);
    position: relative;
    isolation: isolate;
    padding: 8.5rem 0 0;
}
[data-bs-theme="dark"] .faq-page {
    --faq-text: #fff;
    --faq-muted: #a9b3bf;
    --faq-answer: #c8d1dc;
    --faq-num: #5b6b7d;
    --faq-card: #0b0c0e;
    --faq-card-open: #0b0e12;
    --faq-line: rgba(255, 255, 255, 0.08);
    --faq-line-hover: rgba(21, 206, 255, 0.35);
    --faq-chip: rgba(255, 255, 255, 0.04);
    --faq-chip-line: rgba(255, 255, 255, 0.1);
    --faq-accent: #15ceff;
    --faq-accent-soft: rgba(21, 206, 255, 0.12);
    --faq-glow: rgba(21, 206, 255, 0.16);
}

/* backdrop: cyan glow from the top plus a faint grid that fades out */
.faq-page::before {
    content: "";
    position: absolute;
    z-index: -1;
    inset: 0 0 auto;
    height: 620px;
    pointer-events: none;
    background: radial-gradient(ellipse 45% 60% at 30% 0%, var(--faq-glow), transparent 70%),
        radial-gradient(ellipse 30% 45% at 85% 5%, rgba(45, 212, 191, 0.07), transparent 70%);
}
.faq-page::after {
    content: "";
    position: absolute;
    z-index: -1;
    inset: 0 0 auto;
    height: 520px;
    pointer-events: none;
    background-image: linear-gradient(var(--faq-line) 1px, transparent 1px),
        linear-gradient(90deg, var(--faq-line) 1px, transparent 1px);
    background-size: 56px 56px;
    -webkit-mask-image: radial-gradient(ellipse 70% 80% at 30% 0%, #000, transparent 75%);
    mask-image: radial-gradient(ellipse 70% 80% at 30% 0%, #000, transparent 75%);
    opacity: 0.6;
}

/* ───────── Layout: intro left, questions right ───────── */
.faq-layout {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}
.faq-aside {
    display: contents;
}
.faq-head {
    order: 1;
}
.faq-list {
    order: 2;
}
.faq-help {
    order: 3;
}
@media (min-width: 992px) {
    .faq-layout {
        display: grid;
        grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
        column-gap: clamp(2.5rem, 5vw, 5rem);
        align-items: start;
    }
    .faq-aside {
        display: flex;
        flex-direction: column;
        gap: 1.5rem;
        position: sticky;
        top: 110px;
    }
}

/* ───────── Intro, search and topic chips ───────── */
.faq-title {
    margin: 1rem 0 0.85rem;
    font-size: clamp(2.1rem, 4.2vw, 3.1rem);
    font-weight: 600;
    line-height: 1.06;
    letter-spacing: -0.018em;
    color: var(--faq-text);
}
.faq-title span {
    background: linear-gradient(90deg, #15ceff, #2dd4bf);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}
.faq-sub {
    max-width: 420px;
    margin: 0 0 1.75rem;
    font-size: 1.05rem;
    line-height: 1.6;
    color: var(--faq-muted);
}

.faq-search {
    position: relative;
    display: block;
    margin: 0 0 1rem;
}
.faq-search i {
    position: absolute;
    top: 50%;
    left: 1.1rem;
    transform: translateY(-50%);
    font-size: 1.2rem;
    color: var(--faq-muted);
    pointer-events: none;
}
.faq-search input {
    width: 100%;
    height: 52px;
    padding: 0 1.1rem 0 2.9rem;
    border-radius: 14px;
    border: 1px solid var(--faq-chip-line);
    background: var(--faq-chip);
    color: var(--faq-text);
    font-size: 0.98rem;
    outline: none;
    transition:
        border-color 0.2s,
        box-shadow 0.2s,
        background-color 0.2s;
}
.faq-search input::placeholder {
    color: var(--faq-muted);
    opacity: 0.8;
}
.faq-search input:focus {
    border-color: var(--faq-accent);
    box-shadow: 0 0 0 4px var(--faq-accent-soft);
}

.faq-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}
.faq-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    padding: 0.5rem 0.95rem;
    border-radius: 999px;
    border: 1px solid var(--faq-chip-line);
    background: var(--faq-chip);
    color: var(--faq-muted);
    font-size: 0.88rem;
    font-weight: 600;
    white-space: nowrap;
    transition:
        color 0.2s,
        border-color 0.2s,
        background-color 0.2s;
}
.faq-chip span {
    display: inline-grid;
    place-items: center;
    min-width: 1.35rem;
    height: 1.35rem;
    padding: 0 0.35rem;
    border-radius: 999px;
    font-size: 0.72rem;
    background: var(--faq-chip-line);
}
.faq-chip:hover {
    color: var(--faq-text);
    border-color: var(--faq-line-hover);
}
.faq-chip.is-active {
    color: #fff;
    border-color: transparent;
    background: linear-gradient(135deg, #15ceff 0%, #0b9bcc 55%, #1b4f63 100%) border-box; /* border-box: the gradient covers the border too */
    box-shadow: 0 8px 20px -10px rgba(21, 206, 255, 0.7);
}
.faq-chip.is-active span {
    background: rgba(255, 255, 255, 0.22);
}
.faq-chip:focus-visible,
.faq-item .accordion-button:focus-visible {
    outline: 2px solid var(--faq-accent);
    outline-offset: 2px;
}

/* ───────── Questions ───────── */
.faq-page .accordion {
    --bs-accordion-bg: transparent;
    --bs-accordion-border-width: 0;
    display: grid;
    gap: 0.75rem;
}
.faq-item {
    position: relative;
    overflow: hidden;
    border-radius: 1.1rem !important;
    border: 1px solid var(--faq-line) !important;
    background: var(--faq-card) !important;
    transition:
        border-color 0.3s,
        background-color 0.3s,
        box-shadow 0.3s;
}
.faq-item:hover {
    border-color: var(--faq-line-hover) !important;
}
/* open question: gradient hairline border and a soft glow */
.faq-item:has(.accordion-collapse.show) {
    border-color: transparent !important;
    background:
        linear-gradient(var(--faq-card-open), var(--faq-card-open)) padding-box,
        linear-gradient(135deg, rgba(21, 206, 255, 0.65), rgba(45, 212, 191, 0.2) 55%, var(--faq-line)) border-box !important;
    box-shadow: 0 18px 40px -24px rgba(21, 206, 255, 0.45);
}

.faq-item .accordion-button {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1.3rem 1.4rem;
    background: transparent !important;
    box-shadow: none !important;
    color: var(--faq-text) !important;
    font-size: 1.05rem;
    font-weight: 600;
    line-height: 1.4;
    text-align: left;
}
.faq-item .accordion-button::after {
    display: none;
} /* the theme's chevron is replaced by .faq-ico */
.faq-num {
    flex-shrink: 0;
    width: 2rem;
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    color: var(--faq-num);
    font-variant-numeric: tabular-nums;
    transition: color 0.3s;
}
.faq-q {
    flex: 1;
    min-width: 0;
}
.faq-item .accordion-button:not(.collapsed) .faq-num {
    color: var(--faq-accent);
}

/* plus that turns into a cross when open */
.faq-ico {
    position: relative;
    flex-shrink: 0;
    width: 2.2rem;
    height: 2.2rem;
    border-radius: 50%;
    border: 1px solid var(--faq-chip-line);
    background: var(--faq-chip);
    transition:
        transform 0.35s cubic-bezier(0.2, 0.8, 0.2, 1),
        background 0.3s,
        border-color 0.3s;
}
.faq-ico::before,
.faq-ico::after {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0.8rem;
    height: 2px;
    margin: -1px 0 0 -0.4rem;
    border-radius: 2px;
    background: var(--faq-text);
    transition: background 0.3s;
}
.faq-ico::after {
    transform: rotate(90deg);
}
.faq-item .accordion-button:not(.collapsed) .faq-ico {
    transform: rotate(135deg);
    border-color: transparent;
    background: linear-gradient(135deg, #15ceff, #0b9bcc);
    box-shadow: 0 6px 16px -4px rgba(21, 206, 255, 0.6);
}
.faq-item .accordion-button:not(.collapsed) .faq-ico::before,
.faq-item .accordion-button:not(.collapsed) .faq-ico::after {
    background: #fff;
}

.faq-item .accordion-body {
    padding: 0 4.6rem 1.4rem 4.4rem;
    font-size: 0.98rem;
    line-height: 1.75;
    color: var(--faq-answer);
}
.faq-item .accordion-body p {
    margin: 0;
}

/* no results */
.faq-empty {
    padding: 2.5rem 1.5rem;
    text-align: center;
    border: 1px dashed var(--faq-chip-line);
    border-radius: 1.1rem;
    color: var(--faq-muted);
}
.faq-empty i {
    display: block;
    margin-bottom: 0.5rem;
    font-size: 2rem;
    color: var(--faq-accent);
}
.faq-empty b {
    display: block;
    margin-bottom: 0.25rem;
    color: var(--faq-text);
    font-size: 1.05rem;
}
.faq-empty p {
    margin: 0;
}
.faq-empty a {
    color: var(--faq-accent);
}

/* ───────── Support card ───────── */
.faq-help {
    padding: 1.4rem 1.5rem;
    border-radius: 1.25rem;
    border: 1px solid var(--faq-line);
    background: var(--faq-card);
}
.faq-help-head {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 0.5rem;
}
.faq-help-ico {
    display: inline-grid;
    place-items: center;
    width: 38px;
    height: 38px;
    border-radius: 11px;
    font-size: 1.2rem;
    color: var(--faq-accent);
    background: var(--faq-accent-soft);
}
.faq-help-head b {
    font-size: 1.08rem;
    color: var(--faq-text);
}
.faq-help > p {
    margin: 0 0 1.1rem;
    font-size: 0.93rem;
    line-height: 1.6;
    color: var(--faq-muted);
}
.faq-help-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.75rem 1.25rem;
}
.faq-help-link {
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--faq-accent);
    text-decoration: none;
}
.faq-help-link:hover {
    text-decoration: underline;
}

/* ───────── Phones ───────── */
@media (max-width: 991.98px) {
    .faq-page {
        padding: 7rem 0 0;
    }
    .faq-head {
        text-align: center;
    }
    .faq-sub {
        margin-inline: auto;
    }
    /* chips scroll sideways in one row instead of wrapping */
    .faq-chips {
        flex-wrap: nowrap;
        justify-content: flex-start;
        overflow-x: auto;
        /* scrolling clips anything outside the row, so leave room for the active chip's glow
           and pull the row back by the same amount so the spacing around it stays the same */
        margin: -0.4rem -1rem -1rem;
        padding: 0.4rem 1rem 1.25rem;
        scrollbar-width: none;
    }
    .faq-chips::-webkit-scrollbar {
        display: none;
    }
}
@media (max-width: 575.98px) {
    .faq-item .accordion-button {
        gap: 0.75rem;
        padding: 1.1rem 1rem;
        font-size: 0.98rem;
    }
    .faq-num {
        width: 1.6rem;
    }
    .faq-item .accordion-body {
        padding: 0 1rem 1.2rem 3.35rem;
        font-size: 0.94rem;
    }
    .faq-ico {
        width: 2rem;
        height: 2rem;
    }
}
@media (prefers-reduced-motion: reduce) {
    .faq-item,
    .faq-ico {
        transition: none;
    }
}
