/* NFC Pay — matches the noordhoekfc.co.za design system. Dark only; orange is the only accent. */

@font-face {
  font-family: "Geist";
  font-style: normal;
  font-weight: 500 800;
  font-display: swap;
  src: url(../fonts/geist-latin-ext.woff2) format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "Geist";
  font-style: normal;
  font-weight: 500 800;
  font-display: swap;
  src: url(../fonts/geist-latin.woff2) format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
  --bg: #050D18;
  --panel: #0A1628;
  --panel-2: #0F1F3A;
  --navy: #001A41;
  --navy-2: #012C68;
  --orange: #F97316;
  --orange-2: #EA580C;
  --ink: #FFFFFF;
  --muted: #9AA8BD;
  --line: rgba(255, 255, 255, .12);
  --field: rgba(255, 255, 255, .06);
  --ok: #22C55E;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  min-height: 100vh;
  min-height: 100dvh;
  background: var(--bg);
  color: var(--ink);
  font-family: "Geist", -apple-system, "Segoe UI", Helvetica, Arial, sans-serif;
  font-weight: 500;
  line-height: 1.45;
}

/* One column. On a phone it fills the screen like the mockup's phone screen; on desktop it is
   a 420px panel centred on the page background. */
.col {
  max-width: 420px;
  margin: 0 auto;
  min-height: 100vh;
  min-height: 100dvh;
  background: var(--panel);
  padding: 16px 20px 24px;
  display: flex;
  flex-direction: column;
  gap: 11px;
}
@media (min-width: 480px) {
  body { padding: 40px 16px; }
  .col {
    min-height: 0;
    border: 1px solid var(--line);
    border-radius: 22px;
    padding: 24px 24px 22px;
  }
}

.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

:focus-visible { outline: 3px solid var(--orange); outline-offset: 2px; }

/* Badge + wordmark. Clear space around the badge is at least a quarter of its width. */
.crest { display: flex; align-items: center; gap: 10px; color: var(--ink); text-decoration: none; align-self: flex-start; }
.crest img { width: 36px; height: 36px; flex: none; margin: 0; }
.crest span { font-weight: 800; font-size: 13px; letter-spacing: .04em; }

.lead {
  font-size: 24px;
  font-weight: 800;
  line-height: 1.08;
  letter-spacing: -.02em;
  margin: 4px 0 0;
}
.lead em { font-style: normal; color: var(--orange); display: block; }
.sub { margin: -4px 0 0; color: var(--muted); font-size: 13px; }

form { display: flex; flex-direction: column; gap: 11px; margin: 0; }
fieldset { border: 0; margin: 0; padding: 0; min-width: 0; display: flex; flex-direction: column; gap: 8px; }

/* Tiers */
.tiers { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.tier {
  display: block;
  border: 1.5px solid var(--line);
  border-radius: 14px;
  padding: 11px 4px;
  text-align: center;
  cursor: pointer;
  background: var(--field);
  color: var(--ink);
  user-select: none;
  -webkit-tap-highlight-color: transparent;
}
.tier em { display: block; font-style: normal; font-weight: 800; font-size: 16px; letter-spacing: -.01em; line-height: 1.2; }
.tier small { display: block; color: var(--muted); font-size: 11px; margin-top: 2px; line-height: 1.3; }
.tier-input:checked + .tier { border-color: var(--orange); background: rgba(249, 115, 22, .14); }
.tier-input:checked + .tier small { color: var(--orange); }
.tier-input:focus-visible + .tier { outline: 3px solid var(--orange); outline-offset: 2px; }
/* A typed amount wins over the tiers, so show the tiers as unselected */
.amount:has(.other:not(:placeholder-shown)) .tier-input:checked + .tier { border-color: var(--line); background: var(--field); }
.amount:has(.other:not(:placeholder-shown)) .tier-input:checked + .tier small { color: var(--muted); }
@media (prefers-reduced-motion: no-preference) {
  .tier, .other { transition: background .15s, border-color .15s; }
}

.field, .other {
  width: 100%;
  font: inherit;
  font-size: 14px;
  color: var(--ink);
  background: var(--field);
  border: 1.5px solid var(--line);
  border-radius: 12px;
  padding: 10px 12px;
  min-height: 42px;
  -webkit-appearance: none;
  appearance: none;
}
/* 16px on touch screens stops iOS zooming into the field */
@media (hover: none) and (pointer: coarse) { .field, .other { font-size: 16px; } }
.field::placeholder, .other::placeholder { color: var(--muted); opacity: 1; }
.other { border-style: dashed; background: transparent; }
.other:not(:placeholder-shown) { border-style: solid; border-color: var(--orange); background: rgba(249, 115, 22, .14); }
.field[aria-invalid="true"], .other[aria-invalid="true"] { border-color: rgba(255, 255, 255, .55); }

.impact { font-size: 12.5px; color: var(--muted); margin: 0; min-height: 2.9em; }

.error { margin: 0 0 -5px; font-size: 12.5px; color: var(--ink); display: flex; gap: 6px; align-items: baseline; }
.error::before { content: "!"; flex: none; display: inline-grid; place-items: center; width: 15px; height: 15px; border-radius: 50%; background: var(--ink); color: var(--panel); font-size: 10px; font-weight: 800; transform: translateY(2px); }

.notice { margin: 0; padding: 10px 12px; border: 1.5px solid var(--line); border-radius: 12px; background: var(--panel-2); font-size: 13px; }

/* Buttons are pills */
.btn {
  display: block;
  width: 100%;
  min-height: 48px;
  border-radius: 999px;
  padding: 8px 16px;
  text-align: center;
  font: inherit;
  font-weight: 700;
  font-size: 15px;
  line-height: 1.25;
  cursor: pointer;
  text-decoration: none;
  border: 1.5px solid transparent;
  color: var(--ink);
  background: transparent;
}
.btn small { display: block; font-weight: 500; font-size: 11px; opacity: .85; margin-top: 1px; }
.btn.primary { background: var(--orange); border-color: var(--orange); }
.btn.primary:hover, .btn.primary:active { background: var(--orange-2); border-color: var(--orange-2); }
.btn.second { border-color: rgba(255, 255, 255, .35); }
.btn.second:hover { border-color: rgba(255, 255, 255, .6); background: var(--field); }
.btn[disabled], .btn.htmx-request { opacity: .7; cursor: progress; }
.btn:only-child { display: grid; place-items: center; }

.linkish {
  background: none; border: 0; padding: 4px; margin: 0 auto;
  font: inherit; font-size: 12px; color: var(--muted); cursor: pointer;
  text-decoration: underline; text-underline-offset: 3px;
}
.linkish:hover { color: var(--ink); }
a { color: inherit; }

/* Manual EFT panel */
.eft-panel { border: 1.5px solid var(--line); border-radius: 14px; background: var(--panel-2); padding: 14px; display: flex; flex-direction: column; gap: 10px; }
.eft-panel h2 { margin: 0; font-size: 12px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; }
.eft-panel p { margin: 0; font-size: 13px; color: var(--muted); }
.eft-panel dl { margin: 0; display: grid; grid-template-columns: auto 1fr; gap: 4px 12px; font-size: 13px; }
.eft-panel dt { color: var(--muted); }
.eft-panel dd { margin: 0; font-weight: 700; overflow-wrap: anywhere; }
.copy { display: flex; gap: 8px; }
.copy input { flex: 1; min-width: 0; font-weight: 700; letter-spacing: .04em; }
.copy button { flex: none; width: auto; min-height: 42px; padding: 6px 16px; font-size: 13px; }

.foot { margin-top: auto; padding-top: 14px; border-top: 1px solid var(--line); font-size: 12px; color: var(--muted); }
.foot p { margin: 0; }
.foot a { text-underline-offset: 3px; }

/* Thank-you screen */
.thanks { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; gap: 12px; padding: 12px 0; }
.thanks .badge { width: 64px; height: 64px; margin: 8px auto 12px; }
.tick { width: 64px; height: 64px; border-radius: 50%; background: rgba(34, 197, 94, .15); display: grid; place-items: center; }
.tick svg { width: 32px; height: 32px; }
.wait { width: 64px; height: 64px; border-radius: 50%; border: 1.5px solid var(--line); display: grid; place-items: center; }
.wait i { width: 22px; height: 22px; border-radius: 50%; border: 3px solid var(--line); border-top-color: var(--ink); display: block; }
@media (prefers-reduced-motion: no-preference) { .wait i { animation: spin .9s linear infinite; } }
@keyframes spin { to { transform: rotate(360deg); } }
.amount-head { margin: 4px 0 0; font-size: 40px; font-weight: 800; letter-spacing: -.03em; line-height: 1.05; }
.thanks h1.plain { margin: 4px 0 0; font-size: 24px; font-weight: 800; letter-spacing: -.02em; line-height: 1.1; }
.thanks .tier-line { margin: -4px 0 0; color: var(--muted); font-size: 14px; }
.thanks p.msg { margin: 0; color: var(--muted); font-size: 14px; max-width: 30ch; }
.thanks .actions { width: 100%; display: flex; flex-direction: column; gap: 10px; margin-top: 10px; }
.thanks .back { font-size: 12px; color: var(--muted); text-underline-offset: 3px; }

/* Admin */
.admin { max-width: 1200px; margin: 0 auto; padding: 24px 16px 48px; }
.admin h1 { font-size: 18px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; margin: 16px 0 4px; }
.admin .bar { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin: 12px 0 16px; font-size: 13px; }
.admin .bar a, .admin .bar button { border: 1.5px solid var(--line); border-radius: 999px; padding: 6px 12px; text-decoration: none; color: var(--ink); background: var(--field); font: inherit; font-size: 13px; cursor: pointer; }
.admin .bar a[aria-current="true"] { border-color: var(--orange); }
.admin .bar .spacer { flex: 1; }
.admin .table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: 14px; }
.admin table { border-collapse: collapse; width: 100%; font-size: 13px; }
.admin th, .admin td { text-align: left; padding: 8px 10px; border-bottom: 1px solid var(--line); white-space: nowrap; }
.admin th { color: var(--muted); font-weight: 700; background: var(--panel); position: sticky; top: 0; }
.admin td.num { text-align: right; font-variant-numeric: tabular-nums; }
.admin .muted { color: var(--muted); }
.admin form { display: inline; }
.status { width: 100%; display: flex; flex-direction: column; align-items: center; gap: 12px; }
