/* ═══════════════════════════════════════════════════════════════════
   FIRST WIN — Floating Guide Panel
   Bottom-right panel matching auto-tour visual language.
   Prefix: .fw-panel
   ═══════════════════════════════════════════════════════════════════ */

/* ── 1. PANEL SHELL ──────────────────────────────────────────────── */

.fw-panel {
    position: fixed;
    right: 24px;
    bottom: 24px;
    width: 360px;
    max-width: calc(100vw - 48px);
    z-index: 2147483400;
    background: var(--surface-card, #ffffff);
    border-radius: var(--radius-lg, 18px);
    border: 1px solid var(--rule-strong, rgba(26, 24, 21, 0.12));
    box-shadow: 0 22px 60px rgba(15, 23, 42, 0.20), 0 6px 14px rgba(15, 23, 42, 0.08);
    overflow: hidden;
    animation: fw-panel-slide-in 0.30s cubic-bezier(0.2, 0.9, 0.4, 1);
    isolation: isolate;
}

.fw-panel[hidden] {
    display: none !important;
}

/* Accent bar */
.fw-panel::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--accent, #c49510) 0%, var(--accent-strong, #a97807) 100%);
    z-index: 1;
}

@keyframes fw-panel-slide-in {
    from {
        opacity: 0;
        transform: translateY(16px) scale(0.97);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* ── 2. HEADER ───────────────────────────────────────────────────── */

.fw-panel__header {
    padding: 18px 20px 14px;
    display: flex;
    align-items: flex-start;
    gap: 12px;
}

.fw-panel__progress-wrap {
    flex: 1;
    min-width: 0;
}

.fw-panel__progress-text {
    display: block;
    font-family: Inter, system-ui, sans-serif;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--ink-4, #9a9188);
    margin: 0 0 8px;
}

.fw-panel__progress-track {
    height: 5px;
    border-radius: 999px;
    background: var(--rule, rgba(26, 24, 21, 0.08));
    overflow: hidden;
}

.fw-panel__progress-fill {
    height: 100%;
    width: 0;
    background: linear-gradient(90deg, var(--accent, #c49510), var(--accent-strong, #a97807));
    border-radius: 999px;
    transition: width 0.32s ease;
    box-shadow: 0 0 8px rgba(196, 149, 16, 0.42);
}

.fw-panel__close {
    width: 30px;
    height: 30px;
    border-radius: 999px;
    border: 0;
    background: var(--rule, rgba(26, 24, 21, 0.08));
    color: var(--ink-3, #6b6458);
    font-size: 18px;
    line-height: 1;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: background 0.15s ease, color 0.15s ease;
}

.fw-panel__close:hover {
    background: var(--rule-strong, rgba(26, 24, 21, 0.12));
    color: var(--ink, #1a1815);
}

/* ── 3. BODY ─────────────────────────────────────────────────────── */

.fw-panel__body {
    padding: 4px 20px 18px;
    transition: opacity 0.18s ease, transform 0.18s ease;
}

.fw-panel__body.is-fading {
    opacity: 0;
    transform: translateY(6px);
}

.fw-panel__eyebrow {
    margin: 0 0 8px;
    font-family: 'Space Grotesk', system-ui, sans-serif;
    font-size: 10.5px;
    font-weight: 800;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--accent-strong, #a97807);
}

.fw-panel__title {
    margin: 0 0 10px;
    font-family: 'Space Grotesk', system-ui, sans-serif;
    font-size: 17px;
    font-weight: 700;
    letter-spacing: -0.012em;
    line-height: 1.22;
    color: var(--ink, #1a1815);
}

.fw-panel__copy {
    margin: 0;
    font-size: 13.5px;
    line-height: 1.58;
    color: var(--ink-3, #6b6458);
}

/* Download area — shown on the final step */
.fw-panel__download {
    margin: 14px 0 0;
    padding: 14px 16px;
    background: var(--surface-subtle, #f2efe9);
    border: 1px solid var(--rule, rgba(26, 24, 21, 0.08));
    border-radius: var(--radius-sm, 8px);
    display: flex;
    align-items: center;
    gap: 10px;
}

.fw-panel__download[hidden] {
    display: none !important;
}

.fw-panel__download .btn {
    flex-shrink: 0;
}

.fw-panel__download-text {
    font-size: 12.5px;
    font-weight: 500;
    color: var(--ink-3, #6b6458);
    flex: 1;
    min-width: 0;
}

/* ── 4. FOOTER ───────────────────────────────────────────────────── */

.fw-panel__footer {
    padding: 14px 20px 18px;
    border-top: 1px solid var(--rule, rgba(26, 24, 21, 0.08));
    background: rgba(26, 24, 21, 0.02);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    flex-wrap: wrap;
}

.fw-panel__nav {
    display: flex;
    gap: 8px;
    margin-left: auto;
}

.fw-panel__btn {
    min-height: 38px;
    padding: 0 14px;
    font-size: 13px;
    font-weight: 600;
    gap: 6px;
}

.fw-panel__btn--skip {
    padding: 0 12px;
    font-size: 12px;
    font-weight: 500;
}

.fw-panel__btn[disabled] {
    opacity: 0.5 !important;
    cursor: not-allowed !important;
}

/* ── 5. DARK MODE ────────────────────────────────────────────────── */

html[data-theme="dark"] .fw-panel {
    background: var(--card, #0f172a);
    border-color: rgba(148, 163, 184, 0.22);
    box-shadow: 0 22px 60px rgba(0, 0, 0, 0.40), 0 6px 14px rgba(0, 0, 0, 0.20);
}

html[data-theme="dark"] .fw-panel::before {
    background: linear-gradient(90deg, #e3b008 0%, var(--accent-strong, #a97807) 100%);
}

html[data-theme="dark"] .fw-panel__close {
    background: rgba(71, 85, 105, 0.32);
    color: rgba(148, 163, 184, 0.72);
}

html[data-theme="dark"] .fw-panel__close:hover {
    background: rgba(71, 85, 105, 0.52);
    color: rgba(226, 232, 240, 0.88);
}

html[data-theme="dark"] .fw-panel__footer {
    background: rgba(15, 23, 42, 0.55);
    border-top-color: rgba(71, 85, 105, 0.32);
}

html[data-theme="dark"] .fw-panel__download {
    background: rgba(15, 23, 42, 0.42);
    border-color: rgba(71, 85, 105, 0.32);
}

html[data-theme="dark"] .fw-panel__eyebrow {
    color: #e3b008;
}

/* ── 6. MOBILE (≤900px) ─────────────────────────────────────────── */

@media (max-width: 900px) {
    .fw-panel {
        left: 12px;
        right: 12px;
        bottom: 12px;
        width: auto;
        max-width: none;
        border-radius: var(--radius-md, 12px);
    }

    .fw-panel__header {
        padding: 16px 16px 12px;
    }

    .fw-panel__body {
        padding: 2px 16px 14px;
    }

    .fw-panel__footer {
        padding: 12px 16px calc(14px + env(safe-area-inset-bottom, 0px));
    }

    .fw-panel__btn {
        min-height: 40px;
    }

    .fw-panel__download {
        flex-direction: column;
        align-items: stretch;
    }

    .fw-panel__download .btn {
        width: 100%;
        min-height: 40px;
        justify-content: center;
    }
}

/* ── 7. BANNER (kept from original — minor adjustments) ──────────
   .first-win-banner rules remain in style.css.
   Only new panel CSS lives in this file.
   ─────────────────────────────────────────────────────────────── */
