/* ===================================
   SCHOOL FORM BLOCK STYLES
   =================================== */

.school-form-form-container {
    background: white;
    border-radius: 12px;
    border-style: solid;
    border-color: #D9D9D9;
    overflow: hidden !important;
}

h3.em-booking-section-title.em-booking-form-details-title {
    display: none;
}

h3.em-booking-section-title.em-booking-form-tickets-title {
    display: none;
}

table.em-tickets {
    margin: 0px;
}

.em.em-event-booking-form .em-booking-section {
    padding-bottom: 0px;
}






/* Events Manager Native Form Styling */
.school-form-form-container .em-booking-form {
    font-family: 'Montserrat', sans-serif;
}

.school-form-form-container .em-booking-form .em-booking-form-details {
    display: flex;
    flex-direction: column;
}

.school-form-form-container .em-booking-form .em-booking-form-details .em-booking-field {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.school-form-form-container .em-booking-form .em-booking-form-details .em-booking-field label {
    font-weight: 600;
    font-size: 14px;
    color: #333;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.school-form-form-container .em-booking-form .em-booking-form-details .em-booking-field input[type="text"],
.school-form-form-container .em-booking-form .em-booking-form-details .em-booking-field input[type="email"],
.school-form-form-container .em-booking-form .em-booking-form-details .em-booking-field input[type="tel"],
.school-form-form-container .em-booking-form .em-booking-form-details .em-booking-field input[type="url"],
.school-form-form-container .em-booking-form .em-booking-form-details .em-booking-field select,
.school-form-form-container .em-booking-form .em-booking-form-details .em-booking-field textarea {
    padding: 12px 16px;
    border: 2px solid #E5E7EB;
    border-radius: 8px;
    font-size: 16px;
    font-family: 'Montserrat', sans-serif;
    transition: border-color 0.3s ease;
    background: #fff;
}

.school-form-form-container .em-booking-form .em-booking-form-details .em-booking-field input:focus,
.school-form-form-container .em-booking-form .em-booking-form-details .em-booking-field select:focus,
.school-form-form-container .em-booking-form .em-booking-form-details .em-booking-field textarea:focus {
    outline: none;
    border-color: #3B82F6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

/* Course Groups Dropdown Styling */
.school-form-form-container .em-booking-form .em-booking-form-details .em-booking-field select[name="atx_course_group_selection"] {
    background: #fff;
    border: 2px solid #E5E7EB;
    border-radius: 8px;
    padding: 12px 16px;
    font-size: 16px;
    font-family: 'Montserrat', sans-serif;
    color: #333;
}

.school-form-form-container .em-booking-form .em-booking-form-details .em-booking-field select[name="atx_course_group_selection"]:focus {
    border-color: #3B82F6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

/* Ticket Selection Styling */
.school-form-form-container .em-booking-form .em-booking-form-tickets {
    margin-top: 24px;
}

.school-form-form-container .em-booking-form .em-booking-form-tickets .em-booking-ticket {
    border: 2px solid #E5E7EB;
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 16px;
    background: #fff;
}

.school-form-form-container .em-booking-form .em-booking-form-tickets .em-booking-ticket .em-booking-ticket-name {
    font-weight: 600;
    font-size: 18px;
    color: #333;
    margin-bottom: 8px;
}

.school-form-form-container .em-booking-form .em-booking-form-tickets .em-booking-ticket .em-booking-ticket-price {
    font-size: 24px;
    font-weight: 700;
    color: #3B82F6;
    margin-bottom: 16px;
}

.school-form-form-container .em-booking-form .em-booking-form-tickets .em-booking-ticket .em-booking-ticket-spaces {
    display: flex;
    align-items: center;
    gap: 12px;
}

.school-form-form-container .em-booking-form .em-booking-form-tickets .em-booking-ticket .em-booking-ticket-spaces label {
    font-weight: 600;
    color: #333;
    margin: 0;
}

.school-form-form-container .em-booking-form .em-booking-form-tickets .em-booking-ticket .em-booking-ticket-spaces input[type="number"] {
    width: 80px;
    padding: 8px 12px;
    border: 2px solid #E5E7EB;
    border-radius: 6px;
    text-align: center;
    font-size: 16px;
    font-family: 'Montserrat', sans-serif;
}

/* Submit Button Styling */
.school-form-form-container .em-booking-form .em-booking-form-buttons {
    margin-top: 32px;
}

.school-form-form-container .em-booking-form .em-booking-form-buttons .em-booking-submit {
    background: linear-gradient(135deg, #3B82F6 0%, #1D4ED8 100%);
    color: white;
    border: none;
    padding: 16px 32px;
    border-radius: 8px;
    font-size: 18px;
    font-weight: 600;
    font-family: 'Montserrat', sans-serif;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    width: 100%;
}

.school-form-form-container .em-booking-form .em-booking-form-buttons .em-booking-submit:hover {
    background: linear-gradient(135deg, #1D4ED8 0%, #1E40AF 100%);
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(59, 130, 246, 0.3);
}

.school-form-form-container .em-booking-form .em-booking-form-buttons .em-booking-submit:disabled {
    background: #9CA3AF;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

/* Error Messages */
.school-form-form-container .em-booking-form .em-booking-message {
    padding: 12px 16px;
    border-radius: 8px;
    margin-bottom: 20px;
    font-family: 'Montserrat', sans-serif;
}

.school-form-form-container .em-booking-form .em-booking-message.em-booking-message-error {
    background: #FEF2F2;
    border: 1px solid #FECACA;
    color: #DC2626;
}

.school-form-form-container .em-booking-form .em-booking-message.em-booking-message-success {
    background: #F0FDF4;
    border: 1px solid #BBF7D0;
    color: #16A34A;
}

/* No Booking Available */
.school-form-no-booking {
    text-align: center;
    padding: 40px 20px;
    background: #F9FAFB;
    border-radius: 12px;
    border: 2px solid #E5E7EB;
}

.school-form-no-booking p {
    font-family: 'Montserrat', sans-serif;
    color: #6B7280;
    margin-bottom: 8px;
}

.school-form-no-booking p:first-child {
    font-weight: 600;
    color: #374151;
    font-size: 18px;
}

/* Error Message */
.school-form-error {
    text-align: center;
    padding: 40px 20px;
    background: #FEF2F2;
    border-radius: 12px;
    border: 2px solid #FECACA;
}

.school-form-error p {
    font-family: 'Montserrat', sans-serif;
    color: #DC2626;
    font-weight: 600;
    margin: 0;
}

/* WordPress Block Wrapper - Layer 1 (handles WordPress integration) */

.wp-block-acf-atax-school-form {
    margin-top: 0 !important;
}

.wp-block-acf-atax-school-form .school-form-personal-info,
.wp-block-acf-atax-school-form .school-form-schedule-selection,
.wp-block-acf-atax-school-form .school-form-pricing-selection {
    width: 100%;
    max-width: 100vw;
}

/* Main Section Container - Layer 2 (handles design constraints) */
.school-form-section {
    background: linear-gradient(180deg, #ffffff 15%, #EDEFF5 15%, #EDEFF5 85%, #ffffff 85%);
    width: 100%;
    position: relative;
    padding: 40px 20px 40px 20px; /* Desktop: top 80px, sides 20px, bottom 0px */
    font-family: 'Montserrat', sans-serif;
}

/* Content Container - Layer 3 (handles width constraints) */
.school-form-container {
    max-width: 1200px; /* Desktop container width - as requested */
    width: 100%;
    margin: 0 auto;
    position: relative;
    z-index: 2;
    display: flex;
    align-items: stretch; /* Ensure both columns have equal height */
    gap: 93px; 
    padding: 0;
    justify-content: space-between;
    font-family: 'Montserrat', sans-serif;
}

/* School Form Layout */
.school-form-content-left {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 24px;
    min-height: 0; /* Allow flex item to shrink */
    font-family: 'Montserrat', sans-serif;
    justify-content: center;
}

/* Ticket Selection Styles */
.school-form-ticket-card {
    cursor: pointer;
    transition: all 0.3s ease;
    border: 2px solid transparent;
    border-radius: 8px;
    padding: 16px;
    background: #ffffff;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.school-form-ticket-card:hover {
    border-color: #10A1DC;
    box-shadow: 0 4px 12px rgba(16, 161, 220, 0.2);
    transform: translateY(-2px);
}

.school-form-ticket-card.active {
    border-color: #10A1DC;
    background: #f0f8ff;
    box-shadow: 0 4px 12px rgba(16, 161, 220, 0.3);
}

.school-form-ticket-card.active .school-form-ticket-title {
    color: #10A1DC;
    font-weight: 600;
}

/* Submit Button States */
.school-form-submit-button {
    transition: all 0.3s ease;
}

.school-form-submit-button:disabled,
.school-form-submit-button.disabled {
    opacity: 0.5;
    cursor: not-allowed;
    background: #cccccc;
}

.school-form-submit-button:not(:disabled):not(.disabled) {
    background: #10A1DC;
    cursor: pointer;
}


.school-form-cancellation-title {
    font-size: 18px;
    font-weight: 700;
    color: #354477;
    margin: 0 0 12px 0;
    font-family: 'Montserrat', sans-serif;
}

.school-form-cancellation-text {
    font-size: 16px;
    line-height: 1.6;
    color: #354477;
    margin: 0;
    font-family: 'Montserrat', sans-serif;
}

/* Payment Instruction */
.school-form-payment-instruction {
    font-size: 16px;
    line-height: 1.6;
    color: #354477;
    margin: 0;
    font-family: 'Montserrat', sans-serif;
    font-weight: 700;
}

.school-form-form-right {
    flex: 1; /* Take equal space as content column */
    flex-shrink: 0;
    display: flex; /* Enable flexbox for form stretching */
    align-items: stretch; /* Stretch form to fill container height */
    min-height: 0; /* Allow flex item to shrink */
    font-family: 'Montserrat', sans-serif;
}

/* Custom Booking Form Styles */
.school-booking-form {
    background: white;
    border-radius: 16px;
    padding: 32px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    font-family: 'Montserrat', sans-serif;
    width: 100%;
}

.school-form-personal-info:last-child,
.school-form-schedule-selection:last-child,
.school-form-pricing-selection:last-child {
    margin-bottom: 0;
}

.school-form-section-title {
    font-size: 18px;
    font-weight: 700;
    color: #354477;
    margin: 0 0 20px 0;
    font-family: 'Montserrat', sans-serif;
}

.school-form-field-group {
    margin-bottom: 20px;
}

.school-form-field-row {
    display: flex;
    gap: 16px;
}

.school-form-field-row .school-form-field-group {
    flex: 1;
    margin-bottom: 0;
}

.school-form-label {
    display: block;
    font-size: 14px;
    font-weight: 600;
    color: #354477;
    margin-bottom: 8px;
    font-family: 'Montserrat', sans-serif;
}

.school-form-input,
.school-form-select {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    font-size: 16px;
    font-family: 'Montserrat', sans-serif;
    transition: border-color 0.2s ease;
    box-sizing: border-box;
}

.school-form-input:focus,
.school-form-select:focus {
    outline: none;
    border-color: #354477;
}

.school-form-select {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='%236b7280' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='m6 8 4 4 4-4'/%3e%3c/svg%3e");
    background-position: right 12px center;
    background-repeat: no-repeat;
    background-size: 16px;
    padding-right: 40px;
    appearance: none;
}

.school-form-radio-group {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.school-form-radio-label {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    cursor: pointer;
    padding: 16px;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    transition: all 0.2s ease;
}

.school-form-radio-label:hover {
    border-color: #354477;
    background-color: #f8f9fa;
}

.school-form-radio {
    margin: 0;
    width: 20px;
    height: 20px;
    accent-color: #354477;
}

.school-form-radio-text {
    font-size: 15px;
    color: #495057;
    line-height: 1.4;
    font-family: 'Montserrat', sans-serif;
}

.school-form-radio:checked + .school-form-radio-text {
    color: #354477;
    font-weight: 600;
}

.school-form-submit {
    margin-top: 32px;
}

.school-form-schedule-selection {
    margin-top: 16px;
}

.school-form-button {
    width: 100%;
    background: #10A1DC;
    color: white;
    border: none;
    padding: 24px !important;
    border-radius: 8px;
    font-size: 18px;
    font-weight: 700;
    font-family: 'Montserrat', sans-serif;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.school-form-button:hover {
    background: #2a3659;
}

.school-form-no-tickets {
    background: white;
    border-radius: 16px;
    padding: 32px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    text-align: center;
    color: #6c757d;
    font-family: 'Montserrat', sans-serif;
}

/* Mascot above title */
.school-form-mascot {
    display: flex;
    justify-content: flex-start;
    align-items: center;
    width: 100%;
    padding: 0;
}

.school-form-mascot-image {
    max-width: 60px; /* Reasonable mascot size */
    height: auto;
    display: block;
}

/* Franchise Contact Form Typography */
.school-form-h1 {
    font-size: 48px; /* Desktop default - main title */
    font-weight: 700;
    line-height: 1.2;
    margin: 0; /* No margin - gap handles spacing */
    color: var(--primary-color);
    font-family: 'Montserrat', sans-serif;
}

.school-form-body-text {
    font-size: 16px;
    font-weight: 400;
    line-height: 1.5;
    margin: 0; /* No margin - gap handles spacing */
    color: var(--primary-color);
    font-family: 'Montserrat', sans-serif;
}

/* City Name Styling */
.city-name {
    position: relative;
    display: inline-block;
}

.yellow-underline {
    position: absolute;
    bottom: -8px;
    left: -4px;
    right: -4px;
    height: 4px;
    background: var(--yellow-color);
    border-radius: 50px;
    transform: rotate(-1deg);
    z-index: 1;
    display: block;
}

/* Button container */
.school-form-button {
    display: flex;
    justify-content: flex-start;
    align-items: center;
    padding: 0;
}

/* Contact Information Section */
.school-form-contact-info {
    display: flex;
    flex-direction: column;
    gap: 16px;
    margin-top: 24px;
    font-family: 'Montserrat', sans-serif;
}

.school-form-contact-item {
    display: flex;
    align-items: flex-start;
    gap: 12px;
}

.school-form-contact-icon {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
    margin-top: 2px;
}

.school-form-contact-text {
    font-size: 16px;
    font-weight: 400;
    line-height: 1.5;
    color: var(--primary-color);
    font-family: 'Montserrat', sans-serif;
}

.school-form-address-text,
.school-form-hours-text {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.school-form-address-text div,
.school-form-hours-text div {
    font-size: 16px;
    font-weight: 400;
    line-height: 1.5;
    color: var(--primary-color);
    font-family: 'Montserrat', sans-serif;
}

/* Franchise Contact Form Container */
.school-form-form-container {
    width: 100%;
    height: 100%; /* Full height of parent */
    display: flex;
    align-items: stretch; /* Stretch to fill container height */
}

/* WPForms styling */
.school-form-form-container .wpforms-container {
    width: 100%;
    max-width: 100%;
    font-family: 'Montserrat', sans-serif;
}

.school-form-form-container .wpforms-form {
    width: 100%;
}

.school-form-form-container .wpforms-field {
    margin-bottom: 0px;
}

.school-form-form-container .wpforms-field-label {
    font-family: 'Montserrat', sans-serif;
    font-size: 16px !important;
    font-weight: 500 !important;
    color: var(--primary-color, #354477) !important;
    margin-bottom: 8px;
    display: block;
}

.school-form-form-container .wpforms-field input,
.school-form-form-container .wpforms-field textarea,
.school-form-form-container .wpforms-field select {
    width: 100%;
    padding: 16px 20px;
    border: 2px solid var(--custom-grey, #d3d3d3);
    border-radius: 8px;
    font-family: 'Montserrat', sans-serif;
    font-size: 16px;
    font-weight: 400;
    color: var(--primary-color, #354477);
    background-color: var(--white, #ffffff);
    transition: border-color 0.3s ease;
    box-sizing: border-box;
}

.school-form-form-container .wpforms-field input::placeholder,
.school-form-form-container .wpforms-field textarea::placeholder {
    color: var(--custom-mid-grey, #888888);
    font-family: 'Montserrat', sans-serif;
    font-size: 16px;
}

.school-form-form-container .wpforms-field input:focus,
.school-form-form-container .wpforms-field textarea:focus,
.school-form-form-container .wpforms-field select:focus {
    outline: none;
    border-color: var(--accent-color, #10A1DC);
    box-shadow: 0 0 0 3px rgba(16, 161, 220, 0.1);
}

.school-form-form-container .wpforms-field textarea {
    min-height: 120px;
    resize: vertical;
}

/* Checkbox styling */
.school-form-form-container .wpforms-field-checkbox {
    margin-bottom: 24px;
}

.school-form-form-container .wpforms-field-checkbox .wpforms-field-label {
    font-weight: 400;
    font-size: 14px;
    color: var(--primary-color, #354477);
    margin-bottom: 0;
    display: flex;
    align-items: flex-start;
    gap: 8px;
    line-height: 1.4;
}

.school-form-form-container .wpforms-field-checkbox input[type="checkbox"] {
    width: 18px;
    height: 18px;
    margin: 0;
    flex-shrink: 0;
    margin-top: 2px;
}

/* Submit button styling */
.school-form-form-container .wpforms-submit {
    background-color: var(--primary-color, #354477);
    color: white;
    border: none;
    padding: 18px 40px;
    border-radius: 8px;
    font-family: 'Montserrat', sans-serif;
    font-size: 18px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    width: 100%;
    text-transform: none;
    letter-spacing: 0.5px;
}

.school-form-form-container .wpforms-submit:hover {
    background-color: var(--accent-color, #10A1DC);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(53, 68, 119, 0.3);
}

.school-form-form-container .wpforms-submit:active {
    transform: translateY(0);
    box-shadow: 0 2px 10px rgba(53, 68, 119, 0.2);
}

/* ===================================
   FRANCHISE CONTACT FORM RESPONSIVE DESIGN - GOLDEN STANDARD
   =================================== */

/* ===================================
   LAPTOP BREAKPOINT (1151px-1600px)
   ===================================
   NO font size changes - same fonts as desktop
   NO layout changes - same layout as desktop
   Only spacing adjustments (gaps, padding)
   =================================== */
@media (max-width: 1600px) {
    .school-form-container {
        /* Reduce gaps only - maintain same layout */
        gap: 60px; /* Reduced from 80px */
    }
    
    .school-form-content-left {
        /* Adjust max-width for reduced gap */
        max-width: calc(1200px - 561px - 60px - 40px);
    }
}

/* ===================================
   TABLET BREAKPOINT (768px-1150px)
   ===================================
   Columns stack (flex-direction: column)
   Reduced gaps and spacing
   NO font size changes - same fonts as desktop
   Layout transformation happens here
   =================================== */
@media (max-width: 1150px) {
    .school-form-personal-info,
    .school-form-schedule-selection,
    .school-form-pricing-selection {
        /* Maintain main container spacing control */
        padding: 60px 20px 0px 20px; /* Reduced top padding */
    }
    
    .school-form-container {
        /* Stack columns on tablet */
        flex-direction: column;
        gap: 40px; /* Reduced gap between stacked elements */
    }
    
    .school-form-content-left {
        /* Full width when stacked */
        max-width: 100%;
        order: 1; /* Content first on tablet */
    }
    
    .school-form-form-right {
        /* Adjust form for tablet layout */
        width: 100%;
        max-width: 561px; /* Fixed width instead of CSS variable */
        height: auto;
        order: 2; /* Form second on tablet */
    }
}

/* ===================================
   MOBILE BREAKPOINT (0px-767px)
   ===================================
   Stacked layout maintained
   Reduced padding and spacing
   Main titles only: 48px → 36px for mobile readability
   =================================== */
@media (max-width: 767px) {
    .school-form-personal-info,
    .school-form-schedule-selection,
    .school-form-pricing-selection {
        /* Mobile main container spacing control */
        padding: 60px 16px 30px 16px; /* Reduced sides, added bottom */
    }
    
    .school-form-container {
        /* Maintain stacked layout */
        flex-direction: column;
        gap: 32px; /* Further reduced gap on mobile */
    }
    
    .school-form-content-left,
    .school-form-form-right {
        /* Full width on mobile */
        max-width: 100%;
    }
    
    /* Main title exception - 48px → 36px for mobile readability */
    .school-form-h1 {
        font-size: 36px; /* Mobile title scaling */
    }
}
