/* static/css/tour.css */
/* Styles for Onboarding Tour Overlay and Dialog (Light and Dark Mode) */

.tour-overlay {
    position: fixed;
    inset: 0;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(3, 7, 18, 0.75);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    padding: 1rem;
    transition: opacity 0.2s ease, visibility 0.2s ease;
}

.tour-overlay.hidden {
    display: none !important;
}

.tour-modal {
    position: relative;
    width: 100%;
    max-width: 480px;
    background: #0f172a;
    color: #f8fafc;
    border: 1px solid #1e293b;
    border-radius: 1rem;
    padding: 1.5rem;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.5), 0 8px 10px -6px rgba(0, 0, 0, 0.5), 0 0 20px rgba(0, 245, 255, 0.15);
    animation: tourModalFadeIn 0.25s ease-out;
}

@keyframes tourModalFadeIn {
    from {
        opacity: 0;
        transform: scale(0.95) translateY(10px);
    }
    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

.tour-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1.25rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid #1e293b;
}

.tour-header-left {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.tour-title-badge {
    display: inline-flex;
    align-items: center;
    padding: 0.25rem 0.6rem;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    background: rgba(192, 199, 209, 0.15);
    color: var(--xmas-primary, #C0C7D1);
    border: 1px solid rgba(154, 164, 178, 0.35);
}

.tour-counter {
    font-size: 0.8125rem;
    font-weight: 600;
    color: #94a3b8;
}

.tour-skip-btn {
    background: transparent;
    border: none;
    color: #94a3b8;
    font-size: 0.8125rem;
    font-weight: 600;
    cursor: pointer;
    padding: 0.35rem 0.65rem;
    border-radius: 0.5rem;
    transition: color 0.15s ease, background-color 0.15s ease;
}

.tour-skip-btn:hover {
    color: #f1f5f9;
    background-color: rgba(255, 255, 255, 0.06);
}

.tour-body {
    min-height: 80px;
    display: flex;
    align-items: center;
    margin-bottom: 1.5rem;
}

.tour-step-text {
    font-size: 0.95rem;
    line-height: 1.6;
    color: #e2e8f0;
    margin: 0;
}

.tour-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    padding-top: 0.75rem;
    border-top: 1px solid #1e293b;
}

.tour-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.6rem 1.25rem;
    border-radius: 0.75rem;
    font-size: 0.875rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.15s ease;
    border: none;
}

.tour-btn-back {
    background: #1e293b;
    color: #cbd5e1;
    border: 1px solid #334155;
}

.tour-btn-back:hover:not(:disabled) {
    background: #334155;
    color: #ffffff;
}

.tour-btn-back:disabled,
.tour-btn-back.disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

.tour-btn-next {
    margin-left: auto;
    background: linear-gradient(135deg, var(--xmas-primary, #C0C7D1) 0%, var(--xmas-accent, #9AA4B2) 100%);
    color: var(--xmas-text-on-primary, #0B1220);
    box-shadow: 0 4px 12px rgba(192, 199, 209, 0.25);
}

.tour-btn-next:hover {
    background: linear-gradient(135deg, var(--xmas-primary-hover, #E3E8EF) 0%, var(--xmas-primary, #C0C7D1) 100%);
    box-shadow: 0 6px 16px rgba(192, 199, 209, 0.35);
    transform: translateY(-1px);
}

/* Light Mode Overrides (matches body.light, html.light, and .light) */
body.light .tour-overlay,
html.light .tour-overlay,
.light .tour-overlay {
    background: rgba(15, 23, 42, 0.45);
}

body.light .tour-modal,
html.light .tour-modal,
.light .tour-modal {
    background: #ffffff;
    color: #0f172a;
    border-color: #e2e8f0;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.05);
}

body.light .tour-header,
html.light .tour-header,
.light .tour-header,
body.light .tour-footer,
html.light .tour-footer,
.light .tour-footer {
    border-color: #e2e8f0;
}

body.light .tour-title-badge,
html.light .tour-title-badge,
.light .tour-title-badge {
    background: rgba(14, 165, 233, 0.12);
    color: #0284c7;
    border-color: rgba(14, 165, 233, 0.3);
}

body.light .tour-counter,
html.light .tour-counter,
.light .tour-counter {
    color: #64748b;
}

body.light .tour-step-text,
html.light .tour-step-text,
.light .tour-step-text {
    color: #1e293b;
}

body.light .tour-skip-btn,
html.light .tour-skip-btn,
.light .tour-skip-btn {
    color: #64748b;
}

body.light .tour-skip-btn:hover,
html.light .tour-skip-btn:hover,
.light .tour-skip-btn:hover {
    color: #0f172a;
    background-color: #f1f5f9;
}

body.light .tour-btn-back,
html.light .tour-btn-back,
.light .tour-btn-back {
    background: #f1f5f9;
    color: #334155;
    border-color: #cbd5e1;
}

body.light .tour-btn-back:hover:not(:disabled),
html.light .tour-btn-back:hover:not(:disabled),
.light .tour-btn-back:hover:not(:disabled) {
    background: #e2e8f0;
    color: #0f172a;
}

/* Mobile Responsiveness */
@media (max-width: 640px) {
    .tour-modal {
        padding: 1.25rem;
        max-width: 95%;
    }
    .tour-step-text {
        font-size: 0.875rem;
    }
    .tour-btn {
        padding: 0.5rem 1rem;
        font-size: 0.8125rem;
    }
}
