/* Styles of the order-pattern modules (Bestellungen, Sortiment, Bestellungen einstellen). Linked from index.html
   after app.css. Use the variables of app.css. */

/* Actions and filters above the list */
.order-actions { display: flex; flex-wrap: wrap; gap: .6rem; margin: 0 0 1rem; }
.order-actions .button { flex: 1 1 11rem; }
.order-actions .button.small { flex: 0 0 auto; }
.chips.filters { margin: 0 0 1.25rem; }
.chips.filters .chip { font-variant-numeric: tabular-nums; }
.order-past { margin: 1.75rem .9rem .5rem; font-size: .84rem; font-weight: 600; color: var(--ink-3); }
.chip-sub { display: block; font-size: .78rem; font-weight: 500; color: var(--ink-2); }
.chip.on .chip-sub { color: color-mix(in srgb, var(--cream) 85%, transparent); }
.chips.windows .chip, .chips.days .chip { flex-direction: column; align-items: flex-start; gap: 0; min-height: 2.9rem; line-height: 1.2; padding-block: .35rem; }
.chips.windows .chip:disabled { opacity: .5; cursor: not-allowed; }

/* One order in a list: time, who and what, the next step */
.order-line {
  display: grid; grid-template-columns: 3.3rem minmax(0, 1fr) auto; align-items: center; gap: .25rem .7rem; padding-block: .55rem;
}
.order-time { display: grid; align-self: start; padding-top: .55rem; font-variant-numeric: tabular-nums; line-height: 1.15; }
.order-time b { font-size: 1rem; font-weight: 700; }
.order-time small { font-size: .76rem; color: var(--ink-2); }
.order-open {
  display: grid; gap: .15rem; min-width: 0; min-height: 2.9rem; padding: .35rem 0; border: 0; background: transparent; text-align: left; border-radius: 8px;
}
.order-open .row-title { font-weight: 600; }
.order-open:active { background: #f1f0ec; }
.order-quick { justify-self: end; white-space: nowrap; }
.order-tags { display: flex; flex-wrap: wrap; gap: .3rem; margin-top: .15rem; }
.order-line.st-done .row-title, .order-line.st-off .row-title { color: var(--ink-2); }
.order-line.st-off .row-title { text-decoration: line-through; text-decoration-thickness: 1px; }
@media (max-width: 26rem) {
  .order-line { grid-template-columns: 3.1rem minmax(0, 1fr); }
  .order-quick { grid-column: 2; justify-self: start; margin-bottom: .2rem; }
}

/* State and payment chips */
.tag.st-new { background: #fbe9d8; color: #7a3d1c; }
.tag.st-ok { background: var(--brand-soft); color: var(--brand); }
.tag.st-work { background: #e6eef6; color: #2a5170; }
.tag.st-ready { background: #dff1e6; color: #17603c; }
.tag.st-done { background: var(--fill); color: var(--ink-2); }
.tag.st-off { background: #f6e1de; color: #8c2a1f; }
.tag.st-late { background: #fbe4c8; color: #6e3d00; }
.tag.pay-paid { background: #dff1e6; color: #17603c; }
.tag.pay-open { background: #fff3d6; color: #6b4a00; }
.tag.tag-delivery { background: #efe6f4; color: #5b3c71; }
.tag.tag-override, .tag.tag-warn { background: #fff3d6; color: #6b4a00; }
.tag.tag-sold { background: #f6e1de; color: #8c2a1f; }
.tag.tag-season { background: #e9efe4; color: #3e5a2a; }

/* The day's list: totals per product, the orders behind each line, the packing list */
.order-daynav { display: flex; align-items: center; gap: .35rem; margin: 0 0 1rem; flex-wrap: wrap; }
.order-daynav .cal-date { flex: 1; margin: 0; text-align: center; font-weight: 650; min-width: 8rem; }
.totals { margin-bottom: 1rem; }
.totals-head, .totals-row {
  display: grid; grid-template-columns: minmax(0, 1fr) 3.6rem 4.4rem 1rem; align-items: center; gap: .5rem; padding: .55rem 1rem;
}
.totals-head { font-size: .78rem; font-weight: 650; color: var(--ink-2); border-bottom: .5px solid var(--line); }
.totals-head span:nth-child(n+2) { text-align: right; }
.totals-head span:last-child { grid-column: 3; }
.totals-row { width: 100%; min-height: 3rem; border: 0; background: transparent; text-align: left; font-size: 1rem; }
button.totals-row:active { background: #f1f0ec; }
.totals-item + .totals-item { border-top: .5px solid var(--line); }
.totals-name { font-weight: 550; overflow-wrap: anywhere; }
.totals-n { text-align: right; font-variant-numeric: tabular-nums; font-weight: 650; }
.totals-n.todo { color: #8f4a26; }
.totals-row .chevron { justify-self: end; transition: transform .15s; }
.totals-row[aria-expanded="true"] .chevron { transform: rotate(90deg); }
.totals-orders { list-style: none; margin: 0; padding: 0 1rem .75rem 1.4rem; display: grid; gap: .45rem; }
.totals-orders li { display: grid; gap: .1rem; padding: .45rem .7rem; border-radius: 10px; background: var(--fill); font-size: .9rem; }
.totals-orders li span { color: var(--ink-2); overflow-wrap: anywhere; }
.action-row.standalone { margin-top: .5rem; border-radius: var(--radius); box-shadow: var(--shadow); justify-content: space-between; }
.group-head .segmented { flex: 0 1 15rem; }

/* The order in its sheet */
.order-detail { display: grid; gap: .5rem; }
.order-note { font-size: .88rem; color: var(--ink-2); overflow-wrap: anywhere; }
.order-items { list-style: none; margin: .35rem 0 0; padding: 0; display: grid; gap: .3rem; }
.order-items li { display: flex; flex-wrap: wrap; justify-content: space-between; gap: .1rem .75rem; }
.order-items li small { flex-basis: 100%; color: var(--ink-2); font-size: .88rem; }
.order-items .order-total { padding-top: .35rem; border-top: .5px solid var(--line); font-weight: 650; }
.order-contact { display: grid; gap: .45rem; justify-items: start; }
.order-contact .button { text-decoration: none; }
.order-more { display: flex; flex-wrap: wrap; gap: .5rem; }
.order-more .button { flex: 0 1 auto; }
.button.danger-text { color: var(--danger); }
.order-block { display: grid; gap: .55rem; padding-top: 1rem; border-top: .5px solid var(--line); }
.order-block-title { margin: 0; font-size: .95rem; font-weight: 650; }
.order-block .order-more { margin: 0; }
.order-message { display: grid; gap: .3rem; }
.order-message p { margin: 0; }
.order-history { list-style: none; margin: 0; padding: 0; display: grid; gap: .3rem; font-size: .9rem; }
.order-history li { display: grid; grid-template-columns: max-content minmax(0, 1fr); gap: .75rem; }
.hist-at { color: var(--ink-2); font-variant-numeric: tabular-nums; white-space: nowrap; }
.message-preview { display: grid; gap: .35rem; }
.message-preview p { margin: 0; }
.ok-line { margin: 0; padding: .6rem .8rem; border-radius: 11px; background: #dff1e6; color: #17603c; font-weight: 550; }
.sheet-body .impact { margin: 0; }
.sheet-body .impact p { margin: 0; }

/* The owner's entry */
.entry-line { display: grid; gap: .8rem; padding: .9rem; box-shadow: none; border: .5px solid var(--line); overflow: visible; }
.stepper { display: inline-flex; align-items: center; gap: .5rem; padding: .15rem; border-radius: 12px; background: var(--fill); justify-self: start; }
.stepper .icon-button { width: 2.75rem; height: 2.75rem; font-size: 1.35rem; font-weight: 600; border-radius: 10px; background: var(--card); }
.stepper .icon-button:disabled { opacity: .45; }
.stepper-value { min-width: 4.5rem; text-align: center; font-weight: 650; font-variant-numeric: tabular-nums; }
/* The sheet body is a grid with a 1rem gap: a label sits right above its chips, text buttons hug the content. */
.sheet-body > .field-label { margin: .25rem 0 -.5rem; }
.sheet-body > .text-button { justify-self: start; margin: -.4rem 0; }
.sheet-body > .card.sheet-card { overflow: visible; }
.sheet-card > .row { background: transparent; }
@media (max-width: 21rem) { .sheet-body .field-pair { grid-template-columns: 1fr; } }

/* Sortiment */
.sort-line { display: flex; align-items: center; gap: .5rem; padding-block: .3rem; }
.sort-line .order-open { flex: 1; display: flex; align-items: center; gap: .75rem; }
.sort-line.is-sold .row-title { color: var(--ink-2); }
.sold-toggle {
  display: inline-flex; align-items: center; gap: .4rem; min-height: 2.75rem; padding: .3rem .7rem; border-radius: 11px; border: 1px solid var(--line);
  background: var(--card); font-size: .88rem; font-weight: 600; color: var(--ink-2); white-space: nowrap; flex: none;
}
.sold-mark { width: 1rem; height: 1rem; border-radius: 5px; border: 2px solid currentColor; flex: none; }
.sold-toggle[aria-pressed="true"] { background: #f6e1de; border-color: #e7b8b1; color: #8c2a1f; }
.sold-toggle[aria-pressed="true"] .sold-mark { background: currentColor; box-shadow: inset 0 0 0 2px #f6e1de; }
.photo-row { display: flex; align-items: center; gap: .8rem; flex-wrap: wrap; }
.photo-row .row-text { flex: 1 1 10rem; }
.photo-tile {
  display: grid; place-items: center; width: 3.6rem; height: 3.6rem; border-radius: 12px; flex: none;
  background: linear-gradient(135deg, var(--brand-soft), #f6e7dc); color: var(--brand); font-size: 1.5rem; font-weight: 700;
}
.size-row { display: flex; align-items: flex-end; gap: .75rem; flex-wrap: wrap; }
.size-row .field { flex: 1 1 9rem; }
.size-add { display: grid; grid-template-columns: minmax(0, 1fr) 8rem; gap: .6rem .75rem; align-items: end; }
.size-add > .button { grid-column: 1 / -1; justify-self: start; }
@media (max-width: 21rem) { .size-add { grid-template-columns: 1fr; } }
.input.narrow { max-width: 9rem; }
.chips.allergens .chip { gap: .35rem; }
.chips.allergens .chip b { font-weight: 750; }

/* Bestellungen einstellen */
.stack-row { display: grid; gap: .5rem; align-items: stretch; }
.stack-row .field { width: 100%; }
.cap-row { justify-content: space-between; gap: .75rem; }
.cap-row .select { max-width: 10rem; }
.group-intro.inner { margin: 0; padding: .75rem 1rem .25rem; }
.impact-order { display: grid; gap: .5rem; padding: .9rem; box-shadow: none; border: .5px solid var(--line); overflow: visible; }
.impact-order p { margin: 0; }

/* Fix round 1 (owner test of 27 Nov 2026) */
.order-actions .button { flex: 1 0 auto; white-space: nowrap; }
.order-amounts { margin: -.25rem 0 1rem; }
.order-amounts .row-text { flex: 1; min-width: 0; }
.order-make-head { flex-wrap: wrap; row-gap: .5rem; }
.order-make-head .segmented { flex: 1 0 auto; max-width: 16rem; }
.order-make-head .segment span { white-space: nowrap; }
.totals-parts { display: grid; gap: .25rem; margin-bottom: 1rem; }
.totals-parts .totals { margin-bottom: .5rem; }
.totals-part-title { margin: .25rem .9rem .4rem; font-size: .84rem; font-weight: 650; color: var(--ink-2); }
.order-facts { display: grid; grid-template-columns: max-content minmax(0, 1fr); gap: .35rem .9rem; margin: .25rem 0 0; }
.order-facts dt { color: var(--ink-2); font-size: .9rem; }
.order-facts dd { margin: 0; overflow-wrap: anywhere; }
@media (max-width: 21rem) { .order-facts { grid-template-columns: 1fr; } .order-facts dd { margin-bottom: .25rem; } }
.order-message-head { display: flex; flex-wrap: wrap; gap: .1rem .5rem; font-size: .88rem; color: var(--ink-2); }
.order-message-head b { color: var(--ink); font-weight: 650; }
.order-message.is-old .quote-box { opacity: .6; }
.paid-choices { display: grid; gap: .6rem; }
.button.paid-choice { display: grid; justify-content: stretch; justify-items: start; align-content: center; gap: .05rem; min-height: 3.2rem; text-align: left; padding-inline: 1rem; }
.paid-label { font-weight: 650; }
.paid-sub { font-size: .82rem; font-weight: 500; color: var(--ink-2); }
/* „Ab 1. Mai“ beside a season product before its first day: a plain label, never looking like a button. */
.season-start { flex: none; padding: 0 .2rem; color: var(--ink-2); font-size: .88rem; font-weight: 550; white-space: nowrap; }

/* Fix round 2 (owner tests of 28 Nov 2026) */
.message-text { white-space: pre-line; }
.order-open .order-what { display: block; }
.season-hint { margin: -.4rem 0 0; }

/* K13 feature pass (28 Nov 2026): search, day load, deposits, changes, customers, standing orders, print */
.order-search { margin: 0 0 .75rem; }
.order-day-head { align-items: baseline; flex-wrap: wrap; row-gap: .25rem; }
.order-day-head .group-title { margin-bottom: 0; }
.day-open { display: inline-flex; align-items: center; gap: .4rem; min-height: 2.75rem; padding: 0 .2rem; font-size: .86rem; color: var(--ink-2); font-weight: 550; }
.day-open .chevron { width: .9rem; }
.tag.tag-full { background: #f6e1de; color: #8c2a1f; }
.tag.pay-deposit { background: #e6eef6; color: #2a5170; }
.tag.tag-series { background: var(--brand-soft); color: var(--brand); }
.order-line.is-urgent { box-shadow: inset 3px 0 0 #c2582b; background: #fdf3ec; }
.order-line.is-urgent .order-note:first-of-type { color: #8f3d16; font-weight: 550; }
.day-actions { margin: -.25rem 0 .75rem; justify-content: flex-end; }
.day-full { margin: 0 0 1rem; }
.pack-window { display: grid; gap: .4rem; margin-bottom: .9rem; }
.pack-window-head { display: flex; align-items: center; justify-content: space-between; gap: .5rem; padding: 0 .9rem; min-height: 2.75rem; }
.pack-window-title { margin: 0; font-size: .9rem; font-weight: 650; color: var(--ink-2); font-variant-numeric: tabular-nums; }
.totals-category { margin: .35rem .9rem .3rem; font-size: .8rem; font-weight: 650; letter-spacing: .02em; text-transform: uppercase; color: var(--ink-3); }
.plain-list { list-style: none; margin: 0; padding: 0; display: grid; gap: .45rem; }
.ready-list li { padding: .55rem .75rem; border-radius: 10px; background: var(--fill); overflow-wrap: anywhere; }
.deposit-line { margin: 0; font-weight: 600; }
.customer-link { border-radius: var(--radius); background: var(--fill); }
.customer-link .row-icon { color: var(--brand); }
.stepper .stepper-input { width: 3.6rem; min-height: 2.75rem; text-align: center; font-weight: 650; font-variant-numeric: tabular-nums; padding: 0 .25rem; background: var(--card); }
.stepper-unit { padding-right: .25rem; color: var(--ink-2); font-size: .9rem; }
.suggest { display: grid; gap: .4rem; }
.suggest .card { box-shadow: none; border: .5px solid var(--line); }
.pay-detail { display: grid; gap: .6rem; margin-top: .6rem; }
.repeat-days { padding-top: 0; }
.full-hint { margin: -.4rem 0 0; color: #6b4a00; }
.delivery-fields { display: grid; gap: .8rem; }
.notice-line { margin: 0 0 1rem; padding: .7rem .9rem; border-radius: 12px; background: #fff3d6; color: #5c3f00; }
.season-prompt .row-value { margin: 0; color: var(--ink-2); }
.season-prompt .failure-actions { display: flex; flex-wrap: wrap; gap: .5rem; }
.series-date { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: .2rem .75rem; padding: .5rem .75rem; border-radius: 10px; background: var(--fill); }
.series-day { font-weight: 600; }
.series-state { grid-column: 1; color: var(--ink-2); font-size: .88rem; }
.series-date .button, .series-date .text-button { grid-column: 2; grid-row: 1 / span 2; justify-self: end; }
.series-date .text-button + .button { grid-row: auto; }
.stat-row { justify-content: space-between; gap: 1rem; }
.stat-value { font-size: 1.25rem; font-weight: 700; font-variant-numeric: tabular-nums; white-space: nowrap; }
.season-again .chip { flex-direction: column; align-items: flex-start; gap: 0; min-height: 2.9rem; line-height: 1.2; padding-block: .35rem; }
.textarea { min-height: 4.5rem; resize: vertical; line-height: 1.4; }

/* The print view of the Backliste and „Heute binden“ (BK2): A4, large type, nothing of the app around it. */
.print-sheet { padding: 1.25rem; border-radius: var(--radius); background: var(--card); box-shadow: var(--shadow); display: grid; gap: 1.1rem; }
.print-head { display: grid; gap: .15rem; }
.print-shop { margin: 0; font-size: .9rem; color: var(--ink-2); }
.print-title { margin: 0; font-size: 1.35rem; }
.print-part { display: grid; gap: .6rem; }
.print-part-title { margin: 0; font-size: 1.05rem; padding-bottom: .25rem; border-bottom: 1.5px solid var(--ink); }
.print-group-title { margin: .2rem 0 .2rem; font-size: .9rem; text-transform: uppercase; letter-spacing: .03em; color: var(--ink-2); }
.print-table { width: 100%; border-collapse: collapse; font-size: 1.05rem; }
.print-table th { text-align: left; font-size: .8rem; color: var(--ink-2); font-weight: 650; padding: .25rem .4rem; border-bottom: .5px solid var(--line); }
.print-table th:nth-child(n+2), .print-n { text-align: right; width: 4.5rem; }
.print-table td { padding: .45rem .4rem; border-bottom: .5px solid var(--line); vertical-align: top; }
.print-n { font-weight: 700; font-size: 1.2rem; font-variant-numeric: tabular-nums; }
.print-note { display: block; font-size: .9rem; color: var(--ink-2); overflow-wrap: anywhere; }
.print-orders { margin: 0; padding-left: 1.2rem; display: grid; gap: .55rem; }
.print-orders li { display: grid; gap: .1rem; }
@media print {
  @page { size: A4; margin: 14mm; }
  html, body { background: #fff !important; }
  body * { visibility: hidden !important; }
  .print-sheet, .print-sheet * { visibility: visible !important; }
  .print-sheet { position: absolute; inset: 0 auto auto 0; width: 100%; box-shadow: none; padding: 0; font-size: 13pt; color: #000; }
  .print-title { font-size: 20pt; }
  .print-table { font-size: 13pt; }
  .print-n { font-size: 16pt; }
  .print-note { color: #000; }
  .print-part { break-inside: avoid-page; }
}
.series-date { grid-template-columns: minmax(0, 1fr) auto; }
.series-open { display: grid; gap: .1rem; min-height: 2.75rem; align-content: center; padding: 0; border: 0; background: transparent; text-align: left; font: inherit; color: inherit; }
button.series-open .series-state { color: var(--brand); }
.series-date .button { grid-column: 2; grid-row: 1; }
.fd-pick { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: .6rem; align-items: center; }
/* B9: the customer's reminder tick on the order, in the tint of the customer link, the action under the text. */
.order-remind { border-radius: var(--radius); background: var(--fill); align-items: flex-start; }
.order-remind::before { display: none; }
.order-remind .row-icon { color: var(--brand); }
.order-remind .text-button { justify-self: start; align-self: flex-start; margin-top: .25rem; padding-left: 0; }
/* F44, BK5: a real photo in the tile, and the photos of an order. */
img.photo-tile { object-fit: cover; background: var(--fill); }
.product-photo .text-button { justify-self: start; }
.order-photos { display: flex; flex-wrap: wrap; gap: .6rem; }
.order-photo { position: relative; display: grid; gap: .25rem; justify-items: start; }
.order-photo img { width: 5.5rem; height: 5.5rem; border-radius: 12px; object-fit: cover; background: var(--fill); }
