/* Project Creation Wizard Styles */

.project-wizard-container {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 100000;
}

.wizard-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    animation: fadeIn 0.3s ease;
}

.wizard-modal {
    background: var(--bg-secondary, white);
    width: 95%;
    max-width: 1400px;
    height: 90vh;
    border-radius: 16px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    animation: slideUp 0.3s ease;
}

/* Wizard Header */
.wizard-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    padding: 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.wizard-steps {
    display: flex;
    align-items: center;
    gap: 20px;
}

.wizard-step {
    display: flex;
    align-items: center;
    gap: 10px;
    color: rgba(255, 255, 255, 0.6);
    cursor: pointer;
    transition: all 0.3s;
}

.wizard-step.active {
    color: white;
}

.wizard-step.completed {
    color: rgba(255, 255, 255, 0.9);
}

.step-number {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 16px;
    transition: all 0.3s;
}

.wizard-step.active .step-number {
    background: white;
    color: #667eea;
}

.wizard-step.completed .step-number {
    background: #48bb78;
    color: white;
}

.wizard-step.completed .step-number::after {
    content: '\f00c';
    font-family: 'Font Awesome 5 Free';
    font-weight: 900;
}

.step-label {
    font-size: 14px;
    font-weight: 500;
}

.step-connector {
    width: 60px;
    height: 2px;
    background: rgba(255, 255, 255, 0.3);
}

.wizard-close {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.wizard-close:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: scale(1.1);
}

/* Wizard Content */
.wizard-content {
    flex: 1;
    overflow: hidden;  /* Changed from auto to hidden */
    padding: 40px;
    display: flex;
    flex-direction: column;
}

.wizard-page {
    height: 100%;
    display: flex;
    flex-direction: column;
}

.wizard-page[data-page="2"] {
    overflow: hidden;
}

.wizard-page h2 {
    margin: 0 0 20px 0;
    font-size: 24px;
    color: var(--text-primary, #333);
    display: flex;
    align-items: center;
    gap: 12px;
    flex-shrink: 0;
}

/* Specific for step 2 with task builder */
.wizard-page[data-page="2"] h2 {
    margin-bottom: 15px;
}

.wizard-form {
    max-width: 800px;
    margin: 0 auto;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 20px;
}

.form-group {
    display: flex;
    flex-direction: column;
}

.form-group label {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 8px;
    font-weight: 600;
    color: var(--text-primary, #333);
    font-size: 14px;
}

.form-group input,
.form-group textarea,
.form-group select {
    padding: 12px;
    border: 2px solid var(--border-color, #e0e0e0);
    border-radius: 8px;
    font-size: 14px;
    background: var(--bg-primary, white);
    color: var(--text-primary, #333);
    transition: all 0.2s;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    outline: none;
    border-color: var(--primary-color, #667eea);
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

/* Quick Templates */
.quick-templates {
    margin-top: 40px;
}

.quick-templates h3 {
    margin: 0 0 20px 0;
    font-size: 18px;
    color: var(--text-primary, #333);
}

.template-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 20px;
}

.template-card {
    padding: 20px;
    background: var(--bg-tertiary, #f8f9fa);
    border-radius: 12px;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s;
    border: 3px solid transparent;
}

.template-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
    border-color: var(--primary-color, #667eea);
}

.template-card.selected {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-color: #764ba2;
}

.template-card i {
    font-size: 32px;
    display: block;
    margin-bottom: 10px;
}

.template-card span {
    font-weight: 600;
    font-size: 14px;
}

/* Review Page */
.review-container {
    max-width: 1000px;
    margin: 0 auto;
}

.review-section {
    background: var(--bg-tertiary, #f8f9fa);
    border-radius: 12px;
    padding: 25px;
    margin-bottom: 20px;
}

.review-section h3 {
    margin: 0 0 20px 0;
    font-size: 18px;
    color: var(--text-primary, #333);
    display: flex;
    align-items: center;
    gap: 8px;
}

.review-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 15px;
}

.review-item {
    display: flex;
    gap: 10px;
}

.review-label {
    font-weight: 600;
    color: var(--text-secondary, #666);
    min-width: 80px;
}

.review-value {
    color: var(--text-primary, #333);
}

.review-value.monospace {
    font-family: 'Courier New', monospace;
    font-size: 12px;
    padding: 4px 8px;
    background: var(--bg-secondary, white);
    border-radius: 4px;
}

.review-batch {
    margin-bottom: 20px;
    padding: 15px;
    background: var(--bg-secondary, white);
    border-radius: 8px;
}

.review-batch h4 {
    margin: 0 0 10px 0;
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary, #333);
}

.review-tasks {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.review-task {
    padding: 6px 12px;
    border-radius: 6px;
    color: white;
    font-size: 12px;
    font-weight: 500;
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

.timeline-preview {
    display: flex;
    gap: 30px;
    justify-content: center;
    padding: 20px;
    background: var(--bg-secondary, white);
    border-radius: 8px;
}

.timeline-stat {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 16px;
    color: var(--text-primary, #333);
}

.timeline-stat i {
    font-size: 24px;
    color: var(--primary-color, #667eea);
}

.timeline-stat span {
    font-weight: 600;
}

/* Wizard Footer */
.wizard-footer {
    padding: 20px 40px;
    background: var(--bg-tertiary, #f8f9fa);
    border-top: 1px solid var(--border-color, #e0e0e0);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.wizard-nav {
    display: flex;
    gap: 10px;
}

.btn-wizard {
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    gap: 8px;
}

.btn-cancel {
    background: var(--bg-secondary, white);
    color: var(--text-secondary, #666);
    border: 1px solid var(--border-color, #e0e0e0);
}

.btn-cancel:hover {
    background: var(--bg-tertiary, #f8f9fa);
}

.btn-prev {
    background: var(--bg-secondary, white);
    color: var(--text-primary, #333);
    border: 1px solid var(--border-color, #e0e0e0);
}

.btn-prev:hover {
    background: var(--bg-tertiary, #f8f9fa);
}

.btn-next,
.btn-create {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.btn-next:hover,
.btn-create:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.3);
}

.btn-create {
    background: linear-gradient(135deg, #48bb78 0%, #38a169 100%);
}

/* Task Builder Integration */
#wizard-task-builder {
    height: 100%;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

#wizard-task-builder .task-builder-container {
    height: 100%;
    background: transparent;
    display: flex;
    flex-direction: column;
}

#wizard-task-builder .task-builder-header {
    display: none;
}

#wizard-task-builder .task-builder-footer {
    display: none;
}

#wizard-task-builder .task-builder-layout {
    height: 100%;
    flex: 1;
    min-height: 0;
}

#wizard-task-builder .task-palette {
    height: 100%;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

#wizard-task-builder .task-palette h3 {
    flex-shrink: 0;
    margin-bottom: 15px;
}

#wizard-task-builder .task-categories {
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
    min-height: 0;
    padding-right: 10px;
}

/* Force scrollbar visibility */
#wizard-task-builder .task-categories::-webkit-scrollbar {
    width: 8px;
    display: block !important;
}

#wizard-task-builder .task-categories::-webkit-scrollbar-track {
    background: #f0f0f0;
    border-radius: 4px;
}

#wizard-task-builder .task-categories::-webkit-scrollbar-thumb {
    background: #888;
    border-radius: 4px;
}

#wizard-task-builder .task-categories::-webkit-scrollbar-thumb:hover {
    background: #555;
}

/* Animations */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

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

/* Dark Theme Support */
[data-theme="dark"] .wizard-modal {
    background: #1e1e1e;
}

[data-theme="dark"] .wizard-content {
    background: #1e1e1e;
}

[data-theme="dark"] .form-group input,
[data-theme="dark"] .form-group textarea,
[data-theme="dark"] .form-group select {
    background: #2d2d2d;
    color: #e0e0e0;
    border-color: #404040;
}

[data-theme="dark"] .template-card {
    background: #2d2d2d;
}

[data-theme="dark"] .review-section {
    background: #2d2d2d;
}

[data-theme="dark"] .review-batch {
    background: #3a3a3a;
}

[data-theme="dark"] .wizard-footer {
    background: #2d2d2d;
    border-color: #404040;
}

/* Responsive Design */
@media (max-width: 992px) {
    .wizard-modal {
        width: 100%;
        height: 100vh;
        border-radius: 0;
    }

    .wizard-steps {
        flex-direction: column;
        align-items: flex-start;
    }

    .step-connector {
        display: none;
    }

    .form-row {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .wizard-content {
        padding: 20px;
    }

    .template-cards {
        grid-template-columns: repeat(2, 1fr);
    }

    .timeline-preview {
        flex-direction: column;
        gap: 15px;
    }
}