/**
 * Calculator Onboarding Styles
 * Styling för välkomstmodal och guide
 */

/* Overlay */
.onboarding-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(8px);
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
    padding: 20px;
    overflow-y: auto;
    overflow-x: hidden;
    overscroll-behavior: contain;
}

/* Lock body scroll when modal is open */
body.onboarding-open {
    overflow: hidden !important;
    position: fixed !important;
    width: 100% !important;
    height: 100% !important;
}

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

/* Modal */
.onboarding-modal {
    background: linear-gradient(135deg, #ffffff 0%, #f8fafc 100%);
    border-radius: 20px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    max-width: 520px;
    width: 100%;
    max-height: 85vh;
    overflow-y: auto;
    transform: scale(0.9) translateY(20px);
    transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.onboarding-overlay.show .onboarding-modal {
    transform: scale(1) translateY(0);
}

/* Header */
.onboarding-header {
    text-align: center;
    padding: 24px 24px 20px;
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: white;
    border-radius: 20px 20px 0 0;
    position: relative;
}

.onboarding-icon {
    width: 56px;
    height: 56px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 16px;
    font-size: 28px;
    /* animation: pulse 2s ease-in-out infinite; - Removed for better UX */
}

/* @keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
} - Removed pulse animation */
}

.onboarding-header h2 {
    font-size: 22px;
    font-weight: 700;
    margin: 0 0 8px;
    color: white;
}

.onboarding-subtitle {
    font-size: 14px;
    opacity: 0.95;
    margin: 0;
    font-weight: 400;
}

/* Content */
.onboarding-content {
    padding: 20px;
}

/* Steps */
.onboarding-steps {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 16px;
}

.onboarding-step {
    display: flex;
    gap: 12px;
    padding: 12px 14px;
    background: white;
    border-radius: 12px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.08);
    transition: all 0.2s ease;
}

.onboarding-step:hover {
    transform: translateX(4px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.step-number {
    flex-shrink: 0;
    width: 32px;
    height: 32px;
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    font-weight: 700;
    box-shadow: 0 2px 4px rgba(16, 185, 129, 0.3);
}

.step-content {
    flex: 1;
}

.step-content h3 {
    font-size: 15px;
    font-weight: 600;
    margin: 0 0 4px;
    color: #1f2937;
}

.step-content p {
    font-size: 13px;
    color: #6b7280;
    margin: 0;
    line-height: 1.4;
}

.step-visual {
    display: none;
}

.step-arrow {
    display: none;
}

/* Features */
.onboarding-features {
    background: linear-gradient(135deg, #f0fdf4 0%, #dcfce7 100%);
    border-radius: 12px;
    padding: 16px;
    border: 1.5px solid #10b981;
}

.features-title {
    font-size: 15px;
    font-weight: 600;
    margin: 0 0 12px;
    color: #1f2937;
    text-align: center;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
}

.feature-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: #1f2937;
    font-weight: 500;
}

.feature-item i {
    color: #10b981;
    font-size: 16px;
    flex-shrink: 0;
}

/* Footer */
.onboarding-footer {
    padding: 16px 20px;
    background: #f9fafb;
    border-radius: 0 0 20px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    border-top: 1px solid #e5e7eb;
}

.onboarding-checkbox {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    font-size: 13px;
    color: #6b7280;
    user-select: none;
}

.onboarding-checkbox input {
    width: 16px;
    height: 16px;
    cursor: pointer;
}

.btn-onboarding-primary {
    padding: 10px 20px;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    border: none;
    outline: none;
    display: flex;
    align-items: center;
    gap: 6px;
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: white;
    box-shadow: 0 2px 4px rgba(16, 185, 129, 0.3);
}

.btn-onboarding-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(16, 185, 129, 0.4);
}

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

/* Mobile responsiveness */
@media (max-width: 768px) {
    .onboarding-modal {
        max-width: 95%;
        max-height: 90vh;
        border-radius: 16px;
    }
    
    .onboarding-header {
        padding: 20px 16px 16px;
        border-radius: 16px 16px 0 0;
    }
    
    .onboarding-header h2 {
        font-size: 19px;
    }
    
    .onboarding-subtitle {
        font-size: 13px;
    }
    
    .onboarding-icon {
        width: 48px;
        height: 48px;
        font-size: 24px;
        margin-bottom: 12px;
    }
    
    .onboarding-content {
        padding: 16px;
    }
    
    .onboarding-steps {
        gap: 6px;
        margin-bottom: 12px;
    }
    
    .onboarding-step {
        padding: 10px 12px;
        gap: 10px;
    }
    
    .step-number {
        width: 28px;
        height: 28px;
        font-size: 14px;
    }
    
    .step-content h3 {
        font-size: 14px;
        margin-bottom: 3px;
    }
    
    .step-content p {
        font-size: 12px;
    }
    
    .onboarding-features {
        padding: 12px;
    }
    
    .features-title {
        font-size: 14px;
        margin-bottom: 10px;
    }
    
    .features-grid {
        grid-template-columns: 1fr;
        gap: 8px;
    }
    
    .feature-item {
        font-size: 12px;
    }
    
    .feature-item i {
        font-size: 14px;
    }
    
    .onboarding-footer {
        flex-direction: column;
        align-items: stretch;
        padding: 14px 16px;
        gap: 10px;
        border-radius: 0 0 16px 16px;
    }
    
    .onboarding-checkbox {
        font-size: 12px;
    }
    
    .btn-onboarding-primary {
        width: 100%;
        justify-content: center;
        padding: 10px 16px;
        font-size: 13px;
    }
}

/* Dark mode support (optional) */
@media (prefers-color-scheme: dark) {
    .onboarding-modal {
        background: linear-gradient(135deg, #1f2937 0%, #111827 100%);
    }
    
    .onboarding-step {
        background: #374151;
    }
    
    .step-content h3 {
        color: #f9fafb;
    }
    
    .step-content p {
        color: #d1d5db;
    }
    
    .onboarding-features {
        background: linear-gradient(135deg, #064e3b 0%, #065f46 100%);
        border-color: #10b981;
    }
    
    .features-title {
        color: #f9fafb;
    }
    
    .feature-item {
        color: #f9fafb;
    }
    
    .onboarding-footer {
        background: #1f2937;
        border-top-color: #374151;
    }
    
    .onboarding-checkbox {
        color: #d1d5db;
    }
    
}

/* Smooth scrolling för modal */
.onboarding-modal {
    scroll-behavior: smooth;
}

/* Custom scrollbar för modal */
.onboarding-modal::-webkit-scrollbar {
    width: 8px;
}

.onboarding-modal::-webkit-scrollbar-track {
    background: #f1f5f9;
    border-radius: 0 24px 24px 0;
}

.onboarding-modal::-webkit-scrollbar-thumb {
    background: #10b981;
    border-radius: 4px;
}

.onboarding-modal::-webkit-scrollbar-thumb:hover {
    background: #059669;
}
