/**
 * ╔═══════════════════════════════════════════════════════════════╗
 * ║              ARGUX ONBOARDING SYSTEM STYLES                   ║
 * ║                Production Ready CSS v1.0                      ║
 * ╚═══════════════════════════════════════════════════════════════╝
 * 
 * Complete styles for onboarding system:
 * - Welcome modal
 * - Wizard steps (3 steps)
 * - Tutorial tooltips
 * - Empty states
 * - Animations
 * 
 * Browser support: Modern browsers + iOS Safari
 * File size: ~400 lines
 */

/* ========================================
   MODAL OVERLAY & BASE
   ======================================== */

.onboarding-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(8px);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
    padding: 20px;
}

.onboarding-modal-overlay.show {
    opacity: 1;
}

.onboarding-modal {
    background: linear-gradient(135deg, #1e293b 0%, #0f172a 100%);
    border-radius: 20px;
    max-width: 600px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5),
                0 0 100px rgba(59, 130, 246, 0.2);
    border: 1px solid rgba(59, 130, 246, 0.3);
    transform: scale(0.9);
    transition: transform 0.3s ease;
}

.onboarding-modal-overlay.show .onboarding-modal {
    transform: scale(1);
}

/* ========================================
   WELCOME MODAL
   ======================================== */

.onboarding-welcome-content {
    padding: 40px;
    text-align: center;
}

.welcome-title {
    font-size: 32px;
    font-weight: 700;
    color: #ffffff;
    margin: 0 0 10px 0;
    background: linear-gradient(135deg, #3b82f6, #06b6d4);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.welcome-subtitle {
    font-size: 16px;
    color: #94a3b8;
    margin: 0 0 40px 0;
}

.welcome-steps {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    margin-bottom: 40px;
}

@media (max-width: 640px) {
    .welcome-steps {
        grid-template-columns: 1fr;
    }
}

.welcome-step {
    background: rgba(59, 130, 246, 0.1);
    border: 1px solid rgba(59, 130, 246, 0.2);
    border-radius: 12px;
    padding: 24px 16px;
    transition: all 0.3s ease;
}

.welcome-step:hover {
    background: rgba(59, 130, 246, 0.15);
    border-color: rgba(59, 130, 246, 0.4);
    transform: translateY(-2px);
}

.step-icon {
    font-size: 48px;
    margin-bottom: 12px;
    display: block;
}

.welcome-step h3 {
    font-size: 16px;
    font-weight: 600;
    color: #ffffff;
    margin: 0 0 8px 0;
}

.welcome-step p {
    font-size: 14px;
    color: #94a3b8;
    margin: 0;
}

.welcome-actions {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 20px;
}

.skip-link {
    color: #64748b;
    font-size: 14px;
    text-decoration: none;
    transition: color 0.2s;
}

.skip-link:hover {
    color: #94a3b8;
    text-decoration: underline;
}

/* ========================================
   BUTTONS
   ======================================== */

.btn-primary,
.btn-secondary,
.btn-text-sm {
    padding: 12px 24px;
    border-radius: 10px;
    font-size: 16px;
    font-weight: 600;
    border: none;
    cursor: pointer;
    transition: all 0.2s ease;
    font-family: inherit;
}

.btn-primary {
    background: linear-gradient(135deg, #3b82f6, #2563eb);
    color: white;
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.4);
}

.btn-primary:hover {
    background: linear-gradient(135deg, #2563eb, #1d4ed8);
    box-shadow: 0 6px 20px rgba(59, 130, 246, 0.6);
    transform: translateY(-2px);
}

.btn-secondary {
    background: rgba(59, 130, 246, 0.1);
    color: #3b82f6;
    border: 1px solid rgba(59, 130, 246, 0.3);
}

.btn-secondary:hover {
    background: rgba(59, 130, 246, 0.2);
    border-color: rgba(59, 130, 246, 0.5);
}

.btn-large {
    padding: 16px 32px;
    font-size: 18px;
}

.btn-sm {
    padding: 8px 16px;
    font-size: 14px;
}

.btn-text-sm {
    background: transparent;
    color: #64748b;
    padding: 8px 16px;
    font-size: 14px;
}

.btn-text-sm:hover {
    color: #94a3b8;
    background: rgba(100, 116, 139, 0.1);
}

/* ========================================
   WIZARD MODAL
   ======================================== */

.wizard-modal {
    max-width: 500px;
}

.wizard-progress {
    padding: 24px 24px 0 24px;
}

.progress-bar {
    height: 6px;
    background: rgba(59, 130, 246, 0.2);
    border-radius: 10px;
    overflow: hidden;
    margin-bottom: 12px;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #3b82f6, #06b6d4);
    border-radius: 10px;
    transition: width 0.3s ease;
}

.progress-text {
    font-size: 14px;
    color: #94a3b8;
    text-align: center;
}

.wizard-content {
    padding: 24px 32px;
}

.wizard-title {
    font-size: 24px;
    font-weight: 700;
    color: #ffffff;
    margin: 0 0 8px 0;
}

.wizard-description {
    font-size: 14px;
    color: #94a3b8;
    margin: 0 0 24px 0;
}

.wizard-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.form-group label {
    font-size: 14px;
    font-weight: 500;
    color: #e2e8f0;
}

.form-group input,
.form-group select {
    padding: 12px 16px;
    background: rgba(15, 23, 42, 0.5);
    border: 1px solid rgba(59, 130, 246, 0.3);
    border-radius: 8px;
    color: #ffffff;
    font-size: 16px;
    font-family: inherit;
    transition: all 0.2s ease;
}

.form-group input:focus,
.form-group select:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.form-group select {
    cursor: pointer;
}

.wizard-actions {
    padding: 0 32px 24px 32px;
    display: flex;
    gap: 12px;
    justify-content: flex-end;
}

/* ========================================
   GOALS GRID (Step 3)
   ======================================== */

.goals-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
    margin-bottom: 16px;
}

@media (max-width: 480px) {
    .goals-grid {
        grid-template-columns: 1fr;
    }
}

.goal-checkbox {
    cursor: pointer;
}

.goal-checkbox input[type="checkbox"] {
    display: none;
}

.goal-card {
    background: rgba(15, 23, 42, 0.5);
    border: 2px solid rgba(59, 130, 246, 0.2);
    border-radius: 10px;
    padding: 16px;
    text-align: center;
    transition: all 0.2s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}

.goal-checkbox:hover .goal-card {
    background: rgba(15, 23, 42, 0.8);
    border-color: rgba(59, 130, 246, 0.4);
}

.goal-checkbox input:checked + .goal-card {
    background: rgba(59, 130, 246, 0.2);
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.goal-icon {
    font-size: 32px;
}

.goal-label {
    font-size: 14px;
    font-weight: 500;
    color: #e2e8f0;
}

.goals-hint {
    font-size: 13px;
    color: #64748b;
    text-align: center;
}

/* ========================================
   COMPLETION MODAL
   ======================================== */

.completion-modal {
    max-width: 500px;
}

.completion-content {
    padding: 40px;
    text-align: center;
}

.completion-icon {
    font-size: 80px;
    margin-bottom: 20px;
    animation: bounce 1s ease infinite;
}

@keyframes bounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-20px); }
}

.completion-content h2 {
    font-size: 28px;
    font-weight: 700;
    color: #ffffff;
    margin: 0 0 8px 0;
}

.completion-content > p {
    font-size: 16px;
    color: #94a3b8;
    margin: 0 0 32px 0;
}

.next-steps {
    background: rgba(59, 130, 246, 0.05);
    border: 1px solid rgba(59, 130, 246, 0.2);
    border-radius: 12px;
    padding: 24px;
    margin-bottom: 24px;
    text-align: left;
}

.next-steps h3 {
    font-size: 16px;
    font-weight: 600;
    color: #e2e8f0;
    margin: 0 0 16px 0;
}

.next-step-card {
    background: rgba(15, 23, 42, 0.5);
    border: 1px solid rgba(59, 130, 246, 0.2);
    border-radius: 8px;
    padding: 16px;
    display: flex;
    gap: 16px;
    align-items: center;
    cursor: pointer;
    transition: all 0.2s ease;
    margin-bottom: 12px;
}

.next-step-card:last-child {
    margin-bottom: 0;
}

.next-step-card:hover {
    background: rgba(15, 23, 42, 0.8);
    border-color: #3b82f6;
    transform: translateX(4px);
}

.step-number {
    width: 32px;
    height: 32px;
    background: linear-gradient(135deg, #3b82f6, #2563eb);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    color: white;
    flex-shrink: 0;
}

.next-step-card strong {
    display: block;
    color: #ffffff;
    font-size: 15px;
    margin-bottom: 4px;
}

.next-step-card p {
    margin: 0;
    font-size: 13px;
    color: #94a3b8;
}

/* ========================================
   TUTORIAL TOOLTIPS
   ======================================== */

.tutorial-tooltip {
    position: fixed;
    background: linear-gradient(135deg, #1e293b, #0f172a);
    border: 2px solid #3b82f6;
    border-radius: 12px;
    padding: 16px;
    max-width: 300px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5),
                0 0 0 4px rgba(59, 130, 246, 0.1);
    z-index: 10001;
    opacity: 0;
    transform: scale(0.9);
    transition: all 0.3s ease;
}

.tutorial-tooltip.show {
    opacity: 1;
    transform: scale(1);
}

.tooltip-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.tooltip-header strong {
    color: #ffffff;
    font-size: 16px;
}

.step-counter {
    background: rgba(59, 130, 246, 0.2);
    color: #3b82f6;
    padding: 4px 8px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 600;
}

.tutorial-tooltip p {
    color: #94a3b8;
    font-size: 14px;
    margin: 0 0 16px 0;
    line-height: 1.6;
}

.tooltip-actions {
    display: flex;
    gap: 8px;
    justify-content: flex-end;
}

.tutorial-highlight {
    position: relative;
    z-index: 10000;
    box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.3),
                0 0 0 8px rgba(59, 130, 246, 0.1);
    border-radius: 8px;
    animation: pulse 2s ease infinite;
}

@keyframes pulse {
    0%, 100% {
        box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.3),
                    0 0 0 8px rgba(59, 130, 246, 0.1);
    }
    50% {
        box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.5),
                    0 0 0 8px rgba(59, 130, 246, 0.2);
    }
}

/* ========================================
   EMPTY STATES
   ======================================== */

.empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 60px 20px;
    text-align: center;
}

.empty-icon {
    font-size: 80px;
    margin-bottom: 20px;
    opacity: 0.5;
}

.empty-state h2 {
    font-size: 24px;
    font-weight: 600;
    color: #e2e8f0;
    margin: 0 0 8px 0;
}

.empty-state p {
    font-size: 16px;
    color: #94a3b8;
    margin: 0 0 32px 0;
}

.empty-actions {
    display: flex;
    flex-direction: column;
    gap: 12px;
    width: 100%;
    max-width: 300px;
    margin-bottom: 20px;
}

.empty-link {
    color: #3b82f6;
    font-size: 14px;
    text-decoration: none;
    transition: color 0.2s;
}

.empty-link:hover {
    color: #60a5fa;
    text-decoration: underline;
}

/* ========================================
   MOBILE RESPONSIVE
   ======================================== */

@media (max-width: 640px) {
    .onboarding-modal {
        margin: 0;
        border-radius: 0;
        max-height: 100vh;
    }
    
    .onboarding-welcome-content {
        padding: 24px;
    }
    
    .welcome-title {
        font-size: 24px;
    }
    
    .wizard-content {
        padding: 20px;
    }
    
    .wizard-actions {
        padding: 0 20px 20px 20px;
        flex-direction: column;
    }
    
    .wizard-actions .btn-secondary {
        order: -1;
    }
    
    .tutorial-tooltip {
        max-width: calc(100vw - 40px);
        left: 20px !important;
        right: 20px !important;
    }
}

/* ========================================
   SCROLLBAR STYLING
   ======================================== */

.onboarding-modal::-webkit-scrollbar {
    width: 8px;
}

.onboarding-modal::-webkit-scrollbar-track {
    background: rgba(15, 23, 42, 0.5);
    border-radius: 10px;
}

.onboarding-modal::-webkit-scrollbar-thumb {
    background: rgba(59, 130, 246, 0.5);
    border-radius: 10px;
}

.onboarding-modal::-webkit-scrollbar-thumb:hover {
    background: rgba(59, 130, 246, 0.7);
}

/* ========================================
   ACCESSIBILITY
   ======================================== */

.btn-primary:focus,
.btn-secondary:focus,
.form-group input:focus,
.form-group select:focus {
    outline: 2px solid #3b82f6;
    outline-offset: 2px;
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .onboarding-modal {
        border-width: 2px;
    }
    
    .btn-primary,
    .btn-secondary {
        border-width: 2px;
    }
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
    .onboarding-modal-overlay,
    .onboarding-modal,
    .tutorial-tooltip,
    .btn-primary,
    .btn-secondary,
    .goal-card,
    .next-step-card {
        transition: none;
    }
    
    .completion-icon {
        animation: none;
    }
    
    .tutorial-highlight {
        animation: none;
    }
}
