/* ============================================================
   Gadfly Tour Engine — overlay, spotlight ring, step card
   Uses CSS vars so themes work:
     --color-primary  (brand maroon)
     --color-accent   (brand gold)
   ============================================================ */

/* ---- Overlay dim panels (4 panels surround the spotlight) ---- */
.tour-panel {
    position: fixed;
    background: rgba(31, 30, 29, 0.55);
    backdrop-filter: blur(3px);
    -webkit-backdrop-filter: blur(3px);
    z-index: 200;
    pointer-events: auto;
}

/* ---- Highlight ring around the focused element ---- */
.tour-ring {
    position: fixed;
    z-index: 201;
    border-radius: 0.75rem;
    pointer-events: none;
    box-shadow:
        0 0 0 2px var(--color-accent, #dbc68f),
        0 0 0 6px rgba(219, 198, 143, 0.25);
    transition: top 0.18s ease, left 0.18s ease, width 0.18s ease, height 0.18s ease;
}

/* ---- Click-through advance button (covers highlight area) ---- */
.tour-click-target {
    position: fixed;
    z-index: 201;
    background: transparent;
    cursor: pointer;
    border: none;
    padding: 0;
}

/* ---- Full-screen dim for no-spotlight steps ---- */
.tour-fullscreen-dim {
    position: fixed;
    inset: 0;
    background: rgba(31, 30, 29, 0.55);
    backdrop-filter: blur(3px);
    -webkit-backdrop-filter: blur(3px);
    z-index: 200;
}

/* ---- Step card ---- */
.tour-card {
    position: fixed;
    z-index: 202;
    width: 332px;
}

.tour-card-inner {
    border-radius: 1rem;
    background: white;
    box-shadow: 0 20px 60px -20px rgba(31, 30, 29, 0.6);
    border: 1px solid rgba(44, 42, 41, 0.1);
    overflow: hidden;
    animation: tourCardIn 0.18s ease-out both;
}

@keyframes tourCardIn {
    from {
        opacity: 0;
        transform: translateY(6px) scale(0.98);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

@media (prefers-reduced-motion: reduce) {
    @keyframes tourCardIn {
        from { opacity: 0; }
        to   { opacity: 1; }
    }
}

/* ---- Card progress bar ---- */
.tour-progress-track {
    height: 4px;
    width: 100%;
    background: rgba(44, 42, 41, 0.08);
}

.tour-progress-fill {
    height: 100%;
    background: var(--color-primary, #800020);
    transition: width 0.25s ease;
}

/* ---- Card body ---- */
.tour-card-body {
    padding: 1.25rem;
}

.tour-card-toprow {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 0.5rem;
}

.tour-kicker {
    font-family: var(--font-sans, sans-serif);
    font-size: 10.5px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.14em;
    color: #a07820;
    white-space: nowrap;
}

.tour-close-btn {
    color: #b5b3b1;
    background: transparent;
    border: none;
    padding: 0.125rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 0.25rem;
    transition: color 0.15s;
    margin-right: -0.25rem;
}

.tour-close-btn:hover {
    color: #2c2a29;
}

.tour-title {
    font-family: var(--font-display, serif);
    font-size: 19px;
    line-height: 1.3;
    color: #2c2a29;
    margin: 0 0 0.375rem;
}

.tour-body {
    font-family: var(--font-sans, sans-serif);
    font-size: 13.5px;
    line-height: 1.6;
    color: #6b6968;
    margin: 0;
}

/* ---- Card footer (navigation row) ---- */
.tour-card-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 1.25rem;
}

.tour-skip-btn {
    font-family: var(--font-sans, sans-serif);
    font-size: 12.5px;
    font-weight: 500;
    color: #a5a3a1;
    background: transparent;
    border: none;
    cursor: pointer;
    white-space: nowrap;
    transition: color 0.15s;
    padding: 0;
}

.tour-skip-btn:hover {
    color: #2c2a29;
}

.tour-nav-btns {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.tour-back-btn {
    font-family: var(--font-sans, sans-serif);
    font-size: 12.5px;
    font-weight: 500;
    color: #4a4846;
    background: transparent;
    border: 1px solid rgba(44, 42, 41, 0.15);
    border-radius: 0.5rem;
    padding: 0.375rem 0.75rem;
    cursor: pointer;
    white-space: nowrap;
    transition: color 0.15s, border-color 0.15s;
}

.tour-back-btn:hover {
    color: var(--color-primary, #800020);
    border-color: rgba(128, 0, 32, 0.4);
}

.tour-next-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    font-family: var(--font-sans, sans-serif);
    font-size: 12.5px;
    font-weight: 700;
    color: white;
    background: var(--color-primary, #800020);
    border: none;
    border-radius: 0.5rem;
    padding: 0.375rem 0.875rem;
    cursor: pointer;
    white-space: nowrap;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
    transition: opacity 0.15s;
}

.tour-next-btn:hover {
    opacity: 0.88;
}

/* ---- Toggle button (in TopBar) active state ---- */
#tour-toggle-btn[data-active="true"] {
    background: rgba(219, 198, 143, 0.25);
    border-color: rgba(219, 198, 143, 0.5);
}
