/* Nur fuer die Bestell-App. Basis siehe ../assets/base.css */

.name-row {
  display: flex;
  align-items: center;
  gap: .75rem;
  flex-wrap: wrap;
}
.name-row input { flex: 1 1 14rem; }
.name-state { font-size: .875rem; color: var(--gruen); font-weight: 600; }
.name-row input.fehlt { border-color: var(--rot); background: #FFF6F6; }

.filter-row {
  display: flex;
  gap: .5rem;
  margin-bottom: 1rem;
}
.filter-row input { flex: 1 1 auto; }

/* Speisekarte */

.gruppe { border-top: 1px solid var(--grau-linie); }
.gruppe:first-child { border-top: 0; }
.gruppe > summary {
  cursor: pointer;
  padding: .85rem .25rem;
  font-weight: 600;
  font-size: 1.05rem;
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: .5rem;
}
.gruppe > summary::-webkit-details-marker { display: none; }
.gruppe > summary::after {
  content: "▾";
  color: var(--grau-text);
  font-size: .9rem;
  transition: transform .15s;
}
.gruppe[open] > summary::after { transform: rotate(180deg); }
.gruppe-hinweis {
  margin: 0 0 .75rem;
  color: var(--grau-text);
  font-size: .85rem;
}

.gerichte { display: grid; gap: .4rem; padding-bottom: 1rem; }

.gericht {
  display: grid;
  grid-template-columns: 3rem 1fr auto;
  gap: .25rem .75rem;
  align-items: baseline;
  width: 100%;
  text-align: left;
  font: inherit;
  padding: .7rem .75rem;
  background: var(--weiss);
  border: 1px solid var(--grau-linie);
  border-radius: 8px;
  cursor: pointer;
}
.gericht:hover { background: #FFF6F6; border-color: var(--rot); }
.gericht .nr { color: var(--grau-text); font-variant-numeric: tabular-nums; font-size: .9rem; }
.gericht .bez { font-weight: 600; }
.gericht .preis { font-variant-numeric: tabular-nums; font-weight: 600; white-space: nowrap; }
.gericht .zusatz {
  grid-column: 2 / -1;
  color: var(--grau-text);
  font-size: .85rem;
}
.gericht .wahl {
  grid-column: 2 / -1;
  font-size: .8rem;
  color: var(--rot-dunkel);
  font-weight: 600;
}

.leer-treffer { color: var(--grau-text); padding: 1rem 0; }

/* Bestellliste */

.sync { font-size: .8rem; color: var(--grau-text); }
.sync.warn { color: var(--rot-dunkel); font-weight: 600; }

.table-scroll { overflow-x: auto; }

table.orders {
  width: 100%;
  border-collapse: collapse;
  font-size: .95rem;
}
table.orders th,
table.orders td {
  text-align: left;
  padding: .55rem .5rem;
  border-bottom: 1px solid var(--grau-linie);
  vertical-align: top;
}
table.orders thead th {
  font-size: .8rem;
  text-transform: uppercase;
  letter-spacing: .03em;
  color: var(--grau-text);
}
table.orders .col-nr,
table.orders .col-preis { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
table.orders .col-aktion { width: 2.5rem; text-align: right; }
table.orders tfoot th,
table.orders tfoot td {
  border-bottom: 0;
  border-top: 2px solid var(--schwarz);
  font-size: 1.05rem;
  font-weight: 700;
  padding-top: .75rem;
}
table.orders .opt {
  display: block;
  color: var(--grau-text);
  font-size: .85rem;
}
table.orders .anmerkung { font-style: italic; }
.count { font-weight: 400; color: var(--grau-text); font-size: .85rem; }

.del {
  border: 0;
  background: none;
  font: inherit;
  font-size: 1.1rem;
  line-height: 1;
  color: var(--grau-text);
  cursor: pointer;
  padding: .25rem .4rem;
  border-radius: 6px;
}
.del:hover { color: var(--rot); background: var(--grau-flaeche); }

tr.leer td {
  color: var(--grau-text);
  padding: 1.25rem .5rem;
}

.liste-actions {
  display: flex;
  gap: .5rem;
  flex-wrap: wrap;
  margin-top: 1rem;
}

.kueche { margin-top: 1rem; font-size: .9rem; }
.kueche summary { cursor: pointer; font-weight: 600; }
.kueche ul { margin: .5rem 0 0; padding-left: 1.2rem; }
.kueche li { margin-bottom: .2rem; }

/* Auswahldialog */

.dlg {
  border: 0;
  border-radius: var(--radius);
  padding: 1.25rem;
  width: min(30rem, calc(100vw - 2rem));
  box-shadow: 0 10px 40px rgba(0, 0, 0, .25);
}
.dlg::backdrop { background: rgba(0, 0, 0, .45); }
.dlg h3 { margin-bottom: .2rem; }
.dlg-zusatz { color: var(--grau-text); font-size: .875rem; margin-bottom: 1rem; }
.dlg-zusatz:empty { display: none; }
.dlg-feld { display: block; margin-bottom: 1rem; }
.dlg-feld > span {
  display: block;
  font-weight: 600;
  font-size: .9rem;
  margin-bottom: .3rem;
}
.dlg-preis { margin: 0 0 1rem; }
.dlg-actions {
  display: flex;
  gap: .5rem;
  justify-content: flex-end;
  flex-wrap: wrap;
}

/* Hinweis */

.toast {
  position: fixed;
  left: 50%;
  bottom: 1.25rem;
  transform: translate(-50%, 1rem);
  background: var(--schwarz);
  color: var(--weiss);
  padding: .7rem 1.1rem;
  border-radius: 999px;
  font-size: .9rem;
  box-shadow: var(--schatten);
  opacity: 0;
  pointer-events: none;
  transition: opacity .2s, transform .2s;
  max-width: calc(100vw - 2rem);
}
.toast.an { opacity: 1; transform: translate(-50%, 0); }

@media (prefers-reduced-motion: reduce) {
  .toast, .gruppe > summary::after { transition: none; }
}

/* Druck: nur die Liste */

@media print {
  body { background: #fff; }
  .site-header, .site-footer, #panel-name, #panel-karte,
  .liste-actions, .sync, .del, .col-aktion, .toast { display: none !important; }
  .panel { border: 0; box-shadow: none; padding: 0; margin: 0; }
  table.orders { font-size: 11pt; }
  .kueche[hidden] { display: block !important; }
  .kueche > summary { list-style: none; }
}
