/* MCash FAQ — single responsive layout (no separate mobile markup). */
:root {
    --faq-accent: #0584F8;
    --faq-accent-tint: #eaf4ff;
    --faq-text: #1a2430;
    --faq-text-muted: #5b6572;
    --faq-border: #e6e8eb;
    --faq-bg-muted: #f7f8fa;
}

.faq-wrap * { box-sizing: border-box; }

.faq-wrap {
    max-width: 1100px;
    margin: 0 auto;
    padding: 32px 20px 80px;
    /* No font-family/font-size here on purpose: this block sits inside the
       site's normal layout, so it inherits the page's real font (Poppins,
       per the poppins-heavy/title-font classes already used elsewhere)
       instead of overriding it with a generic fallback stack. */
    color: var(--faq-text);
    font-size: 19px;
}

.faq-title {
    text-align: center;
    color: var(--faq-accent);
    font-weight: 600;
    font-size: 2.4rem;
    margin: 8px 0 28px;
}

/* Search */
.faq-search-box {
    display: flex;
    align-items: center;
    border: 1px solid var(--faq-border);
    border-radius: 999px;
    padding: 6px 6px 6px 22px;
    box-shadow: 0 2px 10px rgba(5, 132, 248, 0.08);
    margin-bottom: 28px;
    transition: border-color .15s ease;
}
.faq-search-box:focus-within { border-color: var(--faq-accent); }
.faq-search-box input {
    flex: 1;
    border: none;
    outline: none;
    font-size: 1.2rem;
    padding: 10px 8px;
    background: transparent;
    color: var(--faq-text);
}
.faq-search-box input::placeholder { color: #9aa3ad; }
.faq-search-btn {
    background: var(--faq-accent);
    border: none;
    color: #fff;
    width: 42px;
    height: 42px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    flex-shrink: 0;
}
.faq-search-btn svg { width: 18px; height: 18px; }

/* Layout */
.faq-layout {
    display: grid;
    grid-template-columns: 220px 1fr;
    gap: 36px;
    align-items: start;
}

/* Sidebar (desktop) */
.faq-sidebar {
    position: sticky;
    top: 20px;
    border-right: 1px solid var(--faq-border);
    padding-right: 12px;
}
.faq-sidebar nav { display: flex; flex-direction: column; gap: 4px; }
.faq-tab-btn {
    all: unset;
    cursor: pointer;
    padding: 10px 12px;
    border-radius: 8px;
    font-size: 1.22rem;
    color: var(--faq-text-muted);
    font-weight: 500;
}
.faq-tab-btn:hover { background: var(--faq-bg-muted); color: var(--faq-text); }
.faq-tab-btn.active {
    color: var(--faq-accent);
    font-weight: 700;
    background: var(--faq-accent-tint);
}
@media (hover: hover) and (pointer: fine) {
    .faq-tab-btn:focus-visible { outline: 2px solid var(--faq-accent); outline-offset: 2px; }
}

/* Mobile tab bar (hidden on desktop) */
.faq-mobile-tabs { display: none; }

/* Panels */
.faq-panel { display: none; }
.faq-panel.active { display: block; }
.faq-panel h2 {
    font-size: 2.15rem;
    font-weight: 800;
    margin: 0 0 20px;
}

.faq-item { border-bottom: 1px solid var(--faq-border); }
.faq-item:first-child { border-top: 1px solid var(--faq-border); }
.faq-q {
    all: unset;
    box-sizing: border-box;
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    padding: 18px 4px;
    cursor: pointer;
    font-weight: 700;
    font-size: 1.38rem;
}
.faq-q:hover { color: var(--faq-accent); }
/* :focus-visible is supposed to fire only for keyboard navigation, but
   mobile Chrome/Safari's heuristic for that is unreliable on touch — a
   plain tap on this button can trigger it too, showing an unwanted blue
   outline box around whichever question was last tapped. Scoping it to
   devices with a real pointer (mouse/trackpad) keeps the outline for
   keyboard users on desktop while removing it entirely on touch. */
@media (hover: hover) and (pointer: fine) {
    .faq-q:focus-visible { outline: 2px solid var(--faq-accent); outline-offset: -2px; }
}
.faq-chev { flex-shrink: 0; transition: transform .3s cubic-bezier(0.4, 0, 0.2, 1); color: var(--faq-accent); }
.faq-item.open .faq-chev { transform: rotate(180deg); }

/* Smooth open/close regardless of content length: animating a CSS grid
   track (0fr -> 1fr) instead of a fixed max-height means the transition
   always matches the real content height exactly — a two-line answer and
   a long OTP-screenshot answer both animate at the same natural speed,
   with no snap/jump and no arbitrary max-height ceiling to bump later. */
.faq-a {
    display: grid;
    grid-template-rows: 0fr;
    transition: grid-template-rows .35s cubic-bezier(0.4, 0, 0.2, 1);
}
.faq-a-inner {
    overflow: hidden;
    min-height: 0;
    padding: 0 4px 20px;
    color: var(--faq-text-muted);
    line-height: 1.7;
    font-size: 1.22rem;
    opacity: 0;
    transition: opacity .25s ease;
}
.faq-a-inner img { max-width: 100%; height: auto; border-radius: 8px; margin-top: 6px; }
.faq-item.open .faq-a { grid-template-rows: 1fr; }
.faq-item.open .faq-a-inner { opacity: 1; transition: opacity .3s ease .08s; }

/* Search results view */
#faq-search-results { display: none; }
#faq-search-results.active { display: block; }
#faq-search-results h2 { font-size: 1.9rem; margin-bottom: 4px; }
.faq-result-meta { color: var(--faq-text-muted); font-size: 1.12rem; margin-bottom: 18px; }
.faq-result-tag {
    display: inline-block;
    font-size: .92rem;
    font-weight: 700;
    color: var(--faq-accent);
    background: var(--faq-accent-tint);
    padding: 2px 8px;
    border-radius: 999px;
    margin-bottom: 6px;
}
.faq-no-results { color: var(--faq-text-muted); padding: 20px 4px; }
.faq-wrap mark { background: #ffe28a; padding: 0 1px; border-radius: 2px; }

/* ===== Mobile ===== */
@media (max-width: 760px) {
    .faq-wrap { padding: 20px 14px 60px; }
    .faq-title { font-size: 1.7rem; margin-bottom: 18px; }
    .faq-layout { grid-template-columns: 1fr; gap: 0; }
    .faq-sidebar { display: none; }
    .faq-mobile-tabs {
        display: block;
        position: sticky;
        top: 0;
        background: #fff;
        z-index: 5;
        margin: 0 -14px 18px;
        padding: 0 14px 10px;
        border-bottom: 1px solid var(--faq-border);
    }
    .faq-mobile-tabs-scroll {
        display: flex;
        gap: 8px;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
        padding: 10px 0 2px;
    }
    .faq-mobile-tabs-scroll::-webkit-scrollbar { display: none; }
    .faq-mobile-tab-btn {
        all: unset;
        cursor: pointer;
        white-space: nowrap;
        padding: 8px 16px;
        border-radius: 999px;
        background: var(--faq-bg-muted);
        color: var(--faq-text-muted);
        font-size: 1.1rem;
        font-weight: 600;
        border: 1px solid var(--faq-border);
    }
    .faq-mobile-tab-btn.active {
        background: var(--faq-accent);
        color: #fff;
        border-color: var(--faq-accent);
    }
    .faq-panel h2 { font-size: 1.75rem; }
    .faq-q { font-size: 1.25rem; padding: 15px 2px; }
    .faq-a-inner { font-size: 1.14rem; }
}

.green {
    color: green;
}

.red {
    color: red;
}