/* Redesign Runde 51 (2.116.0). Copyright © Fabian Stamminger @ The Platform Group */

/* R51-01 (D-2403): Weiterverrechnung Schritt 1, Karten werden nie gestaucht; die Liste ist ein eigener Scroll-Container, die Suche bleibt oben */
.rw-docs { display: flex; flex-direction: column; gap: .5rem; }
.rw-doc { flex: 0 0 auto; min-height: 56px; height: auto; box-sizing: border-box; overflow: visible; }
.rw-doc .rw-doc-main { min-width: 0; }
.rw-docs.is-all { overflow-y: auto; overscroll-behavior: contain; max-height: calc(100dvh - 380px); min-height: 120px; padding-right: 2px; }
#swCard .rw-field:has([data-rw-search]) { position: sticky; top: 0; z-index: 2; background: #fff; padding-bottom: .25rem; }

/* R51-01 (D-2405, D-2406): Fußleiste im Beleg, Betrag und Fälligkeit einzeilig, Grund grau und einzeilig neben dem Knopf */
#documentDetailModal .doc-detail-actionbar .doc-bar-summary { white-space: nowrap !important; overflow: hidden !important; text-overflow: ellipsis !important; line-height: 24px; max-height: 24px; }
#documentDetailModal .doc-detail-actionbar #docApproveNote.is-reason,
#documentDetailModal .doc-detail-actionbar .doc-approve-step.is-reason { color: #565C67; white-space: nowrap !important; overflow: hidden !important; text-overflow: ellipsis; font-size: .875rem; line-height: 1.35; text-align: right; display: block; padding: 0; }
#docApproveNote.is-blocked { color: #565C67; }
.doc-review-nav { gap: 12px; }
.doc-review-nav .doc-review-pos { margin-inline: 12px; }
.todo-card.is-wait { border-color: #D8DCE4; }
.todo-card.is-wait .todo-head { display: flex; align-items: center; gap: .5rem; }
.todo-card .todo-next-main { min-height: 44px; display: inline-flex; align-items: center; justify-content: center; text-decoration: none; padding: 0 1.25rem; border-radius: 999px; }
.todo-card .todo-next { color: #565C67; }
@media (max-width: 767px) {
  #documentDetailModal .doc-detail-actionbar #docApproveNote.is-reason, #documentDetailModal .doc-detail-actionbar .doc-approve-step.is-reason { text-align: left; }
}

/* R51-02 (D-2277): Ausgangsrechnungen, Liste am Handy als Karten, Filter hinter einem Knopf mit Zähler */
.oi-filter-toggle { display: none; }
@media (max-width: 767px) {
  .oi-filter-toggle { display: inline-flex; align-items: center; gap: .5rem; min-height: 44px; padding: 0 1rem; border: 1px solid #D8DCE4; border-radius: 999px; background: #fff; color: #0E1115; font: inherit; font-weight: 600; cursor: pointer; }
  .oi-filter-card .oi-filters { display: none; margin-top: .75rem; }
  .oi-filter-card.is-open .oi-filters { display: grid; grid-template-columns: minmax(0, 1fr); gap: .5rem; }
  .oi-table-wrap { overflow: visible; }
  .oi-table, .oi-table tbody, .oi-table tr, .oi-table td { display: block; width: 100%; box-sizing: border-box; }
  .oi-table thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  .oi-table tr { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: .2rem .75rem; align-items: center; padding: .85rem; margin: 0 0 .6rem; border: 1px solid #D8DCE4; border-radius: 12px; background: #fff; }
  .oi-table td { padding: 0 !important; border: 0 !important; min-width: 0; }
  .oi-table td[data-label]::before { content: attr(data-label) ": "; color: #565C67; font-size: .8125rem; }
  .oi-table td.oi-c-nr { grid-column: 1; grid-row: 1; font-weight: 700; }
  .oi-table td.oi-c-gross { grid-column: 2; grid-row: 1; text-align: right; font-weight: 700; font-variant-numeric: tabular-nums; }
  .oi-table td.oi-c-cust { grid-column: 1 / -1; grid-row: 2; }
  .oi-table td.oi-c-status { grid-column: 1 / -1; grid-row: 3; }
  .oi-table td.oi-c-co, .oi-table td.oi-c-date, .oi-table td.oi-c-due, .oi-table td.oi-c-open { grid-column: 1 / -1; font-size: .875rem; color: #333840; }
  .oi-table td.oi-c-co { display: none; }
}
.oi-table td.oi-num, .oi-table th.oi-num { font-variant-numeric: tabular-nums; }
