/* AXLE CHECKER: the owner's phone notes of 2026-11-22. Linked after layout-rule.css and breakdown-cards.css, so these rules win without touching the
   baselined files. Tokens only: no colour literals; spacing on the 0/4/8/12/16/24 ramp.
     1. The rig selector's thumbnail is the axle layout's own render of the selected rig (rig-snapshot.mjs), scaled to fit.
     3. The gap between the State limits card and the divider above "Axle layout" is a normal section gap.
     4. The zoom magnifier sits in the centre of the Tractor card's header.
     5. Thin leader and dimension lines tie each measurement and weight to its axle (leaders.mjs). */

/* ── 1. Selector thumbnail ──────────────────────────────────────────────────────────────────────────────────────── */
.axc .axc-pop--master .axc-pop-bico.is-rig { align-items: center; justify-content: center; width: 88px; height: 44px; overflow: hidden; }
.axc .axc-pop--master .axc-pop-bico.is-rig .axr { display: block; width: 100%; height: 100%; }

/* ── 3. Section gap: 16px above the divider on a phone (24px on a desktop), 16px below it (the panel heading's own padding) ── */
.axc:not(.axs) .page-heading { padding-bottom: 0; }
@media (max-width: 767px) {
  .axc:not(.axs) .axle-panel { margin-top: 16px; }
}

/* ── 4. Zoom magnifier: horizontally centred in the Tractor card's header, on the title row ─────────────────────── */
@media (max-width: 767px) {
  .axc.axc #axle-units .axle-unit > header .axc-zoombtn { top: calc(4px * var(--axc-inv, 1)); left: 50%; transform: translateX(-50%) scale(var(--axc-inv, 1)); transform-origin: 50% 0; }
}

/* ── 5. Leader and dimension lines ───────────────────────────────────────────────────────────────────────────────── */
.axc { --axc-line: color-mix(in srgb, var(--muted) 85%, transparent); }
.axc #axle-units .axc-leaders { position: absolute; left: 0; top: 0; overflow: visible; pointer-events: none; }
.axc #axle-units .axc-leaders * { pointer-events: none; }
.axc #axle-units .axc-leaders path { fill: none; stroke: var(--axc-line); stroke-width: 1; vector-effect: non-scaling-stroke; }
.axc #axle-units .axc-leaders .axc-lead { stroke-dasharray: 1 3; }
/* The lines sit behind every label and input. */
.axc #axle-units .axc-weight, .axc #axle-units .axc-gap { z-index: 1; }
@media (max-width: 360px) {
  .axc .axc-pop--master .axc-pop-bico.is-rig { width: 64px; height: 32px; }
}

/* ── 9. The three "how it works" steps use the round tool icons from the menu (public/tool-icons), no tinted tile ── */
.axi .axi-step .axi-ico--img { width: 40px; height: 40px; border-radius: 0; background: none; }
html[data-theme="dark"] .axi .axi-step .axi-ico--img { background: none; }
.axi .axi-ico--img > img { display: block; width: 40px; height: 40px; max-width: none; object-fit: contain; }

/* ── 8. Gap between the tool card and the three step cards: 24px on a phone (was 48), 32px on a desktop; the step cards sit 12px apart ── */
body.qtt-axle .qtt-tool { margin-bottom: 32px; }
@media (max-width: 767px) {
  body.qtt-axle .qtt-tool { margin-bottom: 24px; }
  body.qtt-axle .axi .axi-steps { gap: 12px; }
}

/* ── 6. The State limits selector is a combobox: opened, a search field takes the label's place (popover.mjs, state-filter.mjs) ─────────────── */
.axc .axc-pop--state .axc-pop-q { position: absolute; z-index: 2; box-sizing: border-box; margin: 0; padding: 0; border: 0; border-radius: 0; background: transparent; font: inherit; font-size: 14px; font-weight: 600; line-height: 1.4; color: var(--ink); outline: none; box-shadow: none; }
.axc .axc-pop--state .axc-pop-q[hidden] { display: none; }
.axc .axc-pop--state .axc-pop-q::placeholder { font-weight: 500; color: var(--muted); }
.axc .axc-pop--state.is-combo-open .axc-pop-lab { visibility: hidden; }
.axc .axc-pop--state .axc-pop-row[data-active="true"] { background: var(--axp-hover); }
.axc .axc-pop--state .axc-pop-empty { padding: 12px 16px; font-size: 14px; line-height: 1.4; color: var(--muted); }
@media (min-width: 768px) {
  .axc .axc-pop--state.is-combo-open .axc-pop-val { visibility: hidden; }
}
@media (max-width: 767px) {
  .axc .axc-pop--state .axc-pop-q { font-size: 16px; }
}
.axc .axc-pop--state .axc-pop-q:focus, .axc .axc-pop--state .axc-pop-q:focus-visible { outline: none; box-shadow: none; border-radius: 0; }
