/* Styles für die Mittagsplanungs-Ansichten (übernommen aus dem früheren
   eigenständigen Mittagstool, an die CI angepasst).
   Eigene Präfixe (mt-) dort, wo Klassennamen sonst mit der Personalplanung
   kollidieren würden (z.B. .tabs im Kopfbereich). */

/* --- Pillen (Wochentage, Räume/Garten) --- */
.mt-pills { display: flex; gap: 8px; flex-wrap: wrap; margin: 2px 0 12px; }
.mt-pill {
  font-family: var(--font-head);
  text-transform: uppercase;
  font-size: 18px;
  letter-spacing: 0.05em;
  line-height: 1.2;
  padding: 8px 24px;
  border-radius: 999px;
  border: 1px solid var(--line-strong);
  background: #fff;
  color: var(--ink);
  cursor: pointer;
  transition: background .15s, box-shadow .15s;
}
.mt-pill:hover { background: #faf7ee; }
.mt-pill.active {
  background: var(--yellow);
  border-color: #ecc400;
  box-shadow: 0 1px 3px rgba(29, 29, 27, .15);
}


.mt-note {
  display: block; width: 100%; min-height: 44px; resize: vertical;
  padding: 9px 12px; border-radius: var(--radius-sm);
  border: 1px solid var(--line-strong);
  font-family: var(--font-body); font-size: 14px;
  background: #fffdf5; margin-bottom: 10px; color: var(--ink);
}
.mt-note:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-bg); }

/* Abholung + Garten-Schalter in einer Zeile */
.mt-controls {
  display: flex; flex-wrap: wrap; align-items: center; gap: 12px 20px;
  margin: 6px 0 14px; padding-bottom: 14px;
  border-bottom: 1px solid var(--line);
}
.mt-pickup-inline { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.mt-pickup-inline strong { font-size: 14px; }
.mt-controls #mt-mode { margin-left: auto; }

/* Schalter „Garten" (statt zweier Buttons) */
.mt-toggle { display: inline-flex; align-items: center; gap: 9px; cursor: pointer; user-select: none; }
.mt-toggle input { position: absolute; opacity: 0; width: 0; height: 0; }
.mt-switch {
  position: relative; width: 46px; height: 26px; flex: none;
  background: #dededa; border-radius: 999px;
  transition: background .18s;
}
.mt-switch::after {
  content: ""; position: absolute; top: 3px; left: 3px;
  width: 20px; height: 20px; border-radius: 50%;
  background: #fff; box-shadow: 0 1px 3px rgba(29,29,27,.3);
  transition: transform .18s;
}
.mt-toggle input:checked + .mt-switch { background: var(--green); }
.mt-toggle input:checked + .mt-switch::after { transform: translateX(20px); }
.mt-toggle input:focus-visible + .mt-switch { box-shadow: 0 0 0 3px var(--accent-bg); }
.mt-toggle input:disabled + .mt-switch { opacity: .5; }
.mt-toggle input:disabled ~ .mt-toggle-txt { opacity: .5; }
.mt-toggle-txt {
  font-family: var(--font-head); text-transform: uppercase;
  letter-spacing: .03em; font-size: 17px;
}

/* --- Layout: Raum-Grid + Seitenleiste --- */
.mt-layout { display: grid; grid-template-columns: 1fr 230px; gap: 18px; align-items: start; }
@media (max-width: 860px) { .mt-layout { grid-template-columns: 1fr; } }

.room-grid { display: flex; flex-direction: column; gap: 14px; }

.room-block {
  border: 1px solid var(--line); border-radius: var(--radius);
  padding: 14px 16px; background: var(--card);
  box-shadow: 0 1px 2px rgba(29,29,27,.05);
}
.room-block-header {
  font-family: var(--font-head); text-transform: uppercase; letter-spacing: .02em;
  font-size: 19px; margin-bottom: 10px; color: var(--ink);
}
.room-block-shifts { display: flex; gap: 12px; }
@media (max-width: 640px) { .room-block-shifts { flex-direction: column; } }

.shift-col {
  flex: 1; min-width: 0;
  border: 1px solid var(--line); border-radius: var(--radius-sm);
  padding: 10px 12px; min-height: 48px; background: #fbfaf6;
  transition: background-color .15s, border-color .15s;
}
.shift-col.understaffed { border-color: var(--warn); background: var(--violet-soft); }
.shift-col.can-drop {
  border-color: var(--accent); background: #fff6ee; cursor: pointer;
  box-shadow: 0 0 0 3px rgba(242,101,34,.15);
}
.shift-col-label { font-size: 12px; color: var(--muted); margin-bottom: 6px; font-weight: 700; }
.shift-col-label .warn { color: var(--warn); font-weight: 700; }
.shift-col-chips { display: flex; flex-wrap: wrap; gap: 6px; }

/* --- Personen-Chips --- */
.chip {
  display: inline-flex; align-items: center; gap: 6px;
  background: var(--chip-bg, #eeecd9);
  border: 1px solid var(--chip-border, #d8d3ab);
  color: var(--chip-color, #55522e);
  border-radius: 999px; padding: 7px 8px 7px 12px;
  font-size: 14px; font-weight: 700; cursor: pointer;
  user-select: none; touch-action: manipulation;
  box-shadow: 0 1px 2px rgba(29,29,27,.06);
  transition: transform .1s, box-shadow .15s;
}
.chip:hover { transform: translateY(-1px); box-shadow: 0 6px 18px rgba(29,29,27,.10); }

/* Laut Dienstplan/Abwesenheit eigentlich nicht da. */
.chip-conflict { background: #fbe0d6; border-color: #eeb69f; color: #b3431a; }
/* Heute gar nicht im Dienst. */
.chip-unavailable { background: #ebe9e3; border-color: #d6d2c4; color: #6a6a63; }
/* Noch mindestens eine Schicht offen. */
.chip-open { box-shadow: 0 1px 2px rgba(29,29,27,.06), inset 3px 0 0 var(--accent); }
/* Schon überall eingeteilt. */
.chip-placed { opacity: .45; }
.chip.selected {
  background: var(--ink); border-color: var(--ink); color: #fff;
  box-shadow: 0 0 0 2px rgba(29,29,27,.25);
}
.chip-leaves { font-size: 11px; font-weight: 500; opacity: .75; white-space: nowrap; }
.chip-remove {
  border: none; background: transparent; color: inherit; opacity: .6;
  cursor: pointer; font-size: 14px; line-height: 1; padding: 6px;
  min-width: 28px; min-height: 28px;
  display: inline-flex; align-items: center; justify-content: center;
  transition: opacity .15s;
}
.chip-remove:hover { opacity: 1; }
.chip-pickup-badge {
  color: var(--ink); background: var(--yellow);
  font-size: 12px; line-height: 1; padding: 6px;
  min-width: 24px; min-height: 24px; border-radius: 999px;
  display: inline-flex; align-items: center; justify-content: center;
}

/* --- Seitenleiste --- */
.staff-sidebar {
  border: 1px solid var(--line); border-radius: var(--radius);
  padding: 14px; background: var(--card);
  display: flex; flex-direction: column; gap: 8px; min-height: 120px;
  box-shadow: 0 1px 2px rgba(29,29,27,.05);
}
.staff-sidebar h4 {
  margin: 0; font-family: var(--font-head); text-transform: uppercase;
  letter-spacing: .02em; font-size: 17px; font-weight: 400;
}
.staff-sidebar .hint { margin: 0; font-size: 11px; color: var(--muted); line-height: 1.45; }
.sidebar-group-label {
  font-size: 11px; text-transform: uppercase; letter-spacing: .04em;
  color: var(--muted); font-weight: 700;
  margin-top: 4px; padding-top: 8px; border-top: 1px solid var(--line);
}

/* --- Auswahl-Hinweis (Antippen-Bedienung) --- */
.selection-hint {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  background: linear-gradient(120deg, var(--yellow-soft) 0%, var(--orange-soft) 100%);
  border: 1px solid #f0d59a; color: var(--ink);
  padding: 10px 14px; border-radius: var(--radius-sm);
  font-size: 14px; font-weight: 700; margin-bottom: 12px;
}

/* Im Nur-Lesen-Modus bleibt die Mittagsplanung bedienbar (das Team plant den
   Mittag selbst) – gesperrt wird nur die Personalplanung, siehe style.css. */
