/**
 * Multi-Step Registration Form CSS
 * Matches the project theme with #1e3a5f primary and #13c296 accent colors
 */

/* ============================================
   Multi-Step Form Container
   ============================================ */

.multi-step-form-container {
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    overflow: hidden;
}

/* ============================================
   Progress Indicator / Step Header
   ============================================ */

.form-progress-container {
    background: linear-gradient(135deg, #1e3a5f 0%, #2a4f7a 100%);
    padding: 2rem 1.5rem;
    position: relative;
}

.form-progress-steps {
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: relative;
    max-width: 800px;
    margin: 0 auto;
}

.progress-step {
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
    z-index: 2;
    flex: 1;
}

.step-number {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    border: 3px solid rgba(255, 255, 255, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    font-weight: 700;
    color: rgba(255, 255, 255, 0.7);
    transition: all 0.3s ease;
    margin-bottom: 0.5rem;
}

.step-label {
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.7);
    text-align: center;
    font-weight: 600;
    transition: all 0.3s ease;
    max-width: 120px;
}

/* Active Step */
.progress-step.active .step-number {
    background: #13c296;
    border-color: #13c296;
    color: white;
    box-shadow: 0 0 0 4px rgba(19, 194, 150, 0.3);
    transform: scale(1.1);
}

.progress-step.active .step-label {
    color: white;
}

/* Completed Step */
.progress-step.completed .step-number {
    background: #13c296;
    border-color: #13c296;
    color: white;
}

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

.progress-step.completed .step-number::after {
    content: '✓';
    font-size: 1.5rem;
    position: absolute;
}

/* Progress Arrows/Connectors */
.progress-step:not(:last-child)::after {
    content: '\f061';
    /* fa-arrow-right */
    font-family: 'Font Awesome 5 Free';
    font-weight: 900;
    position: absolute;
    top: 25px;
    right: 0;
    transform: translateY(-50%) translateX(50%);
    color: rgba(255, 255, 255, 0.4);
    font-size: 1.2rem;
    z-index: 1;
    transition: color 0.3s ease;
    width: auto;
    height: auto;
    background: none;
}

/* Completed Step Connector */
.progress-step.completed::after {
    color: #13c296;
}

/* Hide old line styles if present in HTML temporarily */
.progress-line,
.progress-line-fill {
    display: none;
}

/* ============================================
   Form Steps Content
   ============================================ */

.form-steps-wrapper {
    position: relative;
    overflow: hidden;
}

.form-step {
    display: none;
    padding: 2.5rem 2rem;
    animation: fadeInStep 0.4s ease;
}

.form-step.active {
    display: block;
}

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

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

.step-title {
    font-size: 1.75rem;
    font-weight: 700;
    color: #1e3a5f;
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.step-title i {
    color: #13c296;
    font-size: 1.5rem;
}

.step-description {
    color: #6b7280;
    margin-bottom: 2rem;
    font-size: 0.95rem;
}

/* ============================================
   Form Sections
   ============================================ */

.form-section {
    margin-bottom: 2.5rem;
}

.section-heading {
    font-size: 1.25rem;
    font-weight: 700;
    color: #1e3a5f;
    margin-bottom: 1.5rem;
    padding-bottom: 0.75rem;
    border-bottom: 2px solid #e5e7eb;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.section-heading i {
    color: #13c296;
    font-size: 1.1rem;
}

/* ============================================
   Form Fields
   ============================================ */

.form-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
    margin-bottom: 1.5rem;
}

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

.form-grid-3 {
    grid-template-columns: repeat(3, 1fr);
}

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

.form-group.full-width {
    grid-column: 1 / -1;
}

/* Qualification Details - Full Width Section */
.qualification-details-section {
    width: 100%;
    padding: 1.25rem 1.5rem;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    border-left: 4px solid #1e3a5f;
    flex-direction: column;
    align-items: stretch;
}

.qualification-details-label {
    font-weight: 600;
    color: #1e3a5f;
    margin-bottom: 0.25rem;
}

.qualification-details-hint {
    display: block;
    margin-bottom: 1rem;
}

.qualification-checkboxes-row {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1rem 1.5rem;
    width: 100%;
}

.qualification-checkbox-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    padding: 0.5rem 0;
}

.qualification-checkbox-input {
    width: 1.125rem;
    height: 1.125rem;
    border-radius: 4px;
    border: 2px solid #cbd5e1;
    accent-color: #1e3a5f;
    cursor: pointer;
    flex-shrink: 0;
}

.qualification-checkbox-input:focus {
    outline: none;
    box-shadow: 0 0 0 2px rgba(30, 58, 95, 0.25);
}

.qualification-checkbox-text {
    font-size: 0.95rem;
    color: #374151;
    font-weight: 500;
}

.qualification-error-msg {
    margin-top: 0.5rem;
    color: #ef4444;
    font-size: 0.85rem;
}

.qualification-details-section.qualification-section-error {
    border-left-color: #ef4444;
    background: #fef2f2;
    border-color: #fecaca;
}

@media (max-width: 640px) {
    .qualification-checkboxes-row {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 400px) {
    .qualification-checkboxes-row {
        grid-template-columns: 1fr;
    }
}

.form-label {
    font-size: 0.9rem;
    font-weight: 600;
    color: #374151;
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.required-mark {
    color: #ef4444;
    font-weight: 700;
}

.form-input,
.form-select,
.form-textarea {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    font-size: 0.95rem;
    color: #1f2937;
    transition: all 0.3s ease;
    background: white;
}

.form-input:focus,
.form-select:focus,
.form-textarea:focus {
    outline: none;
    border-color: #13c296;
    box-shadow: 0 0 0 3px rgba(19, 194, 150, 0.1);
}

.form-input.readonly {
    background: #f9fafb;
    color: #6b7280;
    cursor: not-allowed;
}

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

.form-input.error,
.form-select.error,
.form-textarea.error {
    border-color: #ef4444;
}

.error-message {
    color: #ef4444;
    font-size: 0.85rem;
    margin-top: 0.25rem;
    display: none;
}

.error-message.show {
    display: block;
}

.form-hint {
    font-size: 0.85rem;
    color: #6b7280;
    margin-top: 0.25rem;
}

/* Password Toggle Button */
.password-input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.password-input-wrapper .password-input {
    padding-right: 3rem;
}

.password-toggle-btn {
    position: absolute;
    right: 0;
    top: 0;
    height: 100%;
    width: 3rem;
    background: transparent;
    border: none;
    color: #6b7280;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.3s ease;
    font-size: 1.1rem;
}

.password-toggle-btn:hover {
    color: #13c296;
}

.password-toggle-btn:focus {
    outline: none;
}

.password-toggle-btn i {
    pointer-events: none;
}

/* ============================================
   File Upload Styling
   ============================================ */

.file-upload-wrapper {
    position: relative;
}

.file-upload-input {
    display: none;
}

.file-upload-label {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 2rem 1rem;
    border: 2px dashed #d1d5db;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    background: #f9fafb;
}

.file-upload-label:hover {
    border-color: #13c296;
    background: #f0fdf4;
}

.file-upload-icon {
    font-size: 2.5rem;
    color: #9ca3af;
    margin-bottom: 0.5rem;
}

.file-upload-text {
    font-size: 0.9rem;
    color: #6b7280;
    text-align: center;
}

.file-upload-text strong {
    color: #13c296;
    font-weight: 600;
}

.file-preview {
    display: none;
    margin-top: 1rem;
    padding: 1rem;
    border: 2px solid #13c296;
    border-radius: 8px;
    background: #f0fdf4;
}

.file-preview.show {
    display: block;
}

.file-preview-image {
    max-width: 200px;
    max-height: 200px;
    border-radius: 8px;
    margin-bottom: 0.5rem;
}

.file-preview-info {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

.file-preview-name {
    font-size: 0.9rem;
    color: #1f2937;
    font-weight: 600;
    flex: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.file-remove-btn {
    background: #ef4444;
    color: white;
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.85rem;
    font-weight: 600;
    transition: all 0.3s ease;
}

.file-remove-btn:hover {
    background: #dc2626;
}

/* ============================================
   Radio Buttons & Checkboxes
   ============================================ */

.radio-group,
.checkbox-group {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.radio-option,
.checkbox-option {
    display: flex;
    align-items: center;
    padding: 1rem;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.radio-option:hover,
.checkbox-option:hover {
    border-color: #13c296;
    background: #f0fdf4;
}

.radio-option input[type="radio"],
.checkbox-option input[type="checkbox"] {
    width: 20px;
    height: 20px;
    margin-right: 0.75rem;
    cursor: pointer;
    accent-color: #13c296;
}

.radio-option.selected,
.checkbox-option.selected {
    border-color: #13c296;
    background: #f0fdf4;
}

.option-label {
    font-size: 1rem;
    font-weight: 600;
    color: #1f2937;
}

.option-description {
    font-size: 0.85rem;
    color: #6b7280;
    margin-top: 0.25rem;
}

/* ============================================
   Declaration Section
   ============================================ */

.declaration-box {
    background: #f9fafb;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
}

.declaration-title {
    font-size: 1.1rem;
    font-weight: 700;
    color: #1e3a5f;
    margin-bottom: 1rem;
}

.declaration-text {
    font-size: 0.9rem;
    color: #4b5563;
    line-height: 1.6;
    margin-bottom: 1rem;
}

.declaration-checkbox {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    padding: 1rem;
    background: white;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.declaration-checkbox:hover {
    border-color: #13c296;
}

.declaration-checkbox input[type="checkbox"] {
    width: 20px;
    height: 20px;
    margin-top: 0.25rem;
    cursor: pointer;
    accent-color: #13c296;
}

.declaration-checkbox.checked {
    border-color: #13c296;
    background: #f0fdf4;
}

/* ============================================
   Navigation Buttons
   ============================================ */

.form-navigation {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem 2rem;
    border-top: 2px solid #e5e7eb;
    background: #f9fafb;
}

.btn-nav {
    padding: 0.875rem 2rem;
    font-size: 1rem;
    font-weight: 600;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.btn-previous {
    background: white;
    color: #1e3a5f;
    border: 2px solid #1e3a5f;
}

.btn-previous:hover {
    background: #1e3a5f;
    color: white;
    transform: translateX(-3px);
}

.btn-previous:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

.btn-next {
    background: #13c296;
    color: white;
}

.btn-next:hover {
    background: #10a882;
    transform: translateX(3px);
    box-shadow: 0 4px 12px rgba(19, 194, 150, 0.3);
}

.btn-submit {
    background: #1e3a5f;
    color: white;
}

.btn-submit:hover {
    background: #2a4f7a;
    box-shadow: 0 4px 12px rgba(30, 58, 95, 0.3);
}

.btn-submit:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.btn-loading {
    position: relative;
    pointer-events: none;
}

.btn-loading::after {
    content: '';
    position: absolute;
    width: 16px;
    height: 16px;
    top: 50%;
    right: 1rem;
    margin-top: -8px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: white;
    animation: spinner 0.6s linear infinite;
}

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

/* ============================================
   Responsive Design
   ============================================ */

@media (max-width: 1024px) {
    .form-grid-3 {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .form-progress-container {
        padding: 1.5rem 1rem;
    }

    .step-number {
        width: 40px;
        height: 40px;
        font-size: 1rem;
    }

    .step-label {
        font-size: 0.65rem;
        max-width: 80px;
    }

    .progress-line {
        top: 20px;
    }

    .form-step {
        padding: 1.5rem 1rem;
    }

    .step-title {
        font-size: 1.4rem;
    }

    .form-grid,
    .form-grid-2,
    .form-grid-3 {
        grid-template-columns: 1fr;
    }

    .form-navigation {
        flex-direction: column-reverse;
        gap: 1rem;
        padding: 1rem;
    }

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

@media (max-width: 480px) {
    .step-label {
        display: none;
    }

    .progress-step.active .step-label {
        display: block;
        position: absolute;
        top: 60px;
        white-space: nowrap;
    }

    /* Adjust Arrows for Mobile */
    .progress-step:not(:last-child)::after {
        font-size: 1rem;
        /* Smaller arrows */
        right: -10px;
        /* Adjust position if needed, or keep 0 and rely on translation */
        transform: translateY(-50%) translateX(50%);
    }
}

@media (max-width: 380px) {

    /* Very small screens: hide arrows or make them very small */
    .progress-step:not(:last-child)::after {
        display: none;
        /* Hide arrows if too cramped, or scale down */
    }
}

/* ============================================
   Utility Classes
   ============================================ */

.msf-hidden {
    display: none !important;
}

.text-center {
    text-align: center;
}

.mb-0 {
    margin-bottom: 0;
}

.mb-1 {
    margin-bottom: 0.5rem;
}

.mb-2 {
    margin-bottom: 1rem;
}

.mb-3 {
    margin-bottom: 1.5rem;
}

.mb-4 {
    margin-bottom: 2rem;
}

.mt-0 {
    margin-top: 0;
}

.mt-1 {
    margin-top: 0.5rem;
}

.mt-2 {
    margin-top: 1rem;
}

.mt-3 {
    margin-top: 1.5rem;
}

.mt-4 {
    margin-top: 2rem;
}