/* ============================================
   Cambridge School Admission Portal - Custom Styles
   ============================================ */

/* Global Styles */
body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: #ffffff;
    color: #333;
}

/* Top Navigation Header Styles */
.top-nav-header {
    min-height: 160px;
    height: 160px;
    padding: 0;
}

.top-nav-header .container-fluid {
    height: 100%;
    padding: 10px 20px;
}

/* School Logo (Left Side) */
.top-nav-logo {
    height: 100%;
    display: flex;
    align-items: center;
    flex-shrink: 0;
}

.school-logo-img {
    height: 100%;
    max-height: 140px;
    width: auto;
    object-fit: contain;
    background-color: white;
    padding: 5px;
    border-radius: 5px;
}

/* Center Content */
.top-nav-center {
    padding: 0 20px;
}

.top-nav-center h4 {
    font-size: 1.75rem;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
    letter-spacing: 1px;
}

.top-nav-center small {
    font-size: 0.85rem;
    line-height: 1.4;
}

/* Right Side Image (Statue) */
.top-nav-right-image {
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    flex-shrink: 0;
}

.statue-img {
    height: 100%;
    max-height: 140px;
    width: auto;
    object-fit: contain;
    background-color: white;
    padding: 5px;
    border-radius: 5px;
}

/* Navigation Styles */
.navbar-nav .nav-link.active {
    background-color: rgba(255, 255, 255, 0.2);
    border-radius: 5px;
    font-weight: bold;
}

.navbar-nav .nav-link:hover {
    background-color: rgba(255, 255, 255, 0.1);
    border-radius: 5px;
}

/* Card Styles */
.card {
    border: none;
    border-radius: 10px;
}

.card-header {
    border-radius: 10px 10px 0 0 !important;
    font-weight: 600;
}

/* Form Styles */
.form-label {
    font-weight: 500;
    color: #495057;
    margin-bottom: 0.5rem;
}

.form-control:focus,
.form-select:focus {
    border-color: #0d6efd;
    box-shadow: 0 0 0 0.2rem rgba(13, 110, 253, 0.25);
}

/* Select2 Customization */
.select2-container--bootstrap-5 .select2-selection {
    min-height: 38px;
    border: 1px solid #ced4da;
}

.select2-container--bootstrap-5 .select2-selection--single .select2-selection__rendered {
    line-height: 36px;
    padding-left: 12px;
}

/* File Upload Styles */
.file-upload {
    cursor: pointer;
}

.file-upload:hover {
    border-color: #0d6efd;
}

/* Button Styles */
.btn-lg {
    padding: 0.75rem 2rem;
    font-size: 1.1rem;
    border-radius: 8px;
}

.btn-primary {
    background-color: #1a237e;
    border-color: #1a237e;
}

.btn-primary:hover {
    background-color: #283593;
    border-color: #283593;
}

/* Alert Styles */
.alert {
    border-radius: 8px;
    border: none;
}

/* QR Code Container */
#qrCodeContainer {
    padding: 20px;
    background: white;
    border-radius: 10px;
    display: inline-block;
}

/* Loading Spinner */
.spinner-border {
    width: 3rem;
    height: 3rem;
}

/* Responsive Styles */
@media (max-width: 768px) {
    .top-nav-header {
        min-height: auto;
        height: auto;
        padding: 10px 0;
    }
    
    .top-nav-header .container-fluid {
        flex-direction: column;
        gap: 10px;
    }
    
    .top-nav-logo,
    .top-nav-right-image {
        height: auto;
        max-height: 80px;
    }
    
    .school-logo-img,
    .statue-img {
        max-height: 80px;
    }
    
    .top-nav-center {
        padding: 10px 0;
        text-align: center;
    }
    
    .top-nav-center h4 {
        font-size: 1.25rem;
    }
    
    .top-nav-center small {
        font-size: 0.75rem;
    }
    
    .navbar-text {
        font-size: 0.85rem;
    }
    
    .navbar-text h4 {
        font-size: 1.1rem;
    }
    
    .position-fixed {
        position: relative !important;
        margin: 0 !important;
    }
}

/* Print Styles */
@media print {
    .navbar,
    .btn,
    footer {
        display: none !important;
    }
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 10px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
    background: #888;
    border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
    background: #555;
}

/* Text Uppercase for Form Inputs */
input[type="text"],
input[type="email"],
textarea {
    text-transform: uppercase;
}

/* Required Field Indicator */
.text-danger {
    color: #dc3545 !important;
}

/* Success Badge */
.badge {
    padding: 0.5em 0.75em;
    font-size: 0.875rem;
}

/* Form Section Spacing */
.card.mb-4 {
    margin-bottom: 2rem !important;
}

/* Date Input Styling */
input[type="date"] {
    position: relative;
}

input[type="date"]::-webkit-calendar-picker-indicator {
    cursor: pointer;
    opacity: 0.7;
}

input[type="date"]::-webkit-calendar-picker-indicator:hover {
    opacity: 1;
}
