/* Phone layout for the prices page and the cost estimator (10 Nov 2026). Phones only (max-width 767px): the desktop
   pages are unchanged. Added to /prices/ by mobile_cro.py, after m.css. Behaviour is in prices.js.
   body[data-mp="prices"].
   Goal: one clear path. Pick a car or type a price, tap a few clear choices, see the total. Everything else steps back. */

.mp-jump, .mp-fold-btn { display: none; }

@media (max-width: 767px) {
  /* ---------- top of /prices/: a short heading and two jump buttons, one per tool ---------- */
  body[data-mp="prices"] .page-hero { padding: 28px 20px 22px !important; }
  body[data-mp="prices"] .page-hero h1 { font-size: clamp(28px, 8vw, 34px) !important; line-height: 1.08 !important; margin: 6px 0 8px !important; text-wrap: balance; }
  body[data-mp="prices"] .page-hero p { font-size: 15.5px !important; line-height: 1.4 !important; text-wrap: balance; }
  body[data-mp="prices"] .page-hero .ph-links { display: none !important; }
  body[data-mp] .mp-jump { display: grid !important; grid-template-columns: 1fr 1fr; gap: 8px; margin: 18px auto 0; max-width: 420px; }
  body[data-mp] .mp-jump a {
    display: flex; align-items: center; justify-content: center; min-height: 48px; padding: 0 10px; border-radius: 14px;
    background: #fff; color: #1d1d1f !important; font-size: 15px; font-weight: 600; letter-spacing: -.01em; text-decoration: none !important;
    box-shadow: inset 0 0 0 1px rgba(60,60,67,.16), 0 1px 2px rgba(0,0,0,.04); -webkit-tap-highlight-color: transparent;
  }
  body[data-mp] .mp-jump a:active { transform: scale(.97); }
  body[data-mp="prices"] #prices { padding-top: 34px !important; }

  /* ---------- the estimator is always open on phones (the #costs link used to land on a closed fold) ---------- */
  body[data-mp] #costs .m-fold { max-height: none !important; overflow: visible !important; }
  body[data-mp] #costs .m-fold:after, body[data-mp] #costs > .fold-btn { display: none !important; }
  body[data-mp] #costs { padding-top: 34px !important; padding-bottom: 30px !important; }

  /* order: heading, calculator, then the three explainers and the closing line */
  body[data-mp] #costs > .wrap:first-child { display: flex !important; flex-direction: column; }
  body[data-mp] #costs .cost-top { display: contents !important; }
  body[data-mp] #costs .cost-copy { order: 1; margin: 0 0 18px; }
  body[data-mp] #costs .est { order: 2; }
  body[data-mp] #costs .beat { order: 3; }
  body[data-mp] #costs .cost-switch { order: 4; margin-top: 22px !important; }
  body[data-mp] #costs .cost-copy h2 { font-size: clamp(28px, 8vw, 34px) !important; line-height: 1.06 !important; margin: 6px 0 8px !important; }
  body[data-mp] #costs .cost-copy p { font-size: 15.5px !important; line-height: 1.4 !important; margin: 0 !important; }
  body[data-mp] #costs .cost-switch summary { min-height: 52px; display: flex; align-items: center; padding-top: 0 !important; padding-bottom: 0 !important; font-size: 15px !important; }
  body[data-mp] #costs .cost-switch p { font-size: 14px !important; line-height: 1.5 !important; }
  /* "We usually beat it": one line, no second button */
  body[data-mp] #costs .beat { margin-top: 14px !important; padding: 18px 20px !important; }
  body[data-mp] #costs .beat h3 { font-size: 18px !important; line-height: 1.25 !important; letter-spacing: -.01em; }
  body[data-mp] #costs .beat p, body[data-mp] #costs .beat .btn { display: none !important; }
  body[data-mp] #costs .guide-more { margin-top: 6px; }

  /* ---------- inputs: tighter, with choices that look like buttons ---------- */
  body[data-mp] #costs .est-in { padding: 4px 16px 6px !important; }
  body[data-mp] #costs .est-group { padding: 18px 0 8px !important; }
  body[data-mp] #costs .est-group > h3 { font-size: 13px !important; margin-bottom: 2px !important; color: #55555a !important; }
  body[data-mp] #costs .est-group > h3 > i { display: none !important; }
  body[data-mp] #costs .cs-pill.empty { display: none !important; }   /* a grey "Add" tag looked like a button */
  body[data-mp] #costs .est-row { padding: 7px 0 !important; gap: 6px !important; }
  body[data-mp] #costs .est-row > label { font-size: 15px !important; font-weight: 600; }
  /* helper lines repeat the label: keep only the ones that explain a figure */
  body[data-mp] #costs .est-in > .est-group > .est-row > label > small { display: none !important; }
  body[data-mp] #costs .est-in > .est-group > .est-row:has(#e-fee) > label > small { display: block !important; font-weight: 400; }
  body[data-mp] #costs .est-sub .est-row > label > small { font-weight: 400; font-size: 12.5px !important; color: #55555a !important; }
  body[data-mp] #costs .est-in .est-row select, body[data-mp] #costs .est-in .est-row input:not([type=checkbox]),
  body[data-mp] #costs .ai-grid select { min-height: 50px !important; font-size: 16px !important; border-radius: 12px !important; }
  body[data-mp] #costs .est-in .est-money input { padding-left: 30px !important; }
  body[data-mp] #costs .est-money > span { font-size: 16px !important; }
  body[data-mp] #costs .est-readonly { min-height: 50px; font-size: 16px; border-radius: 12px; }

  /* choices: white buttons with an outline; the chosen one is blue with a tick */
  body[data-mp] #costs .est-seg { background: none !important; padding: 0 !important; gap: 8px !important; margin: 4px 0 2px !important; border-radius: 0 !important; }
  body[data-mp] #costs .est-seg button {
    min-height: 50px !important; padding: 8px 10px !important; border-radius: 12px !important; font-size: 14.5px !important; line-height: 1.2 !important;
    background: #fff !important; color: #1d1d1f !important; border: 0 !important; box-shadow: inset 0 0 0 1px #c7c7cc !important;
    -webkit-tap-highlight-color: transparent; transition: background .15s, box-shadow .15s, transform .12s;
  }
  body[data-mp] #costs .est-seg button:active { transform: scale(.97); }
  body[data-mp] #costs .est-seg button[aria-pressed=true] {
    background: #eef4ff !important; color: #0b3f8f !important; font-weight: 600 !important; box-shadow: inset 0 0 0 2px #1456d9 !important;
  }
  body[data-mp] #costs .est-seg button[aria-pressed=true]::before { content: "✓ "; font-weight: 700; }
  body[data-mp] #costs .est-seg.ai-basis button { font-size: 13.5px !important; padding: 6px 4px !important; }
  body[data-mp] #costs .est-seg.ai-basis button::before { content: none; }   /* three across: no room for the tick */
  body[data-mp] #costs .est-seg button:focus-visible { outline: 3px solid #0b3f8f; outline-offset: 2px; }
  /* duty: two full-width rows, the common case (Japan-built) first */
  body[data-mp] #costs .est-seg:has([data-tax]) { grid-auto-flow: row !important; }
  body[data-mp] #costs .est-seg [data-tax="vatonly"] { order: -1; }
  body[data-mp] #costs .est-seg [data-tax] { text-align: left; padding-left: 14px !important; }
  /* shipping cards */
  body[data-mp] #costs .ss-opt { min-height: 64px; padding: 10px 12px !important; }
  body[data-mp] #costs .ss-opt[aria-checked="true"] { background: #eef4ff !important; box-shadow: inset 0 0 0 1px #1456d9 !important; }
  body[data-mp] #costs .ss-sub { display: none !important; }
  body[data-mp] #costs .ss-opts { margin-top: 8px; }

  /* small print inside the white card was pale green on white: make it readable */
  body[data-mp] #costs .est .fine, body[data-mp] #costs #ai-result, body[data-mp] #costs #cost-status { color: #55555a !important; }
  body[data-mp] #costs .est .fine { font-size: 12.5px !important; line-height: 1.45 !important; }
  body[data-mp] #costs .est .fine a { color: #1456d9 !important; }
  body[data-mp] #costs #duty-note { margin: 2px 0 6px !important; }

  /* "start with your car": the easy way in */
  body[data-mp] #costs .ai-pick { padding: 14px 14px 8px !important; margin: 12px -4px 2px !important; }
  body[data-mp] #costs .ai-pick > h3 { color: #1d1d1f !important; font-size: 16px !important; letter-spacing: -.01em !important; }
  body[data-mp] #costs .ai-pick .ai-opt { display: none !important; }
  body[data-mp] #costs .ai-grid { gap: 8px 10px !important; }
  body[data-mp] #costs .ai-grid > .pc-f:nth-child(-n+2) { grid-column: 1 / -1; }   /* make and model get the full width: long names fit */
  body[data-mp] #costs .ai-grid label { font-size: 13px !important; }
  body[data-mp] #costs .ai-pick:not(.mp-has-car) .ai-basis { display: none !important; }
  body[data-mp] #costs #ai-result { font-size: 13.5px !important; line-height: 1.4 !important; margin: 8px 0 4px !important; }

  /* ---------- result: one number, one button ---------- */
  body[data-mp] #costs .est-out { padding: 20px 18px 20px !important; }
  body[data-mp] #costs .est-out .badge { display: none !important; }
  body[data-mp] #costs .est-total { font-size: 44px !important; margin-top: 6px !important; }
  body[data-mp] #costs .est-bar { margin: 16px 0 12px !important; height: 10px !important; }
  body[data-mp] #costs .est-tax { margin-top: 12px !important; }
  body[data-mp] #costs #cost-status { font-size: 14px !important; line-height: 1.4 !important; margin-top: 12px !important; }
  body[data-mp] #costs .est-actions { margin-top: 4px !important; }
  body[data-mp] #costs .est-actions button { min-height: 44px; font-size: 14.5px !important; color: #1456d9 !important; }
  body[data-mp] #costs #cost-to-enquiry { width: 100%; min-height: 54px; margin-top: 6px; font-size: 17px; }
  body[data-mp] #costs .dep-cta { display: none !important; }   /* the bottom bar and the button above already lead to the quote */
  body[data-mp] #costs .est-out > .fine { margin-top: 14px !important; }
  /* before a price is in: no empty total, bar or motor tax, just what to do next */
  body[data-mp] #costs .est-out.mp-empty .est-total, body[data-mp] #costs .est-out.mp-empty .est-total-sub,
  body[data-mp] #costs .est-out.mp-empty .est-bar, body[data-mp] #costs .est-out.mp-empty .est-tax,
  body[data-mp] #costs .est-out.mp-empty #cost-to-enquiry, body[data-mp] #costs .est-out.mp-empty #reset-costs { display: none !important; }
  body[data-mp] #costs .est-out.mp-empty #cost-status { font-size: 16px !important; color: #1d1d1f !important; margin-top: 8px !important; }
  body[data-mp] #costs .est-out.mp-empty .est-actions { justify-content: flex-start; }

  /* nothing floats over the fields: the chat button waits while a tool is on screen */
  body[data-mp].mp-tool .jc-fab { opacity: 0 !important; pointer-events: none !important; }

  /* ---------- /prices/: the two extra tools open on a tap ---------- */
  body[data-mp] section.mp-fold { padding-top: 0 !important; padding-bottom: 0 !important; }
  body[data-mp] section.mp-fold > .wrap > .section-head { display: flex !important; flex-direction: column; margin: 0 !important; padding: 0 !important; text-align: left !important; }
  body[data-mp] section.mp-fold > .wrap > .section-head > .mp-fold-btn { order: -1; }
  body[data-mp] section.mp-fold > .wrap > .section-head > * { display: none !important; }
  body[data-mp] section.mp-fold > .wrap > .section-head > .mp-fold-btn {
    display: flex !important; align-items: center; justify-content: space-between; gap: 14px; width: 100%; min-height: 68px; margin: 0 0 10px;
    padding: 12px 18px; border: 0; border-radius: 20px; text-align: left; color: #1d1d1f; font: inherit; cursor: pointer;
    background: rgba(255,255,255,.82); box-shadow: inset 0 0 0 1px rgba(60,60,67,.12), 0 6px 18px -12px rgba(16,32,70,.3);
    -webkit-tap-highlight-color: transparent;
  }
  body[data-mp] .mp-fold-btn b { display: block; font-size: 17px; font-weight: 600; letter-spacing: -.01em; }
  body[data-mp] .mp-fold-btn small { display: block; margin-top: 2px; font-size: 13.5px; line-height: 1.3; color: #55555a; font-weight: 400; }
  body[data-mp] .mp-fold-btn i { flex: 0 0 auto; font-style: normal; font-size: 22px; line-height: 1; color: #1456d9; transition: transform .25s; }
  body[data-mp] section.mp-fold.mp-open .mp-fold-btn i { transform: rotate(45deg); }
  body[data-mp] .mp-fold-btn:focus-visible { outline: 3px solid #0b3f8f; outline-offset: 2px; }
  body[data-mp] section.mp-fold:not(.mp-open) > .wrap > :not(.section-head) { display: none !important; }
  body[data-mp] section.mp-fold.mp-open { padding-bottom: 34px !important; }
  body[data-mp] section.mp-fold.mp-open > .wrap > .section-head > p { display: block !important; margin: 4px 2px 16px !important; font-size: 15px !important; line-height: 1.45 !important; text-align: left !important; }
  body[data-mp] #stages.mp-fold { margin-top: 22px; }
  body[data-mp] #worth.mp-fold:not(.mp-open) { margin-bottom: 26px; }

  /* ---------- the car form at the foot of the page: heading first, then the three ticks (they showed above it) ---------- */
  body[data-mp] #enquire .enquiry-intro > .ie-trust { order: 3; }
  body[data-mp] #enquire .enquiry-intro > h2 { font-size: clamp(28px, 8vw, 34px) !important; line-height: 1.08 !important; }

  @media (prefers-reduced-motion: reduce) {
    body[data-mp] #costs .est-seg button, body[data-mp] .mp-fold-btn i, body[data-mp] .mp-jump a { transition: none; }
  }
}
