/* HalleCare Kasse. Mobil først: alt skal kunne betjenes med én tommelfinger ude hos kunden. */
:root {
  --groen: #0e4f4a;
  --groen-lys: #e3efed;
  --groen-mellem: #1d6b64;
  --blaek: #1b2523;
  --svag: #5c6966;
  --kant: #d5dedc;
  --flade: #ffffff;
  --baggrund: #f4f6f5;
  --ok: #157a3c;
  --ok-lys: #e2f4e8;
  --fare: #b42318;
  --advarsel: #f5b400;
  --radius: 14px;
  --tryk: 56px;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  color: var(--blaek);
  background: var(--baggrund);
  -webkit-text-size-adjust: 100%;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; min-height: 100vh; font-size: 17px; line-height: 1.4; }
h1 { font-size: 1.5rem; margin: .5rem 0 1rem; }
h2 { font-size: 1.1rem; margin: 1rem 0 .5rem; }
a { color: var(--groen-mellem); }
.svag { color: var(--svag); }
.tom { color: var(--svag); padding: .5rem 0; list-style: none; }

.testbanner {
  background: repeating-linear-gradient(-45deg, var(--advarsel) 0 14px, #ffd24d 14px 28px);
  color: #2b2100; font-weight: 800; text-align: center; letter-spacing: .06em;
  padding: .45rem 1rem; position: sticky; top: 0; z-index: 30;
}

.top {
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  padding: .6rem 1rem; background: var(--groen); color: #fff;
}
.logo { font-size: 1.05rem; }
.logud { display: flex; align-items: center; gap: .6rem; margin: 0; }
.hvem { font-size: .9rem; opacity: .85; }

.indhold { max-width: 760px; margin: 0 auto; padding: 1rem 1rem calc(96px + env(safe-area-inset-bottom)); }
.kasse-side .indhold { padding-bottom: calc(190px + env(safe-area-inset-bottom)); }

/* Knapper */
button, .knap-stor, .knap-sekundaer { font: inherit; cursor: pointer; }
.knap-stor {
  display: flex; align-items: center; justify-content: center; width: 100%;
  min-height: var(--tryk); padding: .8rem 1.2rem; border: 0; border-radius: var(--radius);
  background: var(--groen); color: #fff; font-weight: 700; font-size: 1.1rem; text-decoration: none;
}
.knap-stor:disabled { background: #9fb3b0; cursor: not-allowed; }
.knap-stor:active:not(:disabled) { transform: scale(.98); }
.knap-sekundaer {
  display: inline-flex; align-items: center; justify-content: center; min-height: 48px;
  padding: .6rem 1rem; border: 2px solid var(--groen); border-radius: var(--radius);
  background: var(--flade); color: var(--groen); font-weight: 650; text-decoration: none;
}
.knap-lille { min-height: 36px; padding: .3rem .8rem; border: 1px solid rgba(255,255,255,.6); border-radius: 10px; background: transparent; color: #fff; }
.knap-tekst { background: none; border: 0; color: var(--groen-mellem); text-decoration: underline; padding: .8rem 0; min-height: 44px; }
.fare { color: var(--fare); }
.knaprad { display: flex; gap: .6rem; }
.knaprad > * { flex: 1; }
button:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible, summary:focus-visible {
  outline: 3px solid var(--advarsel); outline-offset: 2px;
}

/* Formularer */
.stak { display: flex; flex-direction: column; gap: .9rem; }
label { display: flex; flex-direction: column; gap: .3rem; font-weight: 600; font-size: .95rem; }
input, select {
  font: inherit; min-height: 52px; padding: .6rem .8rem; border: 2px solid var(--kant);
  border-radius: 12px; background: var(--flade); color: var(--blaek); width: 100%;
}
input:focus, select:focus { border-color: var(--groen-mellem); outline: none; }
.afkryds { flex-direction: row; align-items: center; gap: .6rem; }
.afkryds input { width: 26px; min-height: 26px; height: 26px; accent-color: var(--groen); }
.to-felter { display: grid; grid-template-columns: 1fr 1fr; gap: .8rem; }
.fejl { background: #fdecea; color: var(--fare); padding: .7rem .9rem; border-radius: 10px; font-weight: 600; margin: .5rem 0; }
.ok { background: var(--ok-lys); color: var(--ok); padding: .7rem .9rem; border-radius: 10px; font-weight: 600; }

/* Login */
.login-side .indhold { display: grid; place-items: center; min-height: 80vh; }
.login-kort { width: 100%; max-width: 380px; background: var(--flade); padding: 1.5rem; border-radius: 20px; box-shadow: 0 6px 30px rgba(14,79,74,.1); }

/* Kassen */
.kategori { font-size: .85rem; text-transform: uppercase; letter-spacing: .08em; color: var(--svag); margin: 1.1rem 0 .5rem; }
.flise-gitter { display: grid; grid-template-columns: repeat(2, 1fr); gap: .7rem; }
@media (min-width: 560px) { .flise-gitter { grid-template-columns: repeat(3, 1fr); } }
.flise {
  display: flex; flex-direction: column; justify-content: space-between; gap: .4rem; text-align: left;
  min-height: 96px; padding: .9rem; border: 2px solid var(--kant); border-radius: var(--radius);
  background: var(--flade); color: var(--blaek);
  -webkit-tap-highlight-color: transparent; transition: transform .08s, border-color .15s;
}
.flise:active { transform: scale(.97); border-color: var(--groen); background: var(--groen-lys); }
.flise-navn { font-weight: 700; font-size: 1.05rem; }
.flise-pris { color: var(--groen-mellem); font-weight: 650; }
.flise-fri {
  width: 100%; min-height: 64px; margin-top: .9rem; align-items: center; justify-content: center;
  border-style: dashed; border-color: var(--groen-mellem); color: var(--groen); font-weight: 700;
}
.aaben-betaling {
  display: block; background: var(--advarsel); color: #2b2100; font-weight: 700; text-decoration: none;
  padding: .9rem 1rem; border-radius: var(--radius); margin-bottom: .6rem;
}

.kurv { margin-top: 1.4rem; }
.kurv-linjer { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: .5rem; }
.kurv-linje {
  display: grid; grid-template-columns: 1fr 44px 2ch 44px; grid-template-rows: auto auto;
  align-items: center; gap: .2rem .4rem; background: var(--flade); border: 1px solid var(--kant);
  border-radius: 12px; padding: .5rem .6rem;
}
.kl-tekst { grid-row: 1 / 3; background: none; border: 0; text-align: left; padding: .2rem 0; color: inherit; display: flex; flex-direction: column; }
.kl-tekst span { font-weight: 650; }
.kl-tekst small { color: var(--svag); font-size: .8rem; }
.kl-antal { width: 44px; height: 44px; border-radius: 50%; border: 2px solid var(--kant); background: var(--baggrund); font-size: 1.3rem; font-weight: 700; color: var(--groen); }
.kl-tal { text-align: center; font-weight: 700; }
.kl-sum { grid-column: 2 / 5; text-align: right; font-weight: 700; font-size: .95rem; }

.betal-bar {
  position: fixed; left: 0; right: 0; bottom: calc(64px + env(safe-area-inset-bottom)); z-index: 20;
  background: var(--flade); border-top: 1px solid var(--kant); box-shadow: 0 -6px 20px rgba(0,0,0,.06);
  padding: .7rem 1rem; display: flex; flex-direction: column; gap: .5rem;
}
.betal-bar > * { width: 100%; max-width: 728px; margin: 0 auto; }
.total { display: flex; justify-content: space-between; align-items: baseline; }
.total strong { font-size: 1.4rem; }

/* Dialoger som ark nedefra */
dialog.ark {
  border: 0; border-radius: 20px 20px 0 0; padding: 1.2rem 1rem calc(1.2rem + env(safe-area-inset-bottom));
  width: 100%; max-width: 560px; margin: auto auto 0; background: var(--flade);
}
dialog.ark::backdrop { background: rgba(10, 30, 28, .45); }
dialog.ark h2 { margin-top: 0; }

/* Bundmenu */
.bundnav {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 25; display: grid; grid-template-columns: repeat(3, 1fr);
  background: var(--flade); border-top: 1px solid var(--kant); padding-bottom: env(safe-area-inset-bottom);
}
.bundnav a {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; min-height: 64px;
  color: var(--svag); text-decoration: none; font-size: .85rem; font-weight: 600;
}
.bundnav .ikon { font-size: 1.3rem; line-height: 1; }
.bundnav a[aria-current="page"] { color: var(--groen); background: var(--groen-lys); }

/* Betalingsskærmen */
.betaling-skaerm { background: var(--flade); border-radius: 20px; padding: 1.2rem 1rem; text-align: center; }
.bv-belob { font-size: 2rem; font-weight: 800; margin: 0 0 .5rem; }
.bv-belob .svag { font-size: .95rem; font-weight: 500; }
.bv-status { display: inline-block; font-weight: 800; padding: .4rem 1rem; border-radius: 999px; margin-bottom: 1rem; font-size: 1.05rem; }
.bv-afventer { background: #fff4d1; color: #6b4e00; }
.bv-afventer::before { content: ""; display: inline-block; width: .6em; height: .6em; margin-right: .5em; border-radius: 50%; background: currentColor; animation: puls 1.2s infinite; }
@keyframes puls { 50% { opacity: .2; } }
.bv-betalt { background: var(--ok); color: #fff; font-size: 2.4rem; padding: 1.4rem 2rem; border-radius: 24px; display: block; margin: 1rem 0 1.4rem; }
.bv-annulleret { background: #f1f1f1; color: var(--svag); }
.qr { display: block; width: min(82vw, 420px); height: auto; margin: 0 auto .8rem; background: #fff; padding: 8px; border-radius: 12px; border: 1px solid var(--kant); }
.bv-hjaelp { font-size: .95rem; margin: 0 0 1rem; }
.bv-link input { font-size: .85rem; min-height: 44px; color: var(--svag); text-align: center; margin-bottom: .6rem; }
.bv-faerdig { margin-top: .4rem; }
@media (prefers-reduced-motion: reduce) { .bv-afventer::before { animation: none; } .flise { transition: none; } }

.detaljer { margin-top: 1rem; background: var(--flade); border-radius: var(--radius); padding: .8rem 1rem; }
.detaljer summary { font-weight: 650; min-height: 44px; display: flex; align-items: center; cursor: pointer; }
.tabel { width: 100%; border-collapse: collapse; margin: .6rem 0; }
.tabel td, .tabel th { padding: .55rem 0; border-bottom: 1px solid var(--kant); text-align: left; vertical-align: top; }
.tabel tfoot th { border-bottom: 0; font-size: 1.1rem; }
.tal { text-align: right !important; white-space: nowrap; padding-left: 1rem !important; }
.fakta { display: grid; grid-template-columns: auto 1fr; gap: .3rem 1rem; margin: .8rem 0; font-size: .95rem; }
.fakta dt { color: var(--svag); }
.fakta dd { margin: 0; overflow-wrap: anywhere; }
.log { font-size: .85rem; color: var(--svag); padding-left: 1.1rem; }

/* Betalinger */
.filter { display: grid; grid-template-columns: 1fr 1fr; gap: .6rem; align-items: end; margin-bottom: .8rem; }
.filter label:nth-of-type(3) { grid-column: 1 / 3; }
.opsummering { margin: .4rem 0 .8rem; }
.betaling-liste, .vare-liste { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: .6rem; }
.betaling-liste a { display: flex; flex-direction: column; gap: .3rem; padding: .8rem 1rem; background: var(--flade); border-radius: var(--radius); color: inherit; text-decoration: none; border: 1px solid var(--kant); }
.bl-top, .bl-bund { display: flex; justify-content: space-between; align-items: center; gap: .6rem; }
.bl-dato { font-size: .9rem; color: var(--svag); }
.bl-tekst { font-weight: 600; }
.bl-bund .svag { font-size: .85rem; }
.maerke { font-size: .8rem; font-weight: 700; padding: .15rem .55rem; border-radius: 999px; background: #eee; color: var(--svag); }
.maerke-betalt { background: var(--ok-lys); color: var(--ok); }
.maerke-afventer { background: #fff4d1; color: #6b4e00; }

/* Prisliste */
.kort { background: var(--flade); border: 1px solid var(--kant); border-radius: var(--radius); }
.ny-vare { padding: 0; margin-bottom: 1rem; border: 0; background: none; }
.ny-vare > summary { list-style: none; }
.ny-vare > summary::-webkit-details-marker { display: none; }
.ny-vare[open] { background: var(--flade); border: 1px solid var(--kant); padding: 1rem; }
.ny-vare[open] > summary { margin-bottom: 1rem; }
.vare-liste details > summary {
  display: grid; grid-template-columns: 1fr auto; gap: .1rem .8rem; padding: .9rem 1rem; cursor: pointer; list-style: none; min-height: var(--tryk);
}
.vare-liste details > summary::-webkit-details-marker { display: none; }
.vare-liste details[open] > form { padding: 0 1rem; }
.vare-liste details[open] > form:last-child { padding-bottom: .4rem; }
.vare-navn { font-weight: 700; }
.vare-pris { font-weight: 700; color: var(--groen-mellem); }
.vare-kat { font-size: .85rem; }
.inaktiv { opacity: .65; }

/* Kundens sider */
.kunde-side { background: var(--groen-lys); }
.kvittering { background: var(--flade); max-width: 480px; margin: 1rem auto; padding: 1.5rem 1.2rem; border-radius: 20px; box-shadow: 0 6px 30px rgba(14,79,74,.1); }
.kvittering header { text-align: center; margin-bottom: 1rem; }
.kvittering header p { margin: 0; }
.kv-firma { font-size: 1.4rem; font-weight: 800; color: var(--groen); }
.kv-ok { background: var(--ok); color: #fff; text-align: center; font-size: 1.4rem; font-weight: 800; padding: 1rem; border-radius: 16px; margin-bottom: 1rem; }
.kv-vent { background: var(--baggrund); text-align: center; padding: 1.2rem; border-radius: 16px; margin-bottom: 1rem; font-weight: 600; }
