/*
 * RRM booking widget — stylesheet.
 *
 * Design: "עיצוב בוק אונליין דמוי Uber Eats" (Claude Design canvas at the repo
 * root), applied one-to-one on 2026-09-14. The ONLY edits from the canvas
 * export are the five image URLs (../img/ — the CSS lives in assets/css/ here),
 * this header, and the `[hidden]` rule right below the step rail. Restyle in
 * the canvas, re-export, re-apply; do not hand-edit the design here.
 *
 * Contract this file honours (see src/lib/booking/CLAUDE.md): everything scoped
 * under .rrm-bk, colour only from --rrm-brand / --rrm-accent (+ --rrm-gutter for
 * the sticky bar), font inherited from the host theme, no globals, no webfonts.
 */

/*
 * RRM booking widget — v2 restyle (bolder).
 * Scoped under .rrm-bk. Colour from --rrm-brand / --rrm-accent only.
 * Font inherited from the host theme. No resets, no globals, no webfonts.
 *
 * Photo hook: .rrm-bk__fill is the image frame. Inline background-image:url(…)
 * or an <img> inside it overrides the schematic truck illustrations.
 */

.rrm-bk {
  --rrm-brand: #111827;
  --rrm-accent: #1d6f35;
  --rrm-ink: #141416;
  --rrm-muted: #6b6f76;
  --rrm-line: #e4e4e0;
  --rrm-bg: #ffffff;
  --rrm-soft: #f4f4f1;
  --rrm-soft-2: #e9e9e4;
  --rrm-radius: 18px;
  --rrm-on-brand: #ffffff;
  --rrm-on-accent: #ffffff;
  --rrm-accent-tint: color-mix(in srgb, var(--rrm-accent) 12%, var(--rrm-bg));
  --rrm-brand-tint: color-mix(in srgb, var(--rrm-brand) 8%, var(--rrm-bg));

  box-sizing: border-box;
  color: var(--rrm-ink);
  container-type: inline-size;
  font-family: inherit;
  line-height: 1.4;
  margin: 0 auto;
  max-width: 640px;
  position: relative;
  width: 100%;
  -webkit-font-smoothing: antialiased;
  font-variant-numeric: tabular-nums;
}
.rrm-bk *,
.rrm-bk *::before,
.rrm-bk *::after { box-sizing: inherit; }

/* ── head: a brand-coloured banner instead of a plain heading ──────────── */
.rrm-bk__head {
  background: var(--rrm-brand);
  background-image: radial-gradient(120% 140% at 100% 0%, color-mix(in srgb, var(--rrm-accent) 55%, transparent), transparent 55%);
  border-radius: var(--rrm-radius) var(--rrm-radius) 6px 6px;
  clip-path: polygon(0 0, 100% 0, 100% calc(100% - 14px), 0 100%);
  color: var(--rrm-on-brand);
  margin: 0 0 14px;
  overflow: hidden;
  padding: 22px 20px 32px;
  position: relative;
}
/* oversized ghost numeral "1→5" is too clever; instead a big soft accent disc peeking from the corner */
.rrm-bk__head::before {
  background: var(--rrm-accent);
  border-radius: 50%;
  content: "";
  height: 180px;
  opacity: .35;
  position: absolute;
  right: -60px;
  top: -90px;
  width: 180px;
}
.rrm-bk__head::after {
  border: 2px solid color-mix(in srgb, var(--rrm-on-brand) 25%, transparent);
  border-radius: 50%;
  content: "";
  height: 220px;
  position: absolute;
  right: -80px;
  top: -110px;
  width: 220px;
}
.rrm-bk__title, .rrm-bk__sub { position: relative; }
.rrm-bk__title {
  color: inherit;
  font-size: clamp(1.7rem, 7cqw, 2.3rem);
  font-weight: 900;
  letter-spacing: -.03em;
  line-height: 1.02;
  margin: 0 0 8px;
  text-wrap: balance;
}
.rrm-bk__sub { color: inherit; font-size: .95rem; margin: 0; opacity: .82; }

/* ── step rail: numbered dots joined by a line ─────────────────────────── */
.rrm-bk__steps { display: grid; grid-template-columns: repeat(4, 1fr); margin: 0 0 22px; padding: 0 4px; }
/* Post-canvas fix: an explicit `display` beats the UA's `[hidden]{display:none}`,
   so the rail stayed visible on the confirmation screen even though the JS sets
   `hidden`. Not a design change — the design never shows a rail there. */
.rrm-bk__steps[hidden] { display: none; }
.rrm-bk__step {
  color: var(--rrm-muted);
  display: block;
  font-size: .74rem;
  font-weight: 700;
  letter-spacing: .02em;
  padding-top: 30px;
  position: relative;
  text-transform: uppercase;
}
.rrm-bk__step::before {
  align-items: center;
  background: var(--rrm-soft-2);
  border-radius: 50%;
  color: var(--rrm-muted);
  content: attr(data-step);
  display: flex;
  font-size: .78rem;
  font-weight: 800;
  height: 24px;
  justify-content: center;
  left: 0;
  position: absolute;
  top: 0;
  transition: background .18s ease, color .18s ease, transform .18s ease;
  width: 24px;
  z-index: 1;
}
.rrm-bk__step::after {
  background: var(--rrm-soft-2);
  content: "";
  height: 2px;
  left: 24px;
  position: absolute;
  right: 0;
  top: 11px;
}
.rrm-bk__step:last-child::after { display: none; }
.rrm-bk__step[data-on="1"] { color: var(--rrm-ink); }
.rrm-bk__step[data-on="1"]::before { background: var(--rrm-brand); color: var(--rrm-on-brand); transform: scale(1.15); box-shadow: 0 0 0 5px var(--rrm-brand-tint); }
.rrm-bk__step[data-done="1"] { color: var(--rrm-accent); }
.rrm-bk__step[data-done="1"]::before { background: var(--rrm-accent); color: var(--rrm-on-accent); content: "✓"; }
.rrm-bk__step[data-done="1"]::after { background: var(--rrm-accent); }

/* ── step 1 ────────────────────────────────────────────────────────────── */
.rrm-bk__ask { align-items: baseline; display: flex; font-size: 1.15rem; font-weight: 800; gap: 10px; letter-spacing: -.015em; margin: 0 0 12px; }
.rrm-bk__ask::after { background: var(--rrm-line); content: ""; flex: 1; height: 2px; transform: translateY(-4px); }

.rrm-bk__grid { display: grid; gap: 10px; grid-template-columns: 1fr; }

@keyframes rrm-rise { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
.rrm-bk__tier {
  animation: rrm-rise .45s cubic-bezier(.2,.7,.2,1) both;
  align-items: stretch;
  background: var(--rrm-bg);
  border: 0;
  border-radius: var(--rrm-radius);
  box-shadow: 0 0 0 1.5px var(--rrm-line);
  color: inherit;
  cursor: pointer;
  display: grid;
  font: inherit;
  gap: 0 12px;
  grid-template-columns: 124px minmax(0, 1fr);
  min-height: 96px;
  overflow: hidden;
  padding: 0;
  position: relative;
  text-align: left;
  transition: box-shadow .18s ease, transform .18s ease, background .18s ease, color .18s ease;
  width: 100%;
  -webkit-tap-highlight-color: transparent;
}
.rrm-bk__tier:hover { box-shadow: 0 0 0 1.5px color-mix(in srgb, var(--rrm-ink) 35%, var(--rrm-line)), 0 10px 24px -14px rgba(0,0,0,.35); transform: translateY(-1px); }
.rrm-bk__tier:active { transform: scale(.985); }
.rrm-bk__tier:focus-visible { outline: 3px solid color-mix(in srgb, var(--rrm-accent) 45%, transparent); outline-offset: 2px; }
/* Selected card flips to brand colour — unmistakable on a phone in sunlight. */
.rrm-bk__tier[aria-pressed="true"] {
  background: var(--rrm-brand);
  box-shadow: 0 0 0 1.5px var(--rrm-brand), 0 14px 30px -14px color-mix(in srgb, var(--rrm-brand) 70%, transparent);
  color: var(--rrm-on-brand);
}
.rrm-bk__tier[aria-pressed="true"]::after {
  align-items: center;
  background: var(--rrm-accent);
  border-radius: 50%;
  color: var(--rrm-on-accent);
  content: "✓";
  display: flex;
  font-size: .85rem;
  font-weight: 900;
  height: 26px;
  justify-content: center;
  line-height: 1;
  position: absolute;
  right: 12px;
  top: 12px;
  width: 26px;
}

/* photo frame */
.rrm-bk__fill {
  background-color: var(--rrm-soft);
  background-position: center;
  background-repeat: no-repeat;
  background-size: 86% auto;
  border-radius: calc(var(--rrm-radius) - 6px);
  margin: 6px 0 6px 6px;
  min-height: 84px;
  overflow: hidden;
  position: relative;
}
.rrm-bk__tier:nth-child(2) { animation-delay: .05s; }
.rrm-bk__tier:nth-child(3) { animation-delay: .1s; }
.rrm-bk__tier:nth-child(4) { animation-delay: .15s; }
.rrm-bk__tier:nth-child(5) { animation-delay: .2s; }
.rrm-bk__fill { transition: transform .35s cubic-bezier(.2,.7,.2,1); }
.rrm-bk__tier:hover .rrm-bk__fill { transform: scale(1.04); }
.rrm-bk__tier[aria-pressed="true"] .rrm-bk__fill { box-shadow: 0 0 0 2px var(--rrm-accent); }
.rrm-bk__fill:has(img), .rrm-bk__fill[style*="url("] { background-size: cover; }
.rrm-bk__fill img { display: block; height: 100%; object-fit: cover; width: 100%; }
.rrm-bk__tier:nth-child(1) .rrm-bk__fill { background-image: url("../img/truck-1.svg"); }
.rrm-bk__tier:nth-child(2) .rrm-bk__fill { background-image: url("../img/truck-2.svg"); }
.rrm-bk__tier:nth-child(3) .rrm-bk__fill { background-image: url("../img/truck-3.svg"); }
.rrm-bk__tier:nth-child(4) .rrm-bk__fill { background-image: url("../img/truck-4.svg"); }
.rrm-bk__tier:nth-child(5) .rrm-bk__fill { background-image: url("../img/truck-5.svg"); }
.rrm-bk__fill i { display: none; }

.rrm-bk__tierText { align-self: center; display: grid; gap: 3px; min-width: 0; padding: 12px 44px 12px 0; }
.rrm-bk__tierLabel { display: block; font-size: 1.1rem; font-weight: 800; letter-spacing: -.02em; line-height: 1.1; }
/* small "MOST POPULAR" ribbon on the middle tier — hidden once selected */
.rrm-bk__tier:nth-child(3):not([aria-pressed="true"]) .rrm-bk__tierLabel::after {
  background: var(--rrm-accent-tint);
  border-radius: 999px;
  color: var(--rrm-accent);
  content: "Most booked";
  display: inline-block;
  font-size: .62rem;
  font-weight: 800;
  letter-spacing: .06em;
  margin-left: 8px;
  padding: 3px 8px;
  text-transform: uppercase;
  vertical-align: 2px;
}
.rrm-bk__tierBlurb { color: var(--rrm-muted); display: block; font-size: .84rem; line-height: 1.35; text-wrap: pretty; }
.rrm-bk__tier[aria-pressed="true"] .rrm-bk__tierBlurb { color: inherit; opacity: .78; }
/* price as a tag sitting on the photo */
.rrm-bk__tierPrice {
  background: var(--rrm-bg);
  border-radius: 999px;
  bottom: 12px;
  box-shadow: 0 2px 8px rgba(0,0,0,.18);
  color: var(--rrm-ink);
  font-size: .95rem;
  font-weight: 900;
  left: 12px;
  letter-spacing: -.02em;
  line-height: 1;
  padding: 7px 10px;
  position: absolute;
  white-space: nowrap;
}
.rrm-bk__tier[aria-pressed="true"] .rrm-bk__tierPrice { background: var(--rrm-accent); color: var(--rrm-on-accent); }

/* Wider: photo-top cards, 2-up; the fifth spans full width. */
@container (min-width: 560px) {
  .rrm-bk__grid { grid-template-columns: 1fr 1fr; gap: 12px; }
  .rrm-bk__tier { grid-template-columns: 1fr; grid-template-rows: 156px auto; gap: 0; }
  .rrm-bk__fill { margin: 6px 6px 0; min-height: 0; }
  .rrm-bk__tierText { padding: 12px 44px 16px 14px; }
  .rrm-bk__tier[aria-pressed="true"]::after { top: auto; bottom: 16px; }
  .rrm-bk__tier:last-child { grid-column: 1 / -1; grid-template-columns: 240px 1fr; grid-template-rows: 130px; }
  .rrm-bk__tier:last-child .rrm-bk__fill { margin: 6px 0 6px 6px; }
  .rrm-bk__tier:last-child .rrm-bk__tierText { padding: 12px 44px 12px 4px; }
  .rrm-bk__tier:last-child[aria-pressed="true"]::after { top: 12px; bottom: auto; }
}

.rrm-bk__body > * { animation: rrm-rise .4s cubic-bezier(.2,.7,.2,1) both; }
.rrm-bk__body > :nth-child(2) { animation-delay: .04s; }
.rrm-bk__body > :nth-child(3) { animation-delay: .08s; }
.rrm-bk__body > :nth-child(4) { animation-delay: .12s; }
.rrm-bk__body > :nth-child(5) { animation-delay: .16s; }

/* Price tag moves onto the photo when cards go photo-top */
@container (min-width: 560px) {
  .rrm-bk__tierPrice { bottom: auto; left: 16px; top: 16px; }
  .rrm-bk__tier:last-child .rrm-bk__tierPrice { bottom: 16px; top: auto; }
  .rrm-bk__tierText { padding-right: 52px; }
  .rrm-bk__tierLabel { font-size: 1.2rem; }
  .rrm-bk__tierBlurb { font-size: .9rem; }
}

/* ── desktop: banner + vertical step rail on the left, flow on the right ── */
@media (min-width: 960px) {
  .rrm-bk {
    align-items: start;
    display: grid;
    gap: 0 48px;
    grid-template-columns: 300px minmax(0, 1fr);
    grid-template-rows: auto 1fr;
    max-width: 1080px;
  }
  .rrm-bk__head {
    border-radius: var(--rrm-radius);
    clip-path: none;
    grid-column: 1;
    grid-row: 1;
    margin: 0 0 28px;
    padding: 32px 28px 34px;
  }
  .rrm-bk__head::before { height: 220px; width: 220px; right: -90px; top: -110px; }
  .rrm-bk__head::after { height: 270px; width: 270px; right: -115px; top: -135px; }
  .rrm-bk__title { font-size: 2.2rem; }
  .rrm-bk__sub { font-size: 1rem; }

  /* vertical rail */
  .rrm-bk__steps {
    display: grid;
    gap: 0;
    grid-column: 1;
    grid-row: 2;
    grid-template-columns: 1fr;
    margin: 0;
    padding: 0 0 0 8px;
    position: sticky;
    top: 24px;
  }
  .rrm-bk__step {
    font-size: .95rem;
    letter-spacing: -.01em;
    min-height: 64px;
    padding: 4px 0 0 44px;
    text-transform: none;
  }
  .rrm-bk__step::before { height: 28px; width: 28px; font-size: .85rem; }
  .rrm-bk__step::after { height: auto; width: 2px; left: 13px; top: 30px; bottom: 6px; right: auto; }
  .rrm-bk__step[data-on="1"] { font-size: 1.05rem; }
  .rrm-bk__step[data-on="1"]::before { transform: scale(1.1); }

  .rrm-bk__body { grid-column: 2; grid-row: 1 / span 2; }
  .rrm-bk__ask { font-size: 1.4rem; margin-bottom: 18px; }

  /* 3 + 2 layout on a 6-track grid: no orphan, no odd wide card */
  .rrm-bk__grid { gap: 14px; grid-template-columns: repeat(6, minmax(0, 1fr)); }
  .rrm-bk__tier { grid-column: span 2; grid-template-rows: 150px auto; }
  .rrm-bk__tier:nth-child(4), .rrm-bk__tier:nth-child(5) { grid-column: span 3; grid-template-rows: 170px auto; }
  .rrm-bk__tier:last-child { grid-template-columns: 1fr; }
  .rrm-bk__tier:last-child .rrm-bk__fill { margin: 6px 6px 0; }
  .rrm-bk__tier:last-child .rrm-bk__tierText { padding: 12px 52px 16px 14px; }
  .rrm-bk__tier:last-child .rrm-bk__tierPrice { bottom: auto; top: 16px; }
  .rrm-bk__tier:last-child[aria-pressed="true"]::after { top: auto; bottom: 16px; }

  .rrm-bk__summary { font-size: 1rem; padding: 14px 18px 14px 44px; }
  .rrm-bk__slots { grid-template-columns: repeat(4, 1fr); }
  .rrm-bk__day { min-width: 80px; padding: 14px 12px; }
  .rrm-bk__row { grid-template-columns: 1.6fr 1fr; }
  .rrm-bk__body:has(.rrm-bk__field) .rrm-bk__actions {
    background: transparent;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    box-shadow: none;
    margin: 24px 0 0;
    padding: 0;
    position: static;
  }
  .rrm-bk__btn:not(.rrm-bk__btn--ghost) { flex: 0 1 320px; margin-left: auto; }
  .rrm-bk__done { padding: 64px 40px 52px; }
}

/* ── summary: a ticket strip ───────────────────────────────────────────── */
.rrm-bk__summary {
  align-items: center;
  background: var(--rrm-brand);
  border-radius: 12px;
  color: var(--rrm-on-brand);
  display: flex;
  flex-wrap: wrap;
  font-size: .92rem;
  gap: 4px 8px;
  margin: 0 0 18px;
  padding: 12px 16px 12px 40px;
  position: relative;
  -webkit-mask: radial-gradient(7px at 0 50%, transparent 98%, #000) left / 51% 100% no-repeat,
                radial-gradient(7px at 100% 50%, transparent 98%, #000) right / 51% 100% no-repeat;
          mask: radial-gradient(7px at 0 50%, transparent 98%, #000) left / 51% 100% no-repeat,
                radial-gradient(7px at 100% 50%, transparent 98%, #000) right / 51% 100% no-repeat;
}
.rrm-bk__summary::before {
  background: var(--rrm-accent);
  border-radius: 50%;
  content: "";
  height: 10px;
  left: 18px;
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 10px;
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--rrm-accent) 30%, transparent);
}
.rrm-bk__summary b { color: inherit; font-weight: 800; }

/* ── day strip (scrolls sideways) + slots ──────────────────────────────── */
.rrm-bk__days {
  display: flex;
  gap: 8px;
  margin: 0 -4px 16px;
  overflow-x: auto;
  padding: 4px 4px 8px;
  scroll-snap-type: x proximity;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}
.rrm-bk__days::-webkit-scrollbar { display: none; }
.rrm-bk__days { -webkit-mask: linear-gradient(90deg, #000 calc(100% - 40px), transparent); mask: linear-gradient(90deg, #000 calc(100% - 40px), transparent); }
/* today badge on the first day */
.rrm-bk__day:first-child .rrm-bk__dayName::after { background: var(--rrm-accent); border-radius: 50%; content: ""; display: inline-block; height: 5px; margin-left: 4px; vertical-align: 2px; width: 5px; }
.rrm-bk__day {
  background: var(--rrm-soft);
  border: 0;
  border-radius: 14px;
  color: inherit;
  cursor: pointer;
  flex: 0 0 auto;
  font: inherit;
  min-width: 64px;
  padding: 12px 10px;
  scroll-snap-align: start;
  text-align: center;
  transition: background .15s ease, color .15s ease, transform .15s ease;
  -webkit-tap-highlight-color: transparent;
}
.rrm-bk__day:hover { background: var(--rrm-soft-2); }
.rrm-bk__day:focus-visible { outline: 3px solid color-mix(in srgb, var(--rrm-accent) 45%, transparent); outline-offset: 2px; }
.rrm-bk__day[aria-pressed="true"] { background: var(--rrm-brand); color: var(--rrm-on-brand); transform: translateY(-2px); box-shadow: 0 10px 20px -12px var(--rrm-brand); }
.rrm-bk__dayName { display: block; font-size: .68rem; font-weight: 700; letter-spacing: .06em; opacity: .65; text-transform: uppercase; }
.rrm-bk__dayNum { display: block; font-size: 1.05rem; font-weight: 800; letter-spacing: -.02em; margin-top: 2px; }
.rrm-bk__day { position: relative; }
.rrm-bk__day[aria-pressed="true"]::after { background: var(--rrm-accent); border-radius: 50%; bottom: 6px; content: ""; height: 5px; left: 50%; position: absolute; transform: translateX(-50%); width: 5px; }

.rrm-bk__slots::before { color: var(--rrm-muted); content: "Available times"; font-size: .72rem; font-weight: 800; grid-column: 1 / -1; letter-spacing: .06em; text-transform: uppercase; }
.rrm-bk__slots { display: grid; gap: 8px; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); }
.rrm-bk__slot {
  background: var(--rrm-bg);
  border: 1.5px solid var(--rrm-line);
  border-radius: 999px;
  color: inherit;
  cursor: pointer;
  font: inherit;
  font-size: .92rem;
  font-weight: 700;
  min-height: 46px;
  padding: 10px 8px;
  transition: border-color .15s ease, background .15s ease, color .15s ease;
  -webkit-tap-highlight-color: transparent;
}
.rrm-bk__slot:hover { border-color: var(--rrm-ink); }
.rrm-bk__slot:focus-visible { outline: 3px solid color-mix(in srgb, var(--rrm-accent) 45%, transparent); outline-offset: 2px; }
.rrm-bk__slot[aria-pressed="true"] { background: var(--rrm-accent); border-color: var(--rrm-accent); color: var(--rrm-on-accent); box-shadow: 0 8px 18px -10px var(--rrm-accent); transform: scale(1.04); }
.rrm-bk__slot { transition: border-color .15s ease, background .15s ease, color .15s ease, transform .15s ease, box-shadow .15s ease; }
.rrm-bk__slot[disabled] { cursor: not-allowed; opacity: .4; text-decoration: line-through; }

/* ── form ──────────────────────────────────────────────────────────────── */
.rrm-bk__field { margin: 0 0 14px; }
.rrm-bk__field label { color: var(--rrm-muted); display: block; font-size: .72rem; font-weight: 800; letter-spacing: .06em; margin: 0 0 6px; text-transform: uppercase; }
.rrm-bk__field input,
.rrm-bk__field textarea {
  appearance: none;
  background: var(--rrm-soft);
  border: 2px solid transparent;
  border-radius: 12px;
  color: var(--rrm-ink);
  font: inherit;
  font-size: 1.05rem;
  font-weight: 600;
  line-height: 1.3;
  min-height: 52px;
  padding: 13px 14px;
  transition: border-color .15s ease, background .15s ease;
  width: 100%;
}
.rrm-bk__field textarea { min-height: 92px; resize: vertical; }
.rrm-bk__field input::placeholder,
.rrm-bk__field textarea::placeholder { color: color-mix(in srgb, var(--rrm-muted) 70%, transparent); font-weight: 500; }
.rrm-bk__field input:focus,
.rrm-bk__field textarea:focus { background: var(--rrm-bg); border-color: var(--rrm-accent); box-shadow: 0 0 0 4px var(--rrm-accent-tint); outline: none; }
.rrm-bk__field:focus-within label { color: var(--rrm-accent); }
.rrm-bk__row { display: grid; gap: 12px; grid-template-columns: 1fr; }
@container (min-width: 480px) { .rrm-bk__row { grid-template-columns: 1.6fr 1fr; } }
/* Honeypot — off-screen, never display:none. */
.rrm-bk__hp { height: 0; left: -9999px; overflow: hidden; position: absolute; width: 0; }

/* ── actions ───────────────────────────────────────────────────────────── */
.rrm-bk__actions { align-items: center; display: flex; gap: 12px; margin: 20px 0 0; }
.rrm-bk__btn {
  align-items: center;
  background: var(--rrm-accent);
  border: 0;
  border-radius: 999px;
  box-shadow: 0 12px 24px -14px var(--rrm-accent);
  color: var(--rrm-on-accent);
  cursor: pointer;
  display: inline-flex;
  flex: 1 1 auto;
  font: inherit;
  font-size: 1.05rem;
  font-weight: 800;
  justify-content: center;
  letter-spacing: -.01em;
  min-height: 56px;
  padding: 14px 24px;
  transition: filter .15s ease, transform .1s ease;
  -webkit-tap-highlight-color: transparent;
}
.rrm-bk__btn:not(.rrm-bk__btn--ghost)::after { content: "→"; display: inline-block; margin-left: 10px; transition: transform .2s ease; }
.rrm-bk__btn:hover { filter: brightness(1.08); }
.rrm-bk__btn:not(.rrm-bk__btn--ghost):hover::after { transform: translateX(4px); }
.rrm-bk__btn:active { transform: scale(.98); }
.rrm-bk__btn:focus-visible { outline: 3px solid color-mix(in srgb, var(--rrm-brand) 45%, transparent); outline-offset: 2px; }
.rrm-bk__btn[disabled] { cursor: not-allowed; opacity: .45; }
.rrm-bk__btn--ghost {
  background: transparent;
  box-shadow: none;
  color: var(--rrm-ink);
  flex: 0 0 auto;
  padding: 14px 6px;
  text-decoration: underline;
  text-decoration-thickness: 2px;
  text-underline-offset: 4px;
}
.rrm-bk__btn--ghost::before { content: "←"; margin-right: 6px; }
.rrm-bk__btn--ghost:hover { filter: none; color: var(--rrm-accent); }

/* Sticky action bar on form steps (address + details). */
.rrm-bk__body:has(.rrm-bk__field) .rrm-bk__actions {
  background: color-mix(in srgb, var(--rrm-bg) 90%, transparent);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  bottom: 0;
  margin: 12px calc(-1 * var(--rrm-gutter, 0px)) 0;
  padding: 12px var(--rrm-gutter, 0px) max(12px, env(safe-area-inset-bottom));
  position: sticky;
  z-index: 2;
  box-shadow: 0 -12px 24px -20px rgba(0,0,0,.35);
}

/* ── notes / errors ────────────────────────────────────────────────────── */
.rrm-bk__note { color: var(--rrm-muted); font-size: .84rem; line-height: 1.45; margin: 14px 0 0; text-wrap: pretty; }
.rrm-bk__grid + .rrm-bk__note { background: var(--rrm-soft); border-radius: 12px; padding: 12px 14px 12px 38px; position: relative; }
.rrm-bk__grid + .rrm-bk__note::before { background: var(--rrm-accent); border-radius: 50%; color: var(--rrm-on-accent); content: "$"; font-size: .7rem; font-weight: 900; height: 18px; left: 12px; line-height: 18px; position: absolute; text-align: center; top: 13px; width: 18px; }
.rrm-bk__note a { color: var(--rrm-ink); font-weight: 700; text-decoration: underline; text-underline-offset: 3px; }
.rrm-bk__error {
  background: color-mix(in srgb, #d97706 14%, var(--rrm-bg));
  border-left: 4px solid #d97706;
  border-radius: 10px;
  color: color-mix(in srgb, #92400e 85%, var(--rrm-ink));
  font-size: .92rem;
  font-weight: 600;
  margin: 0 0 14px;
  padding: 12px 14px;
}

/* ── done ──────────────────────────────────────────────────────────────── */
.rrm-bk__done {
  background: var(--rrm-brand);
  background-image: radial-gradient(120% 140% at 0% 100%, color-mix(in srgb, var(--rrm-accent) 55%, transparent), transparent 55%);
  border-radius: var(--rrm-radius);
  color: var(--rrm-on-brand);
  padding: 34px 22px 26px;
  text-align: center;
  background-image:
    radial-gradient(4px 4px at 12% 22%, color-mix(in srgb, var(--rrm-on-brand) 45%, transparent) 50%, transparent 52%),
    radial-gradient(3px 3px at 88% 18%, var(--rrm-accent) 50%, transparent 52%),
    radial-gradient(3px 3px at 22% 78%, var(--rrm-accent) 50%, transparent 52%),
    radial-gradient(4px 4px at 80% 84%, color-mix(in srgb, var(--rrm-on-brand) 45%, transparent) 50%, transparent 52%),
    radial-gradient(120% 140% at 0% 100%, color-mix(in srgb, var(--rrm-accent) 55%, transparent), transparent 55%);
}
.rrm-bk__done h3 { color: inherit; font-size: clamp(1.7rem, 7cqw, 2.2rem); font-weight: 900; letter-spacing: -.03em; line-height: 1.05; margin: 0 0 8px; }
.rrm-bk__done p { color: inherit; font-size: 1.02rem; margin: 0 auto; max-width: 32ch; text-wrap: pretty; }
.rrm-bk__done .rrm-bk__note { color: inherit; opacity: .8; margin-top: 18px; }
.rrm-bk__done .rrm-bk__note a { color: inherit; }
.rrm-bk__doneMark {
  align-items: center;
  background: var(--rrm-accent);
  border-radius: 50%;
  box-shadow: 0 0 0 10px color-mix(in srgb, var(--rrm-on-brand) 12%, transparent);
  color: var(--rrm-on-accent);
  display: inline-flex;
  font-size: 1.8rem;
  font-weight: 900;
  height: 68px;
  justify-content: center;
  line-height: 1;
  margin: 0 0 22px;
  width: 68px;
}

/* ── loading ───────────────────────────────────────────────────────────── */
.rrm-bk__loading::after { color: var(--rrm-accent); content: "•••"; letter-spacing: .3em; margin-left: auto; opacity: .6; }
.rrm-bk__loading { align-items: center; color: var(--rrm-muted); display: flex; font-size: .95rem; font-weight: 600; gap: 10px; padding: 28px 0; }
.rrm-bk__spinner {
  animation: rrm-spin .8s linear infinite;
  border: 2.5px solid var(--rrm-line);
  border-radius: 50%;
  border-top-color: var(--rrm-accent);
  display: inline-block;
  height: 18px;
  width: 18px;
}
@keyframes rrm-spin { to { transform: rotate(360deg); } }
@keyframes rrm-pop { 0% { transform: scale(.6); opacity: 0; } 60% { transform: scale(1.08); opacity: 1; } 100% { transform: scale(1); } }
@keyframes rrm-ring { from { box-shadow: 0 0 0 0 color-mix(in srgb, var(--rrm-on-brand) 35%, transparent); } to { box-shadow: 0 0 0 26px transparent; } }
.rrm-bk__doneMark { animation: rrm-pop .5s cubic-bezier(.2,.8,.2,1) both, rrm-ring 1.4s ease-out .3s 2; }
.rrm-bk__fallback { color: var(--rrm-muted); }

/* ── motion / colour scheme ────────────────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
  .rrm-bk *, .rrm-bk *::before, .rrm-bk *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; transform: none !important; }
}
@media (prefers-color-scheme: dark) {
  .rrm-bk {
    --rrm-ink: #f3f4f6;
    --rrm-muted: #a1a5ad;
    --rrm-line: #34363c;
    --rrm-bg: #1a1b1f;
    --rrm-soft: #23252a;
    --rrm-soft-2: #2f3137;
  }
  .rrm-bk__tier[aria-pressed="true"] { box-shadow: 0 0 0 1.5px var(--rrm-accent); }
  .rrm-bk__tierPrice { background: var(--rrm-soft); }
}
