/* Guided Tour UI — bottom-docked panel + highlight ring */

/* ── Help button in header ─────────────────────────────── */

.tour-help-btn {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: none;
    background: var(--sage);
    color: var(--white);
    font-family: var(--font-heading);
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s, box-shadow 0.2s;
    flex-shrink: 0;
}

.tour-help-btn:hover {
    background: var(--charcoal);
}

.tour-help-btn--pulse {
    animation: tour-pulse 2s ease-in-out 3;
}

@keyframes tour-pulse {
    0%, 100% { box-shadow: 0 0 0 0 rgba(201, 169, 110, 0); }
    50% { box-shadow: 0 0 0 6px rgba(201, 169, 110, 0.4); }
}

/* ── Launcher modal (tour list) ────────────────────────── */

.tour-launcher-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.tour-launcher-item {
    padding: 0.75rem 1rem;
    border-bottom: 1px solid var(--sand-light);
    cursor: pointer;
    transition: background 0.15s;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
}

.tour-launcher-item:last-child { border-bottom: none; }

.tour-launcher-item:hover { background: var(--cream); }

.tour-launcher-item--current {
    border-left: 4px solid var(--gold);
    padding-left: calc(1rem - 4px);
}

.tour-launcher-meta {
    flex: 1;
    min-width: 0;
}

.tour-launcher-title {
    font-weight: 600;
    font-size: 0.95rem;
    color: var(--charcoal);
}

.tour-launcher-desc {
    font-size: 0.8rem;
    color: var(--charcoal-light);
    margin-top: 0.15rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.tour-launcher-status {
    font-size: 0.75rem;
    padding: 0.2rem 0.5rem;
    border-radius: var(--radius);
    white-space: nowrap;
    flex-shrink: 0;
}

.tour-launcher-status--new { background: var(--sand-light); color: var(--charcoal-light); }
.tour-launcher-status--resume { background: var(--gold-light); color: var(--charcoal); }
.tour-launcher-status--done { background: #d4edd4; color: var(--green-muted); }

/* ── Bottom panel ──────────────────────────────────────── */

.tour-panel {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 250;
    background: var(--white);
    border-top: 3px solid var(--sand);
    box-shadow: 0 -4px 16px rgba(0, 0, 0, 0.1);
    font-family: var(--font-body);
    transition: max-height 0.25s ease;
}

.tour-panel--minimized {
    max-height: 48px;
    overflow: hidden;
}

.tour-panel--expanded {
    max-height: 200px;
    overflow-y: auto;
}

/* Progress bar */
.tour-progress {
    height: 3px;
    background: var(--sand-light);
}

.tour-progress-bar {
    height: 100%;
    background: var(--sage);
    transition: width 0.3s ease;
}

/* Header bar (always visible in minimized state) */
.tour-bar {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0 1rem;
    height: 45px;
    cursor: pointer;
}

.tour-step-indicator {
    font-size: 0.7rem;
    color: var(--charcoal-light);
    white-space: nowrap;
    min-width: 5rem;
}

.tour-step-title {
    flex: 1;
    font-weight: 600;
    font-size: 0.85rem;
    color: var(--charcoal);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.tour-bar-chevron {
    font-size: 0.8rem;
    color: var(--charcoal-light);
    transition: transform 0.2s;
    flex-shrink: 0;
}

.tour-panel--expanded .tour-bar-chevron {
    transform: rotate(180deg);
}

/* Navigation buttons in the bar */
.tour-nav {
    display: flex;
    gap: 0.4rem;
    flex-shrink: 0;
}

.tour-nav-btn {
    padding: 0.25rem 0.6rem;
    font-size: 0.75rem;
    border: 1px solid var(--sand);
    background: var(--white);
    color: var(--charcoal);
    border-radius: var(--radius);
    cursor: pointer;
    font-family: var(--font-body);
    transition: background 0.15s;
}

.tour-nav-btn:hover { background: var(--cream); }

.tour-nav-btn--primary {
    background: var(--sage);
    color: var(--white);
    border-color: var(--sage);
}

.tour-nav-btn--primary:hover { background: var(--charcoal); border-color: var(--charcoal); }

.tour-nav-btn--end {
    color: var(--charcoal-light);
    border-color: transparent;
    background: transparent;
}

.tour-nav-btn--end:hover { background: var(--red-light); color: var(--red-muted); }

/* Expanded body content */
.tour-body {
    padding: 0.5rem 1rem 0.75rem;
}

.tour-section {
    margin-bottom: 0.5rem;
}

.tour-section summary {
    font-weight: 500;
    font-size: 0.8rem;
    color: var(--charcoal-light);
    cursor: pointer;
    padding: 0.2rem 0;
}

.tour-section-content {
    font-size: 0.82rem;
    line-height: 1.55;
    color: var(--charcoal);
}

.tour-section-content p { margin: 0.3rem 0; }
.tour-section-content ul { margin: 0.3rem 0 0.3rem 1.2rem; }
.tour-section-content li { margin: 0.15rem 0; }

/* Action section is always visible (not inside details) */
.tour-action {
    font-size: 0.82rem;
    line-height: 1.55;
    color: var(--charcoal);
    margin-bottom: 0.4rem;
}

.tour-action p { margin: 0.3rem 0; }

/* Explanation boxes */
.tour-explanation {
    border-left: 4px solid var(--gold);
    background: var(--sand-light);
    padding: 0.5rem 0.75rem;
    border-radius: 0 var(--radius) var(--radius) 0;
    margin: 0.4rem 0;
    font-size: 0.8rem;
}

.tour-explanation summary {
    font-weight: 600;
    font-size: 0.8rem;
    color: var(--charcoal);
    cursor: pointer;
}

.tour-explanation p { margin: 0.2rem 0; }

/* Target missing note */
.tour-target-note {
    font-style: italic;
    font-size: 0.75rem;
    color: var(--charcoal-light);
    margin-top: 0.3rem;
}

/* ── Highlight ring ────────────────────────────────────── */

.tour-highlight {
    box-shadow: 0 0 0 4px var(--gold), 0 0 16px rgba(201, 169, 110, 0.3) !important;
    border-radius: var(--radius);
    position: relative;
    z-index: 10;
    transition: box-shadow 0.3s ease;
}

/* ── Summary view (end of tour) ────────────────────────── */

.tour-summary {
    padding: 0.75rem 1rem;
    font-size: 0.82rem;
}

.tour-summary h4 {
    font-size: 0.85rem;
    margin: 0.5rem 0 0.25rem;
    color: var(--charcoal);
}

.tour-summary h4:first-child { margin-top: 0; }

.tour-summary ul {
    margin: 0.25rem 0 0.25rem 1.2rem;
    padding: 0;
}

.tour-summary li { margin: 0.15rem 0; }

.tour-next-tours {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
    margin-top: 0.5rem;
}

.tour-next-link {
    padding: 0.3rem 0.6rem;
    font-size: 0.75rem;
    border: 1px solid var(--sand);
    border-radius: var(--radius);
    background: var(--white);
    color: var(--charcoal);
    cursor: pointer;
    font-family: var(--font-body);
    text-decoration: none;
    transition: background 0.15s;
}

.tour-next-link:hover { background: var(--cream); }

/* ── Print: hide everything ────────────────────────────── */

@media print {
    .tour-panel,
    .tour-help-btn { display: none !important; }
}
