/* The fine-wine sticky backing card.
   One card follows the reader. One field, $0 to the packet wage.
   Desktop: right rail. Mobile: bottom bar.
   Built ENTIRELY on the house tokens (2026-08-12): the old file carried its
   own silver/platinum-blue palette, which made this the one component still
   off the gold-green-black register after the sitewide pass. Tokens theme
   themselves, so this file no longer needs a dark block at all — both hosts
   (work.html, explore.html) load a token sheet before it.
   Copy law: em dashes never reach the screen. */

.sbk {
  position: fixed;
  z-index: 60;
  right: 18px;
  bottom: 18px;
  width: 320px;
  max-width: calc(100vw - 36px);
  padding: 14px 16px 16px;
  border-radius: 18px;
  border: 1px solid var(--rule);
  background:
    radial-gradient(circle at 14% 8%, var(--card-sheen), transparent 42%),
    radial-gradient(circle at 92% 6%, var(--glow-gold), transparent 46%),
    var(--face-strong);
  color: var(--ink);
  box-shadow: 0 1px 0 var(--card-lip) inset, 0 10px 34px rgba(20, 24, 16, 0.22);
  backdrop-filter: blur(8px);
  font: inherit;
  line-height: 1.35;
  overflow: hidden;
}

/* The house top edge: the spectrum, thin, like every status card. */
.sbk::before {
  content: "";
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: var(--spectrum);
}

.sbk[hidden] { display: none; }

.sbk-eyebrow {
  margin: 0 0 2px;
  font-size: 0.74em;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--soft);
}

.sbk-title {
  margin: 0 0 4px;
  font-size: 1.02em;
  font-weight: 650;
  /* Two lines then ellipsis: the card must never grow taller than its rail. */
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.sbk-sub { margin: 0 0 10px; font-size: 0.86em; color: var(--muted); }

.sbk-presets {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 0 0 8px;
}

/* 44px floor: these are standalone controls, thumb-reachable by law. */
.sbk-preset-btn {
  min-height: 44px;
  min-width: 56px;
  flex: 1 1 auto;
  padding: 0 10px;
  border-radius: 12px;
  border: 1px solid var(--rule);
  background: var(--ink-wash);
  color: var(--ink);
  font: inherit;
  font-variant-numeric: tabular-nums;
  cursor: pointer;
}

.sbk-preset-btn[aria-pressed="true"] {
  border-color: var(--gold);
  background: var(--price-bg);
  color: var(--price-ink);
  font-weight: 650;
}

.sbk-row { display: flex; gap: 8px; align-items: stretch; }

.sbk-amount {
  min-height: 44px;
  flex: 1 1 auto;
  width: 100%;
  min-width: 0;
  padding: 0 10px;
  border-radius: 12px;
  border: 1px solid var(--rule);
  background: var(--panel);
  color: var(--ink);
  font: inherit;
  font-variant-numeric: tabular-nums;
}

/* The ONE button treatment: warm face, spectrum ring, same as every CTA. */
.sbk-go-cta {
  min-height: 44px;
  flex: 0 0 auto;
  padding: 0 16px;
  border-radius: 999px;
  border: 2px solid transparent;
  background:
    var(--btn-face) padding-box,
    var(--spectrum) border-box;
  color: var(--btn-ink);
  font: inherit;
  font-weight: 650;
  cursor: pointer;
  box-shadow: 0 1px 0 var(--btn-lip) inset;
}

.sbk-go-cta:disabled { opacity: 0.6; cursor: default; }

.sbk-tally {
  margin: 9px 0 0;
  font-size: 0.82em;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}

.sbk-note { margin: 7px 0 0; font-size: 0.84em; color: var(--muted); }
.sbk-note a { color: var(--link); font-weight: 600; }

.sbk-dismiss-btn {
  position: absolute;
  top: 6px;
  right: 8px;
  min-height: 44px;
  min-width: 44px;
  border: 0;
  background: none;
  color: var(--soft);
  font: inherit;
  font-size: 1.05em;
  cursor: pointer;
}
.sbk-dismiss-btn:hover { color: var(--ink); }

/* Mobile: a bottom bar, edge to edge, above the thumb. */
@media (max-width: 640px) {
  .sbk {
    right: 0;
    left: 0;
    bottom: 0;
    width: auto;
    max-width: none;
    border-radius: 18px 18px 0 0;
    border-left: 0;
    border-right: 0;
    border-bottom: 0;
    padding-bottom: calc(14px + env(safe-area-inset-bottom, 0px));
  }
  .sbk-title { -webkit-line-clamp: 1; }
}

@media (prefers-reduced-motion: no-preference) {
  .sbk { transition: opacity 160ms ease; }
}
