/**
 * Improved Onboarding Progress Styles
 * Less intrusive, progressive disclosure approach
 */

/* Minimized state - subtle floating button */
.onboarding-minimized {
    position: fixed;
    bottom: 24px;
    right: 24px;
    z-index: 999;
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.3s ease;
    animation: subtlePulse 3s ease-in-out infinite;
}

.onboarding-minimized.visible {
    opacity: 1;
    transform: translateY(0);
}

@keyframes subtlePulse {
    0%, 100% { transform: translateY(0) scale(1); }
    50% { transform: translateY(-2px) scale(1.02); }
}

.onboarding-expand-btn {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 20px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 24px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
    transition: all 0.3s ease;
}

.onboarding-expand-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.4);
}

.onboarding-expand-btn .icon {
    width: 20px;
    height: 20px;
    fill: currentColor;
}

/* Expanded state - focused single step */
.onboarding-progress-container {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0.9);
    width: 90%;
    max-width: 480px;
    background: white;
    border-radius: 16px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.15);
    z-index: 10000;
    opacity: 0;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.onboarding-progress-container.visible {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
}

.onboarding-progress-container.hiding {
    opacity: 0;
    transform: translate(-50%, -50%) scale(0.95);
}

.onboarding-progress {
    padding: 32px;
}

.progress-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
}

.progress-header h3 {
    font-size: 18px;
    font-weight: 600;
    color: #1a1a1a;
    margin: 0;
}

.progress-controls {
    display: flex;
    gap: 8px;
}

.progress-minimize,
.progress-close {
    width: 32px;
    height: 32px;
    border: none;
    background: #f5f5f5;
    border-radius: 8px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.progress-minimize:hover,
.progress-close:hover {
    background: #e0e0e0;
}

.progress-minimize svg,
.progress-close svg {
    width: 18px;
    height: 18px;
    fill: #666;
}

/* Current step display */
.current-step-display {
    text-align: center;
    padding: 32px 0;
}

.step-icon-large {
    width: 80px;
    height: 80px;
    margin: 0 auto 16px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.step-icon-large svg {
    width: 40px;
    height: 40px;
    fill: white;
}

.current-step-display h4 {
    font-size: 24px;
    font-weight: 600;
    color: #1a1a1a;
    margin: 0 0 12px;
}

.step-description {
    font-size: 15px;
    color: #666;
    line-height: 1.6;
    max-width: 360px;
    margin: 0 auto;
}

/* Progress bar */
.progress-bar-track {
    height: 6px;
    background: #f0f0f0;
    border-radius: 3px;
    margin: 32px 0 24px;
    overflow: hidden;
}

.progress-bar-fill {
    height: 100%;
    background: linear-gradient(90deg, #667eea 0%, #764ba2 100%);
    border-radius: 3px;
    transition: width 0.3s ease;
}

/* Action buttons */
.progress-actions {
    display: flex;
    gap: 12px;
    justify-content: center;
}

.progress-actions button {
    padding: 10px 20px;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-previous,
.btn-skip {
    background: #f5f5f5;
    color: #666;
}

.btn-previous:hover,
.btn-skip:hover {
    background: #e0e0e0;
}

.btn-action.primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    min-width: 120px;
}

.btn-action.primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

/* Completion state */
.onboarding-complete {
    text-align: center;
    padding: 48px 32px;
}

.complete-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto 24px;
    fill: #10B981;
}

.onboarding-complete h3 {
    font-size: 24px;
    font-weight: 600;
    color: #1a1a1a;
    margin: 0 0 12px;
}

.onboarding-complete p {
    font-size: 15px;
    color: #666;
    margin: 0 0 24px;
}

.btn-close-complete {
    padding: 12px 32px;
    background: linear-gradient(135deg, #10B981 0%, #059669 100%);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-close-complete:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3);
}

/* Dark mode support */
@media (prefers-color-scheme: dark) {
    .onboarding-progress-container {
        background: #1a1a1a;
        box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
    }
    
    .progress-header h3,
    .current-step-display h4,
    .onboarding-complete h3 {
        color: #f0f0f0;
    }
    
    .step-description,
    .onboarding-complete p {
        color: #999;
    }
    
    .progress-minimize,
    .progress-close,
    .btn-previous,
    .btn-skip {
        background: #2a2a2a;
        color: #ccc;
    }
    
    .progress-minimize:hover,
    .progress-close:hover,
    .btn-previous:hover,
    .btn-skip:hover {
        background: #333;
    }
    
    .progress-bar-track {
        background: #2a2a2a;
    }
}

/* Mobile responsiveness */
@media (max-width: 640px) {
    .onboarding-minimized {
        bottom: 16px;
        right: 16px;
    }
    
    .onboarding-expand-btn {
        padding: 10px 16px;
        font-size: 13px;
    }
    
    .onboarding-progress-container {
        width: 95%;
        max-width: none;
        top: 20px;
        transform: translateX(-50%) scale(0.9);
    }
    
    .onboarding-progress-container.visible {
        transform: translateX(-50%) scale(1);
    }
    
    .onboarding-progress {
        padding: 24px;
    }
    
    .current-step-display {
        padding: 24px 0;
    }
    
    .progress-actions {
        flex-direction: column;
    }
    
    .progress-actions button {
        width: 100%;
    }
}

/* Enhanced styles for new onboarding flow */

/* Recommended step styling */
.progress-step.recommended {
    position: relative;
}

.progress-step.recommended .step-icon {
    background: linear-gradient(135deg, #3B82F6 0%, #1D4ED8 100%);
    box-shadow: 0 2px 8px rgba(59, 130, 246, 0.3);
}

.progress-step.recommended::after {
    content: "Recommended";
    position: absolute;
    top: -8px;
    right: -8px;
    background: linear-gradient(135deg, #10B981 0%, #059669 100%);
    color: white;
    font-size: 10px;
    font-weight: 600;
    padding: 2px 6px;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(16, 185, 129, 0.3);
    z-index: 1;
}

.step-recommended {
    font-size: 11px;
    color: #10B981;
    font-weight: 600;
    margin-left: 4px;
}

/* Voice setup modal enhancements */
.voice-setup-modal .onboarding-progress-indicator {
    display: inline-block;
    background: rgba(59, 130, 246, 0.1);
    border: 1px solid rgba(59, 130, 246, 0.2);
    border-radius: 12px;
    padding: 4px 12px;
    margin-top: 8px;
}

.voice-setup-modal .onboarding-progress-indicator span {
    font-size: 12px;
    color: #3B82F6;
    font-weight: 600;
}

.voice-setup-benefits .benefit-item strong {
    color: #1D4ED8;
}

/* Enhanced voice setup benefits */
.voice-setup-benefits .benefit-item {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 12px 0;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.voice-setup-benefits .benefit-item:last-child {
    border-bottom: none;
}

.voice-setup-benefits .benefit-icon {
    flex-shrink: 0;
    width: 24px;
    height: 24px;
    fill: #10B981;
    margin-top: 2px;
}

.voice-setup-benefits .benefit-item span {
    font-size: 14px;
    line-height: 1.5;
    color: #374151;
}

/* Progress step animations */
.progress-step.current .step-icon {
    animation: currentStepPulse 2s ease-in-out infinite;
}

@keyframes currentStepPulse {
    0%, 100% { 
        transform: scale(1);
        box-shadow: 0 2px 8px rgba(59, 130, 246, 0.3);
    }
    50% { 
        transform: scale(1.05);
        box-shadow: 0 4px 16px rgba(59, 130, 246, 0.5);
    }
}