/* ============================================================================
   Vouchers — the member's own voucher shelf.

   A pushed screen: white bar with a back arrow, no nav. Below it a brand
   rail, the standing note, and one block per age band. The bands are the
   structure of the screen — a voucher's age is the only thing sorting it —
   so each band keeps its heading even when the brand filter empties it of
   all but one row.

   Loads AFTER components.css. Nothing here is shared with the other screens
   except the tokens and the phone shell.
   ========================================================================= */

/* ── bar ─────────────────────────────────────────────────────────────────── */
.app--vouchers { display: flex; flex-direction: column; background: var(--c-panel); }

.vbar {
  flex: 0 0 auto;
  position: relative;
  display: flex; align-items: center;
  height: 56px; padding: 0 8px;
  background: var(--c-white);
  border-bottom: 1px solid var(--c-sep);
}
.vbar__back {
  display: flex; align-items: center; justify-content: center;
  width: 40px; height: 40px;
  padding: 0; border: 0; background: none; cursor: pointer;
  color: var(--c-txt);
}
.vbar__back svg {
  width: 22px; height: 22px;
  fill: none; stroke: currentColor; stroke-width: 2.2;
  stroke-linecap: round; stroke-linejoin: round;
}
/* centred on the bar, not after the arrow, so it stays put whatever the
   arrow's width */
.vbar__title {
  position: absolute; left: 0; right: 0;
  text-align: center; pointer-events: none;
  font-family: var(--font); font-size: 17px; font-weight: var(--fw-semi); color: var(--c-txt);
}

.vscroll {
  flex: 1; min-height: 0; overflow-y: auto;
  padding: 14px var(--geo-gutter) calc(var(--geo-safe-bottom) + 24px);
}
.vscroll::-webkit-scrollbar { width: 0; height: 0; }

/* ── brand rail ──────────────────────────────────────────────────────────── */
.vpills {
  display: flex; gap: 8px;
  overflow-x: auto; scrollbar-width: none;
  /* the rail runs to both edges of the screen while the rest of the page
     keeps its gutter, so the last pill reads as scrollable rather than last */
  margin: 0 calc(var(--geo-gutter) * -1);
  padding: 0 var(--geo-gutter);
}
.vpills::-webkit-scrollbar { width: 0; height: 0; }
/* .vpill is the shared filter pill (components.css); this rail adds only the
   tick on the selected pill, which needs the pill to be a flex row. */
.vpill { display: flex; align-items: center; gap: 6px; }
/* the tick belongs to the selected pill only, and takes its space with it */
.vpill__tick { display: none; }
.vpill[aria-pressed='true'] .vpill__tick { display: flex; }
.vpill__tick svg {
  width: 13px; height: 13px;
  fill: none; stroke: currentColor; stroke-width: 3;
  stroke-linecap: round; stroke-linejoin: round;
}

/* ── the standing note ───────────────────────────────────────────────────── */
.vnote {
  display: flex; gap: 10px;
  margin: 14px 0 0; padding: 12px 14px;
  border-radius: 10px;
  background: var(--c-scnd-bg);
  font-family: var(--font); font-size: 13px; font-weight: var(--fw-reg);
  color: var(--c-txt); line-height: 1.45;
}
.vnote b { font-weight: var(--fw-semi); }
.vnote__ic { flex: 0 0 18px; display: flex; padding-top: 1px; color: var(--c-scnd); }
.vnote__ic svg {
  width: 18px; height: 18px;
  fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round;
}

/* ── one block per age band ──────────────────────────────────────────────── */
.vgroup { margin-top: 22px; }
/* a rule between bands, the way the supplied screen separates Latest from
   what follows — on the band, not on the last row, so an empty band cannot
   leave a rule hanging */
.vgroup + .vgroup { border-top: 1px solid var(--c-sep); padding-top: 22px; }
.vgroup__hd {
  margin: 0 0 12px;
  font-family: var(--font); font-size: 18px; font-weight: var(--fw-semi); color: var(--c-txt);
}
.vgroup--archived .vgroup__hd { color: var(--c-n); }

.vrow {
  display: flex; align-items: center; gap: 12px;
  width: 100%;
  margin-bottom: 10px; padding: 12px 14px;
  border: 0; border-radius: 10px; cursor: pointer;
  background: var(--c-white);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
  text-align: left;
}
.vrow:last-child { margin-bottom: 0; }
.vrow:active { background: var(--c-panel); }
.vrow__logo {
  flex: 0 0 40px; height: 40px;
  display: flex; align-items: center; justify-content: center;
  border-radius: 8px; overflow: hidden;
  background: var(--c-white);
}
.vrow__logo img { width: 100%; height: 100%; object-fit: contain; }
.vrow__body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.vrow__name {
  font-family: var(--font); font-size: 15px; font-weight: var(--fw-med); color: var(--c-txt);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.vrow__meta { font-family: var(--font); font-size: 12px; color: var(--c-txt-meta); }
/* the forwarded marker sits against the row's right edge, aligned with the
   date rather than the title */
.vrow__fwd {
  flex: 0 0 auto; align-self: flex-end;
  display: flex; align-items: center; gap: 4px;
  font-family: var(--font); font-size: 12px; color: var(--c-txt-meta);
}
.vrow__fwd svg {
  width: 14px; height: 14px;
  fill: none; stroke: currentColor; stroke-width: 1.8;
  stroke-linecap: round; stroke-linejoin: round;
}

/* Archived is still legible — greyed, not hidden. A voucher that has been
   used is the one a member is most likely to be looking for proof of. */
.vgroup--archived .vrow { background: var(--c-panel); box-shadow: none; }
.vgroup--archived .vrow__name { color: var(--c-n); font-weight: var(--fw-med); }
.vgroup--archived .vrow__logo { opacity: 0.55; }

.vempty {
  margin: 28px 0 0;
  text-align: center;
  font-family: var(--font); font-size: 14px; color: var(--c-n);
}
