/**
 * Sistema de Onboarding
 * Wizard y tour guiado
 */

/* Overlay del onboarding */
.lb-onboarding-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(4px);
    z-index: 99999;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* Modal del wizard */
.lb-onboarding-modal {
    background: white;
    border-radius: 16px;
    max-width: 700px;
    width: 90%;
    max-height: 85vh;
    overflow: hidden;
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.4);
    animation: slideUp 0.4s ease;
}

@keyframes slideUp {
    from { 
        opacity: 0;
        transform: translateY(30px);
    }
    to { 
        opacity: 1;
        transform: translateY(0);
    }
}

/* Header del wizard */
.lb-onboarding-header {
    padding: 32px 40px 24px;
    text-align: center;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    position: relative;
}

.lb-onboarding-close-btn {
    position: absolute;
    top: 16px;
    right: 16px;
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: white;
    font-size: 32px;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    line-height: 1;
    padding: 0;
}

.lb-onboarding-close-btn:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: scale(1.1);
}

.lb-onboarding-header h2 {
    margin: 0 0 8px 0;
    font-size: 28px;
    font-weight: 700;
}

.lb-onboarding-header p {
    margin: 0;
    font-size: 16px;
    opacity: 0.95;
}

/* Progress bar */
.lb-onboarding-progress {
    height: 4px;
    background: rgba(255, 255, 255, 0.2);
}

.lb-onboarding-progress-bar {
    height: 100%;
    background: white;
    transition: width 0.3s ease;
}

/* Body del wizard */
.lb-onboarding-body {
    padding: 40px;
}

/* Steps */
.lb-onboarding-step {
    display: none;
}

.lb-onboarding-step.active {
    display: block;
    animation: fadeIn 0.3s ease;
}

.lb-step-icon {
    font-size: 64px;
    text-align: center;
    margin-bottom: 24px;
}

.lb-step-title {
    font-size: 24px;
    font-weight: 700;
    margin-bottom: 12px;
    color: #0f172a;
    text-align: center;
}

.lb-step-description {
    font-size: 16px;
    line-height: 1.6;
    color: #64748b;
    margin-bottom: 32px;
    text-align: center;
}

/* Checklist de onboarding */
.lb-onboarding-checklist {
    background: #f8fafc;
    border-radius: 12px;
    padding: 24px;
    margin-bottom: 24px;
}

.lb-checklist-item {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 16px;
    background: white;
    border-radius: 8px;
    margin-bottom: 12px;
    transition: all 0.2s;
    cursor: pointer;
}

.lb-checklist-item:hover {
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.lb-checklist-item.completed {
    opacity: 0.6;
}

.lb-checklist-checkbox {
    width: 24px;
    height: 24px;
    border: 2px solid #cbd5e1;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: all 0.2s;
}

.lb-checklist-item.completed .lb-checklist-checkbox {
    background: #10b981;
    border-color: #10b981;
}

.lb-checklist-checkbox::after {
    content: '✓';
    color: white;
    font-weight: bold;
    opacity: 0;
    transform: scale(0);
    transition: all 0.2s;
}

.lb-checklist-item.completed .lb-checklist-checkbox::after {
    opacity: 1;
    transform: scale(1);
}

.lb-checklist-content h4 {
    margin: 0 0 4px 0;
    font-size: 15px;
    color: #0f172a;
}

.lb-checklist-content p {
    margin: 0;
    font-size: 13px;
    color: #64748b;
}

/* Footer del wizard */
.lb-onboarding-footer {
    padding: 24px 40px;
    border-top: 1px solid #e2e8f0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.lb-onboarding-dots {
    display: flex;
    gap: 8px;
}

.lb-onboarding-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #cbd5e1;
    transition: all 0.3s;
}

.lb-onboarding-dot.active {
    background: #2563eb;
    width: 24px;
    border-radius: 4px;
}

/* Botones del wizard */
.lb-onboarding-buttons {
    display: flex;
    gap: 12px;
}

/* Progress widget (sticky en dashboard) */
.lb-onboarding-widget {
    position: fixed;
    bottom: 24px;
    right: 24px;
    width: 320px;
    background: white;
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
    z-index: 9999;
    animation: slideInRight 0.4s ease;
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(100px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.lb-onboarding-widget-header {
    padding: 20px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-radius: 12px 12px 0 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.lb-onboarding-widget-header h3 {
    margin: 0;
    font-size: 16px;
    font-weight: 600;
}

.lb-onboarding-widget-close {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: white;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.lb-onboarding-widget-close:hover {
    background: rgba(255, 255, 255, 0.3);
}

.lb-onboarding-widget-body {
    padding: 20px;
}

.lb-onboarding-progress-text {
    font-size: 13px;
    color: #64748b;
    margin-bottom: 12px;
}

.lb-onboarding-progress-bar-container {
    height: 8px;
    background: #e2e8f0;
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 16px;
}

.lb-onboarding-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #667eea 0%, #764ba2 100%);
    border-radius: 4px;
    transition: width 0.4s ease;
}

.lb-onboarding-tasks {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.lb-onboarding-task {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 14px;
    color: #0f172a;
    padding: 10px;
    border-radius: 6px;
    transition: all 0.2s;
    cursor: pointer;
}

.lb-onboarding-task:hover {
    background: #f8fafc;
}

.lb-onboarding-task.completed {
    opacity: 0.5;
    text-decoration: line-through;
}

.lb-onboarding-task-icon {
    width: 20px;
    height: 20px;
    border: 2px solid #cbd5e1;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    transition: all 0.2s;
}

.lb-onboarding-task.completed .lb-onboarding-task-icon {
    background: #10b981;
    border-color: #10b981;
    color: white;
}

.lb-onboarding-task.completed .lb-onboarding-task-icon::before {
    content: '✓';
}

/* Tour overlay (highlight elements) */
.lb-tour-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    z-index: 99998;
    pointer-events: none;
}

.lb-tour-highlight {
    position: relative;
    z-index: 99999;
    box-shadow: 0 0 0 9999px rgba(0, 0, 0, 0.7);
    border-radius: 8px;
}

.lb-tour-popup {
    position: absolute;
    background: white;
    border-radius: 12px;
    padding: 24px;
    max-width: 350px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
    z-index: 100000;
    animation: slideUp 0.3s ease;
}

.lb-tour-popup-title {
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 8px;
    color: #0f172a;
}

.lb-tour-popup-description {
    font-size: 14px;
    line-height: 1.6;
    color: #64748b;
    margin-bottom: 20px;
}

.lb-tour-popup-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.lb-tour-progress {
    font-size: 12px;
    color: #94a3b8;
}

.lb-tour-buttons {
    display: flex;
    gap: 8px;
}

/* Animación de celebración */
@keyframes confetti {
    0% { transform: translateY(0) rotate(0deg); opacity: 1; }
    100% { transform: translateY(-100vh) rotate(720deg); opacity: 0; }
}

.lb-confetti {
    position: fixed;
    width: 10px;
    height: 10px;
    z-index: 100001;
    animation: confetti 3s ease-out forwards;
}

