/**
 * Onboarding Styles
 * Matches focuverse cosmic theme with dark blue background and cyan accents
 */

/* Overlay - Transparent base (dark effect created by spotlight shadow) */
.onboarding-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: transparent;
    z-index: 9998;
    opacity: 0;
    transition: opacity 300ms ease-out;
    pointer-events: none;
}

.onboarding-overlay.active {
    opacity: 1;
}

/* Modal (Step 1) */
.onboarding-modal {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0.9);
    max-width: 500px;
    width: 90%;
    z-index: 10000;
    opacity: 0;
    transition: all 300ms ease-out;
    pointer-events: auto;
}

.onboarding-modal.active {
    transform: translate(-50%, -50%) scale(1);
    opacity: 1;
}

.onboarding-modal-content {
    background: rgba(15, 20, 40, 0.95);
    backdrop-filter: blur(10px);
    border: 3px solid rgba(100, 255, 218, 0.95);
    border-radius: 12px;
    padding: 40px;
    box-shadow: 0 0 30px rgba(100, 255, 218, 0.5);
    text-align: center;
}

.onboarding-modal-content h2 {
    font-size: 28px;
    color: #64FFDA;
    margin: 0 0 20px 0;
    font-weight: 600;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

.onboarding-modal-content p {
    font-size: 16px;
    color: #FFFFFF;
    line-height: 1.6;
    margin: 0 0 30px 0;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

.onboarding-checkbox-container {
    margin: 0 0 25px 0;
    text-align: left;
}

.onboarding-checkbox-container label {
    display: flex;
    align-items: center;
    cursor: pointer;
    font-size: 14px;
    color: #8892B0;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    transition: color 200ms;
}

.onboarding-checkbox-container label:hover {
    color: #FFFFFF;
}

.onboarding-checkbox-container input[type="checkbox"] {
    width: 18px;
    height: 18px;
    margin-right: 10px;
    cursor: pointer;
    accent-color: #64FFDA;
}

.onboarding-modal-buttons {
    display: flex;
    gap: 15px;
    justify-content: center;
    flex-wrap: wrap;
}

/* Spotlight (Steps 2-5) */
.onboarding-spotlight {
    position: fixed;
    border: 3px solid #64FFDA;
    border-radius: 8px;
    box-shadow:
        0 0 0 4px rgba(100, 255, 218, 0.3),
        0 0 20px rgba(100, 255, 218, 0.5),
        inset 0 0 20px rgba(100, 255, 218, 0.1),
        0 0 0 9999px rgba(10, 11, 26, 0.85);
    pointer-events: none;
    z-index: 9999;
    opacity: 0;
    transition: all 400ms ease-in-out;
}

.onboarding-spotlight.active {
    opacity: 1;
}

/* Tooltip */
.onboarding-tooltip {
    position: fixed;
    max-width: 420px;
    width: 90%;
    background: rgba(15, 20, 40, 0.95);
    backdrop-filter: blur(10px);
    border: 3px solid rgba(100, 255, 218, 0.95);
    border-radius: 10px;
    box-shadow: 0 0 25px rgba(100, 255, 218, 0.5);
    z-index: 10000;
    opacity: 0;
    transform: translateY(10px);
    transition: all 300ms ease-out;
    pointer-events: auto;
}

.onboarding-tooltip.active {
    opacity: 1;
    transform: translateY(0);
}

.onboarding-tooltip-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    padding: 20px 20px 15px 20px;
    border-bottom: 1px solid rgba(100, 255, 218, 0.2);
}

.onboarding-tooltip-header h3 {
    font-size: 18px;
    color: #64FFDA;
    margin: 0;
    font-weight: 600;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    flex: 1;
}

.onboarding-close {
    background: transparent;
    border: none;
    color: #8892B0;
    font-size: 24px;
    cursor: pointer;
    padding: 0;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 200ms;
    line-height: 1;
}

.onboarding-close:hover {
    color: #64FFDA;
}

.onboarding-tooltip-content {
    padding: 20px;
    font-size: 14px;
    color: #FFFFFF;
    line-height: 1.6;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

.onboarding-tooltip-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px 20px 20px;
}

.onboarding-progress {
    font-size: 12px;
    color: #8892B0;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

/* Buttons */
.onboarding-btn-primary {
    background: #64FFDA;
    color: #0A0B1A;
    border: none;
    border-radius: 6px;
    padding: 12px 24px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 200ms;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

.onboarding-btn-primary:hover {
    background: #52EBC8;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(100, 255, 218, 0.4);
}

.onboarding-btn-primary:active {
    transform: translateY(0);
}

.onboarding-btn-skip {
    background: transparent;
    color: #8892B0;
    border: 1px solid #495670;
    border-radius: 6px;
    padding: 12px 24px;
    font-size: 14px;
    cursor: pointer;
    transition: all 200ms;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

.onboarding-btn-skip:hover {
    color: #FFFFFF;
    border-color: #64FFDA;
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .onboarding-modal-content {
        padding: 30px 20px;
    }

    .onboarding-modal-content h2 {
        font-size: 24px;
    }

    .onboarding-modal-content p {
        font-size: 14px;
    }

    .onboarding-tooltip {
        max-width: 90%;
        left: 5% !important;
        right: 5% !important;
        top: auto !important;
        bottom: 20px !important;
        transform: none !important;
    }

    .onboarding-tooltip.active {
        transform: none !important;
    }

    .onboarding-tooltip-header h3 {
        font-size: 16px;
    }

    .onboarding-tooltip-content {
        font-size: 13px;
    }

    .onboarding-spotlight {
        border-width: 2px;
    }

    .onboarding-modal-buttons {
        flex-direction: column;
    }

    .onboarding-btn-primary,
    .onboarding-btn-skip {
        width: 100%;
    }
}

/* Tooltip positioning variants */
.onboarding-tooltip-left {
    /* Positioned by JS */
}

.onboarding-tooltip-right {
    /* Positioned by JS */
}

.onboarding-tooltip-bottom {
    /* Positioned by JS */
}

/* Prevent scroll while onboarding is active */
body.onboarding-active {
    overflow: hidden;
}

/* Focus trap for accessibility */
.onboarding-overlay button:focus {
    outline: 2px solid #64FFDA;
    outline-offset: 2px;
}

/* Animation for step transitions */
@keyframes pulse {
    0%, 100% {
        box-shadow:
            0 0 0 4px rgba(100, 255, 218, 0.3),
            0 0 20px rgba(100, 255, 218, 0.5),
            inset 0 0 20px rgba(100, 255, 218, 0.1),
            0 0 0 9999px rgba(10, 11, 26, 0.85);
    }
    50% {
        box-shadow:
            0 0 0 4px rgba(100, 255, 218, 0.5),
            0 0 30px rgba(100, 255, 218, 0.7),
            inset 0 0 20px rgba(100, 255, 218, 0.1),
            0 0 0 9999px rgba(10, 11, 26, 0.85);
    }
}

.onboarding-spotlight.active {
    animation: pulse 2s ease-in-out infinite;
}
