/* Counter screen: builds on admin.css tokens. Designed for tablets at the stand. */

.counter-top { justify-content: space-between; gap: 0.75rem 1.5rem; }
.counter-top p { margin: 0; }
.counter-where { flex: 1; min-width: 12rem; }
.counter-where .campaign { font-weight: 700; font-size: 1.125rem; color: var(--header-ink); }
.counter-where .device { color: var(--header-muted); font-size: 0.875rem; }
.today { font-weight: 600; font-variant-numeric: tabular-nums; text-align: right; color: var(--header-ink); }

.counter-layout {
  max-width: 1280px;
  margin: 0 auto;
  padding: 1.25rem;
  display: grid;
  grid-template-columns: minmax(300px, 400px) minmax(0, 1fr);
  gap: 1.5rem;
  align-items: start;
}
@media (max-width: 860px) {
  .counter-layout { grid-template-columns: 1fr; }
}

.register { padding: 1.25rem; position: sticky; top: 5rem; }
@media (max-width: 860px) { .register { position: static; } }
.register h1 { font-size: 1.375rem; margin-bottom: 1rem; }
.register input { font-size: 1.125rem; min-height: 52px; }
.consent { margin: 0.25rem 0 1rem; align-items: flex-start; }
.consent input { margin-top: 0.3rem; }
button.big, .button-link.big { min-height: 56px; font-size: 1.125rem; }

.duplicate { border: 1px solid var(--stub); background: color-mix(in srgb, var(--stub) 22%, var(--surface)); border-radius: var(--radius); padding: 0.75rem 1rem; margin-bottom: 1rem; }
.duplicate p { margin-bottom: 0.5rem; font-weight: 550; }

/* ----- Player list ----- */

.players-head { display: flex; align-items: center; gap: 1rem; margin-bottom: 0.75rem; flex-wrap: wrap; }
.players-head h2 { margin: 0; flex: 1; font-size: 1.25rem; }
.players-head input { max-width: 320px; }
.filters { display: flex; gap: 0.5rem; flex-wrap: wrap; margin-bottom: 0.75rem; }
.filters + .filters { margin-top: -0.25rem; }
.chip { background: var(--surface); border: 1px solid var(--line); color: var(--ink); border-radius: 999px; padding: 0.4rem 0.9rem; min-height: 40px; font-weight: 550; }
.chip[aria-pressed="true"] { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }

.player-list { list-style: none; margin: 0; padding: 0; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); overflow: hidden; }
.player-list:empty { display: none; }
.player-list li + li { border-top: 1px solid var(--line); }
.player-list li { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; }
.player-list li.just-added { background: color-mix(in srgb, var(--accent-soft) 85%, transparent); }
.row-delete {
  margin-right: 0.75rem; min-height: 40px; padding: 0.35rem 0.8rem; font-size: 0.875rem;
  background: transparent; color: var(--danger); border: 1px solid color-mix(in srgb, var(--danger) 45%, var(--line));
}
.row-delete:hover { background: var(--danger-soft); }
.row-delete-spacer { display: block; width: calc(0.75rem + 76px); }
.player-row {
  width: 100%; display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 0.25rem 1rem; align-items: center;
  text-align: left; background: none; border: 0; border-radius: 0; padding: 0.85rem 1rem; color: var(--ink); min-height: 64px;
}
.player-row:hover { background: color-mix(in srgb, var(--accent-soft) 60%, transparent); }
.pr-name { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pr-meta { grid-column: 1; color: var(--muted); font-size: 0.875rem; font-weight: 400; }
.pr-status { grid-row: 1 / span 2; grid-column: 2; display: flex; flex-direction: column; align-items: flex-end; gap: 0.25rem; }
.status.won { background: color-mix(in srgb, var(--stub) 45%, var(--surface)); color: var(--stub-ink); }
:root[data-theme="dark"] .status.won { background: #4a3a10; color: var(--stub); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .status.won { background: #4a3a10; color: var(--stub); } }

/* ----- Player dialog ----- */

.player-dialog { width: min(640px, calc(100vw - 1.5rem)); max-width: none; max-height: calc(100dvh - 1.5rem); overflow-y: auto; }
.pd-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 1rem; margin-bottom: 1rem; }
.pd-head h2 { font-size: 1.5rem; margin-bottom: 0.25rem; }
.pd-head p { margin: 0; }
.pd-question { font-weight: 650; font-size: 1.125rem; margin-bottom: 0.75rem; }

.prize-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 0.6rem; margin-bottom: 0.6rem; }
.prize-btn {
  display: flex; flex-direction: column; align-items: flex-start; gap: 0.15rem;
  min-height: 84px; padding: 0.8rem 1rem; text-align: left;
  background: var(--stub); color: var(--stub-ink); border: 0;
}
.prize-btn .pb-name { font-size: 1.125rem; font-weight: 700; }
.prize-btn .pb-left { font-size: 0.875rem; font-weight: 550; }
.prize-btn:disabled { background: var(--line); color: var(--muted); cursor: not-allowed; opacity: 1; }
.no-prize { margin-bottom: 0.75rem; }
.pd-edit { margin-top: 0.75rem; border-top: 1px solid var(--line); padding-top: 1rem; }

.confirm-title { font-size: 1.5rem; font-weight: 750; margin-bottom: 0.25rem; }
.confirm-actions { display: grid; grid-template-columns: 1fr 2fr; gap: 0.6rem; }

/* The issued voucher, styled like the ticket on the admin page */
.voucher-card { background: var(--stub); color: var(--stub-ink); border-radius: 14px; padding: 1.25rem; margin-bottom: 0.75rem; }
.vc-prize { font-size: 1.25rem; font-weight: 700; margin-bottom: 0.25rem; }
.vc-serial { font-size: clamp(1.4rem, 4.5vw, 2rem); font-weight: 750; letter-spacing: 0.03em; font-variant-numeric: tabular-nums; margin-bottom: 0.25rem; overflow-wrap: anywhere; }
.vc-meta { margin-bottom: 1rem; }
.channel { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); gap: 0.5rem; margin-bottom: 0.5rem; }
.channel > [hidden] { display: none !important; }
.button-link.wa, .channel .mail {
  display: flex; align-items: center; justify-content: center; min-height: 52px; font-size: 1.0625rem; font-weight: 600;
  border-radius: var(--radius); border: 0; text-decoration: none; padding: 0.5rem 0.75rem;
}
.button-link.wa { background: #1f7a4d; color: #ffffff; }
.channel .mail { background: #2b3a8c; color: #ffffff; }
.channel .mark { min-height: 52px; }
.vc-email-to { font-size: 0.875rem; margin: -0.15rem 0 0.5rem; overflow-wrap: anywhere; }
.vc-email-to:empty { display: none; }
.add-email { margin: 0.25rem 0 0.5rem; }
.add-email label { font-size: 0.9rem; }
.add-email-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 0.5rem; }
.add-email-row input { background: #ffffff; color: #142321; }
.add-email-row .ghost { color: var(--stub-ink); border: 1px solid var(--stub-ink); background: transparent; }
button.link.vc-add-toggle { color: var(--stub-ink); padding-left: 0; margin-bottom: 0.5rem; }
#vc-email-row:has(#vc-email-sent[hidden]) { grid-template-columns: 1fr; }
.vc-actions { display: grid; grid-template-columns: repeat(2, 1fr); gap: 0.5rem; margin-top: 0.25rem; }
.vc-actions .ghost, .vc-actions .button-link.ghost { color: var(--stub-ink); border: 1px solid var(--stub-ink); background: transparent; display: flex; align-items: center; justify-content: center; padding: 0.55rem 0.5rem; min-height: 48px; font-size: 0.95rem; }
#vc-sent[aria-pressed="true"], #vc-email-sent[aria-pressed="true"] { background: var(--stub-ink); color: var(--stub); }
.channel .ghost.mark { color: var(--stub-ink); border: 1px solid var(--stub-ink); background: transparent; }
@media (max-width: 480px) { .channel { grid-template-columns: 1fr; } }
.no-prize-text { font-size: 1.125rem; font-weight: 600; }
#pd-undo { padding-left: 0; }

/* Edit / delete */
.pd-edit h3 { font-size: 1.0625rem; margin: 0 0 0.75rem; }
.pd-edit-actions { display: grid; grid-template-columns: 1fr 2fr; gap: 0.5rem; }
.pd-footer { display: flex; gap: 0.5rem; justify-content: space-between; flex-wrap: wrap; margin-top: 1rem; padding-top: 1rem; border-top: 1px solid var(--line); }
.pd-footer:not(:has(button:not([hidden]))) { display: none; }
.danger-outline { color: var(--danger); border-color: color-mix(in srgb, var(--danger) 50%, var(--line)); }

#list-message { margin-bottom: 0.75rem; }

.vc-code { font-family: ui-monospace, Menlo, Consolas, monospace; font-weight: 700; margin: -0.6rem 0 1rem; overflow-wrap: anywhere; }
.vc-code:empty { display: none; }
