/* Amigos Checkout bar - THE one bottom Checkout bar on every customer page that has the header
   cart (/, /menu, /account/, /apply/ ...; not /checkout/, which has its own Pay button).
   Markup + behavior: mountCheckoutBar() in /js/amigos-order.js. Everything is namespaced .acb-*
   so a page's own styles never reach in (and these never reach out) - same look everywhere:
   gold pill (CHECKOUT / "3 items · $23" / round arrow), 18px bottom gap + safe area, bottom-half
   shadow, small outlined coral trash circle to its LEFT, the site's theme toggle docked to its
   RIGHT (mountCheckoutBar() moves the real #themeToggle in while the bar shows - a fixed 44px
   slot on each side keeps the pill dead-centered no matter how wide the toggle's own markup
   is), centered "Start over?" dialog, and a black bottom-up gradient behind it all (2026-10-23,
   Matt) that never blocks clicks (pointer-events: none throughout, inherited). Shown only while
   the cart has items. The bar is position: sticky right before #siteFooter, so it rides the viewport bottom and
   the footer pushes it up - it rests on top of the footer (2026-10-24). */
.acb {
  position: sticky; bottom: -1px; z-index: 90;   /* sticky: rides the bottom, footer pushes it up */
  display: flex; justify-content: center; align-items: center; pointer-events: none;
  box-sizing: border-box; margin: 0;
  padding: 0 16px calc(19px + env(safe-area-inset-bottom, 0px));
  font-size: 16px; line-height: normal; letter-spacing: normal; text-align: center;
}
.acb[hidden] { display: none; }
.acb *, .acb *::before, .acb *::after { box-sizing: border-box; margin: 0; }
/* Bottom-up black fade behind the floating bar - decorative only, never intercepts taps. */
.acb::before {
  content: ""; position: absolute; left: 0; right: 0; bottom: 0; top: auto; height: 140px;
  background: linear-gradient(to top, rgba(0,0,0,0.45), rgba(0,0,0,0));
  pointer-events: none; z-index: -1;   /* always on (Matt 2026-10-24), stuck or resting on the footer */
}
.acb-pill {
  pointer-events: auto;
  width: min(260px, calc(100vw - 144px)); max-width: calc(100vw - 32px);
  display: flex; align-items: center; justify-content: center; gap: 10px;
  background: var(--cta-gold, #dec99f); color: var(--cta-gold-fg, #1a1204); text-decoration: none;
  border: none; border-radius: 999px; padding: 14px 28px;
  font-family: var(--font-body); cursor: pointer;
  box-shadow: 0 8px 10px -4px rgba(0,0,0,0.3);   /* bottom-half shadow only */
  -webkit-tap-highlight-color: transparent;
}
.acb-pill:focus-visible { outline: 2px solid var(--paper); outline-offset: 2px; }
.acb-text { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; min-width: 0; text-align: center; }
.acb-row { display: flex; flex-direction: row; align-items: center; justify-content: center; gap: 10px; min-width: 0; }
.acb-label { font-family: var(--font-display); font-weight: 800; font-size: 1.05rem; line-height: 1.15; letter-spacing: 0.05em; text-transform: uppercase; color: var(--cta-gold-fg, #1a1204); }
.acb-total { font-family: var(--font-display); font-weight: 800; font-size: calc(1.05rem + 2px); line-height: 1.15; letter-spacing: normal; color: var(--cta-gold-fg, #1a1204); font-variant-numeric: tabular-nums; }
.acb-count { font-family: var(--font-display); font-weight: 700; font-size: 0.8rem; line-height: 1.15; letter-spacing: normal; color: var(--cta-gold-fg, #1a1204); opacity: 0.75; white-space: nowrap; }
.acb-count::after { content: '\00b7'; margin-left: 8px; }
.acb-arrow { flex: 0 0 auto; display: block; width: 18px; height: 18px; padding: 4px; border-radius: 50%; background: var(--ink); color: var(--cta-gold, #dec99f); }
/* Start-over trash (2026-10-23, Matt): LEFT of the pill, secondary/destructive - small outlined
   circle in the page colour with a coral icon (theme tokens, light + dark). 44px is also the
   touch-target floor (WCAG 2.5.5 / platform guidance), so "small" and "tappable" land on the
   same number. Flex order puts it before the pill with no markup change. */
.acb { gap: 10px; --acb-trash: 44px; }
.acb-trash {
  order: -1; position: relative; flex: 0 0 auto;
  width: var(--acb-trash, 44px); height: var(--acb-trash, 44px); padding: 0; border-radius: 50%; cursor: pointer; pointer-events: auto;
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--ink); color: var(--coral, #ef5b45);
  border: 1px solid var(--card-border); box-shadow: 0 6px 8px -4px rgba(0,0,0,0.22);
  -webkit-tap-highlight-color: transparent;
}
.acb-trash svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.acb-trash:focus-visible { outline: 2px solid var(--coral, #ef5b45); outline-offset: 2px; }
.acb-trash:active { transform: scale(0.94); }
@media (hover: hover) { .acb-trash:hover { border-color: var(--coral, #ef5b45); background: color-mix(in srgb, var(--coral, #ef5b45) 10%, var(--ink)); } }
/* Theme toggle, docked (mountCheckoutBar() moves the real #themeToggle element in here while the
   bar shows - see js/amigos-order.js). RIGHT of the pill (order: 1, opposite the trash's -1), same
   44px circle as the trash so the pill centers on the trash/theme pair, not on the toggle's normal
   pill-shaped width. Overrides the page's own fixed bottom-left .theme-toggle positioning. */
.acb .theme-toggle {
  order: 1; position: static; flex: 0 0 auto; pointer-events: auto;
  width: var(--acb-trash, 44px); height: var(--acb-trash, 44px); min-width: 0; padding: 0; gap: 0;
  border-radius: 50%; left: auto; right: auto; bottom: auto; z-index: auto; box-shadow: 0 6px 8px -4px rgba(0,0,0,0.22);
  background: var(--ink); color: var(--paper); border: 1px solid var(--card-border);
  display: inline-flex; align-items: center; justify-content: center;
}
.acb .theme-toggle svg { width: 18px; height: 18px; }
.acb .theme-toggle:active { transform: scale(0.94); }
@media (hover: hover) { .acb .theme-toggle:hover { border-color: var(--gold); } }
/* "Start over?" confirm: centered card, same everywhere. */
.acb-modal { position: fixed; inset: 0; z-index: 260; background: rgba(0,0,0,0.5); display: flex; align-items: center; justify-content: center; padding: 16px; box-sizing: border-box; font-size: 16px; line-height: 1.4; letter-spacing: normal; }
.acb-modal[hidden] { display: none; }
.acb-modal *, .acb-modal *::before, .acb-modal *::after { box-sizing: border-box; margin: 0; }
.acb-card { width: 100%; max-width: 320px; text-align: center; background: var(--ink); color: var(--paper); border: 1px solid var(--card-border); border-radius: 16px; padding: 22px 20px; box-shadow: 0 16px 40px rgba(0,0,0,0.4); }
.acb-t { font-family: var(--font-display); font-weight: 800; font-size: 1.15rem; line-height: 1.2; color: var(--paper); text-transform: none; letter-spacing: normal; }
.acb-body { margin-top: 8px; font-family: var(--font-body); font-size: 0.86rem; color: var(--paper-dim); }
.acb-actions { display: flex; gap: 10px; margin-top: 18px; }
.acb-cancel, .acb-go { flex: 1; height: 42px; padding: 0; border-radius: 999px; font: 700 0.82rem var(--font-display); letter-spacing: 0.04em; cursor: pointer; }
.acb-cancel { border: 1px solid var(--card-border); background: none; color: var(--paper); }
.acb-go { border: none; background: #ef5b45; color: #fff; }

/* Default layout = design-hotspot layout 6 "Card" (Matt picked 2026-10-24): rounded rectangle,
   CHECKOUT over the item count on the left, total + arrow on the right. */
.acb-pill { width: min(340px, calc(100vw - 128px)); border-radius: 14px; padding: 11px 14px 11px 18px; }
.acb-text { display: grid; grid-template-columns: 1fr auto auto; column-gap: 10px; row-gap: 1px; width: 100%; text-align: left; align-items: center; }
.acb-row { display: contents; }
.acb-label { grid-column: 1; grid-row: 1; justify-self: start; }
.acb-count { grid-column: 1; grid-row: 2; justify-self: start; }
.acb-count::after { content: none; }
.acb-total { grid-column: 2; grid-row: 1 / 3; font-size: 1.3rem; }
.acb-arrow { grid-column: 3; grid-row: 1 / 3; width: 26px; height: 26px; padding: 6px; }

/* + design-hotspot layout 8 "App bar" (Matt picked 2026-10-24): solid bar across the bottom
   instead of the floating gradient, the card pill fills it up to a 380px max, flat (no shadows). */
.acb { padding: 10px 12px calc(10px + env(safe-area-inset-bottom, 0px)); background: var(--ink); border-top: 1px solid var(--card-border); }
.acb::before { display: none; }
.acb-pill { flex: 1 1 auto; width: auto; max-width: 380px; border-radius: 12px; box-shadow: none; }
.acb-trash, .acb .theme-toggle { box-shadow: none; }

/* Default = design-hotspot batch-2 layout 10 "3D press" (Matt picked 2026-10-25, minus the outer
   gold ring from #12): round gold capsule on a darker gold base edge, sinks when tapped. Floats
   with no bar background behind it (Matt: "remove white bg behind toolbar"). */
.acb { margin: 0 10px 10px; padding: 10px 10px calc(14px + env(safe-area-inset-bottom, 0px)); background: none; border: 0; border-radius: 999px; box-shadow: none; }
.acb-pill { border-radius: 999px; outline: none; box-shadow: 0 4px 0 var(--acb-base, color-mix(in srgb, var(--cta-gold, #dec99f) 62%, #000)); transition: transform 0.08s, box-shadow 0.08s; }
.acb-pill:active { transform: translateY(3px); box-shadow: 0 1px 0 var(--acb-base, color-mix(in srgb, var(--cta-gold, #dec99f) 62%, #000)); }
/* + design-hotspot #18 "Nested total" (Matt picked 2026-10-25): total + arrow joined in one dark
   inner capsule at the right end. The arrow overlaps the total by 1px so no seam line shows between them. */
.acb-pill { padding: 7px 7px 7px 24px; }
.acb-text { column-gap: 0; }
.acb-label, .acb-count { margin-right: 10px; }
.acb-total { align-self: stretch; display: flex; align-items: center; background: var(--ink); color: var(--cta-gold, #dec99f); padding: 0 5px 0 14px; border-radius: 999px 0 0 999px; font-size: 1.15rem; }
.acb-arrow { align-self: stretch; width: 32px; height: auto; min-height: 36px; padding: 0 12px 0 4px; margin-left: -1px; border-radius: 0 999px 999px 0; }
/* + design-hotspot #22 "Panel left" + #25's item badge (Matt picked 2026-10-25): trash + theme joined
   in one capsule left of the button; the item count is a red bubble on the button's top-right, so
   CHECKOUT sits alone, vertically centered, on the left of the button. */
.acb { gap: 0; padding-top: 14px; }
.acb-trash { order: -2; border-radius: 999px 0 0 999px; border-right-width: 0; width: 46px; }
.acb .theme-toggle { order: -1; border-radius: 0 999px 999px 0; width: 46px; }
.acb-pill { position: relative; margin-left: 10px; }
.acb-label { grid-row: 1 / 3; align-self: center; }
.acb-count { position: absolute; top: -8px; right: 18px; margin: 0; background: var(--a-red, #ff2829); color: #fff; opacity: 1; padding: 2px 8px; border-radius: 999px; font-size: 0.68rem; box-shadow: 0 0 0 2px var(--ink); }

/* Default layout = design-hotspot #2 "Labeled chips below" (Matt picked 2026-10-31): full-width
   Checkout button, "Start over" + "Theme" text chips centered on a row under it. */
.acb { display: grid; grid-template-columns: auto auto; justify-content: center; column-gap: 10px; row-gap: 10px; }
.acb[hidden] { display: none; }
.acb-pill { grid-row: 1; grid-column: 1 / -1; justify-self: center; width: min(380px, calc(100vw - 40px)); margin-left: 0; }
.acb-trash { grid-row: 2; grid-column: 1; justify-self: end; }
.acb .theme-toggle { grid-row: 2; grid-column: 2; justify-self: start; }
.acb-trash, .acb .theme-toggle { width: auto; height: 32px; padding: 0 12px; gap: 6px; border-radius: 999px; border-right-width: 1px; }
.acb-trash svg, .acb .theme-toggle svg { width: 14px; height: 14px; }
.acb-trash::after, .acb .theme-toggle::after { font: 700 0.62rem var(--font-display); letter-spacing: 0.08em; text-transform: uppercase; }
.acb-trash::after { content: 'Start over'; }
.acb .theme-toggle::after { content: 'Theme'; color: var(--paper); }

/* Count + total = style #9 "Open total" (Matt picked 2026-10-31): "3 items" in small text under
   CHECKOUT, price loose on the gold, arrow in its own dark circle. */
.acb-label { grid-row: 1; align-self: end; }
.acb-count { position: static; grid-column: 1; grid-row: 2; justify-self: start; align-self: start; background: none; color: var(--ink); box-shadow: none; padding: 0; border-radius: 0; font-size: 0.74rem; opacity: 0.75; }
.acb-total { background: none; color: var(--ink); padding: 0 10px 0 0; font-size: 1.3rem; }
.acb-arrow { align-self: center; width: 36px; height: 36px; min-height: 0; padding: 10px; margin: 0; border-radius: 50%; }

/* Lower panel background (Matt 2026-10-31): solid lifted panel behind the button + chips, square
   corners, hairline top edge. Replaces the black bottom-up fade. */
.acb { margin: 0; padding-top: 20px; background: linear-gradient(var(--surface), var(--surface)), var(--ink); border-top: 0; border-radius: 0; box-shadow: none; }
.acb::before { content: none; }

/* Theme toggle removed (Matt 2026-11-01): floating copy hidden; the one docked in the checkout bar stays. */
body > #themeToggle { display: none !important; }

/* Dark theme: checkout bar container gets a 12% black layer over the page colour (kept opaque so
   content doesn't show through the sticky bar). Button stays gold. (Matt 2026-11-01) */
@media (prefers-color-scheme: dark) { :root:not([data-theme]) .acb { background: linear-gradient(rgba(0, 0, 0, 0.12), rgba(0, 0, 0, 0.12)), var(--ink); } }
:root[data-theme="dark"] .acb { background: linear-gradient(rgba(0, 0, 0, 0.12), rgba(0, 0, 0, 0.12)), var(--ink); }

/* Checkout label a little bigger (Matt 2026-11-01). */
.acb .acb-label { font-size: 1.18rem; }

/* Readable Checkout button in both themes (Matt 2026-11-01): every bit of text on the gold is the dark
   CTA ink (count + total used var(--ink), which is cream in light theme), arrow is a dark circle. */
.acb .acb-label, .acb .acb-count, .acb .acb-total { color: var(--cta-gold-fg, #1a1204); }
.acb .acb-count { opacity: 0.85; }
.acb .acb-arrow { background: var(--cta-gold-fg, #1a1204); color: var(--cta-gold, #dec99f); }
/* Light theme container: soft light gray with a hairline top border instead of the dark-theme 12% black. */
@media not all and (prefers-color-scheme: dark) { :root:not([data-theme]) .acb { background: color-mix(in srgb, var(--ink) 82%, #777); border-top: 1px solid var(--card-border); } }
:root[data-theme="light"] .acb { background: color-mix(in srgb, var(--ink) 82%, #777); border-top: 1px solid var(--card-border); }

/* No 3D effect on the Checkout button (Matt 2026-11-01): drop the darker base-edge shadow and the
   press-down sink that went with it. Everything else about the button stays. */
.acb .acb-pill, .acb .acb-pill:active { box-shadow: none; transform: none; }

/* Checkout button hugs its content (Matt 2026-11-01): CHECKOUT, 10px, price, arrow - the button is as
   wide as that and no wider (was a fixed 380px with the price pushed to the far end). */
.acb .acb-pill { width: fit-content; max-width: calc(100vw - 40px); }
.acb .acb-text { grid-template-columns: auto auto auto; column-gap: 0; width: auto; }
.acb .acb-label, .acb .acb-count { margin-right: 10px; }

/* Anchored flush to the viewport bottom (Matt 2026-11-01; replaces the -57px tuck). */
.acb { bottom: 0; }

/* Top edge matches the category bar's border (1px --card-border), both themes (Matt 2026-11-01). */
.acb, :root[data-theme="light"] .acb { border-top: 1px solid var(--card-border); }

/* Shorter panel (Matt 2026-11-01): no top padding, and the Checkout button rides 4px up so it just
   crosses the panel's top border line. */
.acb { padding-top: 0; }
.acb .acb-pill { margin-top: -29px; position: relative; z-index: 1; }   /* half the ~50px button (7px pad + 36px arrow + 7px): the top border runs through its middle (Matt 2026-11-01) */

/* No extra space left of CHECKOUT (Matt 2026-11-01): left padding drops from 24px to the same 7px as the
   right side (where the arrow circle sits). */
.acb .acb-pill { padding-left: 7px; }
/* All text on the Checkout button in capitals, item count included (Matt 2026-11-01). */
.acb .acb-pill, .acb .acb-pill .acb-count { text-transform: uppercase; }
/* Wider gap between CHECKOUT and the price: 10px -> 20px (Matt 2026-11-01). */
.acb .acb-label, .acb .acb-count { margin-right: 20px; }
/* Left padding on the Checkout button: 7px -> 14px -> 20px (Matt 2026-11-01). */
.acb .acb-pill { padding-left: 20px; }
/* Start over / Theme chips a bit tighter: side padding 12 -> 9px, icon gap 6 -> 4px, space between them 10 -> 6px. */
.acb { column-gap: 6px; }
.acb .acb-trash, .acb .theme-toggle { padding: 0 9px; gap: 4px; }
/* Theme chip moved to the footer (Matt 2026-11-01): Start over sits alone, centered, on the chips row. */
.acb .acb-trash { grid-column: 1 / -1; justify-self: center; }

/* More padding all round on the Checkout button (Matt 2026-11-01): 7px -> 11px top/right/bottom, 20px -> 26px
   left. Button is now ~58px tall, so the half-height lift above (margin-top) went -25px -> -29px to keep the
   panel's top border running through its middle. */
.acb .acb-pill { padding: 11px 11px 11px 26px; }
/* Soft shadow above the Checkout panel to separate it from the content scrolling under it (Matt 2026-11-01). */
.acb { box-shadow: 0 -4px 10px -4px rgba(0, 0, 0, 0.22); }
/* Checkout button shadow on its top half only - the part above the panel line. Offset up with a negative
   spread so nothing shows along the bottom half (Matt 2026-11-01). */
.acb .acb-pill, .acb .acb-pill:active { box-shadow: 0 2px 12px -2px rgba(0, 0, 0, 0.28); }   /* lower: barely over the top, more out the sides (Matt 2026-11-01) */
/* Price on the Checkout button: no border, outline, ring or fill of any kind (Matt 2026-11-01). */
.acb .acb-pill .acb-total { border: 0; outline: 0; box-shadow: none; background: none; border-radius: 0; }

/* Start over "Are you sure?" backdrop: darker (Matt 2026-11-02); the pop-up card itself is unchanged. */
.acb-modal { background: rgba(0, 0, 0, 0.75); }

/* Bag on the Checkout pill, left of the text; an added item drops into it and the header bag
   (acbItemAdded() in js/amigos-order.js, Matt 2026-11-10). */
.acb-bag { flex: 0 0 auto; display: inline-flex; width: 22px; height: 22px; color: var(--cta-gold-fg, #1a1204); }
.acb-bag svg { display: block; width: 22px; height: 22px; }
.acb-drop { position: fixed; z-index: 400; width: 10px; height: 10px; border-radius: 3px; background: var(--coral, #ef5b45); box-shadow: 0 0 0 1.5px var(--cta-gold, #dec99f); pointer-events: none; }
