/* ==========================================================================
   1. Wizard Container & Stepper
   ========================================================================== */
.wizard-container {
    background-color: #fff;
    border-radius: 12px;
    position: relative;
}

.wizard-stepper {
    display: flex;
    justify-content: space-between;
    padding: 2rem 2.5rem;
    border-bottom: 1px solid #e9ecef;
    position: relative;
    max-width: 900px;
    margin: 0 auto;
}

.step {
    display: flex;
    align-items: center;
    flex-direction: column;
    text-align: center;
    position: relative;
    z-index: 2;
    width: 16.66%; 
}

.step-circle {
    height: 40px;
    width: 40px;
    border-radius: 50%;
    background-color: #e9ecef;
    color: #6c757d;
    font-weight: bold;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.4s ease, color 0.4s ease;
    border: 2px solid #e9ecef;
}

.step-label {
    margin-top: 0.5rem;
    font-size: 0.875rem;
    color: #6c757d;
    font-weight: 500;
    transition: color 0.4s ease;
}

.step.active .step-circle {
    background-color: #3f51b5;
    color: #fff;
    border-color: #3f51b5;
}

.step.active .step-label {
    color: #3f51b5;
}

.step.completed .step-circle {
    background-color: #198754;
    color: #fff;
    border-color: #198754;
}

.step.completed .step-label {
    color: #198754;
}

.wizard-progress {
    position: absolute;
    top: calc(2rem + 20px);
    left: 0;
    width: 100%;
    height: 4px;
    background-color: #e9ecef;
    z-index: 1;
}

.progress-bar-line {
    height: 100%;
    width: 0%;
    background-color: #3f51b5;
    transition: width 0.5s ease-in-out;
}

/* ==========================================================================
   2. Wizard Panels & Transitions
   ========================================================================== */
.wizard-panel {
    display: none;
    padding: 2.5rem;
    animation: fadeIn 0.6s ease-out;
}

.wizard-panel.active {
    display: block;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.conditional-field-group {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.5s cubic-bezier(0.25, 0.8, 0.25, 1), opacity 0.3s ease-in-out;
    opacity: 0;
    border-left: 3px solid #3f51b5;
    margin-left: 0.5rem;
    padding-left: 1rem;
    margin-top: 1rem;
}

.conditional-field-group.show {
    max-height: 500px;
    opacity: 1;
}

/* ==========================================================================
   3. Form Elements, Buttons & VALIDATION
   ========================================================================== */
.wizard-form-header {
    margin-bottom: 2rem;
    color: #343a40;
    font-weight: 600;
}

.input-group-icon {
    width: 40px;
    display: flex;
    justify-content: center;
    align-items: center;
    background-color: #f8f9fa;
}

.wizard-footer {
    display: flex;
    justify-content: space-between;
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 1px solid #e9ecef;
}

.is-invalid {
    border-color: #dc3545 !important;
}

.form-check-input.is-invalid ~ .form-check-label {
    color: #dc3545;
}

.invalid-feedback {
    display: none;
    width: 100%;
    margin-top: .25rem;
    font-size: .875em;
    color: #dc3545;
    font-weight: 500;
}

.is-invalid ~ .invalid-feedback,
.is-invalid + .input-group ~ .invalid-feedback,
.was-validated :invalid ~ .invalid-feedback {
    display: block;
}

.validation-icon-container {
    width: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #fff;
}

/* --- START: CORRECTED SPINNER STYLES --- */
.validation-spinner {
    width: 18px;
    height: 18px;
    flex-shrink: 0; /* Prevents the spinner from being squeezed */
    border: 2px solid #3f51b5;
    border-top-color: transparent;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    display: none;
}
/* --- END: CORRECTED SPINNER STYLES --- */

.validation-icon {
    font-size: 1.2em;
    display: none;
    animation: pop-in 0.3s cubic-bezier(0.18, 0.89, 0.32, 1.28);
}

.validation-icon.success {
    color: #198754;
}

.validation-icon.error {
    color: #dc3545;
}

.validation-icon-container.loading .validation-spinner {
    display: block;
}

.validation-icon-container.valid .validation-icon.success {
    display: block;
}

.validation-icon-container.invalid .validation-icon.error {
    display: block;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

@keyframes pop-in {
    0% { transform: scale(0.5); opacity: 0; }
    100% { transform: scale(1); opacity: 1; }
}

/* ==========================================================================
   4. Submission Status & Confirmation Panel
   ========================================================================== */
.confirmation-panel {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 3rem 1rem;
    animation: fadeIn 0.5s ease-out;
}

.confirmation-icon {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.5rem;
    margin-bottom: 1.5rem;
    animation: pop-in 0.5s 0.2s cubic-bezier(0.18, 0.89, 0.32, 1.28) backwards;
}

.confirmation-icon.success {
    background-color: #d1e7dd;
    color: #0f5132;
}

.confirmation-icon.error {
    background-color: #f8d7da;
    color: #842029;
}

.confirmation-panel h3 {
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.confirmation-panel p {
    color: #6c757d;
    max-width: 450px;
    margin-bottom: 2rem;
}

.confirmation-actions {
    display: flex;
    gap: 1rem;
}

/* ==========================================================================
   5. File Upload Component Styles
   ========================================================================== */
.file-upload-wrapper {
    position: relative;
    border: 2px dashed #ced4da;
    border-radius: .375rem;
    padding: 1.5rem;
    text-align: center;
    background-color: #f8f9fa;
    transition: border-color .15s ease-in-out, background-color .15s ease-in-out;
}

.file-upload-wrapper:hover {
    border-color: #3f51b5;
    background-color: #fff;
}

.file-upload-input {
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    opacity: 0;
    cursor: pointer;
}

.file-upload-icon {
    font-size: 2.5rem;
    color: #6c757d;
}

.file-upload-text {
    margin-top: 0.5rem;
    color: #6c757d;
    font-weight: 500;
}

.file-upload-text span {
    color: #3f51b5;
    font-weight: 600;
}

.file-list {
    margin-top: 1rem;
    text-align: left;
}

.file-list-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.5rem 0.75rem;
    background-color: #e9ecef;
    border-radius: .25rem;
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
    animation: fadeIn 0.3s;
}

.file-list-item .file-name {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-right: 1rem;
}

.file-list-item .remove-file-btn {
    background: none;
    border: none;
    color: #dc3545;
    cursor: pointer;
    padding: 0;
    font-size: 1rem;
}