/**
 * FWT Preislisten-Generator
 * Datei: tools/preisliste-generator/assets/preisliste-generator.css
 * Zweck: Aussehen des Tabellen-Editors und der PDF-Anzeige
 *
 * Stand: 2026-10-09
 * Auf schmalen Bildschirmen scrollt die Tabelle waagerecht (pl-scroll).
 */
.pl-editor-wrap { margin-bottom: 1.5rem; }
.pl-editor-title { margin: 0 0 .5rem; }

.pl-cat { border: 1px solid #d3dae3; border-radius: .75rem; padding: .75rem; margin: 0 0 1rem; background: #fff; }
.pl-cat__head { display: grid; grid-template-columns: minmax(10rem, 1fr) minmax(10rem, 2fr) auto; gap: .5rem; align-items: center; margin-bottom: .5rem; }
@media (max-width: 40rem) { .pl-cat__head { grid-template-columns: minmax(0, 1fr); } }

.pl-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.pl-table { border-collapse: collapse; width: 100%; min-width: 58rem; }
.pl-th { text-align: left; font-size: .8rem; font-weight: 700; padding: .25rem .25rem; color: #3f4a5a; white-space: nowrap; }
.pl-td { padding: .2rem .25rem; vertical-align: top; }
.pl-td--name { width: 22%; } .pl-td--desc { width: 26%; } .pl-td--unit { width: 9%; }
.pl-td--price { width: 12%; } .pl-td--vat { width: 9%; } .pl-td--tiers { width: 16%; } .pl-td--act { width: 6.5rem; }

.pl-input { box-sizing: border-box; width: 100%; min-width: 0; padding: .45rem .5rem; border: 1px solid #aeb8c6; border-radius: .4rem; font: inherit; font-size: .92rem; background: #fff; color: #1c2333; }
.pl-input:focus { outline: 3px solid #0f766e; outline-offset: 1px; }
.pl-input--cat { font-weight: 700; }

.pl-tools { display: flex; gap: .25rem; }
.pl-btn { min-width: 2.25rem; min-height: 2.25rem; border: 1px solid #aeb8c6; border-radius: .4rem; background: #f3f5f8; color: #1c2333; font: inherit; cursor: pointer; }
.pl-btn:hover { background: #e6ebf1; }
.pl-btn:focus-visible { outline: 3px solid #0f766e; outline-offset: 1px; }
.pl-btn--del { color: #9b1c1c; }
.pl-btn--add { padding: .35rem .8rem; font-weight: 600; margin-top: .5rem; }
.pl-addbar { display: flex; flex-wrap: wrap; gap: 1rem; align-items: center; }
.pl-addbar .pl-btn--add { margin-top: 0; }
.pl-count { font-size: .85rem; color: #4a5565; }

.pl-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

.pl-msg { margin-top: .5rem; }
.pl-pdf { grid-column: 1 / -1; border: 1px solid #d3dae3; border-radius: .75rem; padding: .75rem; margin-top: 1rem; background: #fff; }
.pl-pdf[hidden] { display: none; }
.pl-pdf__bar { display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; margin-bottom: .5rem; }
.pl-pdf__bar strong { margin-right: auto; }
.pl-pdf__frame { width: 100%; height: 70vh; min-height: 24rem; border: 1px solid #d3dae3; border-radius: .4rem; background: #f3f5f8; }

/* Korrekturen: MwSt-Auswahl nicht abschneiden, Code-Block nie breiter als der Bildschirm */
.pl-td--vat { width: 11%; min-width: 6.5rem; }
.pl-table { min-width: 62rem; }
.gk-code, .gk-code pre { max-width: 100%; overflow-x: auto; }
.gk-layout--stacked > *, .gk-layout--stacked .gk-controls, .gk-layout--stacked .gk-card, .pl-editor-wrap, .pl-cat { min-width: 0; max-width: 100%; }
.pl-editor-wrap code { white-space: normal; overflow-wrap: anywhere; }
.pl-scroll, .pl-th--act { position: relative; }
