/* Check-in-spezifische Ergänzungen zum Design-System der Panorama Kirche (web/vendor/pk-design-system).
   Nur semantische Variablen (--pk-surface, --pk-text, --pk-primary …) verwenden, keine eigenen Farben –
   so greifen Hell/Dunkel und spätere Änderungen am Design-System automatisch. */

.app-header .pk-header__inner { min-height: 64px; }
.app-header .pk-logo { height: 32px; }
.app-header .pk-nav { flex: 1; justify-content: center; }
.app-status { white-space: nowrap; }
.app-status--ok::before,
.app-status--bad::before {
  content: "";
  display: inline-block;
  width: 0;
  height: 0;
  margin-right: var(--pk-space-1);
  border-left: 4px solid transparent;
  border-right: 4px solid transparent;
  border-bottom: 7px solid currentColor;
}
.app-status--ok { background: var(--pk-primary-soft); color: var(--pk-primary-text); }
.app-status--bad { background: var(--pk-accent-soft); color: var(--pk-accent-text); }

.app-main { max-width: 860px; padding-block: var(--pk-space-6) var(--pk-space-10); }

.app-head { margin-bottom: var(--pk-space-5); }
.app-head h1 { font-size: clamp(var(--pk-font-size-xl), 4vw, var(--pk-font-size-2xl)); margin: 0; }
.app-head .pk-eyebrow { margin: 0 0 var(--pk-space-1); }
.app-head--split { display: flex; align-items: flex-end; justify-content: space-between; gap: var(--pk-space-4); flex-wrap: wrap; }
.app-subhead { font-size: var(--pk-font-size-xl); }

/* Große Eingabefelder für Tablet/Kiosk */
.app-input-lg { min-height: 60px; font-size: var(--pk-font-size-xl); padding-inline: var(--pk-space-4); }
.app-input-code { font-family: var(--pk-font-family-heading); letter-spacing: 0.3em; max-width: 12ch; }
.app-row { display: flex; gap: var(--pk-space-3); align-items: stretch; }
.app-row .pk-button { min-height: 60px; }

/* Trefferliste */
.app-results { margin-top: var(--pk-space-4); }
.app-results:empty { display: none; }
.app-results .pk-list-item { gap: var(--pk-space-4); }
.app-results .pk-list-item__body { flex: 1; min-width: 0; display: grid; gap: 2px; }
.app-results .pk-list-item__title { font-size: var(--pk-font-size-lg); }
.app-clickable { cursor: pointer; transition: background-color var(--pk-duration-fast); }
.app-clickable:hover { background: var(--pk-surface-muted); }
/* Dreieck aus dem Logo als Pfeil */
.app-clickable::after {
  content: "";
  flex: none;
  border-top: 6px solid transparent;
  border-bottom: 6px solid transparent;
  border-left: 9px solid var(--pk-accent);
}
.app-results.pk-card { padding: 0; }

/* Auswahlkarten (Kinder einer Familie / eines Abholcodes) */
.app-choices { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--pk-space-3); }
.app-choice {
  display: flex;
  align-items: center;
  gap: var(--pk-space-4);
  padding: var(--pk-space-4);
  background: var(--pk-surface);
  border: 2px solid var(--pk-border);
  border-radius: var(--pk-radius-md);
  box-shadow: var(--pk-shadow-sm);
  cursor: pointer;
}
.app-choice--selected { border-color: var(--pk-primary); background: var(--pk-primary-soft); }
.app-choice--done { cursor: default; box-shadow: none; opacity: 0.7; }
.app-choice input[type="checkbox"] { width: 28px; height: 28px; margin: 0; accent-color: var(--pk-primary); flex: none; }
.app-choice__body { flex: 1; min-width: 0; display: grid; gap: 2px; }
.app-choice__name { font-family: var(--pk-font-family-heading); font-size: var(--pk-font-size-lg); font-weight: var(--pk-font-weight-semibold); color: var(--pk-text); }
.app-choice__meta { font-size: var(--pk-font-size-sm); color: var(--pk-text-muted); }
.app-choice select { max-width: 14rem; min-height: 40px; }

.app-actions { display: flex; flex-wrap: wrap; gap: var(--pk-space-3); justify-content: flex-end; margin-top: var(--pk-space-5); }

/* Abholcode nach dem Check-in */
.app-code { text-align: center; margin-bottom: var(--pk-space-4); }
.app-code .pk-eyebrow { margin: 0; }
.app-code__value {
  margin: var(--pk-space-2) 0;
  font-family: var(--pk-font-family-heading);
  font-size: clamp(3rem, 12vw, 4.5rem);
  font-weight: var(--pk-font-weight-bold);
  letter-spacing: 0.2em;
  line-height: 1;
  color: var(--pk-heading);
  font-variant-numeric: tabular-nums;
}
.app-code .pk-hint { margin: 0; }
/* QR-Code auf dem Bildschirm: immer dunkel auf weiß (auch im Dunkelmodus), sonst lesen Scanner schlecht */
.app-qr { width: 168px; height: 168px; margin: var(--pk-space-3) auto; padding: var(--pk-space-2); background: #fff; border-radius: var(--pk-radius-sm); }
.app-qr:empty { display: none; }
.app-qr svg { display: block; width: 100%; height: 100%; }

/* Abholung: Scanner */
.app-scan-button { width: 100%; min-height: 64px; font-size: var(--pk-font-size-md); margin-bottom: var(--pk-space-5); }
.app-scan { display: grid; justify-items: center; gap: var(--pk-space-3); margin-bottom: var(--pk-space-5); }
.app-scan__frame { position: relative; width: 100%; max-width: 420px; aspect-ratio: 1; overflow: hidden; border-radius: var(--pk-radius-md); background: var(--pk-color-brand-ink); }
.app-scan__frame video { width: 100%; height: 100%; object-fit: cover; display: block; }
/* Zielrahmen in Akzentfarbe */
.app-scan__target { position: absolute; inset: 18%; border: 3px solid var(--pk-accent); border-radius: var(--pk-radius-sm); box-shadow: 0 0 0 999px rgba(35, 31, 32, 0.35); }
.app-scan .pk-hint { margin: 0; text-align: center; }
.app-pickup-form { margin-bottom: var(--pk-space-4); }

.app-errors { list-style: none; margin: var(--pk-space-3) 0 0; padding: 0; display: grid; gap: var(--pk-space-2); }
.app-errors li {
  padding: var(--pk-space-3) var(--pk-space-4);
  border-left: 3px solid var(--pk-color-feedback-danger);
  background: var(--pk-accent-soft);
  color: var(--pk-text);
  font-size: var(--pk-font-size-sm);
}

/* Übersicht */
.app-groups { display: grid; gap: var(--pk-space-4); }
.app-group__head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: var(--pk-space-3);
  padding: var(--pk-space-3) var(--pk-space-4);
  border-bottom: 3px solid var(--pk-accent);
}
.app-group__head h2 { font-size: var(--pk-font-size-lg); margin: 0; }
.app-group__count { font-size: var(--pk-font-size-sm); color: var(--pk-text-muted); white-space: nowrap; }
.app-group .pk-list-item { flex-wrap: wrap; }
.app-group .pk-list-item__body { flex: 1; min-width: 10rem; display: flex; flex-wrap: wrap; align-items: center; gap: var(--pk-space-2); }
.app-group .pk-list-item--picked .pk-list-item__title { color: var(--pk-text-muted); font-weight: var(--pk-font-weight-regular); }
.app-empty { padding: var(--pk-space-4); margin: 0; color: var(--pk-text-muted); }

/* Hinweis unten (Toast) */
.app-toast {
  position: fixed;
  left: 50%;
  bottom: var(--pk-space-5);
  transform: translateX(-50%);
  max-width: calc(100% - 2 * var(--pk-space-4));
  padding: var(--pk-space-3) var(--pk-space-5);
  border-radius: var(--pk-radius-sm);
  border-left: 4px solid var(--pk-color-feedback-success);
  background: var(--pk-surface-inverse);
  color: var(--pk-on-inverse);
  box-shadow: var(--pk-shadow-lg);
  z-index: 20;
}
.app-toast--error { border-left-color: var(--pk-accent); }

@media (max-width: 767px) {
  .app-header .pk-header__inner { min-height: 56px; }
  .app-header .pk-logo { height: 28px; }
  .app-header .pk-nav { order: 3; flex: 0 0 100%; justify-content: space-between; gap: var(--pk-space-2); }
  .app-main { padding-block: var(--pk-space-5) var(--pk-space-8); }
}

/* Druck: nur Etiketten, je Etikett eine Seite (Etikettendrucker 62 mm Endlos), schwarz auf weiß */
#print-area { display: none; }
@media print {
  @page { size: 62mm 40mm; margin: 2mm; }
  body { background: #fff; color: #000; }
  .pk-header, main { display: none !important; }
  #print-area { display: block; }
  .label {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 2mm;
    align-items: start;
    height: 36mm;
    overflow: hidden;
    page-break-after: always;
    break-after: page;
    font-family: var(--pk-font-family-base);
    color: #000;
  }
  .label .l-text { min-width: 0; }
  .label .l-name { font-family: var(--pk-font-family-heading); font-size: 16pt; font-weight: 700; line-height: 1.1; overflow-wrap: anywhere; }
  .label .l-group { font-size: 11pt; }
  .label .l-note { font-size: 10pt; font-weight: 700; border: 1px solid #000; padding: 1mm; margin-top: 1mm; }
  .label .l-side { display: grid; justify-items: center; gap: 0.5mm; }
  .label .l-qr { width: 20mm; height: 20mm; }
  .label .l-qr svg { display: block; width: 100%; height: 100%; }
  .label .l-code { font-family: var(--pk-font-family-heading); font-size: 12pt; font-weight: 700; letter-spacing: 1pt; }
  .label--slip .l-qr { width: 30mm; height: 30mm; }
  .label .l-logo { height: 5mm; width: auto; margin-bottom: 1mm; }
  .label .l-title { font-family: var(--pk-font-family-heading); font-size: 9pt; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; }
  .label .l-big { font-family: var(--pk-font-family-heading); font-size: 26pt; font-weight: 700; letter-spacing: 2pt; line-height: 1.1; }
}
