/* ueberfaellig.css: Leiste "ueberfaellig" ueber dem Contentplan (ueberfaellig.js, Moritz 27.11.2026).
   Farben nur aus theme.js: Ziegel (--warn, --warn-ink) heisst ueberfaellig, sonst Schwarz, Grau, Creme.
   Keine Schatten, Status immer Wort plus Zeichen (Manual v1.7, Kapitel Content Platform).
   Drei Schriftgroessen in der Leiste: 17 (Zahl), 15 (Titel, Kunde), 13 (alles andere). */

/* ---- Rahmen ---- */
.ueb-leiste { margin:-4px 0 16px; padding:14px 14px 12px 18px; border-radius:1.25rem; background:var(--bg-s1, #141012);
  border:1px solid color-mix(in srgb, var(--warn, #E36A5F) 38%, transparent); }
/* Beim offenen Kunden nichts, bei anderen schon: ruhige Leiste ohne Ziegel */
.ueb-leiste.ruhig { border-color:var(--line-a100, rgba(255,255,255,0.1)); padding-bottom:14px; }

/* ---- Kopf: Zahl, Hinweis, Umschalter, Einklappen. Computer in einer Zeile, Handy gestapelt ---- */
.ueb-kopf { display:grid; grid-template-columns:auto minmax(0, 1fr) auto auto; grid-template-areas:"t h u k"; align-items:center; column-gap:12px; row-gap:8px; }
.ueb-leiste:not(.ruhig) .ueb-kopf { margin-bottom:6px; }
/* h2 bekommt im Hellen per theme.js die Schriftfarbe mit !important, die Zahl traegt die Farbe deshalb im span */
.ueb-leiste .ueb-zahl { grid-area:t; margin:0; font-family:'Funnel Display', sans-serif; font-size:17px; line-height:1.3; font-weight:600; text-transform:none; letter-spacing:0; white-space:nowrap; }
.ueb-zahl > span { color:var(--warn-ink, #E36A5F); }
.ueb-leiste .ueb-zahl.ruhig { font-size:15px; font-weight:400; white-space:normal; grid-column:1 / 3; }
/* Leise: h2 bekommt im Hellen die Schriftfarbe mit !important (theme.js), darum ein span */
.ueb-zahl.ruhig > span { color:var(--fg-a600, rgba(255,255,255,0.6)); }
.ueb-kopf-hinweis { grid-area:h; margin:0; font-size:13px; line-height:1.4; font-weight:400; color:var(--fg-a600, rgba(255,255,255,0.6)); }
.ueb-umschalter { grid-area:u; justify-self:end; }
.ueb-umschalter button { display:inline-flex; align-items:center; gap:6px; white-space:nowrap; font-size:13px; }
.ueb-umschalter-zahl { font-weight:600; color:var(--fg-a500, rgba(255,255,255,0.5)); }
.ueb-umschalter button.an .ueb-umschalter-zahl { color:inherit; }
.ueb-klapp { grid-area:k; }

.ueb-klapp, .ueb-mehr { flex-shrink:0; min-height:36px; padding:0 14px; border-radius:9999px; font-size:13px; font-weight:600; cursor:pointer;
  background:transparent; color:var(--fg-1, #fff); border:1px solid var(--kontur, var(--line-a150, rgba(255,255,255,0.15))); transition:background-color .3s ease-out; }
.ueb-klapp:hover, .ueb-mehr:hover { background:var(--surf-a080, rgba(255,255,255,0.08)); }
.ueb-klapp:focus-visible, .ueb-mehr:focus-visible { outline:2px solid var(--fg-1, #fff); outline-offset:2px; }
.ueb-mehr { margin-top:6px; }

/* ---- Liste: zwei Spalten am Computer, je Kunde ein Block bei "alle Kunden" ---- */
.ueb-raster { display:grid; grid-template-columns:repeat(2, minmax(0, 1fr)); column-gap:12px; row-gap:2px; margin-left:-8px; }
.ueb-raster[hidden] { display:none; }
.ueb-gruppe-kopf { grid-column:1 / -1; display:flex; align-items:baseline; gap:8px; margin:10px 0 2px 8px; font-size:15px; line-height:1.3; font-weight:600; color:var(--fg-1, #fff); }
.ueb-raster .ueb-gruppe-kopf:first-child { margin-top:2px; }
.ueb-raster.gruppiert .ueb-gruppe-kopf:not(:first-child) { padding-top:12px; border-top:1px solid var(--line-a100, rgba(255,255,255,0.1)); }
.ueb-gruppe-zahl { color:var(--warn-ink, #E36A5F); }
.ueb-gruppe-hier { font-size:13px; font-weight:400; color:var(--fg-a500, rgba(255,255,255,0.5)); }

/* ---- Eine Zeile: Bild, Titel, seit wann, woran es haengt ---- */
.ueb-zeile { display:flex; align-items:center; gap:12px; width:100%; padding:8px 10px 8px 8px; text-align:left; border-radius:14px;
  background:none; border:1px solid transparent; color:inherit; cursor:pointer; transition:background-color .2s ease-out, border-color .2s ease-out, transform .15s cubic-bezier(.16,1,.3,1); }
.ueb-zeile:hover { background:var(--surf-a050, rgba(255,255,255,0.05)); border-color:var(--line-a100, rgba(255,255,255,0.1)); }
.ueb-zeile:active { transform:scale(.99); }
.ueb-zeile:focus-visible { outline:2px solid var(--fg-1, #fff); outline-offset:1px; }
.ueb-bild { width:48px; height:48px; flex-shrink:0; border-radius:10px; overflow:hidden; display:flex; align-items:center; justify-content:center;
  background:var(--surf-a080, rgba(255,255,255,0.08)); color:var(--fg-a500, rgba(255,255,255,0.5)); }
.ueb-bild img { width:100%; height:100%; object-fit:cover; display:block; }
.ueb-bild .material-symbols-outlined { font-size:20px; }
.ueb-bild.fehlt { background:transparent; border:1px dashed var(--fg-a350, rgba(255,255,255,0.35)); }
.ueb-text { min-width:0; flex:1; display:flex; flex-direction:column; gap:2px; }
.ueb-titel { display:-webkit-box; -webkit-box-orient:vertical; -webkit-line-clamp:2; overflow:hidden; overflow-wrap:break-word; font-size:15px; line-height:1.3; font-weight:600; color:var(--fg-1, #fff); }
.ueb-meta, .ueb-grund { font-size:13px; line-height:1.35; color:var(--fg-a600, rgba(255,255,255,0.6)); }
.ueb-meta { overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.ueb-grund { text-wrap:pretty; color:var(--fg-a800, rgba(255,255,255,0.8)); }
.ueb-seit { font-weight:600; color:var(--warn-ink, #E36A5F); }
.ueb-trenner { margin:0 6px; color:var(--fg-a350, rgba(255,255,255,0.35)); }
.ueb-punkt { display:inline-block; width:7px; height:7px; border-radius:50%; margin-right:6px; vertical-align:1px; }
.ueb-pfeil { flex-shrink:0; font-size:20px; color:var(--fg-a400, rgba(255,255,255,0.4)); }

/* Mittlere Breite: Umschalter in die zweite Zeile */
@media (max-width: 1100px) {
  .ueb-kopf { grid-template-columns:auto minmax(0, 1fr) auto; grid-template-areas:"t h k" "u u u"; }
  .ueb-umschalter { justify-self:start; }
  .ueb-leiste .ueb-zahl.ruhig { grid-column:1 / -1; }
  /* Zwei Spalten werden hier schmal: Kanal weglassen statt abschneiden */
  .ueb-kanal { display:none; }
}
@media (max-width: 767px) {
  .ueb-raster { grid-template-columns:minmax(0, 1fr); }
  .ueb-leiste { padding:12px 8px 10px 14px; }
  .ueb-leiste.ruhig { padding:12px 14px 14px; }
  .ueb-kopf { grid-template-columns:minmax(0, 1fr) auto; grid-template-areas:"t k" "h h" "u u"; row-gap:4px; }
  .ueb-umschalter { display:flex; justify-self:stretch; margin-top:6px; margin-right:6px; }
  .ueb-umschalter button { flex:1; justify-content:center; min-height:40px; }
  .ueb-kanal { display:none; }
  .ueb-klapp, .ueb-mehr { min-height:44px; }
  .ueb-zeile { min-height:64px; }
}
@media (prefers-reduced-motion: reduce) {
  .ueb-zeile, .ueb-klapp, .ueb-mehr { transition:none !important; }
}
