/* ── Smart FAQ — Frontend Styles (Velocity palette) ─────────────────────── */

.smart-faq-wrap {
    /* ── Dark theme (default, matches Velocity brand) ── */
    --faq-accent:      #d4943a;
    --faq-accent-lt:   #f0b95e;
    --faq-bg:          rgba(18, 32, 48, 0.96);
    --faq-border:      rgba(255, 255, 255, 0.10);
    --faq-text:        rgba(255, 255, 255, 0.92);
    --faq-muted:       rgba(255, 255, 255, 0.55);
    --faq-hover:       rgba(212, 148, 58, 0.06);
    --faq-open-bg:     rgba(212, 148, 58, 0.10);
    --faq-cat-color:   #f0b95e;
    --faq-radius:      12px;
    --faq-transition:  .26s cubic-bezier(.4, 0, .2, 1);

    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    max-width: 780px;
    margin: 0 auto;
}

/* ── Light override ── */
.smart-faq-wrap[data-theme="light"] {
    --faq-accent:      #c4831f;
    --faq-accent-lt:   #d4943a;
    --faq-bg:          #ffffff;
    --faq-border:      #e8e8e8;
    --faq-text:        #1d2327;
    --faq-muted:       #5a6472;
    --faq-hover:       transparent;
    --faq-open-bg:     #fafafa;
    --faq-cat-color:   #c4831f;
}

/* ── Category heading ── */
.smart-faq-category {
    font-size: var(--faq-c-size, 11px);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .10em;
    color: var(--faq-cat-color);
    margin: 32px 0 10px;
    padding-bottom: 8px;
    border-bottom: 1px solid var(--faq-border);
}

/* ── List container ── */
.smart-faq-list {
    background: var(--faq-bg);
    border: 1px solid var(--faq-border);
    border-top: 3px solid var(--faq-accent);
    border-radius: var(--faq-radius);
    overflow: hidden;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.08);
}

.smart-faq-item {
    border-bottom: 1px solid var(--faq-border);
}
.smart-faq-item:last-child {
    border-bottom: none;
}

/* ── Question button ── */
.smart-faq-question {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 18px 22px;
    background: transparent;
    border: none;
    cursor: pointer;
    text-align: left;
    font-family: inherit;
    font-size: var(--faq-q-size, 15px);
    font-weight: 600;
    color: var(--faq-text);
    transition: background var(--faq-transition), color var(--faq-transition);
    line-height: 1.4;
}
.smart-faq-question:hover {
    background: var(--faq-hover);
}
/* Light theme: no background on hover, just accent the chevron */
.smart-faq-wrap[data-theme="light"] .smart-faq-question:hover {
    background: transparent;
}
.smart-faq-wrap[data-theme="light"] .smart-faq-question:hover .smart-faq-icon {
    opacity: 1;
}
.smart-faq-question[aria-expanded="true"] {
    background: var(--faq-open-bg);
    color: var(--faq-accent);
}

.smart-faq-question span { flex: 1; }

/* ── Chevron ── */
.smart-faq-icon {
    flex-shrink: 0;
    width: 18px;
    height: 18px;
    color: var(--faq-accent);
    opacity: .7;
    transition: transform var(--faq-transition), opacity var(--faq-transition);
}
.smart-faq-question[aria-expanded="true"] .smart-faq-icon {
    transform: rotate(180deg);
    opacity: 1;
}

/* ── Answer panel ── */
.smart-faq-answer {
    overflow: hidden;
    max-height: 0;
    transition: max-height var(--faq-transition);
    background: var(--faq-open-bg);
}
.smart-faq-answer.is-open {
    max-height: 1200px;
}

.smart-faq-answer-inner {
    padding: 4px 22px 20px;
    font-size: var(--faq-a-size, 14.5px);
    line-height: 1.75;
    color: var(--faq-muted);
}
.smart-faq-answer-inner p            { margin: 0 0 10px; }
.smart-faq-answer-inner p:last-child { margin: 0; }
.smart-faq-answer-inner a            { color: var(--faq-accent-lt); }
.smart-faq-answer-inner a:hover      { text-decoration: underline; }
.smart-faq-answer-inner strong       { color: var(--faq-text); }
.smart-faq-answer-inner code {
    background: rgba(212, 148, 58, 0.14);
    color: var(--faq-accent-lt);
    padding: 1px 7px;
    border-radius: 4px;
    font-size: 13px;
    font-family: "SF Mono", Consolas, monospace;
}
.smart-faq-answer-inner ul,
.smart-faq-answer-inner ol {
    margin: 0 0 10px 20px;
}

/* light theme adjustments for open answer bg */
.smart-faq-wrap[data-theme="light"] .smart-faq-answer {
    background: #fafafa;
}

/* light theme adjustments for code */
.smart-faq-wrap[data-theme="light"] .smart-faq-answer-inner code {
    background: #fef3e0;
    color: #8a5c0a;
}

.smart-faq-empty {
    color: rgba(255,255,255,0.40);
    font-style: italic;
}

/* ── Override theme's global button:hover / button:focus rule ──────────────
   Some themes apply background-color:#c36; color:#fff to all button:hover.
   We re-assert our own values with higher specificity + !important to win.  */
.smart-faq-wrap .smart-faq-question:hover,
.smart-faq-wrap .smart-faq-question:focus {
    background-color: transparent !important;
    color: var(--faq-text) !important;
    text-decoration: none !important;
}
/* Keep expanded state intact when hovered/focused */
.smart-faq-wrap .smart-faq-question[aria-expanded="true"]:hover,
.smart-faq-wrap .smart-faq-question[aria-expanded="true"]:focus {
    background-color: var(--faq-open-bg) !important;
    color: var(--faq-accent) !important;
}
/* Light theme open state */
.smart-faq-wrap[data-theme="light"] .smart-faq-question[aria-expanded="true"]:hover,
.smart-faq-wrap[data-theme="light"] .smart-faq-question[aria-expanded="true"]:focus {
    background-color: #fafafa !important;
    color: var(--faq-accent) !important;
}
