body {
    font-family: Arial, sans-serif;
    background-color: #f4f4f4;
    color: #333;
    line-height: 1.6;
    margin: 0;
    padding: 20px;
}

.container {
    max-width: 800px;
    margin: 20px auto;
    background: #fff;
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

h1, h2, h3, h4, h5 {
    color: #0056b3;
    text-align: center;
    margin-bottom: 20px;
}

h3 {
    border-bottom: 1px solid #eee;
    padding-bottom: 10px;
    margin-top: 30px;
}

.admission-type-selection {
    text-align: center;
    margin-bottom: 25px;
    display: flex; /* Use flex for responsiveness */
    flex-wrap: wrap; /* Allow wrapping on small screens */
    justify-content: center;
    gap: 15px; /* Space between items */
}

.admission-type-selection label.admission-type-label { /* Targeted label */
    display: inline-block;
    background-color: #e2e2e2;
    padding: 10px 20px;
    border-radius: 5px;
    cursor: pointer;
    font-size: 1.1em; /* Increased font size */
    transition: background-color 0.3s ease;
    flex: 1; /* Allow items to grow/shrink */
    min-width: 180px; /* Minimum width before wrapping */
    text-align: center;
}

.admission-type-selection label.admission-type-label:hover {
    background-color: #d0d0d0;
}

.admission-type-selection input[type="radio"] {
    display: none; /* Hide the default radio button */
}

.admission-type-selection input[type="radio"]:checked + label.admission-type-label {
    background-color: #007bff;
    color: white;
}

.form-section {
    border: 1px solid #ddd;
    padding: 20px;
    border-radius: 8px;
    margin-top: 20px;
    background-color: #fdfdfd;
}

.form-group {
    margin-bottom: 15px;
}

.form-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: bold;
}

.form-group input[type="text"],
.form-group input[type="email"],
.form-group input[type="tel"],
.form-group input[type="date"],
.form-group select,
.form-group textarea {
    width: calc(100% - 22px);
    padding: 10px;
    border: 1px solid #ccc;
    border-radius: 4px;
    box-sizing: border-box; /* Include padding in width */
}

.form-group input[type="file"] {
    width: 100%;
    padding: 5px 0;
}

fieldset {
    border: 1px solid #b3d9ff;
    border-radius: 5px;
    padding: 15px;
    margin-bottom: 15px;
    background-color: #f7faff;
}

legend {
    font-weight: bold;
    color: #0056b3;
    padding: 0 10px;
}

fieldset label {
    display: block;
    margin-bottom: 8px;
    font-weight: normal;
}

fieldset input[type="checkbox"],
fieldset input[type="radio"] {
    margin-right: 8px;
}

button[type="submit"] {
    display: block;
    width: 100%;
    padding: 12px 20px;
    background-color: #28a745;
    color: white;
    border: none;
    border-radius: 5px;
    font-size: 1.1em;
    cursor: pointer;
    margin-top: 25px;
    transition: background-color 0.3s ease;
}

button[type="submit"]:hover {
    background-color: #218838;
}

.hidden {
    display: none;
}

.info-message {
    background-color: #e7f3fe;
    border-left: 6px solid #2196F3;
    margin-top: 10px;
    padding: 10px;
    color: #2196F3;
    font-size: 0.9em;
}

.validation-error, .file-error, .subject-error {
    color: #dc3545;
    font-size: 0.85em;
    margin-top: 5px;
}

/* Fee Breakdown and Totals */
#feeBreakdown p, #adminFeeBreakdown p {
    display: flex;
    justify-content: space-between;
    margin-bottom: 8px;
}

#feeBreakdown p span, #adminFeeBreakdown p span {
    font-weight: bold;
    color: #0056b3;
}

.total-amount {
    font-size: 1.3em;
    font-weight: bold;
    color: #28a745;
    margin-top: 20px;
    border-top: 1px solid #eee;
    padding-top: 15px;
}

/* Readonly Inputs */
.bank-details .form-group input[readonly],
.payment-proof .form-group input[readonly],
.upi-details .form-group input[readonly] {
    background-color: #e9ecef;
    cursor: not-allowed;
}

/* UPI Section */
.upi-details {
    margin-top: 30px;
    text-align: center;
    border: 1px solid #b3d9ff;
    padding: 20px;
    border-radius: 8px;
    background-color: #f7faff;
}

.upi-id-display strong {
    font-size: 1.2em;
    color: #007bff;
}

.qr-code-placeholder {
    display: block;
    margin: 15px auto 0;
    border: 1px solid #ccc;
    border-radius: 5px;
    max-width: 100%; /* Ensure QR code scales down on mobile */
    height: auto;
}

/* Receipt Actions (No longer needed, but keeping for reference) */
/* .receipt-actions {
    text-align: center;
    margin-top: 20px;
}

.receipt-actions button {
    display: inline-block;
    width: auto;
    margin: 0 10px;
    background-color: #007bff;
    padding: 10px 20px;
    font-size: 1em;
}

.receipt-actions button:hover {
    background-color: #0056b3;
} */

.next-steps-section {
    border: 1px solid #ddd;
    padding: 20px;
    margin-top: 30px;
    border-radius: 8px;
    background-color: #fdfdfd;
}

.next-steps-section ol {
    list-style-type: decimal;
    padding-left: 25px;
}

.next-steps-section li {
    margin-bottom: 10px;
}

.next-steps-section a {
    color: #007bff;
    text-decoration: none;
}

.next-steps-section a:hover {
    text-decoration: underline;
}

/* Custom Modal Styles */
.modal {
    display: none; /* Hidden by default */
    position: fixed; /* Stay in place */
    z-index: 1001; /* Sit on top (higher than loading overlay) */
    left: 0;
    top: 0;
    width: 100%; /* Full width */
    height: 100%; /* Full height */
    overflow: auto; /* Enable scroll if needed */
    background-color: rgba(0,0,0,0.4); /* Black w/ opacity */
    justify-content: center; /* Center horizontally */
    align-items: center; /* Center vertically */
}

.modal-content {
    background-color: #fefefe;
    margin: auto; /* Auto margin for centering */
    padding: 25px;
    border: 1px solid #888;
    width: 80%; /* Could be responsive */
    max-width: 500px; /* Max width for readability */
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
    position: relative;
    text-align: center;
}

.modal-content h2 {
    color: #333;
    margin-bottom: 15px;
}

.modal-content p {
    margin-bottom: 20px;
    line-height: 1.5;
}

.modal-content button {
    background-color: #007bff;
    color: white;
    padding: 10px 20px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 1em;
    transition: background-color 0.3s ease;
}

.modal-content button:hover {
    background-color: #0056b3;
}

.close-button {
    color: #aaa;
    position: absolute;
    top: 10px;
    right: 20px;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
}

.close-button:hover,
.close-button:focus {
    color: black;
    text-decoration: none;
    cursor: pointer;
}

/* Ensure the hidden class works for modals */
.modal.hidden {
    display: none !important;
}

/* Responsive adjustments for smaller screens */
@media (max-width: 600px) {
    .container {
        padding: 15px;
        margin: 10px auto;
    }

    h1 {
        font-size: 1.8em;
    }

    h2 {
        font-size: 1.4em;
    }

    .form-group input[type="text"],
    .form-group input[type="email"],
    .form-group input[type="tel"],
    .form-group input[type="date"],
    .form-group select,
    .form-group textarea {
        width: 100%; /* Full width for inputs on mobile */
        padding: 8px;
    }

    .admission-type-selection label.admission-type-label {
        font-size: 1em;
        padding: 8px 15px;
        width: 100%; /* Stack radio buttons on small screens */
        margin: 5px 0; /* Adjust margin */
    }

    button[type="submit"] {
        padding: 10px 15px;
        font-size: 1em;
    }

    .info-message {
        font-size: 0.85em;
        padding: 8px;
    }

    .modal-content {
        width: 95%;
        padding: 15px;
    }
}