/* Creation Wizard Styles */

/* Modal overlay */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    z-index: 9999;
    display: none;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(4px);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.modal-overlay[style*="display: flex"] {
    opacity: 1;
}

.modal-overlay.active {
    opacity: 1;
}

/* Wizard modal */
.wizard-modal {
    background: white;
    border-radius: 16px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    max-width: 700px;
    width: 90%;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    transform: translateY(30px);
    transition: transform 0.3s ease;
}

.modal-overlay.active .wizard-modal {
    transform: translateY(0);
}

/* Wizard header */
.wizard-header {
    padding: 1.5rem;
    border-bottom: 1px solid #e5e7eb;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.wizard-header h2 {
    margin: 0;
    font-size: 1.5rem;
    font-weight: 600;
    color: #1f2937;
}

.close-btn {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: none;
    background: #f3f4f6;
    color: #6b7280;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s;
    font-size: 1.5rem;
    line-height: 1;
}

.close-btn:hover {
    background: #e5e7eb;
    color: #374151;
    transform: rotate(90deg);
}

/* Progress bar */
.wizard-progress {
    padding: 1.5rem;
    background: #f9fafb;
    border-bottom: 1px solid #e5e7eb;
}

.progress-bar {
    height: 4px;
    background: #e5e7eb;
    border-radius: 2px;
    overflow: hidden;
    margin-bottom: 1rem;
}

.progress-fill {
    height: 100%;
    background: #2d5016;
    border-radius: 2px;
    transition: width 0.3s ease;
    width: 33.33%;
}

.step-indicators {
    display: flex;
    justify-content: space-between;
    max-width: 200px;
    margin: 0 auto;
}

.step-indicator {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: white;
    border: 2px solid #e5e7eb;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    color: #9ca3af;
    font-size: 0.875rem;
    transition: all 0.3s ease;
}

.step-indicator.active {
    background: #2d5016;
    border-color: #2d5016;
    color: white;
}

.step-indicator.completed {
    background: #10b981;
    border-color: #10b981;
    color: white;
}

/* Wizard content */
.wizard-content {
    padding: 2rem;
    overflow-y: auto;
    flex: 1;
}

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

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

.wizard-step h3 {
    margin: 0 0 1.5rem 0;
    color: #1f2937;
    font-size: 1.25rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.wizard-step h3 i {
    color: #2d5016;
}

/* Form elements in wizard */
.wizard-content .form-group {
    margin-bottom: 1.25rem;
}

.wizard-content .form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: #374151;
    font-size: 0.95rem;
}

.wizard-content .form-group label::after {
    content: " *";
    color: #ef4444;
    font-weight: normal;
}

.wizard-content .form-group label:has(+ input:not([required]))::after,
.wizard-content .form-group label:has(+ select:not([required]))::after,
.wizard-content .form-group label:has(+ textarea:not([required]))::after {
    content: "";
}

.wizard-content input[type="text"],
.wizard-content input[type="number"],
.wizard-content input[type="date"],
.wizard-content select,
.wizard-content textarea {
    width: 100%;
    padding: 0.625rem 0.875rem;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    font-size: 0.95rem;
    transition: all 0.2s;
    background: white;
}

.wizard-content input:focus,
.wizard-content select:focus,
.wizard-content textarea:focus {
    outline: none;
    border-color: #2d5016;
    box-shadow: 0 0 0 3px rgba(45, 80, 22, 0.1);
}

.wizard-content .form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

.wizard-content textarea {
    resize: vertical;
    min-height: 100px;
}

/* Location input wrapper */
.location-input-wrapper {
    position: relative;
}

.location-autocomplete {
    padding-right: 2.5rem;
}

/* Summary section */
.summary-section {
    background: #f9fafb;
    padding: 1.5rem;
    border-radius: 12px;
    margin-top: 1.5rem;
}

.summary-section h4 {
    margin: 0 0 1rem 0;
    color: #1f2937;
    font-size: 1.1rem;
}

.summary-item {
    display: flex;
    padding: 0.5rem 0;
    border-bottom: 1px solid #e5e7eb;
}

.summary-item:last-child {
    border-bottom: none;
}

.summary-item strong {
    min-width: 120px;
    color: #6b7280;
}

.summary-item span {
    color: #1f2937;
}

/* Import section */
.import-komoot-section {
    text-align: center;
    padding: 1.5rem;
    background: rgba(45, 80, 22, 0.05);
    border-radius: 12px;
    margin-bottom: 1rem;
    border: 2px dashed #2d5016;
}

.import-komoot-btn {
    background: linear-gradient(135deg, #2d5016 0%, #4a7c25 100%);
    color: white;
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 500;
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    transition: all 0.2s;
    font-size: 1rem;
}

.import-komoot-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(45, 80, 22, 0.3);
}

.import-komoot-btn i {
    font-size: 1.2rem;
}

/* Divider with text */
.divider-with-text {
    text-align: center;
    position: relative;
    margin: 2rem 0;
}

.divider-with-text::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    width: 100%;
    height: 1px;
    background: #d1d5db;
}

.divider-with-text span {
    position: relative;
    background: white;
    padding: 0 1rem;
    color: #9ca3af;
    font-size: 0.9rem;
    font-style: italic;
}

/* Wizard footer */
.wizard-footer {
    padding: 1.5rem;
    border-top: 1px solid #e5e7eb;
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    background: #f9fafb;
}

.wizard-footer .btn {
    padding: 0.625rem 1.25rem;
    border-radius: 8px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.95rem;
    border: none;
}

.wizard-footer .btn-outline {
    background: white;
    color: #374151;
    border: 1px solid #d1d5db;
}

.wizard-footer .btn-outline:hover {
    background: #f3f4f6;
    border-color: #9ca3af;
}

.wizard-footer .btn-primary {
    background: #2d5016;
    color: white;
}

.wizard-footer .btn-primary:hover {
    background: #1e3a11;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(45, 80, 22, 0.3);
}

.wizard-footer .btn-success {
    background: #10b981;
    color: white;
}

.wizard-footer .btn-success:hover {
    background: #059669;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3);
}

/* Ingredients list */
#ingredients-list {
    margin-bottom: 1rem;
}

.ingredient-item {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
}

.ingredient-item input {
    flex: 1;
}

.ingredient-item button {
    padding: 0.5rem;
    background: #ef4444;
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s;
}

.ingredient-item button:hover {
    background: #dc2626;
}

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

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

    .wizard-footer {
        flex-direction: column;
    }

    .wizard-footer .btn {
        width: 100%;
        justify-content: center;
    }

    .summary-item {
        flex-direction: column;
        gap: 0.25rem;
    }

    .summary-item strong {
        min-width: auto;
    }
}