/* stil-bon.css — der Kassenzettel (Ergebnis) und die Rundungs-Wahl.
   Der Bon hat oben und unten eine gezackte Abrisskante (SVG-Zickzack in
   Papierfarbe), ein Stempel „Fair verteilt“ kommt erst, wenn es etwas zu
   verteilen gibt. Balkenbreite und Zeilen-Verzögerung setzt ansicht.js per
   CSSOM — kein style-Attribut im Markup (CSP: style-src 'self'). */
.schritte { border: 0; padding: 0; margin: 0 0 16px; min-width: 0; }
.schritte legend { padding: 0; margin-bottom: 6px; font-size: 12.5px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--tinte-weich); }
.schritte-knoepfe { display: grid; grid-template-columns: 1.55fr 1fr 1fr 1fr; gap: 2px; background: var(--papier-tief); border-radius: 999px; padding: 4px; }
.schritte label { position: relative; display: block; min-width: 0; }
.schritte input { position: absolute; inset: 0; opacity: 0; margin: 0; cursor: pointer; }
.schritte span {
  display: block; text-align: center; padding: 8px 4px; border-radius: 999px; font-size: 13.5px; font-weight: 700;
  color: var(--tinte-weich); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; transition: background .15s, color .15s;
}
.schritte input:checked + span { background: var(--gruen); color: var(--messing-hell); box-shadow: 0 2px 6px rgba(0,0,0,.22); }
.schritte input:focus-visible + span { outline: 3px solid rgba(217,168,63,.6); }

.bon {
  --bon: #fffdf7;
  position: relative; background: var(--bon); color: var(--tinte); margin: 10px 6px 10px; padding: 18px 18px 20px;
  box-shadow: 0 1px 0 rgba(0,0,0,.05), 0 16px 30px -18px rgba(0,0,0,.55);
  font-variant-numeric: tabular-nums;
}
.bon::before, .bon::after {
  content: ""; position: absolute; left: 0; right: 0; height: 10px; pointer-events: none;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='10' viewBox='0 0 16 10'%3E%3Cpath d='M0 10h16L8 0z' fill='%23fffdf7'/%3E%3C/svg%3E") repeat-x;
}
.bon::before { top: -9px; }
.bon::after { bottom: -9px; transform: scaleY(-1); }

.bon-kopf { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 4px 10px; font-size: 12.5px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--tinte-weich); padding-bottom: 10px; border-bottom: 2px dashed var(--papier-rand); }
.bon-kopf span:last-child { margin-left: auto; text-align: right; letter-spacing: .04em; text-transform: none; }
.bon-topf { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; padding: 14px 0 4px; }
.bon-topf-label { font-size: 14px; color: var(--tinte-weich); font-weight: 600; }
.bon-topf-wert { font-family: var(--schau); font-weight: 800; font-size: clamp(28px, 7vw, 36px); line-height: 1; color: var(--gruen); }
.bon-satz { font-size: 13.5px; color: var(--tinte-weich); margin: 0 0 10px; display: flex; justify-content: space-between; gap: 10px; }

.bon-zeilen { list-style: none; margin: 0; padding: 4px 0 0; border-top: 2px dashed var(--papier-rand); }
.bon-zeile {
  display: grid; grid-template-columns: minmax(0,1fr) auto; grid-template-areas: "name betrag" "meta meta" "balken balken";
  padding: 10px 0 9px; border-bottom: 1px dotted var(--papier-rand); column-gap: 10px;
}
.bon-frisch .bon-zeile { animation: drucken .35s ease both; }
.bon-name { grid-area: name; font-weight: 700; font-size: 17px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bon-betrag { grid-area: betrag; font-family: var(--schau); font-weight: 800; font-size: 22px; line-height: 1.1; color: var(--gruen-hell); white-space: nowrap; }
.bon-meta { grid-area: meta; font-size: 13.5px; color: var(--tinte-weich); }
.bon-balken { grid-area: balken; height: 5px; border-radius: 3px; background: var(--papier-tief); margin-top: 7px; overflow: hidden; }
.bon-balken i { display: block; height: 100%; width: 0; border-radius: 3px; background: linear-gradient(90deg, var(--messing-dunkel), var(--messing-hell)); transition: width .45s cubic-bezier(.2,.75,.2,1); }
.bon-zeile-null { opacity: .5; }
.bon-zeile-null .bon-betrag { color: var(--tinte-hauch); }

.bon-summe { display: grid; gap: 4px; padding-top: 12px; }
.bon-summe div { display: flex; justify-content: space-between; gap: 10px; font-size: 15px; }
.bon-summe .gesamt { font-family: var(--schau); font-weight: 800; font-size: 20px; padding-top: 6px; border-top: 2px solid var(--tinte); margin-top: 2px; }
.bon-summe .rest { color: var(--rot); font-weight: 600; font-size: 14px; }
.bon-hinweis { margin: 0; padding: 16px 6px; color: var(--tinte-weich); text-align: center; font-size: 15px; line-height: 1.5; }

.bon-stempel { text-align: center; margin-top: 14px; }
.stempel {
  display: inline-block; transform: rotate(-6deg);
  font-family: var(--schau); font-weight: 800; font-size: 14px; letter-spacing: .14em; text-transform: uppercase;
  color: var(--rot); border: 3px double var(--rot); border-radius: 8px; padding: 4px 10px;
  opacity: .72; mix-blend-mode: multiply; pointer-events: none;
}
.bon-frisch .stempel { animation: stempeln .45s cubic-bezier(.2,1.4,.4,1) .35s both; }
@keyframes stempeln { from { transform: rotate(-6deg) scale(1.7); opacity: 0 } to { transform: rotate(-6deg) scale(1); opacity: .72 } }
@keyframes drucken { from { opacity: 0; transform: translateY(-6px) } to { opacity: 1; transform: none } }
@media (prefers-reduced-motion: reduce) { .bon-frisch .bon-zeile, .bon-frisch .stempel { animation: none } .bon-balken i { transition: none } }
