/* SHIO Tischplan (/tischplan/): baut auf /kasse/kasse.css auf (Design, Raumplan, Tischkarten, Zaehler, Liste,
   Blaetter, eingebettet-Stufen) und ergaenzt nur Kopf-Titel, Menue und das Detail eines Tisches.
   Detail: rechts neben dem Plan angedockt, wenn Platz ist (tischplan.js setzt data-liste="rechts"), sonst als Blatt
   rechts mit Abdunklung (.tp-detail--blatt). */

/* ---------- Kopf ---------- */
.tp-titel {
  margin: 0; padding: 4px 0 4px 20px; border-left: 1px solid var(--kante);
  font-size: 20px; font-weight: 600; color: var(--text); white-space: nowrap; line-height: 1.2;
}
.tp-menue { position: relative; flex: none; }
.tp-menue__knopf {
  width: 44px; height: 44px; border-radius: 50%; border: 1px solid var(--kante); background: var(--soft); color: var(--text);
  display: grid; place-items: center; cursor: pointer; padding: 0;
}
.tp-menue__knopf .icon { width: 22px; height: 22px; }
.tp-menue__knopf[aria-expanded="true"] { background: var(--gold); border-color: var(--gold); color: var(--btn-text); }
@media (hover: hover) and (pointer: fine) { .tp-menue__knopf:hover { background: var(--hover); } .tp-menue__knopf[aria-expanded="true"]:hover { background: var(--gold); } }
.tp-menue__liste {
  position: absolute; z-index: 60; right: 0; top: calc(100% + 12px); width: min(400px, calc(100vw - 24px));
  display: grid; gap: 6px; padding: 8px; border-radius: var(--r-big);
  background: var(--panel); border: 1px solid var(--kante); box-shadow: var(--shadow-big);
}
.tp-menue__liste .einst { min-height: 64px; padding: 10px 14px; }

/* ---------- Detail angedockt ---------- */
.tp-detail {
  width: 360px; flex: none; display: flex; flex-direction: column; min-height: 0;
  background: var(--panel); border: 1px solid var(--kante); border-radius: var(--r); overflow: hidden;
}
.plan-koerper.hat-detail[data-liste="rechts"] .offen { display: none; }
.tp-detail__kopf { flex: none; display: flex; align-items: center; gap: 10px; padding: 14px 12px 12px 18px; border-bottom: 1.5px solid var(--line); }
.tp-detail__titel { flex: 1; min-width: 0; display: grid; gap: 1px; }
.tp-detail__titel h2 { margin: 0; font-size: 22px; font-weight: 700; color: var(--text); line-height: 1.2; }
.tp-detail__ort { font-size: 13px; color: var(--text-soft); font-weight: 500; }
.tp-detail__kopf .pille { flex: none; }
.tp-detail__kopf .knopf--rund { flex: none; --k-hoehe: 40px; background: var(--soft2); border: 0; }
.tp-detail__inhalt { flex: 1; min-height: 0; overflow-y: auto; overscroll-behavior: contain; padding: 12px 14px 14px; display: flex; flex-direction: column; gap: 12px; }
.tp-detail__inhalt > * { flex: none; }
.tp-detail__fuss { flex: none; display: grid; gap: 10px; padding: 12px 14px 14px; border-top: 1.5px solid var(--line); background: var(--panel); }
.tp-detail__fuss:empty { display: none; }
.tp-detail__summe { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; }
.tp-detail__summe span { font-size: 17px; font-weight: 600; color: var(--text-soft); }
.tp-detail__summe small { font-size: 13px; font-weight: 500; color: var(--gold-text); }
.tp-detail__summe b { font-size: 28px; font-weight: 800; color: var(--text); letter-spacing: -.01em; white-space: nowrap; }
.tp-detail__haupt { width: 100%; }

.tp-detail .fakten { grid-template-columns: repeat(2, minmax(0, 1fr)); padding: 12px 14px; gap: 8px 14px; }
.tp-zahlen {
  display: flex; align-items: center; gap: 10px; margin: 0; padding: 10px 14px; border-radius: 14px;
  background: var(--gold); color: var(--btn-text); font-size: 14px; font-weight: 500; line-height: 1.35;
}
.tp-zahlen b { font-weight: 700; }
.tp-zahlen .icon { width: 22px; height: 22px; flex: none; --icon-strich: 2.2; }
.tp-abschnitt { display: flex; align-items: center; gap: 10px; margin-top: 2px; }
.tp-abschnitt h3 { margin: 0; font-size: 13px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--text-mute); }
.tp-abschnitt__zahl { margin-left: auto; font-size: 13px; color: var(--text-soft); font-weight: 500; }
.tp-rechnung { display: grid; gap: 6px; padding: 12px 14px 12px; border: 1px solid rgba(201, 164, 92, .35); border-radius: 16px; background: var(--karte); }
.tp-rechnung .tp-abschnitt { margin: 0 0 2px; }
.tp-rechnung .runde__liste { margin: 0; }
.tp-rechnung .pos__name small.tp-einzel { font-style: normal; }
.tp-rechnung__teile { margin: 2px 0 0; font-size: 12.5px; color: var(--text-mute); font-weight: 500; }
.tp-rechnung__summe { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; padding-top: 8px; border-top: 1px solid var(--line); }
.tp-rechnung__summe span { font-size: 15px; font-weight: 600; color: var(--text-soft); }
.tp-rechnung__summe b { font-size: 20px; font-weight: 700; }
.tp-rechnung__hinweis { margin: 0; font-size: 12px; color: var(--gold-text); font-weight: 500; }
.tp-detail .runde { padding: 10px 12px 12px; }
.tp-detail .pos { grid-template-columns: 34px minmax(0, 1fr) auto; font-size: 14px; }
.tp-frei { margin-top: 8px; padding: 32px 18px; }
.tp-frei .t-klein { max-width: 30ch; }

/* ---------- Detail als Blatt (kein Platz neben dem Plan) ---------- */
.tp-grund { position: fixed; inset: 0; z-index: 880; background: rgba(0, 0, 0, .55); }
.tp-detail.tp-detail--blatt {
  position: fixed; z-index: 890; top: 10px; right: 10px; bottom: 10px; width: min(400px, calc(100vw - 20px));
  border-radius: var(--r-big); box-shadow: var(--shadow-big); animation: tp-rein .2s ease-out;
}
@keyframes tp-rein { from { transform: translateX(24px); opacity: 0; } to { transform: none; opacity: 1; } }

/* ---------- Groessen ---------- */
@media (min-width: 1600px) and (min-height: 900px) {
  .tp-titel { font-size: 24px; padding-left: 26px; }
  .tp-menue__knopf { width: 50px; height: 50px; }
  .tp-detail { width: 400px; }
  .tp-detail__titel h2 { font-size: 26px; }
  .tp-detail .pos { font-size: 15.5px; }
  .tp-detail__summe b { font-size: 32px; }
}
@media (max-width: 1100px) {
  .tp-titel { font-size: 18px; padding-left: 14px; }
}
@media (max-width: 920px) {
  .tp-titel { font-size: 17px; padding-left: 12px; }
}
@media (max-width: 600px) {
  .logo__zusatz { display: none; }
  .tp-titel { border-left: 0; padding-left: 0; }
}

/* Eingebettet in /pult/: kompakter Kopf */
.ist-eingebettet .tp-titel { font-size: 16px; padding-left: 12px; }
.ist-eingebettet .tp-menue__knopf { width: 38px; height: 38px; }
.ist-eingebettet .tp-menue__knopf .icon { width: 19px; height: 19px; }
.ist-eingebettet .tp-detail.tp-detail--blatt { top: 6px; right: 6px; bottom: 6px; width: min(370px, calc(100vw - 12px)); }
.ist-eingebettet .tp-detail__kopf { padding: 10px 10px 10px 14px; }
.ist-eingebettet .tp-detail__titel h2 { font-size: 19px; }
.ist-eingebettet .tp-detail__inhalt { padding: 10px 12px 12px; gap: 10px; }
.ist-eingebettet .tp-detail__fuss { padding: 10px 12px 12px; gap: 8px; }
.ist-eingebettet .tp-detail__summe b { font-size: 24px; }
.ist-eingebettet .tp-detail__haupt { --k-hoehe: 50px; min-height: 50px; }
.ist-eingebettet .tp-menue__liste .einst { min-height: 56px; padding: 8px 12px; }
@media (max-height: 600px) {
  .tp-detail .fakten { padding: 10px 12px; gap: 6px 12px; }
  .tp-detail .fakt dd { font-size: 14px; }
  .tp-menue__liste .einst__text span { font-size: 12px; }
}

@media (prefers-reduced-motion: reduce) {
  .tp-detail.tp-detail--blatt { animation: none; }
}

/* Service-Rufe vom Tablet (Besteck, Getraenke, Frage, Service), 13.10.2026 */
.zaehler__ruf {
  display: inline-flex; align-items: center; gap: 7px; min-height: 40px; padding: 0 14px 0 11px; margin-left: 6px; border-radius: 999px;
  border: 1.5px solid var(--gold); background: var(--panel); color: var(--gold); font-size: 15px; font-weight: 700; cursor: pointer;
  animation: zahlen-atmen 2.6s ease-in-out infinite;
}
.zaehler__ruf .icon { width: 18px; height: 18px; --icon-strich: 2.2; }
.ist-eingebettet .zaehler__ruf { min-height: 34px; font-size: 13px; padding: 0 11px 0 9px; }
.tk__ruf {
  position: absolute; left: 50%; bottom: 0; transform: translate(-50%, 58%); z-index: 3;
  display: inline-flex; align-items: center; gap: 4px; padding: 2px 8px 2px 6px; border-radius: 999px;
  background: var(--gold); color: var(--btn-text); box-shadow: 0 4px 10px rgba(0, 0, 0, .45);
  font-size: 10.5px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; white-space: nowrap; line-height: 1.3;
}
.tk__ruf .icon { width: 13px; height: 13px; --icon-strich: 2.3; }
.tp-ruf {
  display: flex; align-items: center; gap: 10px; margin: 0; padding: 8px 8px 8px 14px; border-radius: 14px;
  border: 1.5px solid var(--gold); color: var(--gold); font-size: 14px; line-height: 1.35;
}
.tp-ruf .icon { width: 22px; height: 22px; flex: none; --icon-strich: 2.2; }
.tp-ruf__text { flex: 1; min-width: 0; }
.tp-ruf__text b { font-weight: 700; }
.tp-ruf__knopf { flex: none; }
@media (prefers-reduced-motion: reduce) { .zaehler__ruf { animation: none; } }