/**
 * Onboarding Styles
 * First-time user tour styling
 */

/* Overlay */
.onboarding-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    height: 100dvh;
    background: rgba(5, 5, 5, 0.97);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow-y: auto;
    padding: 16px;
    padding-top: calc(16px + env(safe-area-inset-top));
    padding-bottom: calc(16px + env(safe-area-inset-bottom));
    z-index: 10000;
    animation: fadeIn 0.3s ease;
}

.onboarding-welcome {
    background: linear-gradient(135deg, rgba(255, 215, 0, 0.1), rgba(255, 215, 0, 0.05));
    border: 2px solid var(--primary-gold, #FFD700);
    border-radius: 16px;
    padding: 40px;
    max-width: 600px;
    width: min(600px, 100%);
    max-height: calc(100dvh - 32px - env(safe-area-inset-top) - env(safe-area-inset-bottom));
    overflow-y: auto;
    box-shadow: 0 8px 40px rgba(255, 215, 0, 0.3);
    animation: slideUp 0.4s ease;
}

.welcome-header {
    text-align: center;
    margin-bottom: 30px;
}

.welcome-header h1 {
    font-size: 36px;
    color: var(--primary-gold, #FFD700);
    margin-bottom: 10px;
    text-shadow: 0 0 30px rgba(255, 215, 0, 0.4);
}

.welcome-header p {
    color: rgba(255, 255, 255, 0.7);
    font-size: 16px;
}

.welcome-content p {
    color: rgba(255, 255, 255, 0.9);
    line-height: 1.6;
    margin-bottom: 30px;
    text-align: center;
}

.welcome-features {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    margin-bottom: 30px;
}

.feature {
    text-align: center;
    padding: 20px 10px;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 8px;
    border: 1px solid rgba(255, 215, 0, 0.2);
}

.feature-icon {
    font-size: 32px;
    display: block;
    margin-bottom: 10px;
}

.feature h3 {
    font-size: 16px;
    color: var(--primary-gold, #FFD700);
    margin-bottom: 5px;
}

.feature p {
    font-size: 13px;
    color: rgba(255, 255, 255, 0.6);
    margin: 0;
}

.welcome-actions {
    display: flex;
    gap: 15px;
    justify-content: center;
}

.btn-skip, .btn-start, .btn-next, .btn-prev, .btn-finish {
    padding: 12px 24px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    border: none;
}

.btn-skip {
    background: transparent;
    color: rgba(255, 255, 255, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.btn-skip:hover {
    background: rgba(255, 255, 255, 0.05);
    color: rgba(255, 255, 255, 0.9);
}

.btn-start, .btn-next, .btn-finish {
    background: var(--primary-gold, #FFD700);
    color: #000;
}

.btn-start:hover, .btn-next:hover, .btn-finish:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(255, 215, 0, 0.4);
}

.btn-prev {
    background: rgba(255, 255, 255, 0.1);
    color: var(--primary-gold, #FFD700);
    border: 1px solid var(--primary-gold, #FFD700);
}

.btn-prev:hover {
    background: rgba(255, 215, 0, 0.1);
}

/* Backdrop */
.onboarding-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(5, 5, 5, 0.8);
    z-index: 9998;
    animation: fadeIn 0.3s ease;
}

/* Tooltip */
.onboarding-tooltip {
    position: fixed;
    background: linear-gradient(135deg, rgba(10, 14, 39, 0.98), rgba(22, 33, 62, 0.98));
    border: 2px solid var(--primary-gold, #FFD700);
    border-radius: 12px;
    padding: 24px;
    max-width: 400px;
    max-height: calc(100dvh - 80px - env(safe-area-inset-top) - env(safe-area-inset-bottom));
    overflow: auto;
    z-index: 9999;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
    animation: tooltipPop 0.3s ease;
}

.onboarding-tooltip.center {
    top: 50% !important;
    left: 50% !important;
    transform: translate(-50%, -50%);
}

.tooltip-content h3 {
    color: var(--primary-gold, #FFD700);
    font-size: 20px;
    margin-bottom: 10px;
    font-weight: 700;
}

.tooltip-content p {
    color: rgba(255, 255, 255, 0.9);
    line-height: 1.6;
    margin-bottom: 20px;
    font-size: 14px;
}

.tooltip-content.completion {
    text-align: center;
}

.tooltip-content.completion h3 {
    font-size: 24px;
    margin-bottom: 15px;
}

.tooltip-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid rgba(255, 215, 0, 0.2);
}

.step-counter {
    color: rgba(255, 255, 255, 0.5);
    font-size: 13px;
}

.tooltip-actions {
    display: flex;
    gap: 10px;
}

.tooltip-arrow {
    position: absolute;
    width: 0;
    height: 0;
    border: 10px solid transparent;
}

.onboarding-tooltip.top .tooltip-arrow {
    bottom: -20px;
    left: 50%;
    transform: translateX(-50%);
    border-top-color: var(--primary-gold, #FFD700);
}

.onboarding-tooltip.bottom .tooltip-arrow {
    top: -20px;
    left: 50%;
    transform: translateX(-50%);
    border-bottom-color: var(--primary-gold, #FFD700);
}

.onboarding-tooltip.left .tooltip-arrow {
    right: -20px;
    top: 50%;
    transform: translateY(-50%);
    border-left-color: var(--primary-gold, #FFD700);
}

.onboarding-tooltip.right .tooltip-arrow {
    left: -20px;
    top: 50%;
    transform: translateY(-50%);
    border-right-color: var(--primary-gold, #FFD700);
}

/* Highlight */
.onboarding-highlight {
    position: relative;
    z-index: 9997;
    box-shadow: 0 0 0 4px rgba(255, 215, 0, 0.4), 0 0 20px rgba(255, 215, 0, 0.6) !important;
    border-radius: 8px !important;
}

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes tooltipPop {
    0% {
        opacity: 0;
        transform: scale(0.8);
    }
    100% {
        opacity: 1;
        transform: scale(1);
    }
}

/* Mobile responsive */
@media (max-width: 768px) {
    .onboarding-welcome {
        padding: 30px 20px;
        max-width: 90vw;
    }

    .welcome-header h1 {
        font-size: 28px;
    }

    .welcome-features {
        grid-template-columns: 1fr;
        gap: 15px;
    }

    .onboarding-tooltip {
        max-width: 90vw;
        padding: 20px;
    }

    .onboarding-tooltip:not(.center) {
        position: fixed !important;
        bottom: 20px !important;
        left: 5vw !important;
        right: 5vw !important;
        top: auto !important;
        transform: none !important;
    }

    .onboarding-tooltip.center {
        position: fixed !important;
        top: auto !important;
        bottom: 20px !important;
        left: 5vw !important;
        right: 5vw !important;
        transform: none !important;
    }

    .welcome-actions {
        flex-wrap: wrap;
    }

    .tooltip-footer {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }

    .tooltip-actions {
        width: 100%;
        justify-content: flex-end;
    }

    .tooltip-arrow {
        display: none;
    }
}
