/* Dormitory Application Specific Styles */

/* Application Summary */
.application-summary .summary-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem;
    border-radius: 0.5rem;
    background: white;
    border: 1px solid #e5e7eb;
    transition: all 0.3s ease;
}

.application-summary .summary-item:hover {
    border-color: var(--primary-color);
    box-shadow: 0 2px 8px rgba(0, 46, 93, 0.1);
}

.application-summary .summary-item i {
    font-size: 1.2rem;
    width: 20px;
    text-align: center;
}

.application-summary .summary-label {
    font-weight: 600;
    color: #374151;
    min-width: 70px;
}

.application-summary .summary-value {
    color: #059669;
    font-weight: 500;
    flex: 1;
}

.student-type-tabs {
    margin-bottom: 2rem;
}

.student-type-tabs .nav-pills .nav-link {
    border-radius: 1rem;
    padding: 1rem 2rem;
    font-weight: 600;
    font-size: 1.1rem;
    transition: all 0.3s ease;
    border: 2px solid transparent;
    background: #f8f9fa;
    color: #6c757d;
}

.student-type-tabs .nav-pills .nav-link:hover {
    background: #e9ecef;
    color: #495057;
    transform: translateY(-2px);
}

.student-type-tabs .nav-pills .nav-link.active {
    background: linear-gradient(135deg, #002e5d 0%, #2b5c83 100%);
    color: white;
    border-color: #002e5d;
    box-shadow: 0 4px 15px rgba(0, 46, 93, 0.3);
}

.nationality-options {
    display: flex;
    gap: 2rem;
    margin-top: 0.5rem;
}

.nationality-options .form-check {
    padding: 1rem;
    border: 2px solid #e5e7eb;
    border-radius: 0.75rem;
    transition: all 0.3s ease;
    cursor: pointer;
    min-width: 120px;
    text-align: center;
}

.nationality-options .form-check:hover {
    border-color: var(--primary-light);
    background-color: #f8f9fa;
}

.nationality-options .form-check-input:checked+.form-check-label {
    color: var(--primary-color);
    font-weight: 600;
}

.nationality-options .form-check:has(.form-check-input:checked) {
    border-color: var(--primary-color);
    background-color: rgba(0, 46, 93, 0.05);
}

.form-check-input {
    width: 1.25rem;
    height: 1.25rem;
    margin-top: 0.125rem;
}

.form-check-label {
    font-size: 1rem;
    cursor: pointer;
}

/* Tab content animations */
.tab-pane {
    animation: fadeIn 0.5s ease-in-out;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Section headers with different colors for student types */
.tab-pane#new-student .section-header h4 {
    color: #28a745 !important;
}

.tab-pane#new-student .section-header hr {
    border-color: #28a745 !important;
}

.tab-pane#old-student .section-header h4 {
    color: #003061 !important;
}

.tab-pane#old-student .section-header hr {
    border-color: #003061 !important;
}

/* Field highlighting for conditional fields */
.new-student-field {
    border-left: 4px solid #28a745;
}

.old-student-field {
    border-left: 4px solid #003061;
}

/* Enhanced form controls */
.form-control:focus,
.form-select:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.2rem rgba(0, 46, 93, 0.25);
}

.form-control.new-student-field:focus {
    border-color: #28a745;
    box-shadow: 0 0 0 0.2rem rgba(40, 167, 69, 0.25);
}

.form-control.old-student-field:focus {
    border-color: #003061;
    box-shadow: 0 0 0 0.2rem rgba(0, 48, 97, 0.25);
}

/* Responsive improvements */
@media (max-width: 768px) {
    .student-type-tabs .nav-pills .nav-link {
        padding: 0.75rem 1rem;
        font-size: 1rem;
    }

    .nationality-options {
        flex-direction: column;
        gap: 1rem;
    }

    .nationality-options .form-check {
        min-width: auto;
    }
}

/* Loading states */
.form-control:disabled,
.form-select:disabled {
    background-color: #f8f9fa;
    opacity: 0.7;
}

/* Enhanced checkboxes */
.form-check {
    padding: 0.75rem;
    border-radius: 0.5rem;
    transition: all 0.3s ease;
}

.form-check:hover {
    background-color: rgba(0, 46, 93, 0.05);
}

.form-check-input:checked {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
}

/* Alert enhancements */
.alert {
    border-radius: 1rem;
    border: none;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.alert-info {
    background: linear-gradient(135deg, #d1ecf1 0%, #bee5eb 100%);
    color: #0c5460;
}

.alert-warning {
    background: linear-gradient(135deg, #fff3cd 0%, #ffeaa7 100%);
    color: #856404;
}

.alert-success {
    background: linear-gradient(135deg, #d4edda 0%, #c3e6cb 100%);
    color: #155724;
}

/* Smooth transitions for all interactive elements */
* {
    transition: all 0.3s ease;
}

/* Print styles */
@media print {

    .student-type-tabs,
    .btn,
    .modal {
        display: none !important;
    }

    .card {
        box-shadow: none !important;
        border: 1px solid #ddd !important;
    }

    .section-header {
        page-break-after: avoid;
    }

    .form-control,
    .form-select {
        border: 1px solid #ddd !important;
        background: white !important;
    }
}

* Success page styles */ .success-animation {
    animation: bounce 2s infinite;
}

@keyframes bounce {

    0%,
    20%,
    50%,
    80%,
    100% {
        transform: translateY(0);
    }

    40% {
        transform: translateY(-10px);
    }

    60% {
        transform: translateY(-5px);
    }
}

@media print {
    .btn {
        display: none !important;
    }

    .card {
        box-shadow: none !important;
        border: 1px solid #ddd !important;
    }
}
/* 
Enhanced Validation Styles */
.form-control.is-invalid,
.form-select.is-invalid {
    border-color: #dc3545;
    box-shadow: 0 0 0 0.2rem rgba(220, 53, 69, 0.25);
    animation: shake 0.5s ease-in-out;
}

.form-control.is-valid,
.form-select.is-valid {
    border-color: #28a745;
    box-shadow: 0 0 0 0.2rem rgba(40, 167, 69, 0.25);
}

.form-check-input.is-invalid {
    border-color: #dc3545;
    box-shadow: 0 0 0 0.2rem rgba(220, 53, 69, 0.25);
}

.form-check-input.is-valid {
    border-color: #28a745;
    box-shadow: 0 0 0 0.2rem rgba(40, 167, 69, 0.25);
}

.validation-message {
    display: block;
    font-size: 0.875rem;
    color: #dc3545;
    margin-top: 0.25rem;
    font-weight: 500;
}

/* Terms checkbox special styling */
#dataAccuracyCheck.is-invalid + label {
    color: #dc3545;
    font-weight: 600;
}

#dataAccuracyCheck.is-valid + label {
    color: #28a745;
    font-weight: 600;
}

/* Shake animation for invalid fields */
@keyframes shake {
    0%, 100% { transform: translateX(0); }
    10%, 30%, 50%, 70%, 90% { transform: translateX(-5px); }
    20%, 40%, 60%, 80% { transform: translateX(5px); }
}

/* Submit button states */
#submitBtn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* Notification styles */
.alert.position-fixed {
    z-index: 9999;
    min-width: 300px;
    max-width: 500px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    border: none;
    border-radius: 0.75rem;
}

.alert-danger {
    background: linear-gradient(135deg, #f8d7da 0%, #f5c6cb 100%);
    color: #721c24;
    border-left: 4px solid #dc3545;
}

.alert-success {
    background: linear-gradient(135deg, #d4edda 0%, #c3e6cb 100%);
    color: #155724;
    border-left: 4px solid #28a745;
}

/* Required field indicators */
.form-label .text-danger {
    font-size: 1.1rem;
    margin-right: 0.25rem;
}

/* Focus improvements */
.form-control:focus,
.form-select:focus,
.form-check-input:focus {
    outline: none;
    border-width: 2px;
}

/* Conditional field highlighting */
.egyptian-fields,
.foreigner-fields {
    transition: all 0.3s ease;
    border-radius: 0.5rem;
    padding: 1rem;
    margin: 0.5rem 0;
}

.egyptian-fields {
    background: rgba(40, 167, 69, 0.05);
    border: 1px solid rgba(40, 167, 69, 0.2);
}

.foreigner-fields {
    background: rgba(0, 123, 255, 0.05);
    border: 1px solid rgba(0, 123, 255, 0.2);
}

/* Tab-specific field styling */
.tab-pane .form-control,
.tab-pane .form-select {
    transition: all 0.3s ease;
}

.tab-pane#new-student .form-control:focus,
.tab-pane#new-student .form-select:focus {
    border-color: #28a745;
    box-shadow: 0 0 0 0.2rem rgba(40, 167, 69, 0.25);
}

.tab-pane#old-student .form-control:focus,
.tab-pane#old-student .form-select:focus {
    border-color: #003061;
    box-shadow: 0 0 0 0.2rem rgba(0, 48, 97, 0.25);
}