/* BRIDGE FORMULA CALCULATOR: the owner's phone notes of 2026-11-22. Linked after axle-notes.css, on the bridge page only. Tokens only: no colour
   literals; spacing on the 0/4/8/12/16/24 ramp.
     1. "Start from" and "Trailer drawing" are the same picture selectors as the axle checker's: the layout's own render of the rig / the
        trailer deck at the left (88x44, 64x32 under 361px), the label and the value to its right (popover.mjs paints it, thumbnail from rig-snapshot.mjs).
     2. The axle layout is the axle checker's layout, from the same code and the same stylesheets (app.mjs, leaders.mjs, layout-rule.css, axle-notes.css,
        and the layout block of the page's inline CSS). The crop on a phone came from `.axle-panel { overflow: hidden }` (equipment-builder/style.css)
        clipping the full-bleed rig box to the padded card; the checker lifts it on a phone, and now this page does too (shared selector). */

/* ── 1. The two selector cards ──────────────────────────────────────────────────────────────────────────────────── */
.axc .axc-pop--rig .axc-pop-bico.is-rig,
.axc .axc-pop--deck .axc-pop-bico.is-rig { align-items: center; justify-content: center; width: 88px; height: 44px; overflow: hidden; }
.axc .axc-pop--rig .axc-pop-bico.is-rig .axr,
.axc .axc-pop--deck .axc-pop-bico.is-rig .axr { display: block; width: 100%; height: 100%; }
/* Desktop: the two cards share the row; each keeps room for its thumbnail and value. */
.axc[data-mode="bridge"] .setup-bar .axc-pop { flex: 1 1 240px; min-width: 0; margin: 0; }
@media (max-width: 720px) {
  /* Phone: one card per row, full width, thumbnail left, label over value (the grid comes from the shared `.axc-pop-btn` phone rule). */
  .axc[data-mode="bridge"] .heading-actions .setup-bar .axc-pop { grid-column: 1 / -1; width: 100%; flex: none; }
}
@media (max-width: 360px) {
  .axc .axc-pop--rig .axc-pop-bico.is-rig,
  .axc .axc-pop--deck .axc-pop-bico.is-rig { width: 64px; height: 32px; }
}

/* ── 2. Same section gap as the checker: no extra gap under the selectors, 16px above the divider on a phone ──────── */
@media (max-width: 767px) {
  .axc[data-mode="bridge"] .axle-panel { margin-top: 16px; }
}

/* ── 3. Desktop toolbar (owner, 2026-11-23): both selectors on the LEFT, the share and print icons on the RIGHT; the pickers' lists are wide enough for their thumbnails ── */
@media (min-width: 721px) {
  .axc[data-mode="bridge"] .heading-actions .setup-bar { order: 1; margin-left: 0; flex: 1 1 auto; justify-content: flex-start; }
  .axc[data-mode="bridge"] .heading-actions .history-actions { order: 2; margin-left: auto; }
  .axc[data-mode="bridge"] .setup-bar .axc-pop { flex: 0 1 360px; }
  .axc[data-mode="bridge"] .axc-pop--rig .axc-pop-list, .axc[data-mode="bridge"] .axc-pop--deck .axc-pop-list { width: max(100%, 520px); max-height: 440px; }
}
