/* ========================================
   ONBOARDING STYLES
   First-time user guidance and animations
   ======================================== */

/* Pulsing glow animation for hamburger menus */
@keyframes pulse-glow {
    0%, 100% {
        box-shadow: 0 0 0 0 rgba(59, 130, 246, 0.7);
    }
    50% {
        box-shadow: 0 0 20px 8px rgba(59, 130, 246, 0.3);
    }
}

@keyframes bounce-hint {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-5px);
    }
}

/* Apply to hamburger menus on first visit */
.hamburger-left.first-time-hint,
.hamburger-right.first-time-hint {
    animation: pulse-glow 2s ease-in-out infinite, bounce-hint 1s ease-in-out infinite;
    position: relative;
}

/* Tooltip hints */
.onboarding-tooltip {
    position: absolute;
    background: linear-gradient(135deg, #3b82f6, #2563eb);
    color: white;
    padding: 12px 16px;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 500;
    box-shadow: 0 4px 20px rgba(59, 130, 246, 0.4);
    z-index: 1000;
    opacity: 0;
    transform: translateY(-10px);
    transition: opacity 0.3s ease, transform 0.3s ease;
    pointer-events: none;
    white-space: nowrap;
    max-width: 200px;
    white-space: normal;
}

.onboarding-tooltip::after {
    content: '';
    position: absolute;
    width: 0;
    height: 0;
    border-style: solid;
}

/* Left tooltip */
.tooltip-left {
    top: 70px;
    left: 10px;
}

.tooltip-left::after {
    border-width: 0 8px 8px 8px;
    border-color: transparent transparent #3b82f6 transparent;
    top: -8px;
    left: 20px;
}

/* Right tooltip */
.tooltip-right {
    top: 70px;
    right: 10px;
}

.tooltip-right::after {
    border-width: 0 8px 8px 8px;
    border-color: transparent transparent #3b82f6 transparent;
    top: -8px;
    right: 20px;
}

/* Show tooltip */
.onboarding-tooltip.show {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}

/* Close button in tooltip */
.tooltip-close {
    background: none;
    border: none;
    color: white;
    font-size: 16px;
    cursor: pointer;
    padding: 0 0 0 8px;
    margin-left: 8px;
    float: right;
    line-height: 1;
    opacity: 0.8;
    transition: opacity 0.3s;
}

.tooltip-close:hover {
    opacity: 1;
}

/* Onboarding overlay (optional full-screen intro) */
.onboarding-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
}

.onboarding-overlay.show {
    opacity: 1;
    pointer-events: auto;
}

.onboarding-content {
    background: white;
    padding: 40px;
    border-radius: 16px;
    max-width: 500px;
    text-align: center;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
}

.onboarding-content h2 {
    margin: 0 0 20px;
    color: #1f2937;
    font-size: 24px;
}

.onboarding-content p {
    margin: 0 0 30px;
    color: #6b7280;
    font-size: 16px;
    line-height: 1.6;
}

.onboarding-features {
    display: flex;
    gap: 20px;
    margin-bottom: 30px;
    text-align: left;
}

.feature-item {
    flex: 1;
    padding: 15px;
    background: #f9fafb;
    border-radius: 8px;
}

.feature-item svg {
    width: 32px;
    height: 32px;
    stroke: #3b82f6;
    margin-bottom: 10px;
}

.feature-item h3 {
    margin: 0 0 5px;
    font-size: 14px;
    color: #1f2937;
}

.feature-item p {
    margin: 0;
    font-size: 12px;
    color: #6b7280;
}

.onboarding-btn {
    background: linear-gradient(135deg, #3b82f6, #2563eb);
    color: white;
    border: none;
    padding: 14px 32px;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.onboarding-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(59, 130, 246, 0.4);
}

/* Dark mode support */
body.dark-mode .onboarding-content {
    background: #1f2937;
    color: white;
}

body.dark-mode .onboarding-content h2 {
    color: white;
}

body.dark-mode .onboarding-content p {
    color: #9ca3af;
}

body.dark-mode .feature-item {
    background: #374151;
}

body.dark-mode .feature-item h3 {
    color: white;
}

body.dark-mode .feature-item p {
    color: #9ca3af;
}

/* Animated pointer arrows (optional) */
.pointer-arrow {
    position: absolute;
    font-size: 24px;
    animation: point 1s ease-in-out infinite;
    z-index: 999;
    opacity: 0;
    transition: opacity 0.3s;
}

.pointer-arrow.show {
    opacity: 1;
}

@keyframes point {
    0%, 100% {
        transform: translate(0, 0);
    }
    50% {
        transform: translate(-5px, -5px);
    }
}

.pointer-left {
    top: 15px;
    left: 70px;
}

.pointer-right {
    top: 15px;
    right: 70px;
}

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

    .onboarding-features {
        flex-direction: column;
    }

    .onboarding-tooltip {
        max-width: 150px;
        font-size: 12px;
        padding: 10px 12px;
    }

    .tooltip-left,
    .tooltip-right {
        top: 65px;
    }
}

@media (max-width: 480px) {
    .onboarding-content h2 {
        font-size: 20px;
    }

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

    .onboarding-btn {
        padding: 12px 24px;
        font-size: 14px;
    }
}