/* Health vouchers (js/vouchers.js): a small row on the dashboard, under the
 * shop's name — the brands that sell medicines — and a page of them all from
 * the sidebar. Hubble's posters are square artwork with the brand already on
 * them, so a card is the poster, the saving and the name. */

/* ── On the dashboard, under the shop's name ─────────────────────── */
/* As wide as what is in it, not the width of the page. */
.vstrip {
  flex: 0 0 auto;
  align-self: flex-start;
  max-width: 100%;
  margin-top: 14px;
  padding: 8px 10px 10px;
}
.vs-head {
  display: flex;
  align-items: baseline;
  gap: 8px;
  min-width: 0;
  margin: 0 2px 7px;
}
.vs-title { flex: 0 0 auto; font-size: 12.5px; font-weight: 800; letter-spacing: .02em; }
.vs-sub { flex: 0 1 auto; min-width: 0; overflow: hidden; font-size: 11.5px; white-space: nowrap; text-overflow: ellipsis; opacity: .78; }
.vs-all {
  flex: 0 0 auto;
  margin-left: auto;
  padding: 3px 10px;
  font: var(--font);
  font-size: 11.5px;
  font-weight: 700;
  color: inherit;
  background: rgba(255, 255, 255, .16);
  border: 1px solid rgba(255, 255, 255, .26);
  border-radius: 999px;
  cursor: pointer;
}
.vs-all:hover { background: rgba(255, 255, 255, .28); }
.homepage.onlight .vs-all { background: rgba(15, 23, 42, .07); border-color: rgba(15, 23, 42, .14); }
.homepage.onlight .vs-all:hover { background: rgba(15, 23, 42, .13); }
.vs-row { display: flex; gap: 8px; padding: 1px; overflow-x: auto; scrollbar-width: thin; }

/* Half the old card: a small poster, the name and the saving beside it. */
.vc-mini {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 4px 12px 4px 4px;
  font: var(--font);
  color: inherit;
  text-align: left;
  background: rgba(255, 255, 255, .12);
  border: 1px solid rgba(255, 255, 255, .2);
  border-radius: 10px;
  cursor: pointer;
}
.vc-mini:hover { background: rgba(255, 255, 255, .24); }
.vc-mini:focus-visible { outline: 2px solid currentColor; outline-offset: 2px; }
.homepage.onlight .vc-mini { background: rgba(15, 23, 42, .05); border-color: rgba(15, 23, 42, .12); }
.homepage.onlight .vc-mini:hover { background: rgba(15, 23, 42, .1); }
.vm-art {
  flex: 0 0 auto;
  width: 42px;
  height: 42px;
  overflow: hidden;
  background: rgba(255, 255, 255, .16);
  border-radius: 8px;
}
.vm-text { display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.vm-name { font-size: 12.5px; font-weight: 700; white-space: nowrap; }
/* The saving, green: money kept. Lighter on the dark wallpapers. */
.vm-off { font-size: 11px; font-weight: 800; letter-spacing: .02em; color: #86efac; }
.homepage.onlight .vm-off { color: #15803d; }
.vm-art .vc-init { font-size: 17px; }
@media (max-height: 700px) {
  .vstrip { margin-top: 10px; }
  .vm-art { width: 36px; height: 36px; }
}
/* Under 980 px wide (the browser copy on a tablet — the desktop window
 * stops at 1024) the figures stack under the name and there is no room
 * left: the row goes, and Vouchers in the sidebar is the way in. */
@media (max-width: 980px) {
  .vstrip { display: none; }
}

/* ── The page of them all, from the sidebar ──────────────────────── */
.vx-wrap {
  flex: 1;
  min-height: 0;
  overflow: auto;
  padding: 18px 24px 30px;
}
.vx-intro {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px 18px;
  max-width: 1100px;
  padding: 12px 16px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 12px;
}
.vx-steps {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 22px;
  margin: 0;
  padding-left: 18px;
  font-size: 12.5px;
  color: var(--muted);
}
.vx-steps b { color: var(--ink); }
.vx-mine { margin-left: auto; }
.vx-locked { margin: 12px 0 0; font-size: 13px; color: var(--muted); }
.vx-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 20px 18px;
  max-width: 1100px;
  margin-top: 18px;
}
.vc-card {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 6px;
  min-width: 0;
  padding: 0;
  font: var(--font);
  color: var(--ink);
  text-align: left;
  background: none;
  border: 0;
  border-radius: 12px;
  cursor: pointer;
}
.vc-art {
  position: relative;
  display: block;
  aspect-ratio: 1;
  overflow: hidden;
  background: var(--line);
  border-radius: 12px;
  box-shadow: 0 3px 10px rgba(15, 23, 42, .12);
  transition: transform .12s ease, box-shadow .12s ease;
}
.vc-card:hover .vc-art { transform: translateY(-2px); box-shadow: 0 8px 18px rgba(15, 23, 42, .2); }
.vc-card:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
@media (prefers-reduced-motion: reduce) { .vc-art { transition: none; } .vc-card:hover .vc-art { transform: none; } }
.vc-img { display: block; width: 100%; height: 100%; object-fit: cover; }
/* A poster that did not load: the brand's initial, so the row has no gap. */
.vc-init {
  display: grid;
  place-items: center;
  width: 100%;
  height: 100%;
  font-size: 30px;
  font-weight: 800;
  color: #fff;
  background: linear-gradient(135deg, #14b8a6, #0f766e);
}
/* The saving, on the poster's corner. */
.vc-off {
  position: absolute;
  top: 8px;
  left: 8px;
  padding: 3px 8px;
  font-size: 12px;
  font-weight: 800;
  line-height: 1.5;
  letter-spacing: .02em;
  color: #fff;
  background: #15803d;
  border-radius: 6px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, .3);
}
.vc-name { overflow: hidden; font-size: 13.5px; font-weight: 600; white-space: nowrap; text-overflow: ellipsis; }
.vc-buy {
  align-self: flex-start;
  padding: 5px 12px;
  font-size: 12px;
  font-weight: 700;
  color: #fff;
  background: var(--accent);
  border-radius: 8px;
}
.vc-card:hover .vc-buy { background: var(--accent-dk); }
.vx-note { max-width: 72ch; margin: 22px 0 0; font-size: 12px; line-height: 1.5; color: var(--muted); }
