/* Wizard/Stepper Layout */
.wizard-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 12px 16px;
    display: grid;
    grid-template-columns: 180px 1fr;
    gap: 16px;
    align-items: start;
}

.wizard-header-row {
    grid-column: 1 / -1;
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 4px;
}

.wizard-progress {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    position: relative;
}

.wizard-progress::before {
    content: '';
    position: absolute;
    top: 20px;
    bottom: 20px;
    left: 20px;
    width: 2px;
    background: var(--line);
    z-index: 0;
}

.wizard-progress-fill {
    position: absolute;
    top: 20px;
    left: 20px;
    width: 2px;
    max-height: calc(100% - 40px);
    background: var(--accent);
    transition: height 0.3s ease;
    z-index: 1;
}

.wizard-step {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 10px;
    position: relative;
    z-index: 2;
    padding: 8px 0;
    cursor: pointer;
    transition: all 0.2s ease;
}

.wizard-step:hover .wizard-step-circle {
    border-color: var(--accent);
    transform: scale(1.05);
}

.wizard-step:hover .wizard-step-label {
    color: var(--accent);
}

.wizard-step-circle {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: white;
    border: 2px solid var(--line);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 13px;
    color: var(--muted);
    transition: all 0.3s ease;
    position: relative;
}

/* Active step - has ring indicator */
.wizard-step.active .wizard-step-circle {
    box-shadow: 0 0 0 4px rgba(0, 123, 255, 0.3);
}

/* Empty/Unfilled - hollow (default) */
.wizard-step.empty .wizard-step-circle {
    background: white;
    border-color: var(--line);
    color: var(--muted);
}

/* Valid - green filled */
.wizard-step.valid .wizard-step-circle {
    background: #28a745;
    border-color: #28a745;
    color: white;
}

/* Invalid - red filled */
.wizard-step.invalid .wizard-step-circle {
    background: #dc3545;
    border-color: #dc3545;
    color: white;
}

/* Partial - orange filled */
.wizard-step.partial .wizard-step-circle {
    background: #fd7e14;
    border-color: #fd7e14;
    color: white;
}

/* Completed (for backward compatibility) */
.wizard-step.completed .wizard-step-circle {
    background: #28a745;
    border-color: #28a745;
    color: white;
}

.wizard-step-label {
    font-size: 13px;
    color: var(--muted);
    text-align: left;
    font-weight: 500;
    white-space: nowrap;
}

.wizard-step.active .wizard-step-label {
    color: var(--accent);
    font-weight: 600;
}

.wizard-content {
    background: white;
    border-radius: 12px;
    padding: 20px 24px;
    box-shadow: var(--shadow);
    min-height: 300px;
}

.wizard-page {
    display: none;
    animation: fadeIn 0.3s ease;
}

.wizard-page.active {
    display: block;
}

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

.wizard-page-title {
    font-size: 20px;
    font-weight: 700;
    margin: 0 0 4px 0;
    color: var(--text);
}

.wizard-page-subtitle {
    font-size: 14px;
    color: var(--muted);
    margin: 0 0 16px 0;
}

.wizard-navigation {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    margin-top: 20px;
    padding-top: 16px;
    border-top: 1px solid var(--line);
}

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

.wizard-nav-right {
    display: flex;
    gap: 12px;
    margin-left: auto;
}

/* Form rows for wizard */
.wizard-content .form-row {
    grid-template-columns: 1fr;
    gap: 16px;
    padding: 20px 0;
    max-width: none;
    margin: 0;
}

.wizard-content .form-row-label {
    padding-top: 0;
}

.wizard-content .form-row-title {
    font-size: 16px;
    margin-bottom: 16px;
}

/* Two-Column Form Layout (removed, using wizard) */
.form-row {
    display: grid;
    grid-template-columns: 220px 1fr;
    gap: 32px;
    padding: 24px 0;
    border-bottom: 1px solid var(--line);
    max-width: 1000px;
    margin: 0 auto;
}

.form-row:last-child {
    border-bottom: none;
}

.form-row-label {
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding-top: 8px;
}

.form-row-title {
    font-size: 18px;
    font-weight: 600;
    color: var(--text);
    display: flex;
    align-items: center;
    gap: 8px;
}

.form-row-icon {
    font-size: 20px;
}

.form-row-subtitle {
    font-size: 14px;
    color: var(--muted);
}

.form-row-content {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

/* Form subsections */
.form-subsection {
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid #f3f4f6;
}

.subsection-title {
    font-size: 13px;
    font-weight: 600;
    color: var(--muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 12px;
}

/* Input with prefix/suffix */
.input-with-prefix,
.input-with-suffix {
    position: relative;
    display: flex;
    align-items: stretch;
}

.input-with-prefix input,
.input-with-suffix input {
    flex: 1;
    width: 100%;
}

.input-with-prefix input {
    padding-left: 32px !important;
}

.input-with-suffix input {
    padding-right: 40px !important;
}

.input-prefix,
.input-suffix {
    position: absolute;
    display: flex;
    align-items: center;
    height: 100%;
    color: var(--muted);
    font-weight: 500;
    pointer-events: none;
}

.input-prefix {
    left: 12px;
}

.input-suffix {
    right: 12px;
}

/* Subsection within form rows */
.form-subsection-divider {
    margin: 12px 0 8px 0;
    padding-top: 12px;
    border-top: 1px solid #f3f4f6;
}

.form-subsection-label {
    font-size: 12px;
    font-weight: 600;
    color: var(--muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 12px;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .wizard-container {
        grid-template-columns: 1fr;
        gap: 12px;
        padding: 6px 10px;
    }

    .wizard-header-row h1 {
        font-size: 18px !important;
    }

    .wizard-content {
        padding: 16px 14px;
    }

    .wizard-progress {
        flex-direction: row;
        justify-content: space-between;
        overflow-x: auto;
        scrollbar-width: none;
        -ms-overflow-style: none;
    }

    .wizard-progress::-webkit-scrollbar {
        display: none;
    }

    .wizard-progress::before {
        top: 18px;
        bottom: auto;
        left: 18px;
        right: 18px;
        width: auto;
        height: 2px;
    }

    .wizard-progress-fill {
        top: 18px;
        left: 18px;
        height: 2px;
        max-width: calc(100% - 36px);
    }

    .wizard-step {
        flex-direction: column;
        padding: 0;
        min-width: 52px;
    }

    .wizard-step-circle {
        width: 32px;
        height: 32px;
        font-size: 12px;
    }

    .wizard-step-label {
        text-align: center;
        font-size: 10px;
    }

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

    .form-row-label {
        padding-top: 0;
    }
}

@media (max-width: 420px) {
    .wizard-container {
        padding: 4px 8px;
    }

    .wizard-content {
        padding: 14px 10px;
        border-radius: 8px;
    }

    .wizard-header-row {
        flex-direction: column;
        align-items: flex-start;
        gap: 6px;
        margin-bottom: 2px;
    }

    /* On very small screens hide step labels — only show circles */
    .wizard-step-label {
        display: none;
    }

    .wizard-step {
        min-width: 36px;
    }

    .wizard-step-circle {
        width: 28px;
        height: 28px;
        font-size: 11px;
    }

    .wizard-progress::before {
        top: 16px;
    }

    .wizard-progress-fill {
        top: 16px;
    }

    .wizard-navigation {
        flex-wrap: wrap;
        gap: 8px;
    }
}

/* Results Modal/Overlay */
.results-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    padding: 20px;
    overflow: auto;
}

.results-container {
    background: var(--bg);
    border-radius: 12px;
    width: 100%;
    max-width: 1400px;
    max-height: 90vh;
    overflow: auto;
    box-shadow: 0 20px 60px rgba(0,0,0,0.3);
    animation: slideUp 0.3s ease;
}

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

.results-header {
    padding: 16px 24px;
    background: white;
    border-bottom: 1px solid var(--line);
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: sticky;
    top: 0;
    z-index: 10;
}

.results-close {
    background: none;
    border: none;
    font-size: 20px;
    cursor: pointer;
    color: var(--muted);
    padding: 6px;
    line-height: 1;
    border-radius: 6px;
    transition: all 0.2s;
}

.results-close:hover {
    background: #f3f4f6;
    color: var(--text);
}

.results-body {
    padding: 16px 24px;
}

.full-width-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 12px 16px;
}
