/* iPad layout — bookings (Jordan 11 Nov 2026, iPad Pro 12.9" landscape 1366 × 1024).
   Every rule starts with html.ed-touch. Desktop and phone are unchanged.
   Jordan 11 Nov 2026: "Bookings page needs a big rework" — the date strip, the date range box,
   the filter boxes on one line, the job type chips on one line, the booking rows fit the width
   with no sideways scroll, no word broken in the middle, status pills on one line. */

/* ── Page room: less white at the sides of the board (Bookings page only) ── */
html.ed-touch .fi-main:has(.scheduler-wrapper) { padding-left: 16px !important; padding-right: 16px !important; }
html.ed-touch .fi-main:has(.scheduler-wrapper) > .fi-page { padding-left: 0 !important; padding-right: 0 !important; }
html.ed-touch .scheduler-wrapper .jobs-timeline { padding-left: 10px !important; padding-right: 10px !important; }

/* ── On every iPad size: no job / driver count under the day in the date strip (Jordan 11 Nov 2026:
   "remove the JOB/Driver number underneath, it's a cause of a lot of issues") ── */
html.ed-touch .scheduler-wrapper .date-card .job-count { display: none !important; }

/* Go to Date: on the iPad a tap lands on the date box itself, laid invisibly over the button, so
   the iPad's own date picker opens under the button (the scripted call is not needed). */
html.ed-touch .scheduler-wrapper .date-nav > div[x-data] > input[type="date"] {
    left: 0 !important; top: 0 !important; bottom: auto !important; width: 100% !important; height: 100% !important;
    pointer-events: auto !important; z-index: 2; opacity: 0 !important; -webkit-appearance: none; appearance: none; cursor: pointer;
}
/* Go to Date fallback panel (a browser without a date picker call): opens under the button,
   inside the screen. */
html.ed-touch .scheduler-wrapper .date-nav > div[x-data] > div[x-show] { min-width: 240px; }

/* ═══ Landscape (1280 px and wider: the iPad Pro 12.9" at 1366): everything on one line. A narrower
   iPad (upright) keeps the wrapping layout it had. ═══ */
@media (min-width: 1280px) {

/* ── 1 · Date strip: one line ── */
html.ed-touch .scheduler-wrapper .date-nav { flex-wrap: nowrap !important; overflow: visible !important; gap: 4px !important; padding: 22px 10px 10px !important; }
html.ed-touch .scheduler-wrapper .date-nav > * { flex-shrink: 0; }
html.ed-touch .scheduler-wrapper .date-nav-month { left: 10px; }
html.ed-touch .scheduler-wrapper .date-nav .date-nav-btn { padding: 0 10px !important; height: 44px; display: inline-flex; align-items: center; font-size: 13px !important; white-space: nowrap; }
html.ed-touch .scheduler-wrapper .date-nav > .date-card { flex: 1 1 0 !important; min-width: 0 !important; height: 44px; justify-content: center; padding: 2px 0 !important; }
html.ed-touch .scheduler-wrapper .date-card .day-name { font-size: 10.5px; line-height: 1.2; white-space: nowrap; }
html.ed-touch .scheduler-wrapper .date-card .day-num { font-size: 16px; line-height: 1.15; white-space: nowrap; }
/* The month beside the first day stays, smaller, on the same line. */
html.ed-touch .scheduler-wrapper .date-card .day-month { font-size: 8px; margin-left: 1px; }

/* ── Tab bar: Schedule · Driver Day · Planner · Dispatch Rules · Smart Assign · stats on one line ── */
html.ed-touch .scheduler-wrapper .ed-sched-tabbar { flex-wrap: nowrap !important; padding: 0 4px !important; }
html.ed-touch .scheduler-wrapper .ed-sched-tabbar > button { padding: 10px 10px !important; font-size: 13.5px !important; white-space: nowrap; flex-shrink: 0; }
html.ed-touch .scheduler-wrapper .ed-sched-smart button { padding: 7px 10px !important; font-size: 12.5px !important; white-space: nowrap; }
html.ed-touch .scheduler-wrapper .ed-sched-stats { gap: 8px !important; font-size: 12.5px !important; white-space: nowrap; flex-shrink: 0; }
/* Labels are ink, never light grey. */
html.ed-touch .scheduler-wrapper .ed-sched-stats span[style*="#9ca3af"] { color: #334155 !important; }

/* ── 2 + 3 · Filter boxes: dates · Cars · Class · Driver · search · Reset all on ONE line ── */
html.ed-touch .scheduler-wrapper .scheduler-filter-bar { flex-wrap: wrap !important; gap: 6px !important; --fb-h: 40px; }
html.ed-touch .scheduler-wrapper .scheduler-filter-bar > *:not(.filter-chips-stack) { flex-shrink: 0; }
/* Date range: two dates, each with its small x, then Go — tidy, no cut-off digits. iPad opens
   its own date wheel on a tap, so no calendar icon. */
html.ed-touch .scheduler-wrapper .scheduler-filter-bar .filter-range-wrap { padding: 0 0 0 2px !important; gap: 0 !important; }
html.ed-touch .scheduler-wrapper .scheduler-filter-bar .filter-range-input,
html.ed-touch .scheduler-wrapper .filter-range-wrap.show-native-icon .filter-range-input {
    width: 104px !important; min-width: 0; font-size: 13px !important; padding: 0 2px 0 6px !important; text-align: left;
}
html.ed-touch .scheduler-wrapper .filter-range-input::-webkit-calendar-picker-indicator,
html.ed-touch .scheduler-wrapper .filter-range-wrap.show-native-icon .filter-range-input::-webkit-calendar-picker-indicator { display: none !important; }
html.ed-touch .scheduler-wrapper .filter-range-input::-webkit-date-and-time-value { text-align: left; }
html.ed-touch .scheduler-wrapper .scheduler-filter-bar .filter-range-side-clear { width: 18px; font-size: 14px; }
html.ed-touch .scheduler-wrapper .scheduler-filter-bar .filter-range-sep { padding: 0 2px; color: #334155; }
html.ed-touch .scheduler-wrapper .scheduler-filter-bar .filter-range-go { padding: 0 11px !important; margin-left: 2px; }
/* Cars · Class · Driver: narrower boxes. */
html.ed-touch .scheduler-wrapper .scheduler-filter-bar .filter-vehicle-select { width: 104px !important; min-width: 0 !important; font-size: 13px !important; padding-left: 8px !important; padding-right: 24px !important; background-position: right 5px center !important; background-size: 14px 14px !important; }
html.ed-touch .scheduler-wrapper .scheduler-filter-bar .filter-vehicle-select + .filter-vehicle-select { width: 84px !important; }
html.ed-touch .scheduler-wrapper .scheduler-filter-bar .filter-driver-select { width: 100px !important; }
/* Search takes what is left. */
html.ed-touch .scheduler-wrapper .scheduler-filter-bar .filter-search-wrap { flex: 1 1 0 !important; min-width: 0 !important; width: auto !important; }
html.ed-touch .scheduler-wrapper .scheduler-filter-bar .filter-search-wrap .filter-field-select { width: 96px !important; flex: 0 0 auto; font-size: 13px !important; padding-left: 8px !important; padding-right: 24px !important; background-position: right 5px center !important; background-size: 14px 14px !important; }
html.ed-touch .scheduler-wrapper .scheduler-filter-bar .filter-search-input { min-width: 0 !important; width: 100% !important; font-size: 13px !important; text-overflow: ellipsis; }
html.ed-touch .scheduler-wrapper .scheduler-filter-bar .filter-reset-all { padding: 0 10px !important; font-size: 12.5px !important; white-space: nowrap; }

/* ── 4 · Unassigned · Assigned · job type chips on ONE line: smaller chips that share the width ── */
html.ed-touch .scheduler-wrapper .scheduler-filter-bar .filter-chips-stack { flex: 1 1 100% !important; min-width: 0; }
html.ed-touch .scheduler-wrapper .scheduler-filter-bar .filter-chips-row { flex-wrap: nowrap !important; gap: 3px !important; overflow: visible !important; padding: 2px 0 !important; }
html.ed-touch .scheduler-wrapper .scheduler-filter-bar .filter-chips-row > .filter-group { flex: 0 0 auto !important; display: flex; gap: 3px !important; padding: 0 !important; margin: 0 !important; }
html.ed-touch .scheduler-wrapper .scheduler-filter-bar #jt-buttons { flex: 1 1 auto !important; flex-wrap: nowrap !important; gap: 3px !important; min-width: 0 !important; }
html.ed-touch .scheduler-wrapper .scheduler-filter-bar #jt-buttons button,
html.ed-touch .scheduler-wrapper .scheduler-filter-bar .filter-group .filter-chip {
    flex: 1 1 auto !important; min-width: 0 !important; height: 30px !important; padding: 0 4px !important;
    font-size: 10.5px !important; letter-spacing: -0.01em; white-space: nowrap !important; overflow: hidden; text-overflow: ellipsis;
}
html.ed-touch .scheduler-wrapper .scheduler-filter-bar .filter-clear-btn { flex: 0 0 auto !important; white-space: nowrap; }

/* ── 5–8 · Booking rows: every column fits the width — no sideways scroll, text 1 px smaller ── */
    html.ed-touch .fi-main .scheduler-wrapper .jobs-timeline.row-view { overflow-x: visible !important; }
    html.ed-touch .fi-main .scheduler-wrapper .jobs-timeline.row-view .job-card.job-row,
    html.ed-touch .fi-main .scheduler-wrapper .jobs-timeline.row-view .jr-head { min-width: 0 !important; }
    html.ed-touch .fi-main .scheduler-wrapper .job-card.job-row,
    html.ed-touch .fi-main .scheduler-wrapper .jr-head {
        /* id · customer · start · pickup · drop-off · price · flight · notes · party · vehicle · driver · actions */
        grid-template-columns: 78px minmax(0, 12fr) 48px minmax(0, 10fr) minmax(0, 10fr) 72px 70px minmax(0, 15fr) minmax(0, 9fr) minmax(0, 11fr) minmax(0, 11fr) 72px !important;
    }
    html.ed-touch .fi-main .scheduler-wrapper .job-card.job-row > div { padding: 5px 4px; font-size: 11px; line-height: 1.35; }
    html.ed-touch .fi-main .scheduler-wrapper .jr-head > div { padding: 6px 4px; font-size: 9px; letter-spacing: .02em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: #334155; }
    html.ed-touch .fi-main .scheduler-wrapper .jr-head > div:first-child { padding-left: 26px; }

    /* 6 · Never break a word in the middle ("Maintenanc / e"): words wrap whole; a word longer
       than its column ends in "…" instead. */
    html.ed-touch .fi-main .scheduler-wrapper .job-card.job-row > div:not(.jr-life):not(.jr-act):not(.jr-id) {
        overflow-wrap: normal !important; word-break: normal !important; hyphens: none; overflow: hidden; text-overflow: ellipsis;
    }
    html.ed-touch .fi-main .scheduler-wrapper .job-card.job-row > div:not(.jr-life):not(.jr-act):not(.jr-id) div:not([x-show]) { overflow: hidden; text-overflow: ellipsis; }
    html.ed-touch .fi-main .scheduler-wrapper .job-card.job-row .jr-chip { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; vertical-align: top; }
    html.ed-touch .fi-main .scheduler-wrapper .job-card.job-row .jr-flight .jr-chip { white-space: nowrap !important; overflow-wrap: normal !important; }

    /* Job number + its menu: tighter beside the tick box. */
    html.ed-touch .fi-main .scheduler-wrapper .job-card.job-row > .jr-id { padding-left: 26px !important; padding-right: 2px; }
    html.ed-touch .fi-main .scheduler-wrapper .jr-idpill { font-size: 10px; padding: 2px 4px; white-space: nowrap; }
    html.ed-touch .fi-main .scheduler-wrapper .jr-select-overlay { left: 4px; }

    html.ed-touch .fi-main .scheduler-wrapper .job-card.job-row > .jr-cust { font-size: 11.5px; }
    html.ed-touch .fi-main .scheduler-wrapper .job-card.job-row > .jr-notes { font-size: 10.5px; }
    html.ed-touch .fi-main .scheduler-wrapper .job-card.job-row > .jr-veh { font-size: 11.5px; }
    /* The car's box: make + reg wrap at the space, never cut. */
    html.ed-touch .fi-main .scheduler-wrapper .job-card.job-row > .jr-veh a.jr-chip { white-space: normal; font-size: 10.5px; line-height: 1.3; padding: 2px 5px; }
    html.ed-touch .fi-main .scheduler-wrapper .job-card.job-row > .jr-drv { font-size: 12px; }
    /* Driver name beside its tier dot: a long surname ends in "…", never cut. */
    html.ed-touch .fi-main .scheduler-wrapper .job-card.job-row > .jr-drv > div > span:first-child { display: flex !important; max-width: 100%; min-width: 0; }
    html.ed-touch .fi-main .scheduler-wrapper .job-card.job-row > .jr-drv > div > span:first-child > a { min-width: 0; overflow: hidden; text-overflow: ellipsis; }
    /* Flight state ("Landed 11:58") fits the flight column. */
    html.ed-touch .fi-main .scheduler-wrapper .job-card.job-row > .jr-flight .flight-state { font-size: 8.5px; padding: 1px 3px; }
    html.ed-touch .fi-main .scheduler-wrapper .job-card.job-row > .jr-price .jr-chip { font-size: 8px !important; padding: 1px 4px; }

    /* 7 · Status pills stay on one line. */
    html.ed-touch .fi-main .scheduler-wrapper .job-card.job-row > .jr-life { padding-left: 26px !important; overflow: hidden; }
    html.ed-touch .fi-main .scheduler-wrapper .jr-lifecycle { flex-wrap: nowrap !important; gap: 3px; }
    html.ed-touch .fi-main .scheduler-wrapper .jr-lc { font-size: 9px; padding: 2px 6px; flex-shrink: 0; }

    /* Actions column: the buttons fit 72 px. */
    html.ed-touch .fi-main .scheduler-wrapper .job-card.job-row > .jr-act { padding: 4px !important; }
    html.ed-touch .fi-main .scheduler-wrapper .jr-act .jr-btn { font-size: 9.5px; padding: 5px 2px; overflow: hidden; text-overflow: ellipsis; }
    html.ed-touch .fi-main .scheduler-wrapper .jr-smart .jr-btn { padding: 2px 4px !important; }

/* Tile layout (the board with ?rows=0): the status pills stay on one line too. */
html.ed-touch .scheduler-wrapper .job-lifecycle-icons { flex-wrap: nowrap !important; gap: 4px !important; }
html.ed-touch .scheduler-wrapper .job-lifecycle-icons > * { padding: 3px 7px !important; font-size: 10.5px !important; gap: 3px !important; white-space: nowrap; flex-shrink: 0; }
html.ed-touch .scheduler-wrapper .job-lifecycle-icons > * svg { width: 12px !important; height: 12px !important; }

}

/* ── 9 · New Booking form: Vehicle Class reads "Auto" when blank (Jordan 11 Nov 2026: "should lose
   the (based on pax) text because it makes the box 2 long"). ── */
html.ed-touch .fi-fo-field-wrp:has(select[id="data.preferred_vehicle_type"]) .choices__list--single .choices__placeholder { font-size: 0 !important; }
html.ed-touch .fi-fo-field-wrp:has(select[id="data.preferred_vehicle_type"]) .choices__list--single .choices__placeholder::before { content: 'Auto'; font-size: 14px; }
