/**
 * Onboarding Styles - Assessor XP
 * Design moderno e interativo
 */

/* Overlay escuro */
.onboarding-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.4);
    backdrop-filter: none;
    z-index: 999;
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

/* Barra de progresso */
.onboarding-progress {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: rgba(255, 255, 255, 0.1);
    z-index: 1001;
}

.progress-bar {
    height: 100%;
    background: linear-gradient(90deg, #007AFF, #00D4FF);
    transition: width 0.5s ease;
    box-shadow: 0 0 20px rgba(0, 122, 255, 0.5);
}

/* Tooltip principal */
.onboarding-tooltip {
    position: fixed;
    background: linear-gradient(135deg, rgba(26, 26, 46, 0.98), rgba(20, 20, 36, 0.98));
    border: 2px solid rgba(0, 122, 255, 0.5);
    border-radius: 16px;
    padding: 0;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5), 
                0 0 40px rgba(0, 122, 255, 0.3);
    z-index: 1000;
    opacity: 0;
    transform: scale(0.9);
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    backdrop-filter: none;
    min-width: 320px;
    max-width: 90vw;
    max-height: 90vh;
    overflow-y: auto;
}

.onboarding-tooltip.active {
    opacity: 1;
    transform: scale(1);
}

/* Header do tooltip */
.onboarding-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 24px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.onboarding-header h3 {
    margin: 0;
    font-size: 1.3rem;
    font-weight: 700;
    color: #ffffff;
    display: flex;
    align-items: center;
    gap: 8px;
}

.onboarding-close {
    background: transparent;
    border: none;
    color: rgba(255, 255, 255, 0.6);
    cursor: pointer;
    padding: 8px;
    border-radius: 8px;
    transition: all 0.2s ease;
    font-size: 1.2rem;
}

.onboarding-close:hover {
    background: rgba(255, 255, 255, 0.1);
    color: #ffffff;
    transform: rotate(90deg);
}

/* Body do tooltip */
.onboarding-body {
    padding: 24px;
}

.onboarding-body p {
    margin: 0;
    font-size: 1rem;
    line-height: 1.6;
    color: rgba(255, 255, 255, 0.9);
}

/* Footer do tooltip */
.onboarding-footer {
    padding: 20px 24px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
}

/* Indicadores de progresso (dots) */
.onboarding-dots {
    display: flex;
    gap: 8px;
}

.onboarding-dots .dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    transition: all 0.3s ease;
}

.onboarding-dots .dot.active {
    width: 24px;
    border-radius: 4px;
    background: linear-gradient(90deg, #007AFF, #00D4FF);
    box-shadow: 0 0 10px rgba(0, 122, 255, 0.5);
}

/* Botões do onboarding */
.onboarding-buttons {
    display: flex;
    gap: 12px;
}

.onboarding-btn {
    padding: 10px 20px;
    border-radius: 8px;
    font-weight: 600;
    font-size: 0.95rem;
    cursor: pointer;
    transition: all 0.3s ease;
    border: none;
    display: flex;
    align-items: center;
    gap: 8px;
}

.onboarding-btn.btn-primary {
    background: linear-gradient(135deg, #007AFF, #0051D5);
    color: #ffffff;
    box-shadow: 0 4px 15px rgba(0, 122, 255, 0.3);
}

.onboarding-btn.btn-primary:hover {
    background: linear-gradient(135deg, #0051D5, #003DA5);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 122, 255, 0.4);
}

.onboarding-btn.btn-primary:active {
    transform: translateY(0);
}

.onboarding-btn.btn-secondary {
    background: rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.8);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.onboarding-btn.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.15);
    color: #ffffff;
    border-color: rgba(255, 255, 255, 0.3);
}

/* Highlight de elementos */
.onboarding-highlight {
    position: relative;
    z-index: 1000 !important;
    box-shadow: 0 0 0 4px rgba(0, 122, 255, 0.5),
                0 0 0 8px rgba(0, 122, 255, 0.3),
                0 0 40px rgba(0, 122, 255, 0.6) !important;
    border-radius: 12px !important;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% {
        box-shadow: 0 0 0 4px rgba(0, 122, 255, 0.5),
                    0 0 0 8px rgba(0, 122, 255, 0.3),
                    0 0 40px rgba(0, 122, 255, 0.6);
    }
    50% {
        box-shadow: 0 0 0 4px rgba(0, 122, 255, 0.7),
                    0 0 0 8px rgba(0, 122, 255, 0.5),
                    0 0 60px rgba(0, 122, 255, 0.8);
    }
}

/* Responsividade */
@media (max-width: 768px) {
    .onboarding-tooltip {
        max-width: 90% !important;
        left: 50% !important;
        top: auto !important;
        bottom: 20px !important;
        transform: translateX(-50%) !important;
    }

    .onboarding-tooltip.active {
        transform: translateX(-50%) !important;
    }

    .onboarding-header h3 {
        font-size: 1.1rem;
    }

    .onboarding-body p {
        font-size: 0.95rem;
    }

    .onboarding-footer {
        flex-direction: column;
        gap: 12px;
    }

    .onboarding-buttons {
        width: 100%;
    }

    .onboarding-btn {
        flex: 1;
        justify-content: center;
    }
}

/* Animações especiais para elementos destacados */
.onboarding-spotlight {
    position: relative;
    overflow: visible;
}

.onboarding-spotlight::before {
    content: '';
    position: absolute;
    top: -10px;
    left: -10px;
    right: -10px;
    bottom: -10px;
    background: radial-gradient(circle, rgba(0, 122, 255, 0.2) 0%, transparent 70%);
    border-radius: 16px;
    animation: spotlight 3s infinite;
    pointer-events: none;
}

@keyframes spotlight {
    0%, 100% {
        opacity: 0.5;
        transform: scale(1);
    }
    50% {
        opacity: 1;
        transform: scale(1.05);
    }
}

/* Loading state */
.onboarding-loading {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 20px;
}

.onboarding-loading span {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #007AFF;
    animation: bounce 1.4s infinite ease-in-out both;
}

.onboarding-loading span:nth-child(1) {
    animation-delay: -0.32s;
}

.onboarding-loading span:nth-child(2) {
    animation-delay: -0.16s;
}

@keyframes bounce {
    0%, 80%, 100% {
        transform: scale(0);
    }
    40% {
        transform: scale(1);
    }
}
