/* ==========================================================================
   Oktai Logistics — mobile stylesheet
   Additive only. Targets the existing desktop markup via attribute
   selectors matching current inline styles — no changes to index.html,
   carrier.html, recruiters.html, terms.html, or privacy.html are required
   beyond linking this file. Load in <head>, BEFORE oktai-mobile.js.
   Shared across all 5 pages.
   ========================================================================== */

/* Terms & Privacy: legal text is not selectable (applies at all screen
   sizes, not just mobile — a copy/paste deterrent, not real IP protection;
   view-source and browser dev tools still see the text). */
.legal-card {
  -webkit-user-select: none;
  -moz-user-select: none;
  user-select: none;
}

@media (max-width: 700px) {

  /* no horizontal scroll, without turning body into its own scroll container
     (overflow-x on html/body would make body the scroller and break window
     scroll events + position:sticky on these exported pages) */
  body { max-width: 100% !important; }
  img, svg, iframe, video, table { max-width: 100% !important; }
  * { min-width: 0; }

  /* ---------------------------------------------------------------- 1. BAR */

  /* bar inner row (index / carrier / recruiters / terms / privacy) */
  [style*="padding: 16px 32px"] {
    padding: 10px 16px !important;
    gap: 10px !important;
  }
  /* desktop nav + phone link move into the overlay menu */
  nav[style*="gap: 28px"] { display: none !important; }
  [style*="margin-left: auto"] > a[href^="tel:"] { display: none !important; }
  [style*="margin-left: auto"][style*="gap: 20px"] { gap: 8px !important; }

  /* logo lockup */
  .m-bar img[alt="Oktai Logistics"] { width: 36px !important; height: 36px !important; }
  .m-bar > a:first-child { min-height: 44px !important; }

  /* bar CTA stays visible and touch-sized */
  .m-bar button, .m-bar a[href*="#apply"] {
    padding: 12px 15px !important;
    font-size: 12px !important;
    min-height: 44px !important;
    letter-spacing: 0.03em !important;
  }

  /* hamburger */
  .m-burger {
    -webkit-appearance: none; appearance: none;
    width: 44px; height: 44px;
    flex: 0 0 44px;
    display: flex; flex-direction: column;
    align-items: center; justify-content: center;
    gap: 5px;
    background: transparent;
    border: 1px solid rgba(255,255,255,0.22);
    border-radius: 999px;
    cursor: pointer;
    padding: 0;
  }
  .m-burger span {
    display: block; width: 18px; height: 2px;
    background: #fff; border-radius: 2px;
    transition: transform 160ms cubic-bezier(.2,.7,.3,1), opacity 120ms linear;
  }
  html.m-menu-open .m-burger.is-open span:nth-child(1),
  .m-burger.is-open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
  .m-burger.is-open span:nth-child(2) { opacity: 0; }
  .m-burger.is-open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

  /* full-screen navy overlay menu.
     Reveal is display-based so it never depends on a transition running. */
  .m-menu {
    position: fixed; inset: 0; z-index: 200;
    background: #0C1E33;
    display: none;
    flex-direction: column;
    padding: 0 20px 28px;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
  }
  .m-menu.is-open { display: flex; }
  html.m-menu-open, html.m-menu-open body { overflow: hidden !important; }
  .m-menu-head { display: flex; align-items: center; justify-content: space-between; height: 64px; }
  .m-menu-links { display: flex; flex-direction: column; gap: 2px; margin-top: 18px; }
  .m-menu-links a {
    display: flex; align-items: center;
    min-height: 56px;
    font-family: var(--font-display, 'Poppins', sans-serif);
    font-weight: 800; text-transform: uppercase;
    letter-spacing: 0.01em;
    font-size: 26px; line-height: 1.1;
    color: #fff !important;
    border-bottom: 1px solid rgba(255,255,255,0.08);
    text-decoration: none;
  }
  .m-menu-links a[aria-current="page"] { color: #4C8CF0 !important; }
  .m-menu-foot { margin-top: auto; padding-top: 26px; display: flex; flex-direction: column; gap: 12px; }
  .m-menu-foot a[href^="tel:"] {
    display: flex; align-items: center; justify-content: center;
    min-height: 52px;
    font-family: var(--font-display, 'Poppins', sans-serif);
    font-weight: 700; font-size: 17px;
    color: #A7C4DA !important;
    border: 1px solid rgba(255,255,255,0.22);
    border-radius: 999px;
    text-decoration: none;
  }
  .m-menu-foot .m-menu-cta {
    display: flex; align-items: center; justify-content: center;
    min-height: 56px;
    font-family: var(--font-display, 'Poppins', sans-serif);
    font-weight: 800; text-transform: uppercase; letter-spacing: 0.04em;
    font-size: 15px;
    background: #2C6ED1; color: #fff !important;
    border: 0; border-radius: 999px;
    cursor: pointer;
    text-decoration: none;
  }

  /* --------------------------------------------------------------- 2. HERO */

  /* padding */
  [style*="padding: 96px 32px 104px"] { padding: 64px 20px 52px !important; }
  [style*="padding: 140px 32px 152px"] { padding: 68px 20px 56px !important; }

  /* headline hierarchy: smaller, tighter, highlight capsule allowed to wrap */
  [style*="clamp(44px, 7vw, 88px)"] { font-size: 34px !important; line-height: 1.02 !important; margin-top: 14px !important; }
  [style*="clamp(40px, 5.6vw, 72px)"] { font-size: 31px !important; line-height: 1.06 !important; margin-top: 14px !important; }
  [style*="clamp(44px, 6.2vw, 86px)"] { font-size: 38px !important; line-height: 1.02 !important; margin-top: 14px !important; }
  .m-hero h1 > span[style*="inline-block"] { line-height: 1.34 !important; margin-top: 0.14em !important; }

  /* hero deck copy */
  .m-hero p[style*="font-size: 22px"],
  .m-hero p[style*="font-size: 21px"] {
    font-size: 16.5px !important;
    line-height: 1.5 !important;
    margin-top: 18px !important;
    max-width: 100% !important;
  }

  /* primary CTA: full width, above the fold */
  .m-hero [style*="padding: 19px 40px"] {
    width: 100% !important;
    padding: 17px 22px !important;
    font-size: 15px !important;
    min-height: 54px !important;
  }
  .m-hero [style*="margin: 34px 0px 0px"] { margin-top: 22px !important; gap: 10px !important; }
  .m-hero [style*="margin: 34px 0px 0px"] > div { width: 100% !important; }

  /* route pills */
  #routes-pills { margin-top: 22px !important; gap: 8px !important; }

  /* portrait re-crops + stronger scrim (subject stays in frame, type stays legible) */
  .okt-hero-bg { background-position: 30% 24% !important; }              /* index — image is mirrored */
  .m-hero-bg-carrier { background-position: 62% 20% !important; }
  .m-hero-bg-recruiters { background-position: 58% 18% !important; }
  .m-hero-scrim {
    background-image: linear-gradient(rgba(12,30,51,0.62), rgba(12,30,51,0.74) 42%, rgba(12,30,51,0.97)) !important;
  }

  /* oversized chevron flourish: pulled in so it cannot overflow the viewport */
  [style*="top: 40px"][style*="right: 60px"] {
    top: 10px !important; right: 8px !important;
    opacity: 0.05 !important;
  }
  [style*="top: 40px"][style*="right: 60px"] span { gap: 4px !important; }
  [style*="top: 40px"][style*="right: 60px"] svg { width: 56px !important; height: 56px !important; }

  /* ----------------------------------------------------- 3. SECTION RHYTHM */

  [style*="padding: 56px 32px 24px"] { padding: 40px 20px 20px !important; }
  [style*="padding: 84px 32px"]      { padding: 52px 20px !important; }
  [style*="padding: 96px 32px;"]     { padding: 52px 20px !important; }
  [style*="padding: 90px 32px"]      { padding: 52px 20px !important; }
  [style*="padding: 88px 32px"]      { padding: 48px 20px !important; }
  [style*="padding: 80px 32px"]      { padding: 48px 20px !important; }
  [style*="padding: 56px 32px 32px"] { padding: 40px 20px 28px !important; }
  [style*="padding: 56px 32px;"]     { padding: 40px 20px !important; }

  /* section headings */
  [style*="clamp(30px, 4vw, 48px)"]   { font-size: 26px !important; margin-bottom: 26px !important; }
  [style*="clamp(28px, 3.6vw, 44px)"] { font-size: 25px !important; }
  [style*="clamp(30px, 4.4vw, 52px)"] { font-size: 25px !important; }
  [style*="clamp(20px, 2.2vw, 28px)"] { font-size: 19px !important; }
  [style*="margin: 56px 0px 0px"]     { margin-top: 34px !important; }

  /* ------------------------------------------------------- 4. GRIDS → 1 COL */

  [style*="grid-template-columns: 1fr 1fr"]   { grid-template-columns: 1fr !important; gap: 16px !important; }
  [style*="grid-template-columns: 1.1fr 1fr"],
  [style*="grid-template-columns: 1fr 1.1fr"] { grid-template-columns: 1fr !important; gap: 26px !important; }
  [style*="minmax(180px, 1fr)"] { grid-template-columns: 1fr 1fr !important; gap: 22px 18px !important; }
  [style*="minmax(230px, 1fr)"],
  [style*="minmax(260px, 1fr)"],
  [style*="minmax(280px, 1fr)"] { grid-template-columns: 1fr !important; gap: 14px !important; }

  /* the split image/text bands read image-first on mobile */
  [style*="grid-template-columns: 1fr 1.1fr"] > div:first-child { order: 2; }
  [style*="grid-template-columns: 1fr 1.1fr"] > div:last-child  { order: 1; }

  /* stats band */
  [style*="minmax(180px, 1fr)"] [style*="clamp(34px, 5vw, 52px)"] { font-size: 34px !important; }
  [style*="minmax(180px, 1fr)"] [style*="letter-spacing: 0.16em"] {
    font-size: 11px !important; letter-spacing: 0.1em !important; margin-top: 7px !important;
  }
  /* every stat pairing centres its number and label as a unit, centred within
     its column rather than flush left */
  [style*="minmax(180px, 1fr)"] > div > div { text-align: center !important; }
  /* three-stat bands (driver, carrier): primary stat gets its own full-width
     centred row, the other two sit side by side beneath it. The four-stat
     recruiter band is untouched by the exactly-three test. */
  [style*="minmax(180px, 1fr)"] > *:first-child:nth-last-child(3) > div {
    grid-column: 1 / -1 !important;
  }

  /* role cards (New / Experienced / Owner-Operator) — stacked, shorter crops */
  [style*="height: 320px"] { height: 210px !important; }

  /* body copy inside cards */
  [style*="padding: var(--space-8)"]  { padding: 22px 20px !important; }
  [style*="padding: var(--space-10)"] { padding: 22px 18px !important; }
  [style*="font-size: 17.5px"] { font-size: 16px !important; line-height: 1.62 !important; }
  [style*="font-size: 15.5px"] { font-size: 15px !important; }
  blockquote[style*="padding: 30px 32px"] { padding: 24px 20px !important; }
  blockquote p { font-size: 17px !important; }
  [style*="font-size: 26px"][style*="font-weight: 800"] { font-size: 22px !important; }

  /* ------------------------------------------------------------- 5. FORMS */

  /* jobs search card + form */
  [style*="width: fit-content"] { width: 100% !important; }
  #jobs-search-form { flex-direction: column !important; align-items: stretch !important; gap: 14px !important; }
  #jobs-search-form > div, #jobs-search-form > div > div { width: 100% !important; }
  #jobs-results-container { width: 100% !important; }
  #jobs-list [style*="justify-content:space-between"] { flex-wrap: wrap !important; gap: 8px !important; }

  /* every field: full width, 16px text (no iOS zoom), 48px touch target */
  input:not([type="checkbox"]):not([type="radio"]),
  select, textarea {
    width: 100% !important;
    box-sizing: border-box !important;
    font-size: 16px !important;
    min-height: 48px !important;
    padding-top: 13px !important; padding-bottom: 13px !important;
  }
  textarea { min-height: 108px !important; }
  input[type="file"] { min-height: 64px !important; }
  input[type="checkbox"] { width: 24px !important; height: 24px !important; }
  label[for="smsConsent"], label[for="carrierConsent"], label[for="recruiterConsent"] { font-size: 13.5px !important; }
  label[for] { min-height: 0 !important; }

  /* buttons: full width, 54px tall */
  button[type="submit"], .m-hero [style*="padding: 19px 40px"], #jobs-search-form button {
    width: 100% !important;
    min-height: 54px !important;
    padding: 17px 22px !important;
    font-size: 15px !important;
  }
  .job-apply-btn { width: 100% !important; min-height: 48px !important; margin-top: 4px !important; }

  /* ---- section labels (mobile only, single-page form) ----
     Small heading inserted above each field group by oktai-mobile.js
     (labelSections). Purely visual — no hiding, no extra taps. */
  .m-section-label {
    grid-column: 1 / -1;
    font-family: var(--font-display, 'Poppins', sans-serif);
    font-weight: 700; font-size: 11px; letter-spacing: 0.1em;
    text-transform: uppercase; color: #6E9BC1;
    margin: 6px 0 -6px;
  }
  .m-section-label:first-of-type { margin-top: 0; }

  /* ---- progressive form steps (currently unused — kept so the multi-step
     flow can be switched back on later by calling buildSteps() instead of
     labelSections() in oktai-mobile.js; harmless if never triggered) ---- */
  .m-progress {
    grid-column: 1 / -1;
    display: flex; align-items: center; gap: 10px;
    margin-bottom: 4px;
  }
  .m-progress-track { display: flex; gap: 5px; flex: 1; }
  .m-progress-track i {
    display: block; height: 4px; flex: 1;
    background: #DFE7EF; border-radius: 999px;
    transition: background 200ms ease-out;
  }
  .m-progress-track i.on { background: #2C6ED1; }
  .m-progress-label {
    font-family: var(--font-display, 'Poppins', sans-serif);
    font-weight: 700; font-size: 11px; letter-spacing: 0.1em;
    text-transform: uppercase; color: #6E7C8C;
    white-space: nowrap;
  }
  .m-step { grid-column: 1 / -1; display: grid; gap: 16px; }
  .m-step[hidden] { display: none !important; }
  .m-step-next {
    -webkit-appearance: none; appearance: none;
    width: 100%; min-height: 54px;
    display: flex; align-items: center; justify-content: center; gap: 10px;
    font-family: var(--font-display, 'Poppins', sans-serif);
    font-weight: 800; text-transform: uppercase; letter-spacing: 0.04em;
    font-size: 15px;
    background: #2C6ED1; color: #fff;
    border: 0; border-radius: 999px;
    cursor: pointer;
    box-shadow: 0 8px 20px rgba(44,110,209,0.28);
  }
  .m-step-back {
    -webkit-appearance: none; appearance: none;
    background: transparent; border: 0;
    align-self: center;
    min-height: 44px; padding: 0 8px;
    font-family: var(--font-display, 'Poppins', sans-serif);
    font-weight: 700; font-size: 13px; letter-spacing: 0.08em;
    text-transform: uppercase; color: #6E7C8C;
    cursor: pointer;
  }

  /* ------------------------------------------------------------ 6. FOOTER */

  footer [style*="gap: 48px"] { gap: 30px !important; }
  footer [style*="gap: 64px"] { gap: 34px !important; }
  footer [style*="max-width: 320px"] { max-width: 100% !important; }
  footer a[href^="mailto:"], footer [style*="font-size: 13.5px"] { font-size: 15px !important; min-height: 44px; display: flex !important; align-items: center; }
  footer [style*="border-radius: 50%"][style*="width: 34px"] { width: 44px !important; height: 44px !important; }

  /* compliance / EOE copy stays at readable body size */
  footer p[style*="font-size: 12.5px"],
  footer span[style*="font-size: 12.5px"],
  footer [style*="font-size: 12.5px"] {
    font-size: 14px !important;
    line-height: 1.65 !important;
    color: #A7C4DA !important;
  }
  footer p[style*="margin: 36px 0px 0px"] { margin-top: 28px !important; }

  /* -------------------------------------------------------- 7. LEGAL PAGES */

  .legal-hero { padding: 34px 0 22px !important; }
  .legal-hero h1 { font-size: 30px !important; }
  .legal-body { padding: 28px 0 44px !important; }
  .container { padding: 0 18px !important; }
  .legal-card { padding: 24px 20px !important; border-radius: 10px !important; }
  .legal-card p, .legal-card li { font-size: 15.5px !important; line-height: 1.68 !important; }
  .legal-card .intro { font-size: 16.5px !important; }
  .legal-card h2 { font-size: 18px !important; margin: 28px 0 10px !important; }
  .legal-card h3 { font-size: 15.5px !important; }
  .legal-card ul { margin-left: 18px !important; }
  .legal-card a.inline { word-break: break-word !important; }
  .footer { padding: 26px 0 !important; }
  .footer p { font-size: 14px !important; line-height: 1.9 !important; }
  /* copyright on its own line, existing link row moved beneath it */
  .footer .m-footer-links { display: block; }

  /* ------------------------------------------------- 8. STICKY APPLY BAR */

  .m-sticky {
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 150;
    display: none; align-items: center; gap: 12px;
    padding: 10px 14px calc(10px + env(safe-area-inset-bottom, 0px));
    background: rgba(12,30,51,0.94);
    -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px);
    border-top: 1px solid rgba(255,255,255,0.1);
  }
  .m-sticky.is-on { display: flex; }
  body.m-sticky-pad { padding-bottom: 78px !important; }
  .m-sticky-tel {
    flex: 0 0 52px; height: 52px;
    display: flex; align-items: center; justify-content: center;
    border: 1px solid rgba(255,255,255,0.24); border-radius: 999px;
    color: #A7C4DA !important; text-decoration: none;
  }
  .m-sticky-cta {
    -webkit-appearance: none; appearance: none;
    flex: 1; min-height: 52px;
    display: flex; align-items: center; justify-content: center;
    font-family: var(--font-display, 'Poppins', sans-serif);
    font-weight: 800; text-transform: uppercase; letter-spacing: 0.04em;
    font-size: 14px;
    background: #2C6ED1; color: #fff !important;
    border: 0; border-radius: 999px;
    cursor: pointer; text-decoration: none;
    box-shadow: 0 6px 18px rgba(44,110,209,0.3);
  }
  .m-sticky-cta:active { transform: translateY(1px) scale(0.995); }

  /* --------------------------------------------------------------- 9. FAQ */

  .faq-header { padding: 18px 18px !important; min-height: 60px !important; }
  .faq-header > span:first-child { font-size: 15.5px !important; line-height: 1.35 !important; }
  .faq-answer { padding: 0 18px 18px !important; font-size: 15px !important; line-height: 1.68 !important; }

  /* hide the desktop-only recruiter-login band CTA sizing quirk */
  [style*="padding: 15px 30px"] { width: 100% !important; min-height: 50px !important; }
}

/* Reduced motion */
@media (max-width: 700px) and (prefers-reduced-motion: reduce) {
  .m-burger span, .m-progress-track i { transition: none !important; }
}
