/**
 * VinoSwipe Contributors — all four screens.
 * Everything is namespaced .vsi so nothing leaks into the landing page and the
 * landing page cannot quietly restyle these.
 * Palette follows the theme's Customizer defaults.
 */

.vsi {
  --w: #6b1435;          /* wine */
  --wd: #43091f;         /* deep wine */
  --ws: #f3e3e9;         /* wine tint */
  --gold: #a87c22;
  --ground: #fbf7f2;
  --surf: #ffffff;
  --surf2: #f4ece5;
  --ink: #1f1418;
  --muted: #6d5c62;
  --faint: #9c8890;
  --line: #e8ddd8;
  --ok: #2f6b4f;
  --warn: #8a5d12;
  --bad: #9b2c2c;

  max-width: 560px;
  margin: 0 auto;
  padding: 0 16px 56px;
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--ink);
  font-size: 16px;
  line-height: 1.45;
  -webkit-font-smoothing: antialiased;
}
.vsi *, .vsi *::before, .vsi *::after { box-sizing: border-box; }
.vsi :focus-visible { outline: 2px solid var(--w); outline-offset: 2px; }
.vsi [hidden] { display: none !important; }

.vsi-boot { color: var(--faint); font-size: 14px; padding: 40px 0; text-align: center; }

/* ---------------------------------------------------------------- shared */
.vsi h2.vsi-h { font-size: 19px; font-weight: 700; margin: 0 0 4px; letter-spacing: -.01em; }
.vsi p.vsi-lede { font-size: 13.5px; color: var(--muted); margin: 0 0 16px; }
.vsi-eyebrow {
  font-size: 11px; font-weight: 600; letter-spacing: .09em; text-transform: uppercase;
  color: var(--faint); margin-bottom: 7px;
}

.vsi-card {
  background: var(--surf); border: 1px solid var(--line); border-radius: 16px;
  box-shadow: 0 1px 2px rgba(67,9,31,.06), 0 8px 26px rgba(67,9,31,.05);
  overflow: hidden;
}

.vsi-btn {
  width: 100%; font: inherit; font-size: 16px; font-weight: 650; color: #fff;
  background: var(--w); border: 0; border-radius: 12px; padding: 15px; min-height: 54px;
  cursor: pointer; margin: 0;
}
.vsi-btn:disabled { background: var(--surf2); color: var(--faint); cursor: default; }
.vsi-btn:not(:disabled):active { background: var(--wd); }
.vsi-btn--ghost {
  background: none; color: var(--w); border: 1px solid var(--line); font-size: 14px; min-height: 46px; padding: 12px;
}
.vsi-btn--ghost:active { background: var(--surf2); }
.vsi-link { background: none; border: 0; color: var(--w); font: inherit; font-size: 13.5px;
  font-weight: 600; cursor: pointer; padding: 8px; display: block; width: 100%; text-align: center; }

.vsi-field { display: block; margin-bottom: 12px; }
.vsi-field > span { display: block; font-size: 12.5px; font-weight: 600; color: var(--muted); margin-bottom: 5px; }
.vsi-field input, .vsi-field select, .vsi-field textarea {
  width: 100%; font: inherit; font-size: 16px; padding: 12px; border-radius: 10px;
  border: 1px solid var(--line); background: var(--surf2); color: var(--ink); min-height: 48px; margin: 0;
}
.vsi-field textarea { min-height: 88px; resize: vertical; }
.vsi-field input:focus, .vsi-field textarea:focus { outline: 2px solid var(--w); outline-offset: -1px; background: var(--surf); }

.vsi-msg { border-radius: 10px; padding: 11px 13px; font-size: 13.5px; margin-bottom: 14px; }
.vsi-msg--err { background: #fdeaea; color: #7a1f1f; border: 1px solid #f3cccc; }
.vsi-msg--ok { background: #e9f4ee; color: #1d4e38; border: 1px solid #c9e4d6; }
.vsi-msg--info { background: var(--surf2); color: var(--muted); border: 1px solid var(--line); }

.vsi-gate {
  max-width: 480px; margin: 36px auto; padding: 24px; text-align: center;
  border: 1px solid var(--line); border-radius: 14px; background: var(--surf);
}

/* ------------------------------------------------------------------ join */
.vsi-steps { display: flex; gap: 5px; margin-bottom: 18px; }
.vsi-steps span { flex: 1; height: 3px; border-radius: 99px; background: var(--line); }
.vsi-steps span.on { background: var(--w); }

.vsi-offer {
  background: var(--ws); border-radius: 12px; padding: 14px 15px; margin-bottom: 18px;
  font-size: 14px; line-height: 1.5;
}
.vsi-offer b { display: block; font-size: 12px; text-transform: uppercase; letter-spacing: .07em;
  color: var(--w); margin-bottom: 4px; }

.vsi-dob { display: grid; grid-template-columns: 1fr 1fr 1.2fr; gap: 8px; }

.vsi-check { display: flex; gap: 11px; align-items: flex-start; padding: 13px;
  border: 1px solid var(--line); border-radius: 11px; margin-bottom: 9px; cursor: pointer; background: var(--surf); }
.vsi-check input { width: 20px; height: 20px; margin: 1px 0 0; flex: 0 0 auto; accent-color: var(--w); }
.vsi-check span { font-size: 13.5px; line-height: 1.5; }
.vsi-check a { color: var(--w); }

/* ------------------------------------------------------------------ scan */
.vsi-bar {
  position: sticky; top: 0; z-index: 8; background: var(--ground);
  border-bottom: 1px solid var(--line); margin: 0 -16px 16px; padding: 10px 16px 11px;
}
.vsi-tally { font-size: 13px; font-weight: 600; color: var(--muted); font-variant-numeric: tabular-nums; margin-bottom: 8px; }
.vsi-storebar { display: flex; gap: 8px; }
.vsi-storebar select, .vsi-storebar button {
  font: inherit; font-size: 14.5px; color: var(--ink); background: var(--surf);
  border: 1px solid var(--line); border-radius: 9px; padding: 9px 11px; min-height: 44px; margin: 0;
}
.vsi-storebar select { flex: 1; min-width: 0; }
.vsi-storebar button { flex: 0 0 auto; color: var(--muted); cursor: pointer; }
.vsi-status { display: flex; align-items: center; gap: 7px; font-size: 12.5px; color: var(--muted); margin-top: 8px; min-height: 18px; }
.vsi-pip { width: 7px; height: 7px; border-radius: 50%; background: var(--ok); flex: 0 0 auto; }
.vsi-pip.pending { background: var(--warn); }
.vsi-pip.off { background: var(--faint); }
.vsi-status button { margin-left: auto; background: none; border: 0; color: var(--w);
  font: inherit; font-size: 12.5px; font-weight: 600; cursor: pointer; padding: 2px 4px; }

.vsi-shot {
  display: block; width: 100%; border: 0; padding: 0; margin: 0; background: var(--surf2);
  aspect-ratio: 4/3; position: relative; cursor: pointer; color: var(--muted); font: inherit;
}
.vsi-shot img { width: 100%; height: 100%; object-fit: cover; display: block; }
.vsi-shot__empty { position: absolute; inset: 0; display: flex; flex-direction: column;
  align-items: center; justify-content: center; gap: 9px; }
.vsi-lens { width: 46px; height: 46px; border-radius: 50%; border: 2px solid var(--w); display: grid; place-items: center; }
.vsi-lens span { width: 17px; height: 17px; border-radius: 50%; background: var(--w); display: block; }
.vsi-hint { font-size: 14px; font-weight: 500; }
.vsi-sub { font-size: 12px; color: var(--faint); }
.vsi-retake { position: absolute; right: 9px; bottom: 9px; background: rgba(0,0,0,.62);
  color: #fff; border-radius: 7px; font-size: 12.5px; padding: 6px 10px; }

.vsi-fields { padding: 13px; display: grid; gap: 10px; }
/* Wine type — one tap, optional. Placed before price on purpose: it costs a
   tap and no keyboard, so it is done before the numeric pad covers the screen. */
.vsi-types { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; }
.vsi-types button {
  font: inherit; font-size: 12px; font-weight: 600; color: var(--muted);
  background: var(--surf2); border: 1.5px solid transparent; border-radius: 10px;
  padding: 9px 2px; min-height: 46px; cursor: pointer;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 5px;
}
.vsi-types button i {
  width: 12px; height: 12px; border-radius: 50%; display: block;
  border: 1px solid rgba(0, 0, 0, .12);
}
.vsi-types button:nth-child(1) i { background: #6b1435; }
.vsi-types button:nth-child(2) i { background: #e8dca4; }
.vsi-types button:nth-child(3) i { background: #e9a7ac; }
.vsi-types button:nth-child(4) i { background: #d9c37a; }
.vsi-types button[aria-pressed="true"] {
  background: var(--w); color: #fff; border-color: var(--w);
}
.vsi-types button[aria-pressed="true"] i { border-color: rgba(255, 255, 255, .5); }

.vsi-pricerow { display: flex; gap: 9px; }
.vsi-money { flex: 1; position: relative; display: flex; align-items: center; margin: 0; }
.vsi-cur { position: absolute; left: 13px; font-size: 19px; color: var(--faint); font-weight: 500; pointer-events: none; }
.vsi-money input {
  width: 100%; font: inherit; font-size: 21px; font-weight: 600; font-variant-numeric: tabular-nums;
  padding: 11px 12px 11px 30px; border-radius: 10px; border: 1px solid var(--line);
  background: var(--surf2); color: var(--ink); min-height: 54px; margin: 0;
}
.vsi-size { flex: 0 0 100px; font: inherit; font-size: 14px; border-radius: 10px;
  border: 1px solid var(--line); background: var(--surf2); color: var(--ink); padding: 0 8px; margin: 0; }
.vsi-bc { width: 100%; font: inherit; font-size: 13.5px; font-variant-numeric: tabular-nums;
  padding: 10px 11px; border-radius: 9px; border: 1px solid var(--line);
  background: var(--surf2); color: var(--ink); margin: 0; min-height: 44px; }

/* ------------------------------------------------------- tiles / tasting */
.vsi-tiles { display: grid; grid-template-columns: repeat(3, 1fr); gap: 7px; }
.vsi-tiles button {
  font: inherit; font-size: 12.5px; font-weight: 650; line-height: 1.25; color: var(--muted);
  background: var(--surf2); border: 1.5px solid transparent; border-radius: 13px;
  padding: 15px 6px; min-height: 90px; cursor: pointer;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px;
}
.vsi-tiles .mk { width: 23px; height: 23px; display: block; }
.vsi-tiles button[aria-pressed="true"] { color: #fff; }
.vsi-tiles button.buy[aria-pressed="true"] { background: var(--ok); border-color: var(--ok); }
.vsi-tiles button.no[aria-pressed="true"] { background: var(--ink); border-color: var(--ink); color: var(--ground); }
.vsi-tiles button.shut[aria-pressed="true"] { background: var(--gold); border-color: var(--gold); }

.vsi-seg { display: grid; grid-template-columns: repeat(5, 1fr); gap: 5px; }
.vsi-seg button {
  font: inherit; font-size: 12px; font-weight: 600; color: var(--muted); background: var(--surf2);
  border: 1px solid transparent; border-radius: 9px; padding: 11px 2px; min-height: 46px; cursor: pointer;
}
.vsi-seg button[aria-pressed="true"] { background: var(--w); color: #fff; border-color: var(--w); }
.vsi-anchors { display: flex; justify-content: space-between; margin-top: 6px; font-size: 10.5px; color: var(--faint); }
.vsi-q { padding: 14px 0; border-top: 1px solid var(--line); }
.vsi-qhead { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; margin-bottom: 9px; }
.vsi-qlabel { font-size: 13.5px; font-weight: 600; }
.vsi-qopt { font-size: 10.5px; color: var(--faint); text-transform: uppercase; letter-spacing: .06em; }

/* ---------------------------------------------------------------- cellar */
.vsi-who { display: flex; align-items: center; gap: 13px; margin-bottom: 18px; }
.vsi-avatar { width: 52px; height: 52px; flex: 0 0 auto; border-radius: 50%; background: var(--w);
  color: #fff; display: grid; place-items: center; font-size: 19px; font-weight: 700; }
.vsi-who h2 { font-size: 21px; font-weight: 700; margin: 0; }
.vsi-who .since { font-size: 12.5px; color: var(--muted); }

.vsi-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 7px; margin-bottom: 8px; }
.vsi-stat { background: var(--surf); border: 1px solid var(--line); border-radius: 12px; padding: 11px 6px; text-align: center; }
.vsi-stat .n { font-size: 20px; font-weight: 700; line-height: 1.1; font-variant-numeric: tabular-nums; }
.vsi-stat .l { font-size: 9.5px; color: var(--faint); text-transform: uppercase; letter-spacing: .05em; margin-top: 2px; }
.vsi-stat.gold .n { color: var(--gold); }
.vsi-carry { font-size: 11.5px; color: var(--faint); text-align: center; margin: 0 0 24px; }

.vsi-pending { display: grid; gap: 8px; margin-bottom: 26px; }
.vsi-pcard { display: flex; gap: 11px; align-items: center; background: var(--surf);
  border: 1px solid var(--line); border-radius: 13px; padding: 10px; }
.vsi-pcard img { width: 42px; height: 56px; object-fit: cover; border-radius: 6px; flex: 0 0 auto; background: var(--surf2); }
.vsi-pcard .info { min-width: 0; flex: 1; }
.vsi-pcard .nm { font-size: 14px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.vsi-pcard .mt { font-size: 11.5px; color: var(--muted); font-variant-numeric: tabular-nums; }
.vsi-pcard button { flex: 0 0 auto; font: inherit; font-size: 13px; font-weight: 600; color: #fff;
  background: var(--w); border: 0; border-radius: 9px; padding: 9px 14px; min-height: 40px; cursor: pointer; }

.vsi-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(106px, 1fr)); gap: 9px; }
.vsi-tile { background: var(--surf); border: 1px solid var(--line); border-radius: 12px;
  overflow: hidden; position: relative; cursor: pointer; text-align: left; padding: 0; font: inherit; color: inherit; }
.vsi-tile img { width: 100%; aspect-ratio: 3/4; object-fit: cover; display: block; background: var(--surf2); }
.vsi-tile .cap { padding: 7px 8px 9px; }
.vsi-tile .nm { font-size: 11.5px; font-weight: 600; line-height: 1.25;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.vsi-tile .pr { font-size: 11px; color: var(--faint); font-variant-numeric: tabular-nums; margin-top: 2px; }
.vsi-verdict { position: absolute; left: 6px; bottom: 6px; font-size: 9.5px; font-weight: 700;
  letter-spacing: .03em; text-transform: uppercase; padding: 3px 7px; border-radius: 6px;
  background: rgba(0,0,0,.62); color: #fff; }
.vsi-first { position: absolute; right: 6px; top: 6px; font-size: 9.5px; font-weight: 700;
  letter-spacing: .03em; text-transform: uppercase; padding: 3px 7px; border-radius: 6px;
  background: var(--gold); color: #fff; }

/* ---------------------------------------------------------------- review */
.vsi-app { background: var(--surf); border: 1px solid var(--line); border-radius: 13px;
  padding: 14px; margin-bottom: 10px; }
.vsi-app h3 { font-size: 15px; margin: 0 0 3px; }
.vsi-app .meta { font-size: 12px; color: var(--muted); margin-bottom: 9px; font-variant-numeric: tabular-nums; }
.vsi-app .why { font-size: 13.5px; background: var(--surf2); border-radius: 9px; padding: 10px 12px; margin-bottom: 11px; }
.vsi-app .acts { display: flex; gap: 8px; }
.vsi-app .acts button { flex: 1; font: inherit; font-size: 14px; font-weight: 600; border-radius: 9px;
  padding: 11px; min-height: 44px; cursor: pointer; border: 1px solid var(--line); background: var(--surf2); color: var(--muted); }
.vsi-app .acts .ok { background: var(--ok); color: #fff; border-color: var(--ok); }
.vsi-badge { display: inline-block; font-size: 10px; font-weight: 700; text-transform: uppercase;
  letter-spacing: .05em; padding: 2px 7px; border-radius: 5px; background: var(--surf2); color: var(--muted); }
.vsi-badge.warn { background: #fbf0d9; color: var(--warn); }

/* ---------------------------------------------------------------- sheet */
.vsi-sheet { position: fixed; inset: 0; background: rgba(20,10,14,.55); z-index: 9999;
  display: flex; align-items: flex-end; justify-content: center; }
.vsi-sheet__in { background: var(--surf); width: 100%; max-width: 560px; border-radius: 18px 18px 0 0;
  padding: 18px 18px calc(22px + env(safe-area-inset-bottom, 0px)); max-height: 88vh; overflow-y: auto; }
.vsi-grab { width: 38px; height: 4px; border-radius: 99px; background: var(--line); margin: 0 auto 14px; }
.vsi-sheet__in h3 { font-size: 19px; margin: 0 0 3px; }
.vsi-sheet__in .sub { font-size: 12.5px; color: var(--muted); margin-bottom: 15px; font-variant-numeric: tabular-nums; }
.vsi-quote { background: var(--surf2); border-left: 3px solid var(--w); border-radius: 0 9px 9px 0;
  padding: 11px 13px; font-size: 13.5px; line-height: 1.55; margin-bottom: 14px; }

.vsi-toast { position: fixed; left: 50%; transform: translateX(-50%);
  bottom: calc(22px + env(safe-area-inset-bottom, 0px)); z-index: 10000;
  background: var(--ink); color: var(--ground); font-size: 14px; font-weight: 500;
  padding: 11px 17px; border-radius: 999px; pointer-events: none; max-width: calc(100% - 32px); }

.vsi-empty { color: var(--muted); font-size: 14px; background: var(--surf);
  border: 1px dashed var(--line); border-radius: 11px; padding: 18px; text-align: center; }

.vsi-foot { margin-top: 22px; font-size: 11px; color: var(--faint); line-height: 1.6; text-align: center; }

@media (prefers-reduced-motion: reduce) { .vsi * { transition: none !important; animation: none !important; } }
