/* Admission Form Styles */

/* Basic styles that don't depend on variables */
.form-section {
    background: white !important;
    padding: 2rem !important;
    border-radius: 20px !important;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.08) !important;
    margin-bottom: 2rem !important;
    display: none !important;
}

.form-section.active {
    display: block !important;
}

.form-control, .form-select {
    border: 2px solid #e9ecef !important;
    border-radius: 10px !important;
    padding: 0.75rem 1rem !important;
    font-size: 1rem !important;
    transition: all 0.3s ease !important;
    background: white !important;
}

.form-control:focus, .form-select:focus {
    border-color: #ffd700 !important;
    box-shadow: 0 0 0 0.2rem rgba(255, 215, 0, 0.25) !important;
    outline: none !important;
}

.btn-submit {
    background: linear-gradient(135deg, #ffd700 0%, #ffed4e 100%) !important;
    border: none !important;
    color: white !important;
    padding: 1rem 2rem !important;
    border-radius: 50px !important;
    font-weight: 600 !important;
    transition: all 0.3s ease !important;
    box-shadow: 0 4px 15px rgba(255, 215, 0, 0.3) !important;
}

.btn-submit:hover {
    transform: translateY(-2px) !important;
    box-shadow: 0 8px 25px rgba(255, 215, 0, 0.4) !important;
    color: white !important;
}

/* Form Container */
.form-container {
    background: white;
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    overflow: hidden;
}

/* Progress Bar */
.progress-container {
    background: #f8f9fa;
    padding: 2rem;
    border-bottom: 1px solid #e9ecef;
}

.progress {
    height: 8px;
    border-radius: 10px;
    background: #e9ecef;
    overflow: hidden;
}

.progress-bar {
    background: var(--gradient-secondary);
    transition: width 0.3s ease;
}

.progress-info {
    display: flex;
    justify-content: space-between;
    margin-top: 1rem;
    font-size: 0.9rem;
    color: var(--text-muted);
}

/* Form Sections */
.form-section {
    background: white;
    padding: 2rem;
    border-radius: 20px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.08);
    margin-bottom: 2rem;
    display: none;
}

.form-section.active {
    display: block !important;
}

.form-section h3 {
    color: var(--primary-navy);
    font-weight: 600;
    margin-bottom: 1.5rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--primary-gold);
    display: flex;
    align-items: center;
}

.step-indicator {
    background: var(--gradient-secondary);
    color: white;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    margin-right: 1rem;
    font-size: 0.9rem;
}

/* Form Elements */
.form-label {
    font-weight: 600;
    color: var(--primary-navy);
    margin-bottom: 0.5rem;
    display: block;
}

.required-field::after {
    content: ' *';
    color: #dc3545;
    font-weight: bold;
}

.form-control,
.form-select {
    border: 2px solid #e9ecef;
    border-radius: 10px;
    padding: 0.75rem 1rem;
    font-size: 1rem;
    transition: all 0.3s ease;
    background: white;
}

.form-control:focus,
.form-select:focus {
    border-color: var(--primary-gold);
    box-shadow: 0 0 0 0.2rem rgba(255, 215, 0, 0.25);
    outline: none;
}

.form-control.is-invalid,
.form-select.is-invalid {
    border-color: #dc3545;
    box-shadow: 0 0 0 0.2rem rgba(220, 53, 69, 0.25);
}

.form-control.is-valid,
.form-select.is-valid {
    border-color: #198754;
    box-shadow: 0 0 0 0.2rem rgba(25, 135, 84, 0.25);
}

.invalid-feedback {
    display: block;
    width: 100%;
    margin-top: 0.25rem;
    font-size: 0.875rem;
    color: #dc3545;
}

.valid-feedback {
    display: block;
    width: 100%;
    margin-top: 0.25rem;
    font-size: 0.875rem;
    color: #198754;
}

/* Form Groups */
.form-group {
    margin-bottom: 1.5rem;
}

.form-row {
    display: flex;
    flex-wrap: wrap;
    margin-right: -0.5rem;
    margin-left: -0.5rem;
}

.form-col {
    flex: 1 0 0%;
    padding-right: 0.5rem;
    padding-left: 0.5rem;
}

/* Checkboxes and Radio Buttons */
.form-check {
    display: flex;
    align-items: flex-start;
    margin-bottom: 1rem;
}

.form-check-input {
    margin-top: 0.25rem;
    margin-right: 0.5rem;
    width: 1rem;
    height: 1rem;
    border: 2px solid #e9ecef;
    border-radius: 0.25rem;
    transition: all 0.3s ease;
}

.form-check-input:checked {
    background-color: var(--primary-gold);
    border-color: var(--primary-gold);
}

.form-check-input:focus {
    border-color: var(--primary-gold);
    box-shadow: 0 0 0 0.2rem rgba(255, 215, 0, 0.25);
}

.form-check-label {
    margin-bottom: 0;
    color: var(--text-secondary);
    line-height: 1.5;
}

.form-check-label a {
    color: var(--primary-gold);
    text-decoration: none;
}

.form-check-label a:hover {
    text-decoration: underline;
}

/* Navigation Buttons */
.form-navigation {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 2rem;
    background: #f8f9fa;
    border-top: 1px solid #e9ecef;
}

.btn-nav {
    padding: 0.75rem 1.5rem;
    border-radius: 50px;
    font-weight: 600;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.btn-prev {
    background: transparent;
    border: 2px solid var(--primary-navy);
    color: var(--primary-navy);
}

.btn-prev:hover {
    background: var(--primary-navy);
    color: white;
    transform: translateY(-2px);
}

.btn-next {
    background: var(--gradient-secondary);
    border: none;
    color: white;
    box-shadow: 0 4px 15px rgba(255, 215, 0, 0.3);
}

.btn-next:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(255, 215, 0, 0.4);
    color: white;
}

.btn-submit {
    background: var(--gradient-secondary);
    border: none;
    color: white;
    padding: 1rem 2rem;
    border-radius: 50px;
    font-weight: 600;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(255, 215, 0, 0.3);
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.btn-submit:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(255, 215, 0, 0.4);
    color: white;
}

.btn-submit:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

/* Loading State */
.btn-loading {
    position: relative;
    color: transparent !important;
}

.btn-loading::after {
    content: '';
    position: absolute;
    width: 16px;
    height: 16px;
    top: 50%;
    left: 50%;
    margin-left: -8px;
    margin-top: -8px;
    border: 2px solid transparent;
    border-top: 2px solid currentColor;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Form Validation Messages */
.validation-message {
    font-size: 0.875rem;
    margin-top: 0.25rem;
}

.validation-message.error {
    color: #dc3545;
}

.validation-message.success {
    color: #198754;
}

/* File Upload */
.file-upload {
    position: relative;
    display: inline-block;
    cursor: pointer;
    width: 100%;
}

.file-upload input[type=file] {
    position: absolute;
    opacity: 0;
    width: 100%;
    height: 100%;
    cursor: pointer;
}

.file-upload-label {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    border: 2px dashed #e9ecef;
    border-radius: 10px;
    background: #f8f9fa;
    transition: all 0.3s ease;
    min-height: 120px;
    flex-direction: column;
    gap: 0.5rem;
}

.file-upload:hover .file-upload-label {
    border-color: var(--primary-gold);
    background: rgba(255, 215, 0, 0.05);
}

.file-upload-icon {
    font-size: 2rem;
    color: var(--primary-gold);
}

.file-upload-text {
    color: var(--text-secondary);
    text-align: center;
}

/* Responsive Design */
@media (max-width: 768px) {
    .form-section {
        padding: 1.5rem;
    }
    
    .form-navigation {
        padding: 1.5rem;
        flex-direction: column;
        gap: 1rem;
    }
    
    .btn-nav {
        width: 100%;
        justify-content: center;
    }
    
    .progress-container {
        padding: 1.5rem;
    }
    
    .step-indicator {
        width: 25px;
        height: 25px;
        font-size: 0.8rem;
    }
    
    .form-section h3 {
        font-size: 1.3rem;
    }
}

@media (max-width: 576px) {
    .form-section {
        padding: 1rem;
        margin-bottom: 1rem;
    }
    
    .form-navigation {
        padding: 1rem;
    }
    
    .progress-container {
        padding: 1rem;
    }
    
    .form-control,
    .form-select {
        padding: 0.5rem 0.75rem;
    }
    
    .btn-nav {
        padding: 0.5rem 1rem;
        font-size: 0.9rem;
    }
}

/* Animation for form transitions */
.form-section {
    animation: fadeIn 0.3s ease-in-out;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Success state styling */
.form-section.completed {
    border-left: 4px solid #198754;
}

.form-section.completed h3::after {
    content: ' ✓';
    color: #198754;
    font-weight: bold;
}

/* Error state styling */
.form-section.has-errors {
    border-left: 4px solid #dc3545;
}

/* Help text */
.form-text {
    font-size: 0.875rem;
    color: var(--text-muted);
    margin-top: 0.25rem;
}

/* Custom select styling */
.form-select {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3e%3cpath fill='none' stroke='%23343a40' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='m1 6 7 7 7-7'/%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 0.75rem center;
    background-size: 16px 12px;
    padding-right: 2.5rem;
}

/* Textarea styling */
textarea.form-control {
    resize: vertical;
    min-height: 100px;
}

/* Date input styling */
input[type="date"].form-control {
    position: relative;
}

input[type="date"].form-control::-webkit-calendar-picker-indicator {
    background: transparent;
    bottom: 0;
    color: transparent;
    cursor: pointer;
    height: auto;
    left: 0;
    position: absolute;
    right: 0;
    top: 0;
    width: auto;
}

/* Email input styling */
input[type="email"].form-control:valid {
    border-color: #198754;
}

input[type="email"].form-control:invalid:not(:placeholder-shown) {
    border-color: #dc3545;
}

/* Phone input styling */
input[type="tel"].form-control {
    font-family: monospace;
}

/* Number input styling */
input[type="number"].form-control {
    -moz-appearance: textfield;
    appearance: textfield;
}

input[type="number"].form-control::-webkit-outer-spin-button,
input[type="number"].form-control::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}
