/*
  BoundBio — vial-size selector styles
  =======================================
  Pairs with design-system/size-selector.js. Self-contained so any page can
  link this one file and get the control; it reads --accent / --accent-rgb
  from whatever the page already sets per product, so it themes itself.

  Sizing follows the existing button language: pill/round geometry, 1px
  hairlines in --line, --accent only for the selected state. Circles are
  46px, above the 44px touch-target floor used elsewhere in the build.
*/

.vsize { position: relative; display: inline-flex; vertical-align: middle; }
.vsize[hidden] { display: none; }

.vsize-btn,
.vsize-opt {
  width: 46px;
  height: 46px;
  border-radius: 50%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0;
  padding: 0;
  background: #fff;
  border: 1px solid var(--line);
  color: var(--ink);
  cursor: pointer;
  line-height: 1;
  transition: border-color .18s ease, box-shadow .18s ease, background .18s ease, transform .18s ease;
}

.vsize-btn {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(var(--accent-rgb), .13);
}
.vsize-btn:hover { transform: translateY(-1px); }
.vsize-btn:active { transform: scale(.94); }
.vsize-btn:focus-visible,
.vsize-opt:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

.vsize-n {
  font-family: var(--font-display, 'Figtree', sans-serif);
  font-size: 16px;
  font-weight: 600;
  letter-spacing: -0.03em;
}
.vsize-u {
  font-size: 8.5px;
  font-weight: 400;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--ink-3);
  margin-top: 1px;
}

/* Tap feedback on change: a quick vertical flip, so switching sizes reads
   as the same control turning over rather than the number just mutating. */
@keyframes vsize-flip {
  0%   { transform: rotateX(0deg); }
  45%  { transform: rotateX(90deg); }
  100% { transform: rotateX(0deg); }
}
.vsize-btn.flip { animation: vsize-flip .34s ease; }

/* ---- Expanded picker (3+ sizes only) ---- */
.vsize-pop {
  position: absolute;
  top: calc(100% + 8px);
  left: 50%;
  transform: translateX(-50%) translateY(-4px);
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 8px;
  border-radius: 980px;
  background: rgba(255, 255, 255, .86);
  backdrop-filter: saturate(180%) blur(12px);
  -webkit-backdrop-filter: saturate(180%) blur(12px);
  border: 1px solid var(--line);
  box-shadow: 0 12px 30px rgba(11, 60, 90, .16);
  opacity: 0;
  pointer-events: none;
  transition: opacity .18s ease, transform .18s ease;
  z-index: 40;
}
.vsize.is-open .vsize-pop {
  opacity: 1;
  pointer-events: auto;
  transform: translateX(-50%) translateY(0);
}
.vsize-opt.on {
  border-color: var(--accent);
  background: rgba(var(--accent-rgb), .10);
}

/* The animations are decoration; the state changes are not. Under reduced
   motion the control still switches, just without the flip or the slide. */
@media (prefers-reduced-motion: reduce) {
  .vsize-btn.flip { animation: none; }
  .vsize-btn:hover, .vsize-btn:active { transform: none; }
  .vsize-pop { transition: none; transform: translateX(-50%); }
}
