/* Wizard Modal Styles */

.wizard-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

.wizard-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.85);
}

.wizard-container {
    position: relative;
    z-index: 1;
    max-width: 700px;
    width: 100%;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    animation: slideUp 0.3s ease;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.wizard-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    padding-bottom: 1.5rem;
    border-bottom: 1.5px solid var(--border-color);
}

.wizard-progress {
    height: 6px;
    background: var(--border-color);
    border-radius: 3px;
    margin: 1.5rem 0;
    overflow: hidden;
}

.wizard-progress-bar {
    height: 100%;
    background: var(--primary);
    transition: width 0.4s ease;
    border-radius: 3px;
}

.wizard-body {
    flex: 1;
    overflow-y: auto;
    padding: 1.5rem 0;
}

.wizard-body::-webkit-scrollbar {
    width: 8px;
}

.wizard-body::-webkit-scrollbar-track {
    background: var(--bg-primary);
}

.wizard-body::-webkit-scrollbar-thumb {
    background: var(--border-color);
    border-radius: 4px;
}

.wizard-footer {
    display: flex;
    justify-content: space-between;
    padding-top: 1.5rem;
    border-top: 1.5px solid var(--border-color);
}

.wizard-step {
    animation: stepFadeIn 0.3s ease;
}

@keyframes stepFadeIn {
    from {
        opacity: 0;
        transform: translateX(20px);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.wizard-step h3 {
    margin-bottom: 0.5rem;
    color: var(--text-main);
}

.wizard-help {
    color: var(--text-secondary);
    margin-bottom: 2rem;
    font-size: 0.95rem;
}

/* File Upload Areas */
.file-upload-area {
    border: 2px dashed var(--border-color);
    border-radius: 12px;
    padding: 2rem;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
}

.file-upload-area:hover {
    border-color: var(--primary);
}

.upload-placeholder p {
    margin: 0.5rem 0;
    color: var(--text-main);
}

.upload-placeholder small {
    color: var(--text-secondary);
    font-size: 0.85rem;
}

/* Sections Grid */
.sections-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 1rem;
}

.section-checkbox {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem;
    background: var(--bg-secondary);
    border: 1.5px solid var(--border-color);
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.section-checkbox:hover {
    background: var(--bg-secondary);
    border-color: var(--primary);
}

.section-checkbox input[type="checkbox"] {
    width: 20px;
    height: 20px;
    cursor: pointer;
}

.section-checkbox.locked {
    opacity: 0.6;
    cursor: not-allowed;
}

.section-checkbox small {
    display: block;
    color: var(--text-secondary);
    font-size: 0.75rem;
    margin-top: 0.25rem;
}

/* Review Summary */
.review-summary {
    background: var(--bg-secondary);
    border: 1.5px solid var(--border-color);
    border-radius: 12px;
    padding: 1.5rem;
}

.review-summary h4 {
    color: var(--primary);
    margin-bottom: 1rem;
    font-size: 1.1rem;
}

.summary-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.75rem;
    margin-bottom: 1rem;
}

.summary-grid div {
    padding: 0.75rem;
    background: var(--bg-primary);
    border-radius: 8px;
    font-size: 0.9rem;
}

.summary-grid strong {
    color: var(--text-secondary);
    display: block;
    margin-bottom: 0.25rem;
    font-size: 0.85rem;
}

.color-preview {
    margin-top: 0.5rem;
}

.sections-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 0.5rem;
}

.section-badge {
    display: inline-block;
    padding: 0.4rem 0.8rem;
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    font-size: 0.85rem;
    color: var(--text-main);
    text-transform: capitalize;
}

/* Checkbox Labels */
.checkbox-label {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    cursor: pointer;
    padding: 0.75rem;
    background: var(--bg-secondary);
    border-radius: 8px;
    transition: background 0.2s;
}

.checkbox-label:hover {
    background: var(--bg-primary);
}

.checkbox-label input[type="checkbox"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
}

/* Loading Spinner */
.wizard-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.loading-spinner {
    width: 60px;
    height: 60px;
    border: 4px solid var(--border-color);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

/* ===== Mobile Responsive Styles ===== */

/* Tablet (768px and below) */
@media (max-width: 768px) {
    .wizard-modal {
        padding: 1rem;
    }

    .wizard-container {
        max-width: 100%;
        max-height: 95vh;
    }

    .wizard-header {
        padding-bottom: 1rem;
    }

    .wizard-progress {
        margin: 1rem 0;
    }

    .wizard-body {
        padding: 1rem 0;
    }

    .wizard-footer {
        padding-top: 1rem;
    }

    /* Single column grids */
    .sections-grid {
        grid-template-columns: 1fr;
    }

    .summary-grid {
        grid-template-columns: 1fr;
    }

    .file-upload-area {
        padding: 1.5rem;
    }

    .review-summary {
        padding: 1.25rem;
    }

    .section-checkbox {
        padding: 0.875rem;
    }
}

/* Mobile (480px and below) */
@media (max-width: 480px) {
    .wizard-modal {
        padding: 0;
    }

    .wizard-container {
        max-height: 100vh;
        border-radius: 0;
    }

    .wizard-header {
        padding-bottom: 0.75rem;
    }

    .wizard-body {
        padding: 0.75rem 0;
    }

    .wizard-footer {
        padding-top: 0.75rem;
        flex-wrap: wrap;
        gap: 0.5rem;
    }

    .wizard-footer .btn {
        flex: 1;
        min-width: 120px;
    }

    .file-upload-area {
        padding: 1.25rem;
        border-radius: 8px;
    }

    .upload-placeholder p {
        font-size: 0.9rem;
    }

    .section-checkbox {
        padding: 0.75rem;
        border-radius: 8px;
    }

    .review-summary {
        padding: 1rem;
        border-radius: 8px;
    }

    .review-summary h4 {
        font-size: 1rem;
    }

    .summary-grid div {
        padding: 0.625rem;
        font-size: 0.85rem;
    }

    .section-badge {
        padding: 0.3rem 0.6rem;
        font-size: 0.8rem;
    }

    .checkbox-label {
        padding: 0.625rem;
    }

    .loading-spinner {
        width: 50px;
        height: 50px;
    }
}