/* Enhanced Registration Form Styles */

/* Hide empty banner on registration pages */
#banner.registration,
#banner.hscp {
    display: none;
}

/* Form Container with gradient background */
#registration {
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    padding: 20px 0 60px 0;
    min-height: auto;
}

#registration .container {
    background: white;
    border-radius: 24px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.1);
    padding: 15px;
    margin-top: 10px;
    margin-bottom: 20px;
}

/* Enhanced heading styles */
#registration h5 {
    color: #3f51b5;
    font-weight: 600;
    font-size: 1.6rem;
    margin: 15px 0 10px 0;
    padding-bottom: 8px;
    border-bottom: 3px solid #3f51b5;
    position: relative;
    z-index: 1;
}

#registration h5::before {
    content: '';
    position: absolute;
    bottom: -3px;
    left: 0;
    width: var(--progress-width, 0%);
    height: 3px;
    background: #ff9800;
}

/* Medical Information heading */
#registration h6 {
    color: #3f51b5;
    font-weight: 600;
    font-size: 1.2rem;
    margin-top: 20px;
    margin-bottom: 0px;
}

/* Student wrapper with card style */
.studentwrapper {
    background: #fafbfc;
    border-radius: 12px;
    padding: 15px;
    margin-bottom: 15px;
    margin-top: 5px;
    border-left: 5px solid #3f51b5;
    box-shadow: 0 4px 15px rgba(0,0,0,0.08);
    overflow: visible;
}

/* Enhanced input fields */
#registration .input-field {
    margin-bottom: 10px;
    position: relative;
}

#registration .input-field input[type="text"],
#registration .input-field input[type="email"],
#registration .input-field input[type="tel"],
#registration .input-field input[type="date"],
#registration .input-field textarea {
    border: 2px solid #e1e8ed;
    border-radius: 8px;
    padding: 12px 15px !important;
    font-size: 0.95rem;
    background: white;
    height: 42px !important;
    box-sizing: border-box;
    margin-bottom: 3px !important;
    line-height: normal;
}

#registration .input-field input[type="text"],
#registration .input-field input[type="email"],
#registration .input-field input[type="tel"],
#registration .input-field textarea {
    padding-top: 12px !important;
}

#registration .input-field input[type="date"] {
    padding: 10px 15px !important;
}

#registration .input-field input[type="text"]:focus,
#registration .input-field input[type="email"]:focus,
#registration .input-field input[type="tel"]:focus,
#registration .input-field input[type="date"]:focus,
#registration .input-field textarea:focus {
    border-color: #3f51b5 !important;
    box-shadow: 0 0 0 3px rgba(63, 81, 181, 0.1) !important;
}

/* Date input specific styling */
#registration .input-field input[type="date"] {
    color: #333;
    font-family: inherit;
}

#registration .input-field input[type="date"]::-webkit-calendar-picker-indicator {
    cursor: pointer;
    opacity: 0.6;
}

/* Enhanced select dropdowns */
#registration select {
    border: 2px solid #e1e8ed;
    border-radius: 8px;
    padding: 8px 15px;
    font-size: 0.95rem;
    background: white;
    height: 42px !important;
    display: flex !important;
    align-items: center !important;
}

#registration select:focus {
    border-color: #3f51b5;
    box-shadow: 0 0 0 3px rgba(63, 81, 181, 0.1);
}

#registration .select-wrapper input.select-dropdown {
    border: 2px solid #e1e8ed;
    border-radius: 8px;
    padding: 10px 15px;
    padding-right: 40px;
    font-size: 0.95rem;
    height: 42px !important;
    margin-bottom: 0 !important;
    display: flex;
    align-items: center;
    line-height: normal;
}

/* Select validation error state - red border */
#registration .select-wrapper.select-error input.select-dropdown,
#registration .select-wrapper.select-error input.select-dropdown:focus,
#registration .input-field .select-wrapper.select-error input.select-dropdown,
.select-wrapper.select-error input.select-dropdown {
    border-color: #F44336 !important;
    border-width: 2px !important;
    border-style: solid !important;
    box-shadow: 0 0 0 1px rgba(244, 67, 54, 0.2) !important;
}

/* Select validation error message positioning */
#registration .input-field .select-wrapper + div.error,
#registration .select-wrapper + div.error {
    margin-top: 2px !important;
    position: relative !important;
}

/* Dropdown arrow/caret - position inside the input box */
#registration .input-field .select-wrapper svg.caret,
#registration .select-wrapper svg.caret,
.select-wrapper svg.caret {
    fill: #3f51b5 !important;
    position: absolute !important;
    right: 10px !important;
    top: -40px !important;
    z-index: 10 !important;
    pointer-events: none !important;
    height: 30px !important;
    width: 30px !important;
}

/* Fix z-index for dropdown lists */
#registration .select-wrapper {
    position: relative;
}

#registration .select-wrapper .dropdown-content {
    z-index: 9999 !important;
    position: absolute !important;
    background: white !important;
    box-shadow: 0 4px 20px rgba(0,0,0,0.15) !important;
    border-radius: 8px !important;
}

#registration .select-wrapper .dropdown-content li {
    min-height: 40px;
    background: white !important;
}

#registration .select-wrapper .dropdown-content li:hover {
    background: #f5f5f5 !important;
}

#registration .select-wrapper .dropdown-content li.selected {
    background: #e8eaf6 !important;
}

/* Ensure dropdown appears above all content */
#registration .input-field:has(.select-wrapper) {
    position: relative;
    z-index: 100;
}

#registration .row:has(.select-wrapper) {
    position: relative;
    z-index: 100 !important;
}

/* Student wrapper needs high z-index when it contains a select */
.studentwrapper:has(.select-wrapper) {
    position: relative;
    z-index: 100 !important;
}

/* Other studentwrappers get lower z-index */
.studentwrapper {
    position: relative;
    z-index: 1;
}

/* Parent Information and other sections after the dropdown should have lower z-index */
#registration > .container > .row {
    position: relative;
    z-index: 1;
}

/* Row containing select gets higher z-index */
#registration > .container > .row:has(.select-wrapper),
#registration .studentwrapper .row:has(.select-wrapper) {
    z-index: 100 !important;
}

/* School dropdown at top of form - ensure it's above studentwrapper below */
#registration .container > .row:has(#school_id) {
    z-index: 200 !important;
}

/* Dropdown content absolute positioning with high z-index */
.select-wrapper .dropdown-content,
#registration .select-wrapper .dropdown-content,
.studentwrapper .select-wrapper .dropdown-content {
    z-index: 9999 !important;
    position: absolute !important;
}

/* Enhanced labels */
#registration .input-field label {
    color: #9e9e9e;
    font-weight: 400;
    font-size: 0.95rem;
    left: 15px !important;
    top: 12px !important;
    transform: none;
    pointer-events: none;
}

#registration .input-field label.active {
    color: #3f51b5;
    font-weight: 500;
    font-size: 0.85rem;
    transform: scale(0.85) !important;
    transform-origin: left;
    background: white;
    padding: 0 5px;
    left: 15px !important;
    top: -8px !important;
}

/* Select dropdown label - always positioned above */
#registration .input-field .select-wrapper + label,
#registration .input-field:has(select) label,
#registration .input-field:has(.select-wrapper) label {
    color: #3f51b5 !important;
    font-weight: 500 !important;
    font-size: 0.8rem !important;
    transform: none !important;
    background: white !important;
    padding: 0 5px !important;
    left: 8px !important;
    top: -8px !important;
    position: absolute !important;
    z-index: 2 !important;
}

/* Move the select input down to make room for label */
#registration .input-field .select-wrapper {
    margin-top: 10px;
}

#registration .input-field:has(input[type="date"]) label:not(:last-child) {
    pointer-events: none;
    display: block !important;
}

#registration .input-field input[type="date"]:focus ~ label,
#registration .input-field input[type="date"]:not([value=""]) ~ label {
    color: #3f51b5 !important;
    font-weight: 500 !important;
    transform: translateY(-50%) scale(0.85) !important;
    transform-origin: left !important;
    background: white !important;
    padding: 0 5px !important;
    left: 15px !important;
    top: 0 !important;
}

/* JavaScript will add 'has-value' class when date is selected */
#registration .input-field.has-value input[type="date"] ~ label {
    color: #3f51b5 !important;
    font-weight: 500 !important;
    transform: translateY(-50%) scale(0.85) !important;
    transform-origin: left !important;
    background: white !important;
    padding: 0 5px !important;
    left: 15px !important;
    top: 0 !important;
}

/* Helper text below date fields */
#registration .input-field p {
    margin: 5px 0 0 0 !important;
    font-size: 0.75rem !important;
    color: #666 !important;
    display: block !important;
    visibility: visible !important;
    height: auto !important;
    line-height: 1.4 !important;
}

/* Previous grade dropdown - move down */
#registration .input-field.previous_grade {
    margin-top: 15px !important;
}

/* Previous grade warning text - closer spacing */
#registration .input-field.previous_grade p:has(label[style*="color:red"]) {
    margin: 2px 0 0 0 !important;
    font-size: 0.7rem !important;
}

#registration .input-field p label {
    display: inline !important;
    position: static !important;
    transform: none !important;
    background: transparent !important;
    padding: 0 !important;
    font-size: 0.75rem !important;
    color: #666 !important;
    font-weight: 400 !important;
    left: 0 !important;
    top: 0 !important;
}

/* Ensure helper text is visible in date field containers */
#registration .input-field:has(input[type="date"]) p {
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
}

/* Radio buttons styling - hide native inputs, use Materialize styled ones */
#registration [type="radio"]:not(:checked),
#registration [type="radio"]:checked {
    position: absolute !important;
    opacity: 0 !important;
    pointer-events: auto !important;
    width: 20px !important;
    height: 20px !important;
    z-index: 1 !important;
    cursor: pointer !important;
    margin: 0 !important;
}

#registration label:has([type="radio"]) {
    position: relative;
    display: inline-block;
    cursor: pointer;
}

#registration [type="radio"] + span {
    position: relative;
    padding-left: 35px;
    font-size: 0.95rem;
    color: #333;
    line-height: 25px;
    display: inline-block;
    vertical-align: middle;
    cursor: pointer;
}

/* Radio button circle */
#registration [type="radio"] + span:before,
#registration [type="radio"] + span:after {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    border-radius: 50%;
}

#registration [type="radio"] + span:before {
    width: 20px;
    height: 20px;
    border: 2px solid #5a5a5a;
    background: transparent;
}

#registration [type="radio"] + span:after {
    width: 12px;
    height: 12px;
    top: 4px;
    left: 4px;
    background: #3f51b5;
    transform: scale(0);
}

#registration [type="radio"]:checked + span:before {
    border-color: #3f51b5 !important;
}

#registration [type="radio"]:checked + span:after {
    transform: scale(1) !important;
    background-color: #3f51b5 !important;
}

/* Checkbox - ensure clickable with Materialize styling */
#registration [type="checkbox"]:not(:checked),
#registration [type="checkbox"]:checked {
    position: absolute !important;
    opacity: 0 !important;
    pointer-events: auto !important;
    width: 20px !important;
    height: 20px !important;
    z-index: 1 !important;
    cursor: pointer !important;
}

/* Radio button label styling */
#registration label:has([type="radio"]) {
    display: inline-flex;
    align-items: center;
    cursor: pointer;
    margin-right: 15px;
    margin-bottom: 0;
}

#registration label:has([type="checkbox"]) {
    cursor: pointer;
}

/* Move the waiver agreement checkbox to the right */
#registration .input-field p:has(#agree) {
    margin-left: 5px !important;
}

/* Ensure waiver link is clickable */
#registration .input-field p:has(#agree) a.modal-trigger {
    position: relative;
    z-index: 10;
    pointer-events: auto !important;
    display: inline;
}

#registration .input-field p:has(label [type="radio"]) {
    display: inline-block !important;
    margin-right: 10px !important;
    margin-top: 0 !important;
    margin-bottom: 0 !important;
}

/* Radio button container alignment */
#registration .input-field:has([type="radio"]) {
    display: flex;
    flex-direction: column;
}

#registration .input-field .fakelabel {
    display: block;
    margin-bottom: 8px;
}

#registration .input-field:has(.fakelabel) p:has(label) {
    display: inline-block !important;
}

/* Enhanced buttons */
#registration .btn,
#registration .btn-large {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 20px;
    padding: 0 28px;
    height: 42px;
    line-height: 42px;
    font-size: 1rem;
    font-weight: 600;
    text-transform: none;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
}

#registration .btn.indigo,
#registration .btn-large.indigo {
    background: linear-gradient(135deg, #3f51b5 0%, #5c6bc0 100%);
}

/* School details cards */
#milpitas-center-detail,
#cupertino-center-detail,
#fremont-center-detail {
    background: linear-gradient(135deg, #667eea15 0%, #764ba215 100%);
    border-radius: 10px;
    padding: 12px 15px;
    margin-top: 8px;
    border-left: 4px solid #667eea;
}

/* Alert messages */
#registration .row p[style*="color:red"] {
    background: #fff3cd;
    border-left: 4px solid #ff9800;
    padding: 6px 12px;
    border-radius: 6px;
    font-weight: 500;
    margin: 0 0 10px 0;
    box-shadow: 0 2px 8px rgba(255, 152, 0, 0.2);
    font-size: 0.9rem;
    display: inline-block;
    max-width: fit-content;
    margin-left: auto;
    margin-right: auto;
}

/* Section dividers */
#registration .row:has(h5) {
    margin-top: 15px;
}

/* Parent information section styling */
#registration .row:has(h5:contains("Parent")) .studentwrapper {
    border-left-color: #ff9800;
}

/* Payment summary styling */
#registration .row:has(> div > p:contains("Total")) {
    background: #e8f5e9;
    border-radius: 10px;
    padding: 20px;
    margin: 30px 0;
    border-left: 4px solid #4caf50;
}

/* Form progress indicator */
.form-section {
    position: relative;
    padding-left: 30px;
}

.form-section::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 4px;
    background: linear-gradient(to bottom, #3f51b5, #667eea);
    border-radius: 2px;
}

/* ================================
   Responsive Adjustments
   Grid column widths are handled by Materialize
   s/m/l classes in the HTML. These rules handle
   spacing, typography, and component tweaks only.
   ================================ */

/* Tablet */
@media only screen and (max-width: 992px) {
    #registration h5 {
        font-size: 1.4rem;
    }
}

/* Mobile */
@media only screen and (max-width: 600px) {
    #registration {
        padding: 10px 0 40px 0;
    }

    #registration .container {
        padding: 15px 10px;
        border-radius: 12px;
        margin-left: 5px;
        margin-right: 5px;
        width: auto;
    }

    .studentwrapper {
        padding: 12px 10px;
    }

    /* Prevent iOS auto-zoom on form focus */
    #registration input[type="text"],
    #registration input[type="email"],
    #registration input[type="tel"],
    #registration input[type="number"],
    #registration select,
    #registration textarea,
    #registration .select-wrapper input.select-dropdown {
        font-size: 16px !important;
    }

    /* iOS gives input[type=date] an intrinsic min-width that overflows
       the column; clamp it so the field stays within its container. */
    #registration .input-field input[type="date"] {
        width: 100% !important;
        max-width: 100% !important;
        min-width: 0 !important;
        -webkit-min-logical-width: 0 !important;
        box-sizing: border-box !important;
        padding: 10px 12px !important;
    }

    #registration .input-field:has(input[type="date"]) p,
    #registration .input-field:has(input[type="date"]) p label {
        white-space: normal !important;
        word-wrap: break-word !important;
        max-width: 100% !important;
    }

    /* Typography scaling */
    #registration h5 {
        font-size: 1.05rem;
    }

    #registration h1 {
        font-size: 1.3rem !important;
    }

    #registration h1 i {
        font-size: 1.4rem !important;
    }

    #registration h6 {
        font-size: 1rem;
    }

    /* Tighten row spacing on mobile */
    #registration .row {
        margin-bottom: 10px;
    }

    /* Input fields need more breathing room when stacked */
    #registration .input-field {
        margin-top: 0.5rem;
        margin-bottom: 0.8rem;
    }

    /* Buttons: full width stacked on mobile */
    #registration .btn,
    #registration .btn-large {
        width: 100%;
        margin-bottom: 10px;
    }

    #registration .btn.right {
        float: none !important;
    }

    /* Enrollment fees section */
    .enrollment-fees-section {
        padding: 15px 12px;
        margin: 10px 0;
    }

    .enrollment-fees-section h5 {
        font-size: 1.05rem;
    }

    .fee-item {
        font-size: 0.85rem;
        padding: 5px 8px;
        max-width: 100%;
    }

    .fee-item .price {
        min-width: auto;
    }

    .class-start-info {
        font-size: 0.9rem;
        padding: 8px 12px;
        flex-wrap: wrap;
    }

    /* Payment/waiver section */
    .payment-waiver-row {
        flex-direction: column;
        gap: 10px;
    }

    .waiver-compact {
        margin-left: 0 !important;
        flex-wrap: wrap;
    }

    /* Waiver modal - full-width on mobile */
    #modalweaver {
        width: 95% !important;
        max-width: 95% !important;
        max-height: 85% !important;
    }

    #modalweaver .modal-content {
        max-height: 60vh !important;
    }

    #modalweaver .modal-content p {
        padding: 12px;
        font-size: 0.9rem;
        line-height: 1.6;
    }

    #modalweaver .modal-footer {
        padding: 10px 15px !important;
        flex-wrap: wrap;
        gap: 8px;
    }

    /* School selection modals */
    #fremont-center.modal,
    #milpitas-center.modal,
    #cupertino-center.modal,
    #hscp-center.modal {
        max-width: 92% !important;
        width: 92% !important;
    }

    /* Paypal info */
    .paypal-info {
        font-size: 0.8rem;
        flex-wrap: wrap;
    }

    /* reCAPTCHA scaling for narrow screens */
    .g-recaptcha {
        transform: scale(0.85);
        transform-origin: 0 0;
    }
}

/* Small phones */
@media only screen and (max-width: 400px) {
    #registration .container {
        padding: 10px 8px;
    }

    .studentwrapper {
        padding: 10px 8px;
    }

    #registration h5 {
        font-size: 0.95rem;
    }

    .g-recaptcha {
        transform: scale(0.77);
        transform-origin: 0 0;
    }

    .fee-item {
        flex-wrap: wrap;
    }

    .fee-item .price {
        margin-left: 26px;
    }
}

/* Fake label styling */
.fakelabel {
    color: #5f6368;
    font-weight: 500;
    font-size: 0.95rem;
    margin-bottom: 10px;
}

/* ================================
   Enrollment Fees & Payment Section
   ================================ */
.fees-payment-section {
    background: linear-gradient(135deg, #fafbfc 0%, #f0f4f8 100%);
    border-radius: 16px;
    padding: 25px;
    margin: 20px 0;
    border: 1px solid rgba(63, 81, 181, 0.1);
}

.fees-card {
    background: white;
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 20px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.05);
    border-left: 4px solid #3f51b5;
}

.fees-card-title {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1.1rem;
    font-weight: 600;
    color: #3f51b5;
    margin-bottom: 15px;
}

.fees-card-title i {
    font-size: 24px;
    color: #ff9800;
}

.fees-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.fees-list li {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 12px 0;
    border-bottom: 1px solid #f0f0f0;
    font-size: 0.95rem;
    color: #444;
    line-height: 1.5;
}

.fees-list li:last-child {
    border-bottom: none;
}

.fees-list li i {
    color: #4caf50;
    font-size: 18px;
    flex-shrink: 0;
    margin-top: 2px;
}

.fees-list li.highlight {
    background: linear-gradient(135deg, #fff3e0 0%, #ffe0b2 100%);
    margin: 0 -15px;
    padding: 12px 15px;
    border-radius: 8px;
    border-bottom: none;
}

.fees-list li.highlight i {
    color: #ff9800;
}

.fees-list li strong {
    color: #333;
}

.early-bird-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: linear-gradient(135deg, #4caf50 0%, #66bb6a 100%);
    color: white;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    margin-left: 8px;
}

.price-tag {
    display: inline-block;
    background: linear-gradient(135deg, #3f51b5 0%, #5c6bc0 100%);
    color: white;
    padding: 3px 10px;
    border-radius: 6px;
    font-weight: 600;
    font-size: 0.9rem;
}

.price-tag.discount {
    background: linear-gradient(135deg, #ff9800 0%, #ffc107 100%);
}

.class-start-banner {
    background: linear-gradient(135deg, #e8f5e9 0%, #c8e6c9 100%);
    border-radius: 10px;
    padding: 15px 20px;
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 20px 0;
    border-left: 4px solid #4caf50;
}

.class-start-banner i {
    font-size: 28px;
    color: #4caf50;
}

.class-start-banner span {
    font-size: 1rem;
    font-weight: 600;
    color: #2e7d32;
}

.payment-options {
    background: white;
    border-radius: 12px;
    padding: 20px;
    margin-top: 20px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.05);
}

.payment-options-title {
    font-size: 1rem;
    font-weight: 600;
    color: #333;
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.payment-options-title i {
    color: #3f51b5;
}

.waiver-section {
    background: linear-gradient(135deg, #fff8e1 0%, #ffecb3 100%);
    border-radius: 10px;
    padding: 15px 20px;
    margin: 20px 0;
    border-left: 4px solid #ff9800;
}

.paypal-notice {
    background: linear-gradient(135deg, #e3f2fd 0%, #bbdefb 100%);
    border-radius: 10px;
    padding: 15px 20px;
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 20px 0;
    border-left: 4px solid #2196f3;
}

.paypal-notice i {
    font-size: 24px;
    color: #1976d2;
}

.paypal-notice span {
    font-size: 0.95rem;
    color: #1565c0;
    font-weight: 500;
}

/* Enhanced error styling */
input.error, select.error, textarea.error {
    border-color: #f44336 !important;
    box-shadow: 0 0 0 3px rgba(244, 67, 54, 0.1) !important;
}

label.error {
    color: #f44336;
    font-size: 0.85rem;
    font-weight: 500;
    margin-top: 5px;
}

/* Enhanced Datepicker Styling */
#registration .datepicker,
#registration input[type="date"] {
    cursor: pointer;
}

/* Modern Modal Styling */
#modalweaver {
    max-height: 80% !important;
}

#modalweaver .modal-footer {
    display: flex !important;
    align-items: center !important;
    justify-content: flex-end !important;
    padding: 15px 24px !important;
    background: linear-gradient(135deg, #3f51b5 0%, #5c6bc0 100%) !important;
    border-radius: 0 0 15px 15px !important;
    position: relative !important;
    z-index: 1 !important;
}

#modalweaver #scroll-hint {
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

#modalweaver #waiver-understand-btn {
}

#modalweaver .modal-content p {
    background: linear-gradient(135deg, #f5f7fa 0%, #e8ecf3 100%);
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 15px;
    border-left: 4px solid #3f51b5;
    line-height: 1.8;
    color: #333;
    text-align: justify;
}

#modalweaver .modal-content p:nth-of-type(1) {
    border-left-color: #ff9800;
}

#modalweaver .modal-content p:nth-of-type(2) {
    border-left-color: #4caf50;
}

#modalweaver .modal-content p:nth-of-type(3) {
    border-left-color: #3f51b5;
    margin-bottom: 0;
}

#modalweaver .modal-content br {
    display: none;
}

/* ================================
   School Selection Modal Styling
   ================================ */
/* Compact school popup for Fremont page */
#fremont-center.modal,
#milpitas-center.modal,
#cupertino-center.modal {
    max-width: 380px !important;
    width: 380px !important;
    max-height: fit-content !important;
    top: 50% !important;
    transform: translateY(-50%) !important;
    border-radius: 10px !important;
}

.school-modal {
    max-width: 500px !important;
    border-radius: 24px !important;
    overflow: hidden;
    box-shadow: 0 30px 100px rgba(0,0,0,0.35) !important;
}

.school-modal .modal-content {
    padding: 0 !important;
    background: #fafbfc;
}

.school-modal-header {
    background: linear-gradient(135deg, #1a237e 0%, #3f51b5 40%, #5c6bc0 70%, #7986cb 100%);
    padding: 40px 25px 35px;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.school-modal-header::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255,255,255,0.15) 0%, transparent 50%);
}

.school-modal-header::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    right: 0;
    height: 30px;
    background: #fafbfc;
    border-radius: 50% 50% 0 0 / 100% 100% 0 0;
}

.school-icon-wrapper {
    width: 90px;
    height: 90px;
    background: rgba(255,255,255,0.2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 18px;
    backdrop-filter: blur(10px);
    position: relative;
    z-index: 1;
    box-shadow: 0 8px 32px rgba(0,0,0,0.15);
    border: 2px solid rgba(255,255,255,0.3);
}

.school-icon-wrapper i {
    font-size: 45px;
    color: white;
    text-shadow: 0 2px 10px rgba(0,0,0,0.2);
}

.school-modal-header h5 {
    color: white !important;
    font-size: 1.7rem !important;
    font-weight: 700 !important;
    margin: 0 0 8px 0 !important;
    border: none !important;
    position: relative;
    z-index: 1;
    text-shadow: 0 2px 10px rgba(0,0,0,0.2);
    letter-spacing: 0.5px;
}

.school-modal-header h5::before {
    display: none !important;
}

.school-subtitle {
    color: rgba(255,255,255,0.95);
    font-size: 1rem;
    margin: 0;
    position: relative;
    z-index: 1;
    font-weight: 400;
    letter-spacing: 1px;
}

.selected-school-card {
    display: flex;
    align-items: center;
    gap: 18px;
    background: linear-gradient(135deg, #e8f5e9 0%, #c8e6c9 100%);
    margin: 25px 20px 20px;
    padding: 20px 22px;
    border-radius: 16px;
    border-left: 5px solid #4caf50;
    box-shadow: 0 4px 20px rgba(76, 175, 80, 0.15);
}

.selected-school-card > i {
    font-size: 38px;
    color: #4caf50;
}

.selected-school-card .school-info {
    display: flex;
    flex-direction: column;
}

.selected-school-card .label {
    font-size: 0.7rem;
    color: #558b2f;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-weight: 600;
}

.selected-school-card .school-name {
    font-size: 1.15rem;
    font-weight: 700;
    color: #2e7d32;
    margin-top: 2px;
}

/* School card display (single-school pages like Fremont) */
.school-card-display {
    display: flex;
    align-items: flex-start;
    gap: 16px;
    background: linear-gradient(135deg, #e8eaf6 0%, #c5cae9 100%);
    padding: 20px 24px;
    border-radius: 14px;
    border-left: 4px solid #3f51b5;
    box-shadow: 0 2px 12px rgba(63, 81, 181, 0.12);
    margin-bottom: 10px;
}

.school-card-icon {
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #3f51b5;
    border-radius: 10px;
    flex-shrink: 0;
}

.school-card-icon i {
    color: white;
    font-size: 22px;
}

.school-card-body {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.school-card-name {
    font-size: 1.1rem;
    font-weight: 700;
    color: #1a237e;
}

.school-card-address {
    font-size: 0.88rem;
    color: #455a64;
    line-height: 1.4;
}

.school-card-meta {
    display: flex;
    gap: 18px;
    margin-top: 6px;
    flex-wrap: wrap;
}

.school-card-meta span {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 0.82rem;
    color: #3f51b5;
    font-weight: 500;
}

.school-card-meta i {
    font-size: 16px;
}

/* School picker (multi-school pages) */
.school-picker-label {
    font-size: 0.85rem;
    color: #546e7a;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 600;
    margin-bottom: 10px !important;
}

.school-picker {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.school-picker.has-error .school-option {
    border-color: #F44336;
}

.school-picker-error {
    color: #F44336;
    font-size: 0.85rem;
    margin-top: 6px;
}

.school-option {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    padding: 18px 20px;
    border: 2px solid #e1e8ed;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.2s ease;
    background: white;
}

.school-option:hover {
    border-color: #9fa8da;
    background: #f5f7ff;
    box-shadow: 0 2px 8px rgba(63, 81, 181, 0.08);
}

.school-option.selected {
    border-color: #3f51b5;
    background: linear-gradient(135deg, #e8eaf6 0%, #f5f7ff 100%);
    box-shadow: 0 2px 12px rgba(63, 81, 181, 0.15);
}

.school-option-radio {
    width: 22px;
    height: 22px;
    border: 2px solid #b0bec5;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    margin-top: 2px;
    transition: all 0.2s ease;
}

.school-option.selected .school-option-radio {
    border-color: #3f51b5;
}

.school-option-radio .radio-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: transparent;
    transition: all 0.2s ease;
}

.school-option.selected .radio-dot {
    background: #3f51b5;
}

.school-option-body {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.school-option-name {
    font-size: 1rem;
    font-weight: 600;
    color: #263238;
}

.school-option.selected .school-option-name {
    color: #1a237e;
}

.school-option-address {
    font-size: 0.85rem;
    color: #607d8b;
    line-height: 1.4;
}

.school-option-meta {
    display: flex;
    gap: 16px;
    margin-top: 4px;
    flex-wrap: wrap;
}

.school-option-meta span {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 0.8rem;
    color: #78909c;
    font-weight: 500;
}

.school-option-meta i {
    font-size: 15px;
}

.school-option.selected .school-option-meta span {
    color: #3f51b5;
}

@media only screen and (max-width: 600px) {
    .school-option {
        padding: 14px 16px;
        gap: 12px;
    }
    .school-card-display {
        padding: 16px 18px;
        gap: 12px;
    }
    .school-card-meta,
    .school-option-meta {
        flex-direction: column;
        gap: 4px;
    }
}

.info-cards {
    padding: 5px 20px 25px;
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.info-card {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 16px 18px;
    background: white;
    border-radius: 14px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.04);
    border: 1px solid rgba(0,0,0,0.04);
}

.info-card > i {
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 14px;
    font-size: 24px;
    flex-shrink: 0;
}

.info-card:nth-child(1) > i {
    background: linear-gradient(135deg, #fff3e0 0%, #ffe0b2 100%);
    color: #e65100;
    box-shadow: 0 4px 12px rgba(255, 152, 0, 0.2);
}

.info-card:nth-child(2) > i {
    background: linear-gradient(135deg, #e3f2fd 0%, #bbdefb 100%);
    color: #1565c0;
    box-shadow: 0 4px 12px rgba(33, 150, 243, 0.2);
}

.info-card:nth-child(3) > i {
    background: linear-gradient(135deg, #f3e5f5 0%, #e1bee7 100%);
    color: #7b1fa2;
    box-shadow: 0 4px 12px rgba(156, 39, 176, 0.2);
}

.info-card .info-text {
    display: flex;
    flex-direction: column;
}

.info-card .info-label {
    font-size: 0.75rem;
    color: #888;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.info-card .info-value {
    font-size: 1rem;
    font-weight: 600;
    color: #333;
}

.info-card .info-link {
    font-size: 1rem;
    font-weight: 600;
    color: #3f51b5;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.info-card .info-link::after {
    content: '→';
}

.school-modal-footer {
    background: #fafbfc !important;
    padding: 20px 25px !important;
    text-align: center !important;
    border-top: 1px solid rgba(0,0,0,0.05);
}

.btn-continue {
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    gap: 10px;
    background: linear-gradient(135deg, #1a237e 0%, #3f51b5 50%, #5c6bc0 100%) !important;
    color: white !important;
    padding: 14px 35px !important;
    border-radius: 30px !important;
    font-weight: 600 !important;
    text-transform: none !important;
    font-size: 1.05rem !important;
    box-shadow: 0 6px 25px rgba(63, 81, 181, 0.35) !important;
    letter-spacing: 0.3px;
    position: relative;
    overflow: hidden;
}

.btn-continue i {
    font-size: 20px;
}
}

/* Modern Compact Enrollment Fees Section */
.enrollment-fees-section {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-radius: 12px;
    padding: 20px 24px;
    margin: 15px 0;
    border-left: 4px solid #FFC107;
}

.enrollment-fees-section h5 {
    margin: 0 0 12px 0 !important;
    padding-bottom: 8px !important;
    font-size: 1.2rem;
    color: #1a237e;
    display: flex;
    align-items: center;
    gap: 8px;
    border-bottom: none !important;
}

.enrollment-fees-section h5::before {
    display: none !important;
}

.enrollment-fees-section h5 i {
    color: #FFC107;
    font-size: 1.4rem;
}

.fees-subheading {
    margin: 14px 0 8px 0 !important;
    padding: 0 !important;
    font-size: 0.95rem;
    font-weight: 600;
    color: #455a64;
    display: flex;
    align-items: center;
    gap: 6px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.fees-subheading:first-of-type {
    margin-top: 0 !important;
}

.fees-subheading i {
    font-size: 18px;
    color: #78909c;
}

.fees-applied-grid {
    border-top: 2px solid #e0e0e0;
    padding-top: 10px;
}

.fee-item.base-fee i { color: #1a237e; }

.fees-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 8px;
    margin-bottom: 12px;
}

.fee-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 10px;
    background: white;
    border-radius: 6px;
    font-size: 0.9rem;
    box-shadow: 0 1px 3px rgba(0,0,0,0.08);
    max-width: 450px;
}

.fee-item i {
    font-size: 18px;
    flex-shrink: 0;
}

.fee-item.early-bird i { color: #ff9800; }
.fee-item.regular i { color: #2196f3; }
.fee-item.deadline i { color: #f44336; }
.fee-item.discount i { color: #4caf50; }
.fee-item.info i { color: #9c27b0; }

.fee-item .price {
    font-weight: 700;
    color: #1a237e;
    margin-left: auto;
    white-space: nowrap;
    min-width: 100px;
    text-align: right;
}

.fee-item.discount .price {
    color: #4caf50;
}

.fee-total {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-top: 6px;
    padding: 14px 20px;
    background: linear-gradient(135deg, #1a237e 0%, #3949ab 100%);
    color: white;
    border-radius: 10px;
    box-shadow: 0 4px 12px rgba(26, 35, 126, 0.25);
    max-width: 450px;
}

.fee-total-label {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1.1rem;
    font-weight: 600;
    letter-spacing: 0.3px;
}

.fee-total-label i {
    font-size: 26px;
    color: #FFC107;
}

.fee-total-label #fee-total-students {
    font-size: 0.85rem;
    font-weight: 400;
    opacity: 0.85;
}

.fee-total-amount {
    font-size: 1.8rem;
    font-weight: 800;
    color: #FFC107;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
    white-space: nowrap;
}

.class-start-info {
    background: linear-gradient(135deg, #1a237e 0%, #3949ab 100%);
    color: white;
    padding: 10px 16px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 12px 0;
    font-weight: 500;
}

.class-start-info i {
    font-size: 20px;
    color: #FFC107;
}

.payment-waiver-row {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    align-items: center;
    margin: 12px 0;
    padding: 12px 0;
    border-top: 1px solid #dee2e6;
}

.payment-type-compact {
    display: flex;
    align-items: center;
    gap: 10px;
}

.payment-type-compact .fakelabel {
    margin: 0;
    font-weight: 600;
    color: #495057;
}

.waiver-compact {
    display: flex;
    align-items: center;
    margin-left: 75px;
}

.waiver-compact label span {
    font-size: inherit;
}

.waiver-compact label span,
.waiver-compact label span a {
    font-size: inherit;
}

.paypal-info {
    background: #e3f2fd;
    color: #1565c0;
    padding: 8px 14px;
    border-radius: 6px;
    font-size: 0.85rem;
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 10px;
}

.paypal-info i {
    font-size: 18px;
}
