/* ============================================================
   USA Times — Booking Surface  ·  iOS-app rebuild 2026-05-26
   Stylesheet for the new /ride/nyc booking page that mirrors
   the iOS member app (HomeView + AirportBookingFlow +
   HourlyBookingFlow). Single column, mobile-first, no marketing
   chrome. Pairs with usat-airport-booking.php.

   Scope: every selector is namespaced under `.usat-ab` so this
   file cannot leak into the rest of the WP theme. Inherits
   palette tokens from usat-design-system.css; redeclares the few
   booking-only tokens it needs locally.
   ============================================================ */

.usat-ab {
    --ab-bg:        #FFFFFF;
    --ab-card:      #FBFAF6;
    --ab-soft:      #ECEFF5;
    --ab-soft-hi:   #E1E6EE;
    --ab-ink:       #101014;
    --ab-text:      #1A1D24;
    --ab-muted:     #848E9F;
    --ab-sub:       #6B7280;
    --ab-rule:      #E4E7ED;
    --ab-border:    #D4D9E2;
    --ab-blue:      #0A3F93;
    --ab-blue-dk:   #082E6B;
    --ab-blue-tint: #F0F4FC;
    --ab-blue-on:   #D7E1F5;
    --ab-gold:      #B89556;
    --ab-radius-card:   18px;
    --ab-radius-pill:   999px;
    --ab-radius-input:  12px;
    --ab-ease:    cubic-bezier(.2,.8,.2,1);

    /* container width — wider on desktop now that the tab strip is horizontal */
    max-width: 720px;
    margin: 0 auto;
    padding: 8px 20px 0;
    color: var(--ab-text);
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    -webkit-font-smoothing: antialiased;
}

/* ============================================================
   HERO — small eyebrow + "Where to?" (mirrors iOS HomeView)
   ============================================================ */

.usat-ab-hero { padding: 4px 4px 12px; }
.usat-ab-greet {
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: var(--ab-muted);
    margin: 0 0 8px;
}
.usat-ab .usat-ab-where {
    font-family: 'Fraunces', Georgia, serif !important;
    font-weight: 400 !important;
    font-size: 34px !important;
    line-height: 1.05 !important;
    letter-spacing: -0.02em !important;
    color: var(--ab-ink) !important;
    margin: 0 !important;
}
@media (max-width: 480px) {
    .usat-ab .usat-ab-where { font-size: 28px !important; }
}

/* ============================================================
   SERVICE TIER TILES — three big cards (mirror of iOS ServiceTierTile)
   ============================================================ */

/* 3-column horizontal tile strip on desktop, stacks on phones. Keeps the
   booking form above the fold instead of pushing it down. */
.usat-ab-tiles {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 8px;
    margin: 4px 0 14px;
}
@media (max-width: 560px) {
    .usat-ab-tiles { grid-template-columns: 1fr; }
}
/* Honor the HTML `hidden` attribute against `display: grid` below */
.usat-ab-tile[hidden],
.usat-ab-pane[hidden],
.usat-ab-card[hidden] { display: none !important; }

.usat-ab-tile {
    display: grid;
    grid-template-columns: 36px 1fr;
    grid-template-rows: auto auto;
    align-items: center;
    gap: 4px 10px;
    background: var(--ab-card);
    border: 1px solid var(--ab-rule);
    border-radius: 14px;
    padding: 10px 12px;
    text-align: left;
    cursor: pointer;
    transition: all 160ms var(--ab-ease);
    box-shadow: 0 1px 2px rgba(16, 16, 20, 0.03);
    min-height: 64px;
}
.usat-ab-tile:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 14px rgba(16, 16, 20, 0.08);
    border-color: var(--ab-border);
}
.usat-ab-tile.active {
    background: var(--ab-blue-tint);
    border-color: var(--ab-blue);
    box-shadow: 0 4px 18px rgba(10, 63, 147, 0.12);
}
.usat-ab-tile-icon {
    grid-row: 1 / 3;
    width: 36px;
    height: 36px;
    border-radius: 10px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: var(--ab-blue-tint);
    color: var(--ab-blue);
    transition: all 160ms var(--ab-ease);
}
.usat-ab-tile.active .usat-ab-tile-icon {
    background: var(--ab-blue);
    color: #FFFFFF;
}
.usat-ab-tile-icon svg { width: 20px; height: 20px; }
.usat-ab-tile-body { display: contents; } /* let children participate in the parent grid */
.usat-ab-tile-name {
    grid-column: 2;
    grid-row: 1;
    font-size: 14px;
    font-weight: 600;
    color: var(--ab-ink);
    letter-spacing: -0.005em;
}
.usat-ab-tile-tag {
    grid-column: 2;
    grid-row: 2;
    font-size: 11px;
    color: var(--ab-muted);
    line-height: 1.35;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.usat-ab-tile-tag strong { color: var(--ab-text); font-weight: 600; }
/* The compact strip uses the blue tint as the "active" affordance — the
   trailing arrow icon becomes redundant and just steals space. */
.usat-ab-tile-arrow { display: none; }

/* ============================================================
   SECTION CARD — every form section is one card
   ============================================================ */

.usat-ab-form { display: grid; gap: 10px; }
.usat-ab-card {
    background: var(--ab-card);
    border: 1px solid var(--ab-rule);
    border-radius: var(--ab-radius-card);
    padding: 18px 18px 20px;
    box-shadow: 0 1px 2px rgba(16, 16, 20, 0.03);
}
.usat-ab .usat-ab-card-h {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif !important;
    font-size: 11px !important;
    font-weight: 600 !important;
    letter-spacing: 0.16em !important;
    text-transform: uppercase !important;
    color: var(--ab-muted) !important;
    margin: 0 0 12px !important;
    line-height: 1.2 !important;
}
.usat-ab-card-sub {
    font-size: 13px;
    color: var(--ab-sub);
    margin: 8px 0 0;
    line-height: 1.45;
}

/* ============================================================
   MAP PREVIEW
   ============================================================ */

.usat-ab-card-map { padding: 0; overflow: hidden; }
.usat-ab-map {
    width: 100%;
    height: 200px;
    background: linear-gradient(180deg, #F4F6F9 0%, #E9ECF1 100%);
    position: relative;
}
.usat-ab-map-fallback {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    color: var(--ab-sub);
}
.usat-ab-map-fallback svg { width: 24px; height: 24px; }
.usat-ab-map-fallback-text { font-size: 14px; }
.usat-ab-map-fallback-text strong { color: var(--ab-ink); font-weight: 600; }

/* ============================================================
   SEGMENTED CONTROL (direction toggle)
   ============================================================ */

.usat-ab-segmented {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4px;
    background: var(--ab-soft);
    padding: 4px;
    border-radius: var(--ab-radius-input);
    margin-bottom: 14px;
}
.usat-ab-seg {
    height: 38px;
    border: 0;
    background: transparent;
    border-radius: 9px;
    font-family: inherit;
    font-size: 14px;
    font-weight: 500;
    color: var(--ab-muted);
    cursor: pointer;
    transition: all 160ms var(--ab-ease);
}
.usat-ab-seg.active {
    background: #FFFFFF;
    color: var(--ab-ink);
    font-weight: 600;
    box-shadow: 0 1px 3px rgba(16, 16, 20, 0.10);
}

/* ============================================================
   AIRPORT PILL ROW
   ============================================================ */

.usat-ab-airport-row {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}
.usat-ab-airport-pill {
    flex: 1 0 auto;
    min-width: 56px;
    height: 42px;
    padding: 0 14px;
    border: 1px solid var(--ab-border);
    border-radius: var(--ab-radius-pill);
    background: #FFFFFF;
    color: var(--ab-ink);
    font-family: inherit;
    font-size: 14px;
    font-weight: 600;
    letter-spacing: 0.04em;
    cursor: pointer;
    transition: all 140ms var(--ab-ease);
}
.usat-ab-airport-pill:hover {
    background: var(--ab-soft);
    border-color: var(--ab-blue);
}
.usat-ab-airport-pill.active {
    background: var(--ab-blue);
    color: #FFFFFF;
    border-color: var(--ab-blue);
    box-shadow: 0 4px 12px rgba(10, 63, 147, 0.18);
}

/* ============================================================
   VEHICLE PICKER (illustrated cards)
   ============================================================ */

.usat-ab-vehicle-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}
@media (max-width: 420px) {
    .usat-ab-vehicle-row { grid-template-columns: 1fr; }
}
.usat-ab-vehicle {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 4px;
    padding: 14px 14px 16px;
    background: #FFFFFF;
    border: 1.5px solid var(--ab-rule);
    border-radius: 14px;
    cursor: pointer;
    text-align: left;
    transition: all 160ms var(--ab-ease);
    position: relative;
}
.usat-ab-vehicle:hover {
    border-color: var(--ab-border);
    box-shadow: 0 4px 12px rgba(16, 16, 20, 0.06);
}
.usat-ab-vehicle.active {
    border-color: var(--ab-blue);
    background: var(--ab-blue-tint);
    box-shadow: 0 6px 18px rgba(10, 63, 147, 0.14);
}
.usat-ab-vehicle.active::after {
    content: '';
    position: absolute;
    top: 10px;
    right: 12px;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: var(--ab-blue);
    background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23ffffff' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'><path d='M5 12l5 5L20 7'/></svg>");
    background-size: 12px;
    background-position: center;
    background-repeat: no-repeat;
}
.usat-ab-vehicle-art {
    display: block;
    width: 100%;
    height: auto;
    max-height: 96px;
    margin: 0 0 6px;
}
.usat-ab-vehicle-name {
    font-size: 15px;
    font-weight: 600;
    color: var(--ab-ink);
}
.usat-ab-vehicle-sub {
    font-size: 12px;
    color: var(--ab-muted);
    margin-bottom: 6px;
}
.usat-ab .usat-ab-vehicle-price {
    display: inline-flex;
    align-items: baseline;
    gap: 4px;
    font-family: 'Fraunces', Georgia, serif !important;
    font-size: 18px;
    font-weight: 600;
    color: var(--ab-ink);
    font-variant-numeric: tabular-nums lining-nums;
}
.usat-ab .usat-ab-vehicle-price .star { color: var(--ab-blue); font-family: inherit !important; font-size: 16px; }

/* ============================================================
   ADDRESS INPUT — pill-shaped with leading icon
   ============================================================ */

.usat-ab-input-shell {
    position: relative;
    margin-top: 6px;
}
.usat-ab-input-ico {
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    width: 18px;
    height: 18px;
    color: var(--ab-muted);
    pointer-events: none;
}
.usat-ab-input {
    width: 100%;
    height: 52px;
    padding: 0 16px 0 44px;
    background: var(--ab-soft);
    border: 1px solid transparent;
    border-radius: var(--ab-radius-input);
    font-family: inherit;
    font-size: 15px;
    color: var(--ab-ink);
    transition: all 140ms var(--ab-ease);
}
.usat-ab-input::placeholder { color: var(--ab-muted); }
.usat-ab-input:focus {
    outline: 0;
    background: #FFFFFF;
    border-color: var(--ab-blue);
    box-shadow: 0 0 0 4px rgba(10, 63, 147, 0.10);
}

/* mini fields side-by-side (flight # + riders) */
.usat-ab-row-2col {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin-top: 10px;
}
@media (max-width: 420px) {
    .usat-ab-row-2col { grid-template-columns: 1fr; }
}
.usat-ab-mini-field {
    display: flex;
    flex-direction: column;
    gap: 6px;
}
.usat-ab-mini-label {
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--ab-muted);
}
.usat-ab-mini-input {
    height: 44px;
    padding: 0 14px;
    background: var(--ab-soft);
    border: 1px solid transparent;
    border-radius: 10px;
    font-family: 'JetBrains Mono', 'Courier New', monospace;
    font-size: 14px;
    color: var(--ab-ink);
    transition: all 140ms var(--ab-ease);
}
.usat-ab-mini-input:focus {
    outline: 0;
    background: #FFFFFF;
    border-color: var(--ab-blue);
    box-shadow: 0 0 0 3px rgba(10, 63, 147, 0.10);
}
.usat-ab-mini-spacer { height: 44px; }

/* ============================================================
   STEPPER (riders +/−)
   ============================================================ */

.usat-ab-stepper {
    display: grid;
    grid-template-columns: 44px 1fr 44px;
    height: 44px;
    background: var(--ab-soft);
    border-radius: 10px;
    overflow: hidden;
}
.usat-ab-step {
    border: 0;
    background: transparent;
    color: var(--ab-ink);
    font-size: 18px;
    font-weight: 600;
    cursor: pointer;
    transition: background 120ms var(--ab-ease);
}
.usat-ab-step:hover { background: var(--ab-soft-hi); }
.usat-ab-step:active { background: var(--ab-border); }
.usat-ab-step-val {
    border: 0;
    background: transparent;
    text-align: center;
    font-family: inherit;
    font-size: 16px;
    font-weight: 600;
    color: var(--ab-ink);
    -moz-appearance: textfield;
}
.usat-ab-step-val::-webkit-outer-spin-button,
.usat-ab-step-val::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }

/* ============================================================
   HOURLY DURATION PILLS
   ============================================================ */

.usat-ab-hours-row {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}
.usat-ab-hour-pill {
    flex: 1 0 56px;
    min-width: 56px;
    height: 44px;
    border: 1px solid var(--ab-border);
    border-radius: var(--ab-radius-pill);
    background: #FFFFFF;
    color: var(--ab-ink);
    font-family: inherit;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 140ms var(--ab-ease);
}
.usat-ab-hour-pill .usat-ab-hour-unit { color: var(--ab-muted); font-weight: 500; }
.usat-ab-hour-pill:hover {
    background: var(--ab-soft);
    border-color: var(--ab-blue);
}
.usat-ab-hour-pill.active {
    background: var(--ab-blue);
    color: #FFFFFF;
    border-color: var(--ab-blue);
}
.usat-ab-hour-pill.active .usat-ab-hour-unit { color: #C2D1ED; }

/* ============================================================
   DAYS PILLS (commute days of week)
   ============================================================ */

.usat-ab-days-row {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 6px;
    margin-top: 10px;
}
@media (max-width: 480px) {
    .usat-ab-days-row { gap: 4px; }
}
.usat-ab-day-pill {
    height: 44px;
    border: 1px solid var(--ab-border);
    border-radius: var(--ab-radius-pill);
    background: #FFFFFF;
    color: var(--ab-ink);
    font-family: inherit;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 140ms var(--ab-ease);
    padding: 0;
}
.usat-ab-day-pill:hover {
    background: var(--ab-soft);
    border-color: var(--ab-blue);
}
.usat-ab-day-pill.active {
    background: var(--ab-blue);
    color: #FFFFFF;
    border-color: var(--ab-blue);
    box-shadow: 0 4px 10px rgba(10, 63, 147, 0.18);
}

/* ============================================================
   DATETIME (pickup time)
   ============================================================ */

.usat-ab-datetime {
    width: 100%;
    height: 52px;
    padding: 0 16px;
    background: var(--ab-soft);
    border: 1px solid transparent;
    border-radius: var(--ab-radius-input);
    font-family: inherit;
    font-size: 15px;
    color: var(--ab-ink);
    transition: all 140ms var(--ab-ease);
}
.usat-ab-datetime:focus {
    outline: 0;
    background: #FFFFFF;
    border-color: var(--ab-blue);
    box-shadow: 0 0 0 4px rgba(10, 63, 147, 0.10);
}

/* ============================================================
   NOTES (collapsible textarea)
   ============================================================ */

.usat-ab-notes-card { padding: 14px 18px; }
.usat-ab-notes-toggle {
    border: 0;
    background: transparent;
    color: var(--ab-blue);
    font-family: inherit;
    font-size: 14px;
    font-weight: 600;
    padding: 6px 0;
    cursor: pointer;
}
.usat-ab-notes-toggle:hover { color: var(--ab-blue-dk); }
.usat-ab-notes {
    width: 100%;
    margin-top: 10px;
    padding: 12px 14px;
    background: var(--ab-soft);
    border: 1px solid transparent;
    border-radius: 10px;
    font-family: inherit;
    font-size: 14px;
    line-height: 1.5;
    color: var(--ab-ink);
    resize: vertical;
}
.usat-ab-notes:focus {
    outline: 0;
    background: #FFFFFF;
    border-color: var(--ab-blue);
    box-shadow: 0 0 0 3px rgba(10, 63, 147, 0.10);
}

/* ============================================================
   SUB-THRESHOLD WARNING CARD
   ============================================================ */

.usat-ab-sub-card {
    background: #FFF8F2;
    border-color: #F5D4B3;
}
.usat-ab-sub-actions {
    display: flex;
    gap: 8px;
    margin-top: 12px;
    flex-wrap: wrap;
}
.usat-ab-sub-btn {
    flex: 1;
    min-width: 140px;
    height: 44px;
    padding: 0 18px;
    border: 1px solid var(--ab-border);
    background: #FFFFFF;
    color: var(--ab-ink);
    border-radius: var(--ab-radius-pill);
    font-family: inherit;
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: all 140ms var(--ab-ease);
}
.usat-ab-sub-btn.primary {
    background: var(--ab-ink);
    color: #FFFFFF;
    border-color: var(--ab-ink);
}
.usat-ab-sub-btn:hover { transform: translateY(-1px); box-shadow: 0 4px 12px rgba(16,16,20,0.08); }

/* ============================================================
   STICKY FARE FOOTER
   ============================================================ */

.usat-ab-footer-spacer { height: 88px; }

.usat-ab-fare-footer {
    position: sticky;
    bottom: 0;
    left: 0;
    right: 0;
    margin: 0 -20px;
    padding: 12px 20px calc(12px + env(safe-area-inset-bottom));
    background: rgba(255, 255, 255, 0.92);
    backdrop-filter: saturate(180%) blur(12px);
    -webkit-backdrop-filter: saturate(180%) blur(12px);
    border-top: 1px solid var(--ab-rule);
    z-index: 30;
}
.usat-ab-fare-footer-inner {
    max-width: 640px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1fr auto;
    align-items: center;
    gap: 16px;
}
.usat-ab-fare-left { display: flex; flex-direction: column; line-height: 1.2; }
.usat-ab .usat-ab-fare-num {
    font-family: 'Fraunces', Georgia, serif !important;
    font-size: 26px;
    font-weight: 600;
    color: var(--ab-ink);
    display: inline-flex;
    align-items: baseline;
    gap: 4px;
}
.usat-ab-fare-num .star { color: var(--ab-blue); font-size: 20px; }
.usat-ab-fare-sub {
    font-size: 11px;
    color: var(--ab-muted);
    letter-spacing: 0.06em;
    text-transform: uppercase;
    margin-top: 2px;
}

.usat-ab-reserve {
    appearance: none;
    -webkit-appearance: none;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    height: 52px;
    padding: 0 26px;
    border: 0;
    border-radius: var(--ab-radius-pill);
    background: var(--ab-blue);
    color: #FFFFFF;
    font-family: inherit;
    font-size: 16px;
    font-weight: 600;
    letter-spacing: 0.005em;
    cursor: pointer;
    box-shadow: 0 6px 18px rgba(10, 63, 147, 0.28);
    transition: all 160ms var(--ab-ease);
}
.usat-ab-reserve:hover {
    background: var(--ab-blue-dk);
    transform: translateY(-1px);
    box-shadow: 0 10px 26px rgba(10, 63, 147, 0.36);
}
.usat-ab-reserve svg { width: 18px; height: 18px; }

/* ============================================================
   KILL: legacy hero/fleet/how/testimonials elements if any old
   markup leaks in via cached pages — belt and suspenders.
   ============================================================ */

.usat-ab .usat-ab-hero-text,
.usat-ab .usat-ab-trust,
.usat-ab .usat-ab-fleet,
.usat-ab .usat-ab-how,
.usat-ab .usat-ab-testimonials,
.usat-ab .usat-ab-footer-meta { display: none !important; }

/* ============================================================
   TIGHTEN PARENT WRAPPER — the WP block group containing our
   shortcode often paints a tall top padding via the theme. Strip
   it on /ride/* so the booking surface starts directly under the
   site header, not 200 px down.
   ============================================================ */

body.usat-polished.usat-on-checkout .entry-content,
body.usat-polished.usat-on-checkout main,
body.usat-polished.usat-on-checkout main > article,
body.usat-polished.usat-on-checkout main .wp-block-group,
body.usat-polished.usat-on-checkout .wp-block-post-content,
body.usat-polished.usat-on-checkout .wp-block-post-content > .wp-block-group {
    padding-top: 0 !important;
    margin-top: 0 !important;
}
/* Site-blocks > group:first-child is the page header; group at index 2 is
   typically the content. Drop the post-header gap. */
body.usat-polished.usat-on-checkout .wp-site-blocks > * + * {
    margin-block-start: 0 !important;
}

/* ============================================================
   ACCESSIBILITY
   ============================================================ */

.usat-ab :focus-visible {
    outline: 2px solid var(--ab-blue);
    outline-offset: 3px;
    border-radius: 6px;
}
@media (prefers-reduced-motion: reduce) {
    .usat-ab *,
    .usat-ab *::before,
    .usat-ab *::after {
        animation-duration: 0.01ms !important;
        transition-duration: 0.01ms !important;
    }
}
