/* =========================================================================
   Aggressive White Space Reset (With Center Alignment Restored)
========================================================================= */

/* Forcefully strip hidden padding/margins from parent wrappers */
#header, 
.nav-container, 
.purchase-wrapper,
.main-content-column {
    padding-top: 0 !important;
    margin-top: 0 !important;
}

/* Hard reset the main workspace container clearance with centering rules */
main.booking-container {
    max-width: 1100px;
    margin-top: 80px !important;  /* Keeps the form tight under your fixed header line */
    margin-bottom: 40px;
    margin-left: auto !important;  /* Restores perfect horizontal centering */
    margin-right: auto !important; /* Restores perfect horizontal centering */
    padding-top: 0 !important;
    padding-left: 20px;
    padding-right: 20px;
    display: grid;
    grid-template-columns: 1fr;
    gap: 20px;
}

@media (min-width: 850px) {
    main.booking-container {
        grid-template-columns: 1fr 380px;
        align-items: start;
    }
}

/* Page heading layout mechanics */
.booking-heading-wrapper {
    grid-column: 1 / -1; 
    text-align: center;
}

main.booking-container h1 {
    color: #1e293b;
    /* Dynamically scales: minimum 1.3rem on mobile, up to 1.6rem on desktop */
    font-size: clamp(1.3rem, 4vw, 1.6rem); 
    font-weight: 800;
    margin-top: 30px;
    margin-bottom: 5px;           /* Clean breathing room below title */
    text-align: center;
    line-height: 1.3;             /* Gives multi-line titles comfortable breathing room */
    max-width: 800px;             /* Prevents the long text from stretching too wide */
    margin-left: auto;            /* Centers the text block container */
    margin-right: auto;           /* Centers the text block container */
}

/* Alert badge styling remaining distinct */
.badge-seats {
    display: inline-block;
    background-color: #fef2f2;
    color: #ef4444;
    border: 1px solid #fca5a5;
    padding: 5px 12px;
    border-radius: 6px;
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 25px;
}

/* =========================================================================
   Cards and Container Elements (Left & Right Sidebars)
========================================================================= */

.form-section, 
.summary-sidebar {
    background-color: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;       
    padding: 18px 24px;       /* REDUCED: 18px top/bottom, 24px left/right */
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -1px rgba(0, 0, 0, 0.03);
}

/* Adds breathing room below the booker card before the delegate card starts */
.booker-section {
    margin-bottom: 25px;
}

/* Sticky layout rules for modern desktops */
.summary-sidebar {
    position: -webkit-sticky;
    position: sticky;
    top: 200px;
}

.form-section h2 {
    font-size: 1.2rem;
    font-weight: 700;
    margin-top: 0 !important;
    padding-top: 0 !important;
    margin-bottom: 15px;
    border-bottom: 2px solid #f1f5f9;
    padding-bottom: 12px;
    color: #1e293b;
    text-align: center;
}

.driver-num-title {
    color: #334155;
    font-size: 1.1rem;
    font-weight: 700;
    text-align: left;
    margin-bottom: 15px;
}

/* Injected rows via JavaScript handle top spacing cleanly */
.driver-row .fallback-spacing {
    margin-top: 20px;
}

.driver-separator {
    border: 0; 
    border-top: 1px dashed #e2e8f0; 
    margin: 25px 0;
}

/* =========================================================================
   Form Grid Components & Input Styling
========================================================================= */

.form-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 20px;
}

@media (min-width: 600px) {
    .form-grid.split {
        grid-template-columns: 1fr 1fr;
    }
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

/* Spacing adjustments for structured input blocks */
.corporate-checkbox-group {
    margin-bottom: 5px;
}

#company_name_wrapper {
    display: none; /* Keeps the box hidden until the JavaScript checkbox turns it on */
    margin-bottom: 10px;
}

.attendee-checkbox-group {
    justify-content: center; 
    padding-top: 20px;
}

.form-group label {
    font-size: 0.875rem;
    font-weight: 600;
    color: #475569; /* Balanced charcoal gray */
}

/* Form layout adjustment for the attendee checkbox alignment */
.checkbox-container {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    user-select: none;
}

.checkbox-container input[type="checkbox"] {
    width: 20px;
    height: 20px;
    cursor: pointer;
    margin: 0;
}

/* Inputs redesigned for light mode typing profiles (Target typing fields safely) */
.form-group input[type="text"],
.form-group input[type="email"],
.form-group input[type="tel"],
.form-group input[type="date"] {
    background-color: #f8fafc; /* Sleek off-white background fill */
    border: 1px solid #cbd5e1;
    color: #1e293b;
    font-family: 'Open Sans', sans-serif;
    font-size: 1rem;
    padding: 12px 16px;
    border-radius: 8px;
    outline: none;
    transition: all 0.2s ease-in-out;
}

.form-group input[type="text"]:focus,
.form-group input[type="email"]:focus,
.form-group input[type="tel"]:focus,
.form-group input[type="date"]:focus {
    background-color: #ffffff;
    border-color: #e62222; /* Retains your brand signature spotlight */
    box-shadow: 0 0 0 3px rgba(230, 34, 34, 0.15);
}

/* =========================================================================
   Right Column Sidebar & Quantity Modules
========================================================================= */

.quantity-selector-row {
    margin-bottom: 20px; 
    padding-bottom: 15px; 
    border-bottom: 1px solid #f1f5f9; 
    text-align: center;
}

.quantity-label {
    display: block; 
    color: #1e293b !important;
    font-size: 0.9rem;
    font-weight: 600; 
    margin-bottom: 12px;
    text-align: center;
}

/* Plus / Minus Selector Widget Buttons */
.qty-btn {
    background-color: #f1f5f9;
    border: 1px solid #cbd5e1;
    color: #334155;
    font-size: 1.2rem;
    font-weight: bold;
    width: 38px;
    height: 38px;
    cursor: pointer;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.qty-btn:hover {
    background-color: #e2e8f0;
    color: #0f172a;
    border-color: #94a3b8;
}

#course_quantity {
    background-color: #f8fafc;
    border: 1px solid #cbd5e1;
    color: #1e293b;
    height: 38px;
    font-size: 1rem;
    font-weight: 600;
    border-radius: 6px;
    outline: none;
}

/* Removes default browser spin arrows to ensure numbers sit perfectly centered */
#course_quantity::-webkit-outer-spin-button,
#course_quantity::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

#course_quantity {
    -moz-appearance: textfield; /* Firefox support fallback */
    text-align: center;
}

/* Centers the quantity control group layout */
.quantity-controls {
    display: flex;
    align-items: center;
    justify-content: center; /* Aligns buttons and input perfectly in the center */
    gap: 8px;                /* Slight extra breathing room between buttons */
}

/* Centers the row components perfectly next to each other */
.summary-price-row {
    display: flex;
    justify-content: center; /* Keeps them centered together */
    align-items: baseline;    /* Aligns the baseline of the text naturally */
    gap: 15px;               /* Clean spacing separation */
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 2px solid #f1f5f9;
}

/* Keeps the description label subtle but clear */
.price-label {
    color: #475569;
    font-weight: 600;
    font-size: 1rem;
}

/* Restores your large, prominent, ultra-bold price font */
.price-amount {
    font-size: 2.2rem;       /* Clean, prominent sizing scale */
    font-weight: 800;        /* Extra bold weight profile */
    color: #1e293b;          /* Crisp high-contrast dark slate color */
}


/* Container reset */
.summary-bullets {
    list-style: none; /* Safely removes default browser bullets if necessary */
    padding: 0;
    margin: 0;
}




/* Ensures the flex container handles the green tick and the text block as two clean columns */
.summary-bullets li {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    margin-bottom: 12px;
}

/* Forces the text column to read the sentence and strong tags seamlessly as inline text */
.summary-bullets li span {
    display: inline;
    line-height: 1.6;
    text-align: left;
}


/* Target the bold title label inside your list */
.summary-bullets li .step-label {
    flex-shrink: 0;          /* Physically blocks the text from shrinking or wrapping */
    width: 180px;            /* Gives it a wide, dedicated column (adjust this number if you need it wider) */
    display: inline-block;
    white-space: nowrap;     /* Guarantees the text stays locked onto one single line */
}

/* Target the accompanying message text */
.summary-bullets li .step-message {
    display: inline;
    line-height: 1.5;
}

/* Optional: If you need to nudge the entire list block slightly rightward */
.confirmation-next-steps .summary-bullets {
    padding-left: 10px;
}


.summary-bullets li::before {
    content: "✓ ";
    color: #16a34a;
    font-weight: 900;
    margin-right: 4px;
}

.btn-checkout {
    display: block;
    width: 100%;
    background-color: #e62222; /* Signature Brand Red */
    color: #ffffff;
    font-family: 'Open Sans', sans-serif;
    font-size: 1.1rem;
    font-weight: 700;
    padding: 16px;
    border-radius: 8px;
    cursor: pointer;
    text-align: center;
    box-shadow: 0 4px 6px -1px rgba(230, 34, 34, 0.2); /* Matching brand shadow */
    transition: background-color 0.2s, transform 0.1s;
}

.btn-checkout:hover {
    background-color: #b81414; /* Deepened, rich crimson on hover */
}

.btn-checkout:active {
    transform: scale(0.98);
}

.security-stamp {
    text-align: center;
    font-size: 0.9rem;
    color: #16171a;
    margin-top: 20px;
}

/* =========================================================================
   Sidebar Course Selection Snapshot
========================================================================= */
.summary-course-snapshot {
    background-color: #f8fafc; /* Subtle off-white box to frame the details */
    border: 1px dashed #cbd5e1;
    border-radius: 8px;
    padding: 12px 15px;
    margin-top: 5px;
    margin-bottom: 20px;
    font-family: 'Open Sans', sans-serif;
    text-align: left; /* Kept left-aligned so long course names are highly readable */
}

.snapshot-title {
    font-size: 1.5rem;
    font-weight: 600;
    color: #1e293b;
    line-height: 1.4;
    margin-bottom: 15px;
}

/* Structural layouts for the new stacked date/time blocks */
.selection-row-container {
    margin-bottom: 16px;
}

.selection-row-container:last-of-type {
    margin-bottom: 0;
}

.selection-row-header {
    display: flex;
    align-items: center;
    gap: 8px; /* Spaces the icon cleanly next to the text label */
    margin-bottom: 4px;
}

.selection-row-label {
    font-size: 0.75rem;
    font-weight: 700;
    color: #64748b;
    letter-spacing: 0.05em;
    line-height: 1.2;
}

.selection-icon {
    font-size: 1.1rem;
    line-height: 1;
}

/* The prominent font style that indents directly below the label text above */
.selection-row-value.large-display {
    font-family: 'Open Sans', sans-serif;
    font-size: 1.2rem;   /* Crisp, clear readable text scale */
    font-weight: 600;   /* Extra bold weight profile */
    color: #16171a;     /* Deep charcoal typography color */
    padding-left: 32px; /* Perfect left-edge alignment under the label string */
}

.timezone-note {
    font-size: 0.8rem; 
    color: #64748b;
    font-weight: 600;
}

/* High-visibility warning alert for corporate buyers */
.company-zoom-alert {
    display: none; /* Hidden by default, controlled via JS */
    background-color: #fef2f2;
    border: 1px solid #fca5a5;
    color: #b91c1c;
    padding: 14px 18px;
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: 600;
    line-height: 1.5;
    margin-bottom: 20px;
}

/* Class applied dynamically via JavaScript to drop fields out of view */
.hide-driver-contact {
    display: none !important;
}

/* Entitlement selections & date inputs alignment profile */
.entitlement-container {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 20px;
    margin-top: 15px;
    padding: 12px 16px;
    background-color: #f8fafc;
    border-radius: 8px;
    border: 1px solid #e2e8f0;
}

.entitlement-options {
    display: flex;
    gap: 40px;
}

.entitlement-label {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.9rem;
    font-weight: 600;
    color: #334155;
    cursor: pointer;
}

.entitlement-label input[type="radio"] {
    width: 18px;
    height: 18px;
    accent-color: #e62222; /* Matches your brand signature accent color */
    cursor: pointer;
    margin: 0;
}

.entitlement-dates {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    flex-grow: 1;
}

.entitlement-dates .form-group {
    flex: 1;
    min-width: 140px; /* Prevents inputs from getting squashed on laptop screens */
}

/* Inline warning request for category select blocks */
.entitlement-request-text {
    display: block;
    color: #ef4444; /* Eye-catching red accent state */
    font-size: 0.85rem;
    font-weight: 700;
    margin-bottom: 8px;
    width: 100%; /* Spans full horizontal container row */
}

/* =========================================================================
   STRIPE CHECKOUT SUCCESS CONFIRMATION MODULES (Global Availability)
========================================================================= */
.success-hero {
    text-align: center;
    padding: 40px 20px;
    background-color: #f8fafc;
    border-radius: 12px;
    border: 1px solid #e2e8f0;
    margin-bottom: 30px;
}
.success-icon {
    font-size: 3.5rem;
    color: #16a34a;
    margin-bottom: 15px;
    display: inline-block;
}
.success-hero h1 {
    color: #1e293b;
    font-size: 2rem;
    font-weight: 800;
    margin-bottom: 10px;
}
.success-hero p {
    color: #475569;
    font-size: 1.1rem;
    max-width: 600px;
    margin: 0 auto;
}
.confirmation-panel {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 24px;
    margin-bottom: 30px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
}
.panel-heading {
    font-size: 1.3rem;
    font-weight: 700;
    color: #1e293b;
    border-bottom: 2px solid #f1f5f9;
    padding-bottom: 12px;
    margin-bottom: 20px;
}

.meta-list {
    list-style: none;
    padding: 0;
    margin: 0 0 20px 0;
}

.meta-list li {
    padding: 10px 0;
    border-bottom: 1px dashed #f1f5f9;
    display: flex;
    justify-content: flex-start; /* Aligns both label and value to the left edge */
    gap: 15px;                   /* Creates a short, clean distance between them */
    font-size: 1rem;
}

/* Give the bold labels a fixed structural width so the details align perfectly in a neat vertical line */
.meta-list li strong { 
    color: #1e293b; 
    width: 220px;                /* Keeps all headings uniform */
    flex-shrink: 0;              /* Prevents labels from squishing on small laptop screens */
}

.meta-list li span { 
    color: #475569; 
}


.delegate-badge-row {
    background-color: #f8fafc;
    padding: 16px;
    border-radius: 8px;
    border: 1px solid #e2e8f0;    /* Changed from a thick red left-border to a clean, subtle full box border */
    margin-bottom: 16px;
}
.delegate-name {
    font-weight: 700;
    color: #1e293b;
    font-size: 1.05rem;
    margin-bottom: 6px;
}
.delegate-licence {
    font-size: 0.9rem;
    color: #475569;
}
.delegate-licence strong {
    color: #1e293b;
}
/* New structural rows for the category start/expiry date metrics */
.delegate-dates-row {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    margin-top: 8px;
    padding-top: 8px;
    border-top: 1px dashed #e2e8f0;
    font-size: 0.85rem;
    color: #64748b;
}
.date-metric strong {
    color: #475569;
}




/* Forces all structural layout panels on the success page to span full-width */
.success-hero,
.confirmation-panel {
    grid-column: 1 / -1;
    width: 100%;
    box-sizing: border-box;
}

/* =========================================================================
   Desktop Sidebar Structural Runway Validation Fix
========================================================================= */
@media (min-width: 850px) {
    /* Target the class directly to match your mid-stylesheet declaration safely */
    .summary-sidebar {
        grid-column: 2 !important;        /* Lock the card explicitly into the right-hand column track */
        position: -webkit-sticky !important; 
        position: sticky !important;      /* Re-declare standard sticky positioning */
        top: 150px !important;            /* Safe clearance buffer below your fixed drop navigation line */
        align-self: start !important;     /* Force-collapses the container block height so it has physical room to glide */
        display: block !important;        /* Ensures no template properties flip it into a flex strip */
    }
}


/* Success page typography controls */
.panel-intro {
    margin-bottom: 15px; 
    color: #475569; 
    font-size: 0.95rem;
}

/* Fallback state alert window modifiers */
.delegate-pending-box {
    background-color: #fffbeb; 
    border-color: #fef3c7;
}
.delegate-pending-title {
    color: #b45309;
}
.delegate-pending-text {
    color: #d97706; 
    margin-top: 4px; 
    font-size: 0.88rem;
}


/* =========================================================================
   Job Title Full-Width Utility Framework Extension
========================================================================= */
@media (min-width: 600px) {
    /* Ensures full-width utility containers span across complex nested tracks */
    .form-grid.full-width {
        grid-column: 1 / -1;
    }
}

/* Subtle optimization for touch-device form fields */
.form-group input[type="text"],
.form-group input[type="email"],
.form-group input[type="tel"] {
    -webkit-appearance: none; /* Smooths out rendering inconsistencies on iOS Safari */
}
