/* PIM-104 (docs/plans/2026-10-04-pim-104-visual-language.md §2.2, §7 E9): the components the web app and the supplier portal
   share - notice, card, status pill, empty state, button. Served by the web as /bausteine.css, embedded in the portal's dll and
   inlined in its <style> after grundwerte.css. Only the tokens of grundwerte.css; one class per component. */

/* notice: in the content column; warn (amber), info (blue), fehler (red), ok (green) */
.hinweisbox { border: 1px solid; border-radius: var(--r-6); padding: var(--a-8) var(--a-12); font-size: var(--t-13); }
.hinweisbox.warn { background: var(--amber-hell); border-color: #f4ddb4; color: #6b4300; }
.hinweisbox.info { background: var(--blau-hell); border-color: #cfe2fb; color: var(--text); }
.hinweisbox.fehler { background: var(--rot-hell); border-color: #f2c8d0; color: var(--rot-text); }
.hinweisbox.ok { background: var(--gruen-hell); border-color: #8ed6ae; color: var(--gruen-text); }
.hinweisbox > :first-child { margin-top: 0; }
.hinweisbox > :last-child { margin-bottom: 0; }

/* card: a surface with a title, an optional one-line explanation, then its body 8 apart */
.karte { background: var(--flaeche); border: 1px solid var(--linie); border-radius: var(--r-6); padding: var(--a-16); min-width: 0; }
.karte > * { margin-top: 0; margin-bottom: 0; }
.karte > * + * { margin-top: var(--a-8); }
.karte h2 { font-size: var(--t-14); margin: 0; overflow-wrap: anywhere; }
.karte > .unter { font-size: var(--t-12); color: var(--text-3); margin-top: var(--a-2); }

/* status pill: the pill mapping's five kinds; a cell-state pill takes its matrix colour from data-farbe (pim.css) */
/* 16 px tall: it sits inside a table row's 18 px text line without growing the row */
.chip { display: inline-block; padding: 0 6px; border-radius: var(--r-pille); font-size: var(--t-12); font-weight: 600; white-space: nowrap; line-height: 16px; }
.chip.gut { background: var(--gruen-hell); color: var(--gruen-text); }
.chip.warn { background: var(--amber-hell); color: var(--amber-text); }
.chip.schlecht { background: var(--rot-hell); color: var(--rot-text); }
.chip.info { background: var(--blau-hell); color: var(--blau); }
.chip.neutral { background: var(--leer); color: var(--text-2); }
a.chip:hover { text-decoration: none; filter: brightness(.96); }

/* empty state: one surface wherever a list has nothing to show */
.leer { color: var(--text-3); font-size: var(--t-13); padding: var(--a-12) var(--a-16); background: var(--grund); border: 1px dashed var(--linie); border-radius: var(--r-6); }

/* button: one height (the app bar's search field, --feld); secondary is the plain .knopf */
.knopf { display: inline-flex; align-items: center; justify-content: center; gap: var(--a-4); height: var(--feld); padding: 0 var(--a-12);
  font: inherit; font-size: var(--t-13); font-weight: 600; white-space: nowrap; text-decoration: none;
  border: 1px solid var(--linie); background: var(--flaeche); color: var(--text); border-radius: var(--r-4); cursor: pointer; }
.knopf:hover { border-color: var(--blau); color: var(--blau); text-decoration: none; }
.knopf.primaer { background: var(--blau); border-color: var(--blau); color: #fff; }
.knopf.gefahr { background: var(--rot); border-color: var(--rot); color: #fff; }
/* PIM-598 (Kai: "secondary buttons ... light grey plus a wider surrounding line"): the secondary look of the pages that draw .knopf from this sheet alone - the standalone pages and the portal.
   Not on a New page (body.neu: this sheet is in its layer alt there, and its own rules draw the button), not on a coloured face, an inactive (.aus) or a pressed button, nor the portal's .gross.
   :where keeps the specificity at body + .knopf, so every other .knopf rule still wins. The line is an inset shadow: it takes no layout space. */
body:where(:not(.neu)) .knopf:where(:not(.primaer, .gefahr, .aus, .gross, [aria-pressed="true"])) { border-color: var(--knopf-linie); background: var(--grund); box-shadow: inset 0 0 0 1px var(--knopf-linie); }
body:where(:not(.neu)) .knopf:where(:not(.primaer, .gefahr, .aus, .gross, [aria-pressed="true"], :disabled)):hover { background: var(--flaeche); box-shadow: inset 0 0 0 1px var(--blau); }
.knopf:disabled { opacity: .45; cursor: not-allowed; }
/* PIM-252: a pop-up's upload runs ~30 s - pim.js puts `laeuft` on the form: the primary button turns grey and a spinner with the hint stands beside it */
form.laeuft .knopf.primaer:disabled { background: var(--text-3); border-color: var(--text-3); opacity: 1; }
.hochladehinweis { display: inline-flex; align-items: center; gap: var(--a-8); font-size: var(--t-13); color: var(--text-3); }
.hochladehinweis[hidden] { display: none; }
/* PIM-277: the file names a card's click uploads, beside the upload button */
.dateinamen { display: inline-flex; flex-wrap: wrap; align-items: center; gap: var(--a-8); font-size: var(--t-13); color: var(--text-3); }
.dateinamen[hidden], .dateinamen [hidden] { display: none; }
.drehen { width: 14px; height: 14px; border: 2px solid var(--linie); border-top-color: var(--blau); border-radius: 50%; animation: drehen 0.9s linear infinite; }
@keyframes drehen { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .drehen { animation-duration: 3s; } }
.ergebnis-oeffnen { display: flex; align-items: center; gap: var(--a-8); margin: var(--a-4) 0; }
.knoepfe { display: flex; gap: var(--a-8); flex-wrap: wrap; align-items: center; }
