/* Oktoberfest bestelsite
   Kleuren komen uit de bestaande huisstijl van Feest van Harry:
   rood #e30613, donkerblauw #1f244c, crème #faefb5. */

:root {
  --blauw: #1f244c;
  --blauw-diep: #151935;
  --rood: #e30613;
  --rood-diep: #b4040f;
  --creme: #faefb5;
  --zand: #f6f1e4;
  --wit: #ffffff;
  --grijs: #6b6f85;
  --lijn: rgba(31, 36, 76, 0.14);
  --groen: #1c7a4a;
  --oranje: #c96a1a;

  --rond: 14px;
  --rond-klein: 10px;
  --schaduw: 0 2px 10px rgba(21, 25, 53, 0.10);
  --schaduw-op: 0 8px 28px rgba(21, 25, 53, 0.22);

  --tekst: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --veilig-onder: env(safe-area-inset-bottom, 0px);
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  font-family: var(--tekst);
  font-size: 17px;
  line-height: 1.45;
  color: var(--blauw);
  background: var(--zand);
  -webkit-tap-highlight-color: transparent;
}

h1, h2, h3 { line-height: 1.15; margin: 0; font-weight: 800; letter-spacing: -0.01em; }

a { color: var(--rood); }

img { max-width: 100%; height: auto; display: block; }

button { font: inherit; color: inherit; }


/* ---------------------------------------------------------------- knoppen */

.knop {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4em;
  min-height: 48px;
  padding: 0 1.1rem;
  border: 0;
  border-radius: var(--rond-klein);
  background: var(--rood);
  color: var(--wit);
  font-weight: 700;
  cursor: pointer;
  text-decoration: none;
  transition: background 0.15s, transform 0.08s;
}

.knop:hover { background: var(--rood-diep); }
.knop:active { transform: translateY(1px); }
.knop:disabled { opacity: 0.55; cursor: default; }

.knop-groot { min-height: 56px; padding: 0 1.6rem; font-size: 1.05rem; }

.knop-stil {
  background: transparent;
  color: var(--blauw);
  border: 2px solid var(--lijn);
}
.knop-stil:hover { background: rgba(31, 36, 76, 0.06); }
.knop-stil.is-aan { background: var(--blauw); color: var(--wit); border-color: var(--blauw); }

.knop-tussen { background: var(--oranje); }
.knop-tussen:hover { background: #a85713; }

.knop-waarschuw { background: var(--groen); }
.knop-waarschuw:hover { background: #156138; }

:where(button, a, input, [tabindex]):focus-visible {
  outline: 3px solid var(--blauw);
  outline-offset: 2px;
}


/* ---------------------------------------------------------------- bestelpagina */

.kop {
  position: sticky;
  top: 0;
  z-index: 20;
  background: var(--blauw);
  color: var(--wit);
  padding: 0.75rem 1rem 0.65rem;
  box-shadow: var(--schaduw);
}

/* de blauw-witte ruit van het Beierse wimpelbandje */
.kop::after {
  content: "";
  position: absolute;
  inset: auto 0 -6px 0;
  height: 6px;
  background:
    repeating-linear-gradient(135deg, #2a63c7 0 10px, #ffffff 10px 20px);
  opacity: 0.9;
}

.kop-binnen {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  max-width: 720px;
  margin: 0 auto;
}

.kop-merk { margin: 0; font-weight: 800; font-size: 1.05rem; letter-spacing: 0.01em; }

.kop-team {
  max-width: 720px;
  margin: 0.2rem auto 0;
  font-size: 0.85rem;
  color: var(--creme);
}

.tafelknop {
  display: flex;
  align-items: baseline;
  gap: 0.4rem;
  min-height: 44px;
  padding: 0.25rem 0.8rem;
  border: 2px solid rgba(255, 255, 255, 0.35);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  color: var(--wit);
  cursor: pointer;
}
.tafelknop:hover { background: rgba(255, 255, 255, 0.18); }
.tafelknop-label { font-size: 0.8rem; opacity: 0.8; }
.tafelknop-nummer { font-size: 1.15rem; font-weight: 800; }

.kaart { max-width: 720px; margin: 0 auto; padding: 1rem 1rem 2rem; }

body.heeft-balk .kaart { padding-bottom: calc(6rem + var(--veilig-onder)); }

.groep + .groep { margin-top: 1.75rem; }

.groep-kop {
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--grijs);
  margin-bottom: 0.6rem;
}

.producten { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.6rem; }

.product {
  display: grid;
  grid-template-columns: 64px 1fr auto;
  align-items: center;
  gap: 0.7rem;
  padding: 0.55rem 0.65rem;
  background: var(--wit);
  border: 2px solid transparent;
  border-radius: var(--rond);
  box-shadow: var(--schaduw);
  transition: border-color 0.15s, box-shadow 0.15s;
}

.product.is-gekozen {
  border-color: var(--rood);
  box-shadow: 0 4px 16px rgba(227, 6, 19, 0.18);
}

.product-beeld {
  width: 64px;
  aspect-ratio: 1;
  display: grid;
  place-items: center;
  background: var(--zand);
  border-radius: var(--rond-klein);
  overflow: hidden;
}
.product-beeld img { width: 100%; height: 100%; object-fit: contain; }

.product-naam { font-size: 0.98rem; text-wrap: balance; }
.product-uitleg { margin: 0.1rem 0 0; font-size: 0.85rem; color: var(--grijs); }
.product-prijs { margin: 0.2rem 0 0; font-weight: 700; color: var(--rood); }

.teller { display: flex; align-items: center; gap: 0.1rem; }

.teller-knop {
  width: 46px;
  height: 46px;
  border: 2px solid var(--lijn);
  border-radius: 50%;
  background: var(--wit);
  font-size: 1.35rem;
  font-weight: 700;
  line-height: 1;
  cursor: pointer;
  display: grid;
  place-items: center;
}
.teller-knop:disabled { opacity: 0.3; cursor: default; }
.teller-plus { background: var(--rood); border-color: var(--rood); color: var(--wit); }
.teller-plus:hover { background: var(--rood-diep); }

.teller-getal {
  min-width: 2ch;
  text-align: center;
  font-weight: 800;
  font-size: 1.1rem;
  font-variant-numeric: tabular-nums;
}

.kaart-voet {
  margin-top: 2rem;
  text-align: center;
  font-size: 0.9rem;
  color: var(--grijs);
}
.kaart-voet a { display: inline-block; margin-left: 0.35rem; }

.balk {
  position: fixed;
  inset: auto 0 0 0;
  z-index: 30;
  background: var(--blauw);
  color: var(--wit);
  padding: 0.7rem 1rem calc(0.7rem + var(--veilig-onder));
  box-shadow: 0 -4px 20px rgba(21, 25, 53, 0.28);
}

.balk-binnen {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  max-width: 720px;
  margin: 0 auto;
}

.balk-telling { margin: 0; font-weight: 700; font-variant-numeric: tabular-nums; }


/* ---------------------------------------------------------------- vensters */

.venster {
  border: 0;
  border-radius: var(--rond);
  padding: 0;
  max-width: 480px;
  width: calc(100% - 2rem);
  box-shadow: var(--schaduw-op);
  color: var(--blauw);
}
.venster::backdrop { background: rgba(21, 25, 53, 0.65); }

.venster-binnen { padding: 1.4rem; }
.venster-midden { text-align: center; }
.venster h2 { font-size: 1.3rem; margin-bottom: 0.35rem; }
.venster-uitleg { margin: 0 0 1rem; color: var(--grijs); font-size: 0.92rem; }

.tafelrooster {
  list-style: none;
  margin: 0 0 1.1rem;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(88px, 1fr));
  gap: 0.5rem;
}

.tafelvak {
  width: 100%;
  min-height: 72px;
  padding: 0.5rem 0.3rem;
  border: 2px solid var(--lijn);
  border-radius: var(--rond-klein);
  background: var(--wit);
  cursor: pointer;
  display: grid;
  align-content: center;
  gap: 0.15rem;
}
.tafelvak:hover { border-color: var(--blauw); }
.tafelvak.is-gekozen { border-color: var(--rood); background: #fff4f4; }
.tafelvak-nummer { font-size: 1.5rem; font-weight: 800; line-height: 1; }
.tafelvak-team {
  font-size: 0.72rem;
  color: var(--grijs);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* het controlescherm: overzicht, naam, bevestigen */

.overzicht {
  list-style: none;
  margin: 0 0 0.2rem;
  padding: 0.7rem 0;
  border-top: 1px solid var(--lijn);
  border-bottom: 1px solid var(--lijn);
}

.overzicht li {
  display: grid;
  grid-template-columns: 2.8ch 1fr auto;
  gap: 0.6rem;
  padding: 0.22rem 0;
}

.overzicht-aantal { font-weight: 800; color: var(--rood); font-variant-numeric: tabular-nums; }
.overzicht-naam { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.overzicht-prijs { font-variant-numeric: tabular-nums; color: var(--grijs); }

.overzicht-totaal {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin: 0 0 1.1rem;
  color: var(--grijs);
  font-size: 0.92rem;
}
.overzicht-totaal strong { font-size: 1.25rem; color: var(--blauw); font-variant-numeric: tabular-nums; }

.veldlabel { display: block; font-weight: 700; font-size: 0.9rem; margin-bottom: 0.3rem; }

.veld {
  width: 100%;
  min-height: 52px;
  padding: 0 0.8rem;
  border: 2px solid var(--lijn);
  border-radius: var(--rond-klein);
  font: inherit;
  background: var(--wit);
  color: var(--blauw);
}
.veld:focus { border-color: var(--blauw); outline: none; }
.veld.is-fout { border-color: var(--rood); background: #fff6f6; }

.veldhulp { margin: 0.35rem 0 1.1rem; font-size: 0.85rem; color: var(--grijs); }
.veldhulp.is-fout { color: var(--rood); font-weight: 600; }

.knop-vol { width: 100%; }
.knop-vol + .knop-vol { margin-top: 0.5rem; }

.vinkje {
  margin: 0 auto 0.5rem;
  width: 64px;
  height: 64px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--groen);
  color: var(--wit);
  font-size: 2rem;
  font-weight: 700;
}

.bevestig-tekst { color: var(--grijs); margin: 0 0 1.2rem; }


/* ---------------------------------------------------------------- meldingen */

.melding {
  margin: 0;
  padding: 0.8rem 1rem;
  text-align: center;
  font-weight: 600;
}

.melding-dicht { background: var(--creme); color: #6b4a00; }

.melding-zwevend {
  position: fixed;
  left: 50%;
  bottom: calc(6rem + var(--veilig-onder));
  z-index: 40;
  transform: translate(-50%, 1rem);
  max-width: min(420px, calc(100% - 2rem));
  background: var(--blauw);
  color: var(--wit);
  border-radius: var(--rond-klein);
  box-shadow: var(--schaduw-op);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s, transform 0.2s;
}
.melding-zwevend.is-zichtbaar { opacity: 1; transform: translate(-50%, 0); }


/* ---------------------------------------------------------------- inloggen */

body.smal { display: grid; place-items: center; min-height: 100vh; }

.inlog {
  width: min(360px, calc(100% - 2rem));
  padding: 1.75rem;
  background: var(--wit);
  border-radius: var(--rond);
  box-shadow: var(--schaduw);
}
.inlog h1 { font-size: 1.3rem; margin-bottom: 1rem; }
.inlog label { display: block; font-size: 0.85rem; color: var(--grijs); margin-bottom: 0.3rem; }
.inlog input {
  width: 100%;
  min-height: 48px;
  padding: 0 0.8rem;
  margin-bottom: 0.9rem;
  border: 2px solid var(--lijn);
  border-radius: var(--rond-klein);
  font: inherit;
}
.inlog button { width: 100%; }
.fout { color: var(--rood); font-size: 0.9rem; min-height: 1.2em; margin: 0.6rem 0 0; }


/* ---------------------------------------------------------------- barscherm */

body.bar { background: var(--blauw-diep); color: var(--wit); }

.barkop {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.85rem 1.1rem;
  background: var(--blauw);
  box-shadow: var(--schaduw);
}
.barkop h1 { font-size: 1.25rem; display: flex; align-items: center; gap: 0.6rem; }

.barkop-tel {
  min-width: 2.2ch;
  padding: 0.05em 0.45em;
  border-radius: 999px;
  background: var(--rood);
  font-variant-numeric: tabular-nums;
  text-align: center;
}

.barkop-knoppen { display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem; }
.barkop .knop-stil { color: var(--wit); border-color: rgba(255, 255, 255, 0.3); }
.barkop .knop-stil:hover { background: rgba(255, 255, 255, 0.12); }
.barkop .knop-stil.is-aan { background: var(--wit); color: var(--blauw); }
.inline { display: inline; margin: 0; }

.schakel { display: inline-flex; align-items: center; gap: 0.4rem; font-size: 0.9rem; }
.schakel input { width: 20px; height: 20px; accent-color: var(--rood); }

.barlijst {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 0.85rem;
  padding: 1.1rem;
  align-items: start;
}
.barlijst.is-offline { opacity: 0.5; }

.bon {
  background: var(--wit);
  color: var(--blauw);
  border-radius: var(--rond);
  padding: 0.9rem 1rem 0.8rem;
  border-left: 8px solid var(--rood);
  box-shadow: var(--schaduw);
}
.bon.is-onderweg { border-left-color: var(--oranje); }
.bon.is-geleverd, .bon.is-geannuleerd { border-left-color: var(--lijn); opacity: 0.55; }
.bon.is-bezig { opacity: 0.45; }

.bon.is-vers { animation: verschijn 0.9s ease-out; }
@keyframes verschijn {
  from { box-shadow: 0 0 0 4px var(--rood); transform: scale(0.99); }
  to   { box-shadow: var(--schaduw); transform: none; }
}

.bon-kop { display: flex; align-items: flex-start; justify-content: space-between; gap: 0.75rem; }
.bon-tafel { margin: 0; font-size: 2.1rem; font-weight: 800; line-height: 1; }
.bon-tafel-label {
  display: block;
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--grijs);
}
.bon-meta { text-align: right; }
.bon-tijd { margin: 0; font-size: 0.85rem; color: var(--grijs); font-variant-numeric: tabular-nums; }
.bon-nummer { margin: 0.1rem 0 0; font-size: 0.78rem; color: var(--grijs); }
.bon-besteller { margin: 0.35rem 0 0; font-size: 1.05rem; font-weight: 700; }
.bon-team { margin: 0.1rem 0 0; font-size: 0.85rem; font-weight: 700; color: var(--rood); }

.bon-regels { list-style: none; margin: 0.7rem 0; padding: 0.7rem 0; border-top: 1px solid var(--lijn); border-bottom: 1px solid var(--lijn); }
.bon-regels li { display: flex; gap: 0.6rem; padding: 0.18rem 0; font-size: 1.05rem; }
.regel-aantal { min-width: 2.6ch; font-weight: 800; font-variant-numeric: tabular-nums; color: var(--rood); }

.bon-totaal { margin: 0 0 0.6rem; font-weight: 700; font-size: 0.92rem; }

/* Twee kleine knoppen naast elkaar, Geleverd eronder over de volle breedte.
   Dat is de knop die de hele avond geraakt wordt, dus die is de grootste. */
.bon-acties {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.35rem;
}
.bon-acties .knop { min-height: 48px; padding: 0 0.6rem; font-size: 0.92rem; }
.bon-acties .knop:last-child { grid-column: 1 / -1; font-weight: 800; }

.leeg { grid-column: 1 / -1; text-align: center; padding: 3rem 1rem; color: rgba(255, 255, 255, 0.6); }


/* ---------------------------------------------------------------- scorebord */

body.scorebord {
  background: var(--blauw-diep);
  color: var(--wit);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
body.scorebord.is-offline { opacity: 0.6; }

.scorekop { text-align: center; padding: 1.6rem 1rem 0.9rem; }
.scorekop h1 { font-size: clamp(1.8rem, 5vw, 3.2rem); }
.scorekop-onder { margin: 0.3rem 0 0; color: var(--creme); font-size: clamp(0.9rem, 1.6vw, 1.15rem); }

.scoremidden {
  flex: 1;
  display: flex;
  align-items: center;
  padding: 0 clamp(1rem, 4vw, 3rem);
}

.ranglijst {
  list-style: none;
  margin: 0 auto;
  padding: 0;
  width: 100%;
  max-width: 1100px;
  display: grid;
  gap: clamp(0.4rem, 0.9vh, 0.9rem);
}

.rang {
  display: grid;
  grid-template-columns: auto minmax(8ch, 1fr) minmax(0, 2fr) auto;
  align-items: center;
  gap: clamp(0.6rem, 2vw, 1.4rem);
  padding: clamp(0.5rem, 1.4vw, 0.9rem) clamp(0.7rem, 2vw, 1.2rem);
  background: rgba(255, 255, 255, 0.07);
  border-radius: var(--rond);
  transition: background 0.3s;
}
.rang.is-podium { background: rgba(255, 255, 255, 0.13); }
.rang.is-plek1 { background: rgba(250, 239, 181, 0.18); box-shadow: inset 0 0 0 2px var(--creme); }
.rang.is-gestegen { animation: oplichten 1.4s ease-out; }
@keyframes oplichten {
  0%   { background: rgba(227, 6, 19, 0.45); }
  100% { background: rgba(255, 255, 255, 0.07); }
}

.rang-plek {
  width: clamp(2rem, 4vw, 3rem);
  font-size: clamp(1.2rem, 3vw, 2.2rem);
  font-weight: 800;
  text-align: center;
  color: var(--creme);
  font-variant-numeric: tabular-nums;
}
.is-plek1 .rang-plek { color: #ffd84d; }

.rang-tekst { min-width: 0; }
.rang-team {
  display: block;
  font-size: clamp(1rem, 2.6vw, 1.9rem);
  font-weight: 800;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.rang-tafel { display: block; font-size: clamp(0.7rem, 1.3vw, 0.95rem); color: rgba(255, 255, 255, 0.6); }

.rang-balk { height: clamp(10px, 1.6vw, 18px); border-radius: 999px; background: rgba(255, 255, 255, 0.12); overflow: hidden; }
.rang-vulling {
  display: block;
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--rood), #ff6b3d);
  transition: width 0.8s cubic-bezier(0.22, 1, 0.36, 1);
}

.rang-stuks {
  font-size: clamp(1.3rem, 3.4vw, 2.6rem);
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  min-width: 3ch;
  text-align: right;
}

.scorevoet {
  padding: 1.2rem clamp(1rem, 4vw, 3rem) 1.6rem;
  text-align: center;
  color: rgba(255, 255, 255, 0.7);
}
.scorevoet strong { color: var(--wit); font-size: 1.25em; font-variant-numeric: tabular-nums; }
.scorevoet-stand { margin: 0.3rem 0 0; font-size: 0.8rem; opacity: 0.6; }

body.scorebord .leeg { color: rgba(255, 255, 255, 0.55); }


/* ---------------------------------------------------------------- beheer */

body.beheer { background: var(--zand); }

.beheer-binnen { max-width: 880px; margin: 0 auto; padding: 1.25rem 1rem 3rem; }
.beheer-binnen h1 { font-size: 1.4rem; margin-bottom: 0.25rem; }
.beheer-kop { display: flex; flex-wrap: wrap; gap: 0.5rem; justify-content: space-between; align-items: center; margin-bottom: 1.25rem; }

.blok {
  background: var(--wit);
  border-radius: var(--rond);
  padding: 1.1rem;
  box-shadow: var(--schaduw);
  margin-bottom: 1.1rem;
}
.blok h2 { font-size: 1.05rem; margin-bottom: 0.2rem; }
.blok-uitleg { margin: 0 0 0.9rem; font-size: 0.88rem; color: var(--grijs); }

.tabel { width: 100%; border-collapse: collapse; font-size: 0.92rem; }
.tabel th { text-align: left; font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.08em; color: var(--grijs); padding: 0 0.4rem 0.4rem; }
.tabel td { padding: 0.3rem 0.4rem; border-top: 1px solid var(--lijn); }
.tabel input[type="text"], .tabel input[type="number"] {
  width: 100%;
  min-height: 40px;
  padding: 0 0.5rem;
  border: 2px solid var(--lijn);
  border-radius: 8px;
  font: inherit;
}
.tabel input[type="checkbox"] { width: 22px; height: 22px; accent-color: var(--rood); }
.tabel .smal-veld { width: 6.5rem; }

.gelukt { background: #e6f5ec; color: var(--groen); padding: 0.7rem 1rem; border-radius: var(--rond-klein); margin: 0 0 1rem; font-weight: 600; }

.qr-rooster { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 1rem; }
.qr-vak { text-align: center; border: 2px solid var(--lijn); border-radius: var(--rond-klein); padding: 0.9rem; background: var(--wit); }
.qr-vak img, .qr-vak svg { width: 100%; height: auto; }
.qr-vak p { margin: 0.5rem 0 0; font-weight: 800; font-size: 1.1rem; }
.qr-vak small { color: var(--grijs); font-weight: 400; display: block; }

@media print {
  body.beheer { background: var(--wit); }
  .beheer-kop, .blok:not(.blok-qr), .knop { display: none !important; }
  .blok-qr { box-shadow: none; padding: 0; }
  .qr-rooster { grid-template-columns: repeat(3, 1fr); }
  .qr-vak { break-inside: avoid; border-color: #ccc; }
}


/* ---------------------------------------------------------------- klein scherm */

@media (max-width: 380px) {
  .product { grid-template-columns: 60px 1fr auto; gap: 0.6rem; padding: 0.5rem; }
  .product-beeld { width: 60px; }
  .teller-knop { width: 40px; height: 40px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}
