/* ======================
   🎓 Onboarding Tutorial Styles
   For 50-60 year olds - Large, clear, friendly
   ====================== */

/* Overlay - Dark semi-transparent background */
.tutorial-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.85);
    z-index: 99998;
    transition: opacity 0.3s ease;
    pointer-events: none;
}

.tutorial-overlay.hidden {
    display: none;
}

/* Spotlight - Highlight the target element - ABOVE overlay */
.tutorial-spotlight {
    position: fixed;
    background: transparent;
    border: 5px solid #00FF00;
    border-radius: 12px;
    box-shadow: 
        0 0 40px rgba(0, 255, 0, 0.8),
        0 0 80px rgba(0, 255, 0, 0.5),
        inset 0 0 0 9999px rgba(0, 0, 0, 0);
    z-index: 99999;
    transition: all 0.4s ease;
    pointer-events: none;
    animation: spotlightPulse 2s ease-in-out infinite;
}

/* Make the highlighted element visible by raising its z-index VERY HIGH */
.tutorial-highlight-target {
    position: relative !important;
    z-index: 100000 !important;
}

/* Header needs to be above overlay during tutorial */
header.tutorial-highlight-target {
    z-index: 100000 !important;
}

/* Nav tabs container needs special handling to prevent distortion */
.tutorial-highlight-target.nav-tabs-container {
    position: relative !important;
    z-index: 100000 !important;
}

@keyframes spotlightPulse {
    0%, 100% {
        border-color: #00FF00;
        box-shadow: 
            0 0 40px rgba(0, 255, 0, 0.8),
            0 0 80px rgba(0, 255, 0, 0.5);
    }
    50% {
        border-color: #00FFAA;
        box-shadow: 
            0 0 50px rgba(0, 255, 170, 1),
            0 0 100px rgba(0, 255, 170, 0.7);
    }
}

/* Tooltip - The explanation box */
.tutorial-tooltip {
    position: fixed;
    background: linear-gradient(135deg, #1A1A1A 0%, #0F0F0F 100%);
    border: 3px solid #00FF00;
    border-radius: 20px;
    padding: 30px;
    max-width: 450px;
    z-index: 100001;
    box-shadow: 
        0 10px 40px rgba(0, 0, 0, 0.5),
        0 0 30px rgba(0, 255, 0, 0.3);
    animation: tooltipFadeIn 0.4s ease;
}

.tutorial-tooltip.hidden {
    display: none;
}

@keyframes tooltipFadeIn {
    from {
        opacity: 0;
        transform: scale(0.9);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* Arrow pointing to target */
.tutorial-arrow {
    position: absolute;
    width: 20px;
    height: 20px;
    background: #1A1A1A;
    border: 3px solid #00FF00;
    border-bottom: none;
    border-right: none;
    z-index: -1;
}

/* Step indicator */
.tutorial-step-indicator {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    margin-bottom: 20px;
    font-size: 20px;
    color: #00FF00;
    font-weight: 700;
}

.tutorial-step-current {
    font-size: 32px;
    color: #00FF00;
    text-shadow: 0 0 10px rgba(0, 255, 0, 0.5);
}

.tutorial-step-separator {
    color: #666666;
    font-size: 24px;
}

.tutorial-step-total {
    color: #999999;
    font-size: 24px;
}

/* Title - Large and clear */
.tutorial-title {
    font-size: 28px;
    font-weight: 800;
    color: #FFFFFF;
    margin-bottom: 15px;
    text-align: center;
    line-height: 1.3;
}

/* Description - Large text for easy reading */
.tutorial-description {
    font-size: 22px;
    line-height: 1.6;
    color: #E0E0E0;
    margin-bottom: 30px;
    text-align: center;
    font-weight: 500;
}

/* Buttons */
.tutorial-buttons {
    display: flex;
    gap: 15px;
    justify-content: center;
}

.tutorial-btn {
    padding: 16px 32px;
    font-size: 20px;
    font-weight: 700;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.2s ease;
    border: none;
    min-width: 140px;
    text-align: center;
}

.tutorial-btn-skip {
    background: #333333;
    color: #AAAAAA;
    border: 2px solid #555555;
}

.tutorial-btn-skip:hover {
    background: #444444;
    color: #FFFFFF;
    border-color: #666666;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.tutorial-btn-next {
    background: linear-gradient(135deg, #00FF00 0%, #00DD00 100%);
    color: #000000;
    border: 2px solid #00FF00;
    box-shadow: 0 4px 15px rgba(0, 255, 0, 0.4);
}

.tutorial-btn-next:hover {
    background: linear-gradient(135deg, #00DD00 0%, #00BB00 100%);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 255, 0, 0.6);
}

.tutorial-btn-next:active {
    transform: translateY(0);
}

/* Help button in header */
.help-button {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: linear-gradient(135deg, #00FF00 0%, #00BFFF 100%);
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    box-shadow: 0 2px 10px rgba(0, 255, 0, 0.3);
    animation: helpButtonPulse 3s ease-in-out infinite;
}

.help-button svg {
    width: 24px;
    height: 24px;
    color: #000000;
}

.help-button:hover {
    transform: scale(1.1) rotate(15deg);
    box-shadow: 0 4px 20px rgba(0, 255, 0, 0.5);
}

.help-button:active {
    transform: scale(0.95) rotate(0deg);
}

@keyframes helpButtonPulse {
    0%, 100% {
        box-shadow: 0 2px 10px rgba(0, 255, 0, 0.3);
    }
    50% {
        box-shadow: 0 4px 20px rgba(0, 255, 0, 0.6);
    }
}

/* Mobile responsive */
@media (max-width: 768px) {
    .tutorial-tooltip {
        max-width: calc(100vw - 40px);
        padding: 25px;
        left: 20px !important;
        right: 20px;
        width: auto !important;
    }

    .tutorial-title {
        font-size: 24px;
    }

    .tutorial-description {
        font-size: 19px;
    }

    .tutorial-btn {
        padding: 14px 24px;
        font-size: 18px;
        min-width: 120px;
    }

    .tutorial-buttons {
        flex-direction: column;
    }

    .tutorial-btn {
        width: 100%;
    }
}

/* Light mode compatibility */
.light-mode .tutorial-overlay {
    background: rgba(255, 255, 255, 0.9);
}

.light-mode .tutorial-tooltip {
    background: linear-gradient(135deg, #FFFFFF 0%, #F8F8F8 100%);
    border-color: #10B981;
    box-shadow: 
        0 10px 40px rgba(0, 0, 0, 0.2),
        0 0 30px rgba(16, 185, 129, 0.3);
}

.light-mode .tutorial-arrow {
    background: #FFFFFF;
    border-color: #10B981;
}

.light-mode .tutorial-title {
    color: #1A1A1A;
}

.light-mode .tutorial-description {
    color: #333333;
}

.light-mode .tutorial-step-current {
    color: #10B981;
    text-shadow: 0 0 10px rgba(16, 185, 129, 0.5);
}

.light-mode .tutorial-btn-skip {
    background: #E5E7EB;
    color: #6B7280;
    border-color: #D1D5DB;
}

.light-mode .tutorial-btn-skip:hover {
    background: #D1D5DB;
    color: #1A1A1A;
}

.light-mode .tutorial-btn-next {
    background: linear-gradient(135deg, #10B981 0%, #059669 100%);
    border-color: #10B981;
    box-shadow: 0 4px 15px rgba(16, 185, 129, 0.4);
}

.light-mode .tutorial-btn-next:hover {
    box-shadow: 0 6px 20px rgba(16, 185, 129, 0.6);
}

.light-mode .tutorial-spotlight {
    border-color: #10B981;
    box-shadow: 
        0 0 40px rgba(16, 185, 129, 0.8),
        0 0 80px rgba(16, 185, 129, 0.5);
}

@keyframes spotlightPulseLightMode {
    0%, 100% {
        border-color: #10B981;
        box-shadow: 
            0 0 40px rgba(16, 185, 129, 0.8),
            0 0 80px rgba(16, 185, 129, 0.5);
    }
    50% {
        border-color: #059669;
        box-shadow: 
            0 0 50px rgba(16, 185, 129, 1),
            0 0 100px rgba(16, 185, 129, 0.7);
    }
}

.light-mode .tutorial-spotlight {
    animation: spotlightPulseLightMode 2s ease-in-out infinite;
}
