/* Ergänzungsstile für Ansichten und Dialoge (Fricke-Look).
   Wird zusätzlich zu style.css geladen. Nur Klassen, die dort fehlen. */

/* ---------- Allgemeine Hilfen ---------- */

.grau { color: var(--grau); }

.hinweis {
  font-size: 14px;
  color: var(--grau);
  background: var(--creme);
  padding: 12px 14px;
  border: 1px solid var(--linie);
}

/* ---------- Kopfzeilen der Ansichten ---------- */

.kopf-ansicht,
.kalender-kopf,
.listen-kopf,
.karte-kopf {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin-bottom: 14px;
}

/* ---------- Chips ---------- */

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

/* ---------- Kalenderwochen-Navigation ---------- */

.kw-nav {
  display: flex;
  align-items: center;
  gap: 4px;
}

.kw-label {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 44px;
  padding: 0 14px;
  font-size: 15px;
  font-weight: 500;
  background: var(--weiss);
  border: 1px solid var(--linie);
  color: var(--tinte);
  white-space: nowrap;
}

/* ---------- Essen ---------- */

.essen-inhalt {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
}

/* Raster füllt die Höhe: 40px Kopf + 3 gleiche Reihen */
.essen-raster {
  flex: 1;
  min-height: 0;
  display: grid;
  grid-template-columns: 120px repeat(7, minmax(0, 1fr));
  grid-template-rows: 40px repeat(3, minmax(150px, 1fr));
  gap: 6px;
}

.essen-ecke {
  background: transparent;
}

.essen-tag {
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: .04em;
  background: var(--weiss);
  border: 1px solid var(--linie);
  color: var(--tinte);
}

.essen-tag.heute {
  background: var(--bordeaux);
  color: #fff;
  border-color: var(--bordeaux);
}

.essen-reihe-label {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--tinte);
  background: var(--zart, var(--creme));
  border: 1px solid var(--linie);
  text-align: center;
  padding: 6px;
}

.mahlzeit-plus {
  font-size: 40px;
  font-weight: 300;
  color: var(--grau);
  line-height: 1;
}

/* Handy: Tageskarten untereinander */
.essen-tage {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.essen-tag-karte {
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.essen-tag-titel {
  font-size: 15px;
  font-weight: 500;
  margin-bottom: 4px;
}

.essen-tag-titel.heute {
  color: var(--bordeaux);
}

.mahlzeit-zeile {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  padding: 6px 10px;
  text-align: left;
  width: 100%;
}

/* ---------- Kachel-Raster (Einkauf, Zutaten) ---------- */

.kachel-raster {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 12px;
}

.kachel-raster .kachel {
  position: relative;
}

.menge-badge {
  position: absolute;
  top: 6px;
  right: 6px;
  min-width: 22px;
  height: 22px;
  padding: 0 6px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 600;
  color: #fff;
  background: var(--bordeaux);
  border-radius: 0;
}

/* ---------- Listen ---------- */

.listen-layout {
  display: grid;
  grid-template-columns: 330px 1fr;
  gap: 18px;
  height: 100%;
  min-height: 0;
  align-items: stretch;
}

.listen-links {
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-height: 0;
  overflow-y: auto;
}

.listen-links-kopf {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 4px;
}

.listen-karte {
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-height: 74px;
  padding: 12px;
  text-align: left;
  background: var(--weiss);
  border: 1px solid var(--linie);
  cursor: pointer;
  position: relative;
}

.listen-karte.aktiv {
  background: var(--weiss);
  box-shadow: inset 3px 0 0 var(--bordeaux), 0 12px 32px rgba(26, 26, 26, .06);
}

.listen-karte-kopf {
  display: flex;
  align-items: center;
  gap: 10px;
}

.listen-karte-kopf .emoji {
  font-size: 30px;
  line-height: 1;
}

.listen-karte-name {
  font-size: 16px;
  font-weight: 500;
  color: var(--tinte);
}

.listen-karte-info {
  font-size: 13px;
  color: var(--grau);
}

.listen-rechts,
.listen-detail {
  background: var(--weiss);
  box-shadow: 0 12px 32px rgba(26, 26, 26, .06);
  padding: 18px;
  min-height: 0;
  overflow-y: auto;
}

.listen-kopf {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 14px;
}

.listen-kopf-links {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.listen-kopf-rechts {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.listen-titel {
  font-size: 22px;
  font-weight: 300;
  margin: 0;
  color: var(--tinte);
}

.listen-untertitel {
  font-size: 13px;
  color: var(--grau);
  margin-top: 2px;
}

.listen-abschnitte {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 22px 28px;
}

.listen-abschnitt {
  min-width: 0;
}

.listen-abschnitt .label {
  color: var(--bordeaux);
  margin-bottom: 6px;
}

.listen-punkt {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 50px;
  padding: 6px 4px;
  border-bottom: 1px solid var(--linie);
  width: 100%;
  text-align: left;
  background: transparent;
  cursor: pointer;
}

.listen-punkt-text {
  flex: 1;
  min-width: 0;
  font-size: 15px;
  color: var(--tinte);
}

.listen-punkt.erledigt .listen-punkt-text {
  color: var(--grau);
  text-decoration: line-through;
}

.listen-zurueck {
  margin-bottom: 12px;
}

.listen-uebersicht {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

/* Eintrag in der linken Liste */
.liste-eintrag:has(> .liste-eintrag-kopf) {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 12px;
  text-align: left;
  background: var(--weiss);
  border: 1px solid var(--linie);
  cursor: pointer;
  width: 100%;
}

.liste-eintrag.aktiv {
  box-shadow: inset 3px 0 0 var(--bordeaux), 0 12px 32px rgba(26, 26, 26, .06);
}

.liste-eintrag-kopf {
  display: flex;
  align-items: center;
  gap: 10px;
}

.liste-eintrag-kopf .emoji {
  font-size: 24px;
  line-height: 1;
}

.liste-eintrag-name {
  font-size: 15px;
  font-weight: 500;
  color: var(--tinte);
}

.liste-eintrag-info {
  font-size: 12px;
  color: var(--grau);
}

/* ---------- Fortschrittsbalken (Ergänzung) ---------- */

.fortschritt-fuellung {
  height: 100%;
  background: var(--bordeaux);
  transition: width .25s ease;
}

/* ---------- PIN ---------- */

.pin {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
}

.pin-punkte {
  display: flex;
  gap: 10px;
  justify-content: center;
  min-height: 14px;
}

.pin-punkt {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  border: 1px solid var(--bordeaux);
  background: transparent;
}

.pin-punkt.an {
  background: var(--bordeaux);
}

.pin-hinweis {
  font-size: 13px;
  color: var(--grau);
  min-height: 18px;
  text-align: center;
}

.pin-block {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  width: 100%;
  max-width: 320px;
}

.pin-reihe {
  display: contents;
}

.pin-taste {
  height: 72px;
  font-size: 26px;
  font-weight: 400;
  background: var(--weiss);
  border: 1px solid var(--linie);
  color: var(--tinte);
  cursor: pointer;
}

.pin-taste:active {
  background: var(--creme);
}

/* ---------- Personenwahl ---------- */

.personen-wahl {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  justify-content: center;
}

.person-wahl-knopf {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  width: 96px;
  padding: 8px;
  background: transparent;
  border: 2px solid transparent;
  cursor: pointer;
}

.person-wahl-knopf:hover,
.person-wahl-knopf:focus-visible {
  border-color: var(--bordeaux);
  outline: none;
}

.person-wahl-knopf .person-bild {
  width: 64px;
  height: 64px;
  font-size: 26px;
}

.person-wahl-name {
  font-size: 14px;
  color: var(--tinte);
  text-align: center;
}

.person-bild-klein {
  width: 24px;
  height: 24px;
  font-size: 12px;
  flex: 0 0 auto;
}

/* ---------- Emoji-Feld ---------- */

.emoji-feld {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.emoji-reihe {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.emoji-chip {
  width: 44px;
  height: 44px;
  min-width: 44px;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  line-height: 1;
  background: var(--weiss);
  border: 1px solid var(--linie);
  cursor: pointer;
}

.emoji-chip.aktiv,
.emoji-chip:focus-visible {
  border-color: var(--bordeaux);
  outline: none;
}

/* ---------- Formular ---------- */

.formular {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.formular-fehler {
  color: var(--bordeaux);
  font-size: 14px;
  min-height: 18px;
}

.feld-eingabe {
  height: 48px;
  padding: 0 12px;
  font-size: 16px;
  font-family: inherit;
  color: var(--tinte);
  background: var(--weiss);
  border: 1px solid var(--linie);
  border-radius: 0;
  width: 100%;
  box-sizing: border-box;
}

.feld-eingabe:focus {
  outline: none;
  border-color: var(--bordeaux);
}

/* ---------- Dialog-Inhalt ---------- */

.dialog-inhalt {
  display: flex;
  flex-direction: column;
  gap: 12px;
  max-height: 60vh;
  overflow-y: auto;
}

/* ---------- Bildschirmschoner ---------- */

.schoner-emoji {
  font-size: 32px;
  line-height: 1;
}

.schoner-essen {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin: 24px 0;
}

.schoner-mahlzeit {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 22px;
  font-weight: 300;
}

.schoner-mahlzeit-label {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--grau);
}

.schoner-mahlzeit-name {
  font-size: 22px;
  font-weight: 300;
  color: var(--tinte);
}

.schoner-termine {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 12px;
}

.schoner-termin {
  display: flex;
  align-items: baseline;
  gap: 12px;
  font-size: 22px;
  font-weight: 300;
}

.schoner-termin-zeit {
  font-size: 13px;
  font-weight: 600;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--bordeaux);
  min-width: 110px;
}

.schoner-termin-titel {
  font-size: 22px;
  font-weight: 300;
  color: var(--tinte);
}

/* ---------- Mehr-Dialog (Handy) ---------- */

.mehr-dialog {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.mehr-knopf {
  height: 96px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  font-size: 14px;
  text-align: center;
  padding: 8px;
}

/* ---------- Fehlerkarte ---------- */

.fehler-karte {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  gap: 12px;
  padding: 32px 24px;
  max-width: 480px;
  margin: 40px auto;
}

.fehler-titel {
  font-size: 22px;
  font-weight: 300;
  margin: 0;
  color: var(--tinte);
}

.fehler-text {
  font-size: 15px;
  color: var(--grau);
  margin: 0;
}

/* ---------- Kalender: Woche, Punkte, Legende, Handy ---------- */

.woche {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 8px;
}

.termin-punkte {
  display: inline-flex;
  gap: 4px;
  margin-left: 6px;
  vertical-align: middle;
}

.termin-punkte > span {
  display: inline-block;
  width: 10px;
  height: 10px;
  border-radius: 50%;
}

.tages-liste {
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-height: 50vh;
  overflow-y: auto;
}

.kalender-legende {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  align-items: center;
  font-size: 13px;
  color: var(--grau);
}

.kalender-handy {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

/* ---------- Anmeldung ---------- */

.anmelden-logo {
  width: 96px;
  height: 96px;
  display: block;
  margin: 0 auto 16px;
}

.anmelden-gruss {
  font-size: 16px;
  color: var(--grau);
  text-align: center;
  margin: 0 0 20px;
}

.anmelden-form {
  display: flex;
  flex-direction: column;
  gap: 14px;
  width: 100%;
  max-width: 360px;
  margin: 0 auto;
}

.anmelden-fehler {
  color: var(--bordeaux);
  font-size: 14px;
  min-height: 18px;
}

/* ---------- Seitenleiste: Einstellungen unten ---------- */

.nav-unten {
  margin-top: auto;
}

/* ---------- Handy-Anpassungen ---------- */

@media (max-width: 899px) {
  .listen-layout {
    grid-template-columns: 1fr;
    height: auto;
  }

  .listen-abschnitte {
    grid-template-columns: 1fr;
    gap: 18px;
  }

  .kachel-raster {
    grid-template-columns: repeat(auto-fill, minmax(110px, 1fr));
  }

  .essen-raster {
    grid-template-columns: 90px repeat(7, minmax(0, 1fr));
    grid-template-rows: 36px repeat(3, minmax(120px, 1fr));
  }

  .woche {
    grid-template-columns: repeat(7, minmax(0, 1fr));
    gap: 6px;
  }

  .mehr-dialog {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

/* Nachbesserungen Handy */
@media (max-width: 899px) {
  .leiste-unten.nur-handy { display: flex; flex-direction: row; }
  .leiste-unten .nav-knopf { flex: 1 1 0; width: auto; height: 64px; box-shadow: none; }
  .leiste-unten .nav-knopf.aktiv { box-shadow: inset 0 3px 0 var(--bordeaux); }
  .mahlzeit.mahlzeit-zeile { flex-direction: row; justify-content: flex-start; align-items: center; min-height: 56px; gap: 12px; padding: 8px 12px; }
  .mahlzeit.mahlzeit-zeile .emoji { font-size: 28px !important; }
  .personen-leiste { gap: 6px; }
}

/* Anmeldeseite: alles mittig untereinander */
.anmelden { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px; min-height: 100dvh; padding: 24px 16px; box-sizing: border-box; text-align: center; }
.anmelden-titel { margin: 4px 0 0; font-size: 40px; font-weight: 300; }
.anmelden-gruss { margin: 0 0 12px; }
.anmelden .chips { justify-content: center; }
.anmelden form, .anmelden-form { width: min(380px, 100%); text-align: left; }
.anmelden .knopf-bordeaux { width: 100%; height: 52px; font-size: 16px; }

/* Countdowns im Kopf */
.kopf-countdowns { margin-left: 24px; gap: 8px; }
.kopf-countdowns > span { height: 36px; padding: 0 12px; display: inline-flex; align-items: center; gap: 6px; background: var(--weiss); border: 1px solid var(--linie); font-size: 13px; font-weight: 500; white-space: nowrap; }

/* Bildschirmschoner mit Fotos: Text hell über dem Bild */
.schoner.mit-fotos { background: #000; color: #fff; }
.schoner.mit-fotos > :not(:first-child) { position: relative; z-index: 1; text-shadow: 0 2px 12px rgba(0,0,0,.6); }
.schoner.mit-fotos .schoner-mahlzeit, .schoner.mit-fotos .schoner-termin { background: rgba(0,0,0,.35); color: #fff; }
.kopf { flex-wrap: nowrap; }
.kopf-countdowns { flex: 1 1 auto; min-width: 0; overflow: hidden; flex-wrap: nowrap !important; }
