/* ===========================================================
   Fætter Aarhus – billetsystem
   TEMA: ret farver og skrift her, så det matcher hjemmesiden.
   =========================================================== */
/* Samme farver og skrift som faetteraarhus.dk (Lato hentes fra Google Fonts i Views::page()).
   Hjemmesiden har ingen mørk tilstand, så det har billetsiderne heller ikke. */
:root {
  --font: "Lato", system-ui, -apple-system, BlinkMacSystemFont, "Helvetica Neue", Arial, sans-serif;
  --font-heading: var(--font);
  --bg: #ece8da;         /* hjemmesidens baggrund */
  --card: #f5f2e8;       /* lidt lysere end baggrunden */
  --ink: #7d1d11;        /* hjemmesidens tekstfarve */
  --heading: #4e0b02;    /* mørk rød til overskrifter */
  --muted: #9a5b4f;
  --line: #d8cfba;
  --brand: #7d1d11;      /* knapper, links, datoer (som Take away-knappen) */
  --brand-ink: #ece8da;  /* tekst på knapper */
  --sand: #edd5a7;
  --ok: #2f6b2f;
  --bad: #b3261e;
  --warn: #8a5a00;
  --radius: 1rem;        /* som menukortene */
  --btn-radius: .5rem;   /* som Take away-knappen */
  --logo-height: 50px;   /* som .logo på hjemmesiden (inkl. 20px padding-top) */
}
:root { color-scheme: light }

/* ---------- Grundlag ---------- */
* { box-sizing: border-box }
body { margin: 0; background: var(--bg); color: var(--ink); font: 16px/1.5 var(--font) }
a { color: var(--brand) }
h1, h2, h3 { font-family: var(--font-heading); color: var(--heading) }
h1 { font-size: 30px; font-weight: 600; line-height: 1.15; margin: 8px 0 6px; letter-spacing: -.03em }
h2 { font-weight: 600 }
h2 { font-size: 20px; margin: 28px 0 10px }
main { max-width: 880px; margin: 0 auto; padding: 8px 16px 48px }
.muted { color: var(--muted) }
.small { font-size: 13px }
.center { text-align: center }

/* ---------- Top (samme header som hjemmesiden) ---------- */
.site-header { position: relative; background: var(--bg); padding: 1rem 1rem .5rem; z-index: 1000 }
.site-header .bar-inner { position: relative; max-width: 1100px; margin: 0 auto; display: flex; align-items: center; justify-content: space-between; min-height: calc(var(--logo-height) + 2rem) }
.site-header a.logo { position: absolute; left: 50%; transform: translateX(-50%); text-decoration: none; font-weight: 800; font-size: 22px; color: var(--heading) }
.site-header a.logo img { height: var(--logo-height); width: auto; display: block; margin: 2rem auto; padding-top: 20px } /* border-box som Bootstrap: billedet bliver 30px højt */
.site-nav { display: flex; gap: 1.5rem; align-items: center }
.site-nav a, .mobile-nav a { color: var(--ink); text-decoration: none; font-weight: 500; font-size: 1rem }
.site-nav a:hover { color: var(--heading); text-decoration: underline }
.site-nav a.active { color: var(--heading); font-weight: 600; text-decoration: underline; text-underline-offset: 3px }
.header-right { min-width: 120px; display: flex; justify-content: flex-end }
.btn-takeaway { background: var(--brand); color: var(--brand-ink); font-weight: 600; font-size: .9rem; border-radius: var(--btn-radius); padding: .45rem 1rem; text-decoration: none; white-space: nowrap }
.btn-takeaway:hover { background: var(--heading); color: var(--brand-ink) }
.burger-btn { display: none; background: transparent; border: 0; padding: .5rem; flex-direction: column; justify-content: center; align-items: center; gap: 4px; cursor: pointer }
.burger-line { width: 24px; height: 2px; background: var(--ink); border-radius: 2px }
.mobile-nav { display: none; flex-direction: column; position: absolute; top: 100%; left: 0; right: 0; z-index: 999; background: var(--bg); border-top: 1px solid rgba(148,163,184,.2); padding: .75rem 1rem 1rem }
.mobile-nav.open { display: flex }
.mobile-nav a { padding: .5rem 0 }
.mobile-nav a.active { color: var(--heading); font-weight: 600 }
@media (max-width: 767.98px) {
  .site-nav { display: none }
  .burger-btn { display: flex }
}
/* Personalesider (admin/check-in): kompakt header, så scanneren får pladsen */
header.top { display: flex; justify-content: space-between; align-items: center; padding: 12px 16px; max-width: 880px; margin: 0 auto; gap: 12px; flex-wrap: wrap }
header.top a.logo { font-weight: 800; font-size: 20px; text-decoration: none; color: var(--heading) }
header.top a.logo img { height: 36px; width: auto; display: block }
header.top nav a { margin-left: 14px; font-size: 14px; color: var(--ink) }

/* ---------- Kort og events ---------- */
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; margin: 12px 0 }
.events { display: grid; gap: 12px; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)) }
.event { display: flex; flex-direction: column; text-decoration: none; color: inherit }
.event:hover { border-color: var(--brand) }
.event .date { color: var(--brand); font-weight: 600; font-size: 14px }
.event h3 { margin: 4px 0 6px; font-size: 19px }
.event .meta { margin-top: auto; display: flex; justify-content: space-between; font-size: 14px; padding-top: 10px }
.pill { display: inline-block; padding: 2px 9px; border-radius: 99px; font-size: 12px; font-weight: 600; border: 1px solid var(--line) }
.pill.ok { color: var(--ok); border-color: currentColor }
.pill.bad { color: var(--bad); border-color: currentColor }
.pill.warn { color: var(--warn); border-color: currentColor }

/* ---------- Formularer ---------- */
form.buy { max-width: 480px }
label { display: block; font-size: 14px; font-weight: 600; margin: 12px 0 4px }
input, select, textarea { width: 100%; padding: 11px 12px; border: 1px solid var(--line); border-radius: var(--btn-radius); font: inherit; background: #fff; color: var(--ink) }
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px }
.btn { display: inline-block; width: 100%; margin-top: 16px; padding: 13px 16px; border: 0; border-radius: var(--btn-radius); background: var(--brand); color: var(--brand-ink); font: 600 16px var(--font); cursor: pointer; text-align: center; text-decoration: none }
.btn:hover { background: var(--heading) }
.btn.ghost:hover { background: transparent; color: var(--ink); border-color: var(--ink) }
.btn.ghost { background: transparent; color: var(--muted); border: 1px solid var(--line); margin-top: 8px }
.btn.small { width: auto; padding: 6px 12px; font-size: 13px; margin: 0 }
.btn.narrow { max-width: 280px }
.error { background: color-mix(in srgb, var(--bad) 12%, transparent); color: var(--bad); padding: 10px 12px; border-radius: 10px; margin: 0 0 10px }
.total { display: flex; justify-content: space-between; font-weight: 700; font-size: 18px; margin-top: 14px }

/* ---------- Billetter ---------- */
.tickets { display: grid; gap: 14px; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)) }
.ticket { text-align: center; border-style: dashed }
.ticket strong { display: block }
.ticket .qr { display: inline-block; line-height: 0; background: #fff; padding: 10px; border-radius: 8px; margin: 8px 0; min-width: 190px; min-height: 190px }
.ticket code { font-size: 18px; letter-spacing: 2px; font-weight: 700 }
.single { max-width: 320px; margin: 0 auto }

/* ---------- Admin ---------- */
table { width: 100%; border-collapse: collapse; font-size: 14px }
th, td { text-align: left; padding: 8px 6px; border-bottom: 1px solid var(--line); vertical-align: top }
th { color: var(--muted); font-weight: 600 }
td.num, th.num { text-align: right; font-variant-numeric: tabular-nums }
.scroll { overflow-x: auto }
.bar { height: 6px; border-radius: 3px; background: var(--line); overflow: hidden; margin-top: 4px }
.bar i { display: block; height: 100%; background: var(--brand) }

/* ---------- Testbetaling ---------- */
.mockpay { max-width: 420px; margin: 40px auto; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px }
.mockbar { background: #facc15; color: #1c1712; font-weight: 700; font-size: 12px; text-align: center; padding: 6px; border-radius: 8px; margin-bottom: 12px }

/* ---------- Check-in ---------- */
.scan { font-size: 28px; font-weight: 800; text-align: center; padding: 28px 12px; border-radius: var(--radius); margin: 14px 0 }
.scan.ok { background: var(--ok); color: #fff }
.scan.bad { background: var(--bad); color: #fff }
.scan.idle { background: var(--card); border: 1px dashed var(--line); color: var(--muted); font-size: 18px; font-weight: 600 }
.scan small { display: block; font-size: 16px; font-weight: 500; margin-top: 6px }
video { width: 100%; border-radius: 12px; background: #000; max-height: 300px; object-fit: cover }

@media print {
  header.top, .site-header, .noprint { display: none }
  body { background: #fff; color: #000 }
  .card { break-inside: avoid }
}
