/* ═══════════════════════════════════════════════════════════════════════════
   Tagesübersicht — Paket P2-5
   Gehört zu public/js/tagesuebersicht.js.
   Mobile-first: schmal steht alles untereinander, ab 640 px wird verdichtet.
   Farben ausschließlich über die Tokens aus index.html.
   ═══════════════════════════════════════════════════════════════════════════ */

.heute-datum {
  font-size: 14px;
  color: var(--text-soft);
  margin: 2px 0 14px;
}

.heute-block { margin-bottom: 16px; }

.heute-kopf {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 14px;
}

.heute-titel {
  font-size: 13px;
  font-weight: 600;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: .4px;
}

.heute-kopf-zusatz { font-size: 13px; color: var(--muted); }

/* ── Handlungsbedarf ──────────────────────────────────────────────────────── */

.hu-liste { list-style: none; }

.hu-zeile {
  border-left: 3px solid var(--border-strong);
  border-bottom: 1px solid var(--border);
}

.hu-zeile:last-child { border-bottom: none; }

.hu-kritisch   { border-left-color: var(--red); }
.hu-dringend   { border-left-color: var(--yellow); }
.hu-offen      { border-left-color: var(--accent); }
.hu-vorgemerkt { border-left-color: var(--border-strong); }

/* Die ganze Zeile ist die Schaltfläche — am Telefon ist ein kleiner Link
   darin nicht zu treffen (Spec §6, 44 px Mindestmaß). */
.hu-knopf {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  min-height: 56px;
  padding: 12px 14px;
  background: none;
  border: none;
  text-align: left;
  font-family: var(--font);
  font-size: 14px;
  color: var(--text);
  cursor: pointer;
}

.hu-knopf:hover { background: var(--row-hover); }

.hu-symbol { font-size: 18px; line-height: 1; flex: 0 0 auto; }

.hu-text { display: flex; flex-direction: column; gap: 3px; min-width: 0; flex: 1 1 auto; }

.hu-titel { font-weight: 600; overflow-wrap: anywhere; }

.hu-zusatz { font-size: 13px; color: var(--muted); overflow-wrap: anywhere; }

/* Schmal nimmt die Zielangabe eine ganze Spalte weg; die Zeile ist ohnehin
   vollständig anklickbar, der Pfeil genügt dort. */
.hu-ziel { display: none; font-size: 13px; color: var(--accent); white-space: nowrap; flex: 0 0 auto; }

/* ── Tag und Wetter ───────────────────────────────────────────────────────── */

.heute-astro { display: flex; flex-direction: column; gap: 6px; }
.heute-astro-zeile { font-size: 14px; }
.heute-zeile-fehler { font-size: 13px; color: var(--yellow); }

.heute-ort {
  font-size: 13px;
  color: var(--muted);
  margin: 10px 0 14px;
  overflow-wrap: anywhere;
}

.heute-wetter {
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding-top: 14px;
  border-top: 1px solid var(--border);
}

.heute-wetter-jetzt { display: flex; flex-direction: column; gap: 3px; }
.heute-wetter-grad { font-size: 26px; font-weight: 700; line-height: 1; }
.heute-wetter-text { font-size: 14px; }
.heute-wetter-sub { font-size: 13px; color: var(--muted); }

.heute-wetter-tage {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
}

.heute-wetter-tag {
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--r);
  padding: 10px 12px;
}

.heute-wetter-tag-kopf {
  font-size: 13px;
  color: var(--text-soft);
  text-transform: uppercase;
  letter-spacing: .4px;
  margin-bottom: 4px;
}

.heute-wetter-tag-wert { font-size: 16px; font-weight: 600; }
.heute-wetter-tag-sub { font-size: 13px; color: var(--muted); margin-top: 3px; }

/* ── Termine ──────────────────────────────────────────────────────────────── */

.heute-termine { list-style: none; }

.heute-termin {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 10px 0;
  border-bottom: 1px solid var(--border);
}

.heute-termin:last-child { border-bottom: none; }
.heute-termin-zeit { font-size: 13px; color: var(--muted); white-space: nowrap; }
.heute-termin-titel { font-size: 14px; overflow-wrap: anywhere; }
.heute-termin-warn { font-size: 13px; color: var(--yellow); }

.heute-mehr { margin-top: 14px; }
.heute-mehr .btn { min-height: 44px; }

/* ── Gesundheit ───────────────────────────────────────────────────────────── */

.heute-werte {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 12px;
}

.heute-wert {
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--r);
  padding: 12px 14px;
}

.heute-wert-lbl {
  font-size: 13px;
  color: var(--text-soft);
  text-transform: uppercase;
  letter-spacing: .4px;
  margin-bottom: 5px;
}

.heute-wert-val { font-size: 20px; font-weight: 700; line-height: 1.1; }
.heute-wert-sub { font-size: 13px; color: var(--muted); margin-top: 4px; }

/* ── Datenquellen ─────────────────────────────────────────────────────────── */

.heute-quellen-fazit { font-size: 13px; color: var(--muted); margin-bottom: 12px; line-height: 1.5; }

/* ── Offene Punkte ────────────────────────────────────────────────────────── */

.heute-offen { list-style: none; }

.heute-offen li {
  display: flex;
  flex-direction: column;
  gap: 3px;
  padding: 10px 0;
  border-bottom: 1px solid var(--border);
}

.heute-offen li:last-child { border-bottom: none; }
.heute-offen-titel { font-size: 14px; font-weight: 600; }
.heute-offen-text { font-size: 13px; color: var(--muted); line-height: 1.5; }

@media (min-width: 640px) {
  .hu-ziel { display: inline; }
  .heute-wetter-tage { grid-template-columns: repeat(3, 1fr); }
  .heute-termin { flex-direction: row; align-items: baseline; gap: 14px; }
  .heute-termin-zeit { flex: 0 0 120px; }
}

/* Eingeklappte Fristen jenseits der Vormerkfrist. */
/* C1 (Phase 3): gebündelte Zeile. Die Einzelzeilen stehen eingeklappt
   darunter, eingerückt und etwas kleiner — sichtbar untergeordnet. */
.hu-buendel { margin: 0 0 6px 34px; }
.hu-buendel summary {
  list-style: none; cursor: pointer; color: var(--muted); font-size: 13px;
  min-height: 44px; display: flex; align-items: center; gap: 6px;
}
.hu-buendel summary::-webkit-details-marker { display: none; }
.hu-buendel summary::before { content: '▶'; font-size: 11px; transition: transform .2s; }
.hu-buendel[open] summary::before { transform: rotate(90deg); }
.hu-unter { border-bottom: none; }
.hu-unter .hu-titel { font-weight: 400; }

.hu-spaeter { margin-top: 10px; border-top: 1px solid var(--border); }

.hu-spaeter summary {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  padding: 10px 0;
  font-size: 13px;
  color: var(--muted);
  cursor: pointer;
  list-style: none;
}

.hu-spaeter summary::-webkit-details-marker { display: none; }
.hu-spaeter summary::before { content: '▶'; font-size: 11px; transition: transform .2s; }
.hu-spaeter[open] summary::before { transform: rotate(90deg); }

/* ── Automatisierung (P2-10) ──────────────────────────────────────────────── */

.agent-name { font-size: 14px; font-weight: 600; overflow-wrap: anywhere; }
.agent-sub { font-size: 13px; color: var(--muted); margin-top: 2px; }

.agent-hinweis {
  font-size: 13px;
  color: var(--muted);
  line-height: 1.5;
  margin-top: 14px;
}

/* inline-flex statt inline-block: nur so greift min-height zuverlaessig
   (als inline-block ergab die Zeilenhoehe 42 px). Die doppelte Klasse ist
   noetig, weil P2-2 die Mindesthoehe ab 640 px fuer `a.btn` zuruecknimmt —
   bei einem Link, der die einzige Aktion des Abschnitts ist, soll sie aber
   auf jeder Breite gelten. */
.agent-link.btn {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  text-decoration: none;
}

/* ── Briefing-Panel (26.10.2026) ──────────────────────────────────────────── */

.hb-leiste {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 12px;
}

.hb-reiterleiste { display: flex; gap: 4px; border-bottom: 1px solid var(--border); }

/* Reiter wie die Unterreiter der Fachbereiche: Unterstrich statt Fläche. */
.hb-reiter {
  min-height: 44px;
  padding: 8px 14px;
  background: none;
  border: none;
  border-bottom: 2px solid transparent;
  color: var(--muted);
  font-weight: 600;
  cursor: pointer;
}
.hb-reiter:hover { color: var(--text); }
.hb-reiter.aktiv { color: var(--accent); border-bottom-color: var(--accent); }

.hb-tag select { min-height: 44px; }

.hb-status {
  font-size: 13px;
  padding: 6px 10px;
  border-left: 3px solid var(--border-strong);
  border-radius: 0 var(--r) var(--r) 0;
  margin-bottom: 10px;
}
.hb-ok     { border-left-color: var(--green);  background: var(--green-weak);  color: var(--green); }
.hb-warn   { border-left-color: var(--yellow); background: var(--yellow-weak); color: var(--yellow); }
.hb-fehler { border-left-color: var(--red);    background: var(--red-weak);    color: var(--red); }

/* Der Text kommt zeilengenau aus Telegram; Einrückungen der Terminliste
   bleiben erhalten, lange Zeilen brechen um statt seitlich zu laufen. */
.hb-text {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  font-size: 14px;
  line-height: 1.5;
  max-height: 520px;
  overflow-y: auto;
}
.hb-text strong { display: inline-block; margin-top: 4px; }
