/**
 * Knexia Setup Wizard Styles
 * Complete styling for the guided onboarding experience
 */

/* Wizard Modal Styling */
.setup-wizard-content {
    border: none;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    border-radius: 16px;
    overflow: hidden;
}

.setup-wizard-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-bottom: none;
    padding: 20px 24px;
    position: relative;
}

.setup-wizard-close {
    filter: brightness(0) invert(1);
    opacity: 0.8;
}

.setup-wizard-close:hover {
    opacity: 1;
}

.wizard-progress-container {
    flex-grow: 1;
    margin-right: 20px;
}

.wizard-progress-bar {
    background: rgba(255, 255, 255, 0.2);
    height: 8px;
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 8px;
}

.wizard-progress-fill {
    background: linear-gradient(90deg, #4CAF50, #81C784);
    height: 100%;
    border-radius: 4px;
    transition: width 0.5s ease;
    position: relative;
}

.wizard-progress-fill::after {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    width: 30px;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3));
    animation: shimmer 2s infinite;
}

@keyframes shimmer {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}

.wizard-step-counter {
    font-size: 0.9rem;
    font-weight: 500;
    opacity: 0.9;
}

/* Wizard Body */
.setup-wizard-body {
    padding: 32px;
    background: #fafbfc;
    min-height: 400px;
}

.wizard-step-content {
    max-width: 600px;
    margin: 0 auto;
}

/* Step Icons */
.wizard-icon, .wizard-step-icon {
    font-size: 4rem;
    margin-bottom: 1rem;
    background: linear-gradient(135deg, #667eea, #764ba2);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Welcome Step Styling */
.wizard-welcome {
    text-align: center;
}

.setup-benefits .row {
    margin-top: 2rem;
}

.benefit-item {
    text-align: center;
    padding: 20px;
    background: white;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    height: 100%;
    transition: transform 0.2s ease;
}

.benefit-item:hover {
    transform: translateY(-2px);
}

.benefit-item i {
    font-size: 2rem;
    margin-bottom: 0.5rem;
}

.benefit-item h6 {
    color: #2d3748;
    font-weight: 600;
    margin-bottom: 0.25rem;
}

.benefit-item small {
    color: #718096;
}

/* Phone Setup Step */
.option-card {
    background: white;
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    padding: 24px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    height: 100%;
}

.option-card:hover {
    border-color: #667eea;
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.option-card i {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.option-card h6 {
    color: #2d3748;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.option-card p {
    color: #718096;
    margin-bottom: 1rem;
}

/* Test Step */
.test-option-card {
    background: white;
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    padding: 20px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
}

.test-option-card:hover {
    border-color: #4CAF50;
    transform: translateY(-2px);
}

.test-option-card i {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.test-checklist ul {
    background: white;
    border-radius: 8px;
    padding: 16px;
    margin-top: 16px;
}

.test-checklist li {
    padding: 4px 0;
    color: #4a5568;
}

/* Greeting Step */
.greeting-examples {
    margin-top: 20px;
    background: white;
    border-radius: 8px;
    padding: 16px;
}

.example-buttons {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-top: 8px;
}

/* Mock Toggle */
.toggle-preview {
    background: white;
    border-radius: 8px;
    padding: 20px;
    margin-top: 16px;
    text-align: center;
}

.mock-toggle {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    padding: 12px 20px;
    background: #f7fafc;
    border-radius: 8px;
    border: 1px solid #e2e8f0;
}

/* Wizard Footer */
.setup-wizard-footer {
    padding: 20px 32px;
    background: white;
    border-top: 1px solid #e2e8f0;
}

/* Floating Progress Indicator */
.wizard-floating-progress {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 1040;
    background: white;
    border-radius: 50px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    padding: 12px 20px;
    display: flex;
    align-items: center;
    gap: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.wizard-floating-progress:hover {
    transform: scale(1.05);
    box-shadow: 0 6px 25px rgba(0, 0, 0, 0.2);
}

.wizard-floating-progress::after {
    content: 'Click to continue';
    position: absolute;
    bottom: -25px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 0.7rem;
    color: #4a5568;
    background: rgba(255, 255, 255, 0.9);
    padding: 2px 8px;
    border-radius: 12px;
    white-space: nowrap;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.wizard-floating-progress:hover::after {
    opacity: 1;
}

.progress-circle {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: conic-gradient(#4CAF50 0deg, #4CAF50 calc(var(--progress, 0) * 3.6deg), #e2e8f0 calc(var(--progress, 0) * 3.6deg));
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.progress-circle::before {
    content: '';
    position: absolute;
    width: 28px;
    height: 28px;
    background: white;
    border-radius: 50%;
}

.progress-text {
    position: relative;
    font-size: 0.8rem;
    font-weight: 600;
    color: #2d3748;
}

.progress-label {
    font-size: 0.9rem;
    color: #4a5568;
    font-weight: 500;
}

/* Highlight Overlay System */
.wizard-highlight-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.7);
    z-index: 1050;
    pointer-events: none;
}

.wizard-spotlight {
    position: absolute;
    background: transparent;
    border: 3px solid #4CAF50;
    border-radius: 8px;
    box-shadow: 0 0 0 9999px rgba(0, 0, 0, 0.7), 0 0 20px #4CAF50;
    pointer-events: none;
    transition: all 0.5s ease;
}

.wizard-tooltip {
    position: absolute;
    z-index: 1051;
    pointer-events: auto;
}

.tooltip-content {
    background: white;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
    max-width: 300px;
    position: relative;
    border: 2px solid #4CAF50;
}

.tooltip-title {
    color: #2d3748;
    font-weight: 600;
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.tooltip-description {
    color: #4a5568;
    margin: 0;
    line-height: 1.5;
}

.tooltip-arrow {
    position: absolute;
    top: -10px;
    left: 20px;
    width: 0;
    height: 0;
    border-left: 10px solid transparent;
    border-right: 10px solid transparent;
    border-bottom: 10px solid #4CAF50;
}

.tooltip-arrow::after {
    content: '';
    position: absolute;
    top: 2px;
    left: -8px;
    width: 0;
    height: 0;
    border-left: 8px solid transparent;
    border-right: 8px solid transparent;
    border-bottom: 8px solid white;
}

/* Highlighted Elements */
.wizard-highlighted {
    position: relative;
    z-index: 1051;
    animation: highlightPulse 2s infinite;
}

@keyframes highlightPulse {
    0% { box-shadow: 0 0 20px rgba(76, 175, 80, 0.6); }
    50% { box-shadow: 0 0 30px rgba(76, 175, 80, 0.9); }
    100% { box-shadow: 0 0 20px rgba(76, 175, 80, 0.6); }
}

/* Completion Celebration */
.wizard-celebration-toast {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 1060;
    background: linear-gradient(135deg, #4CAF50, #81C784);
    color: white;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(76, 175, 80, 0.4);
    animation: slideInRight 0.5s ease, celebrate 0.6s ease 0.2s;
}

.toast-content {
    padding: 16px 20px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.toast-content i {
    font-size: 1.5rem;
}

.toast-text strong {
    display: block;
    font-weight: 600;
}

.toast-text small {
    opacity: 0.9;
    font-size: 0.85rem;
}

.toast-content .btn-close {
    filter: brightness(0) invert(1);
    opacity: 0.8;
    margin-left: auto;
}

@keyframes slideInRight {
    from { transform: translateX(100%); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
}

@keyframes celebrate {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
}

/* Step-specific Styles */
.wizard-navigation-hint {
    margin-top: 24px;
    padding: 16px;
    background: rgba(102, 126, 234, 0.1);
    border-radius: 8px;
    text-align: center;
}

.phone-test-instructions {
    text-align: center;
    margin-top: 20px;
}

.test-completion {
    margin-top: 20px;
    text-align: center;
}

.golive-info .alert h4 {
    font-family: 'Monaco', 'Menlo', monospace;
    color: #2d3748;
}

.next-steps ul {
    background: white;
    border-radius: 8px;
    padding: 20px;
    list-style: none;
    margin: 20px 0;
}

.next-steps li {
    padding: 8px 0;
    display: flex;
    align-items: center;
    gap: 12px;
}

.sharing-options {
    margin-top: 24px;
}

.completion-celebration .alert ul {
    margin-bottom: 0;
}

.optional-integrations {
    margin-top: 24px;
}

.optional-integrations .btn {
    padding: 16px 12px;
    font-size: 0.85rem;
    line-height: 1.2;
}

.optional-integrations .btn i {
    font-size: 1.5rem;
    margin-bottom: 8px;
}

/* Responsive Design */
@media (max-width: 768px) {
    .setup-wizard-body {
        padding: 20px;
    }
    
    .wizard-floating-progress {
        right: 10px;
        top: 10px;
        padding: 8px 12px;
    }
    
    .progress-circle {
        width: 32px;
        height: 32px;
    }
    
    .progress-circle::before {
        width: 22px;
        height: 22px;
    }
    
    .progress-text {
        font-size: 0.7rem;
    }
    
    .tooltip-content {
        max-width: 250px;
        padding: 16px;
    }
    
    .wizard-celebration-toast {
        left: 10px;
        right: 10px;
        top: 10px;
    }
    
    .example-buttons {
        justify-content: center;
    }
    
    .sharing-options .d-flex {
        flex-direction: column;
        gap: 8px;
    }
    
    .optional-integrations .row {
        gap: 8px;
    }
    
    .optional-integrations .col-md-4 {
        flex: 1;
    }
}

/* Dark mode support */
@media (prefers-color-scheme: dark) {
    .setup-wizard-body {
        background: #1a202c;
    }
    
    .benefit-item,
    .option-card,
    .test-option-card,
    .greeting-examples,
    .toggle-preview,
    .test-checklist ul,
    .next-steps ul {
        background: #2d3748;
        border-color: #4a5568;
    }
    
    .benefit-item h6,
    .option-card h6,
    .tooltip-title {
        color: #e2e8f0;
    }
    
    .benefit-item small,
    .option-card p,
    .tooltip-description {
        color: #a0aec0;
    }
    
    .wizard-floating-progress,
    .tooltip-content {
        background: #2d3748;
        border-color: #4a5568;
    }
    
    .progress-circle::before {
        background: #2d3748;
    }
    
    .progress-text {
        color: #e2e8f0;
    }
    
    .progress-label {
        color: #a0aec0;
    }
}

/* Animation for wizard steps */
.wizard-step-content {
    animation: fadeInUp 0.4s ease;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Hover effects for interactive elements */
.wizard-floating-progress:hover {
    cursor: pointer;
}

.wizard-floating-progress:hover .progress-label {
    color: #4CAF50;
}

/* Loading states */
.wizard-loading {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.wizard-loading::after {
    content: '';
    width: 16px;
    height: 16px;
    border: 2px solid transparent;
    border-top: 2px solid currentColor;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Success states */
.wizard-success {
    color: #4CAF50;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.wizard-success::before {
    content: '✓';
    font-weight: bold;
}

/* Error states */
.wizard-error {
    color: #f56565;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.wizard-error::before {
    content: '⚠';
    font-weight: bold;
}

/* Floating Help Button */
.wizard-floating-help {
    position: fixed;
    bottom: 20px;
    left: 20px;
    z-index: 1040;
    display: none;
    animation: bounceIn 0.5s ease;
}

.floating-help-btn {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: linear-gradient(135deg, #667eea, #764ba2);
    border: none;
    color: white;
    font-size: 1.5rem;
    box-shadow: 0 4px 20px rgba(102, 126, 234, 0.4);
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.floating-help-btn:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 25px rgba(102, 126, 234, 0.6);
    color: white;
}

.floating-help-btn:active {
    transform: scale(0.95);
}

@keyframes bounceIn {
    0% {
        opacity: 0;
        transform: scale(0.3);
    }
    50% {
        opacity: 1;
        transform: scale(1.05);
    }
    70% {
        transform: scale(0.9);
    }
    100% {
        opacity: 1;
        transform: scale(1);
    }
}

/* Navigation divider for sidebar */
.nav-divider {
    height: 1px;
    background: rgba(255, 255, 255, 0.1);
    margin: 8px 16px;
}

/* Continue Setup Button */
.wizard-continue-button {
    animation: bounceIn 0.6s ease;
}

.wizard-continue-button .btn {
    box-shadow: 0 4px 12px rgba(40, 167, 69, 0.3);
    border: none;
    font-weight: 600;
}

.wizard-continue-button .btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(40, 167, 69, 0.4);
}

@keyframes bounceIn {
    0% {
        opacity: 0;
        transform: scale(0.3);
    }
    50% {
        opacity: 1;
        transform: scale(1.05);
    }
    70% {
        transform: scale(0.9);
    }
    100% {
        opacity: 1;
        transform: scale(1);
    }
}