/* Änderungshistorie: vor Änderungen an dieser Datei docs/AENDERUNGSHISTORIE.md lesen. */
/* Eigene Anpassungen an Sneat (S0.3). Farben nach docs/Konzeptuebersicht_Monatsplan.pdf:
   Akzent #696cff (hell #e7e7ff), Fläche #f5f5f9, Rahmen #e4e6e8, Text #384551.
   Sneat-Dateien unter assets/sneat/ bleiben unverändert - Änderungen nur hier. */

/* Schrift Public Sans lokal (keine Google-Fonts-Anfrage, Datenschutz) */
@font-face { font-family: 'Public Sans'; font-style: normal; font-weight: 400; font-display: swap; src: url('../../vendor/public-sans/public-sans-latin-400-normal.woff2') format('woff2'); }
@font-face { font-family: 'Public Sans'; font-style: normal; font-weight: 500; font-display: swap; src: url('../../vendor/public-sans/public-sans-latin-500-normal.woff2') format('woff2'); }
@font-face { font-family: 'Public Sans'; font-style: normal; font-weight: 600; font-display: swap; src: url('../../vendor/public-sans/public-sans-latin-600-normal.woff2') format('woff2'); }
@font-face { font-family: 'Public Sans'; font-style: normal; font-weight: 700; font-display: swap; src: url('../../vendor/public-sans/public-sans-latin-700-normal.woff2') format('woff2'); }

:root {
   --mp-akzent: #696cff;
   --mp-akzent-hell: #e7e7ff;
   --mp-rahmen: #e4e6e8;
   --mp-text: #384551;
}

/* Kategorie-Chip (Abb. 2/4). Farben je Kategorie folgen mit S1.1 aus kategorie.farbe. */
.mp-chip {
   display: inline-block;
   padding: 0.1rem 0.55rem;
   margin: 0 0.15rem 0.15rem 0;
   border-radius: 1rem;
   font-size: 0.75rem;
   line-height: 1.4;
   /* Farbe je Kategorie über style="--k: #rrggbb" (kategorie.farbe), sonst Akzentfarbe */
   background: color-mix(in srgb, var(--k, var(--mp-akzent)) 14%, white);
   color: var(--k, var(--mp-akzent));
   white-space: nowrap;
}

.mp-chip-entwurf { --k: #a36d00; font-weight: 500; vertical-align: middle; }

/* Terminliste (S1.4): Tabulator-Zeilen */
.tabulator-row.mp-abgesagt .tabulator-cell { text-decoration: line-through; color: #9a9a9a; }
.tabulator-row.mp-tag-sonntag { background-color: #fffde6; }
.tabulator-row.mp-tag-feiertag { background-color: #eefbee; }
#termin-tabelle .tabulator-cell { white-space: normal; }

/* Kartenliste je Tag (Handy, S1.5/S1.6) */
.mp-tag-karte { background: #fff; border: 1px solid var(--mp-rahmen); border-radius: 8px; overflow: hidden; }
.mp-tag-kopf { padding: 0.4rem 0.75rem; font-weight: 600; background: #f5f5f9; }
.mp-tag-sonntag .mp-tag-kopf { background: #ffff99; }
.mp-tag-feiertag .mp-tag-kopf { background: #ccffcc; }
.mp-tag-ferien .mp-tag-kopf { box-shadow: inset 4px 0 0 #9999ff; }
.mp-termin-karte {
   display: flex; gap: 0.75rem; width: 100%; text-align: left; padding: 0.6rem 0.75rem;
   border: 0; border-top: 1px solid var(--mp-rahmen); background: #fff; color: var(--mp-text);
}
button.mp-termin-karte:active { background: var(--mp-akzent-hell); }
.mp-termin-zeit { flex: 0 0 4.2rem; font-weight: 600; color: var(--mp-akzent); }
.mp-termin-inhalt { flex: 1 1 auto; min-width: 0; }
.mp-termin-karte.mp-abgesagt .mp-termin-inhalt > .fw-medium { text-decoration: line-through; color: #9a9a9a; }

/* Formular als Bottom-Sheet (Handy) bzw. Seitenleiste (PC) */
.offcanvas-bottom.mp-sheet { height: auto; max-height: 92vh; border-radius: 1rem 1rem 0 0; }
.offcanvas-end.mp-sheet { width: 30rem; }

/* Einheitenauswahl in der oberen Leiste */
.mp-einheit-wahl { max-width: 22rem; min-width: 0; flex: 0 1 22rem; }

/* Initiale als Benutzerbild in der oberen Leiste */
.mp-avatar {
   display: inline-flex;
   align-items: center;
   justify-content: center;
   width: 2.25rem;
   height: 2.25rem;
   font-weight: 600;
}

/* Einrückung im Einheitenbaum */
.mp-einzug { display: inline-block; flex: 0 0 auto; width: 0; }
.mp-einzug[data-tiefe="1"] { width: 1.25rem; }
.mp-einzug[data-tiefe="2"] { width: 2.5rem; }
.mp-einzug[data-tiefe="3"] { width: 3.75rem; }
.mp-einzug[data-tiefe="4"] { width: 5rem; }
.mp-einzug[data-tiefe="5"] { width: 6.25rem; }

/* Menü-Logo: Font-Awesome-Symbol statt Sneat-SVG; Höhe der Logozeile wie Sneat demo.css (nicht eingebunden) */
.app-brand-logo { display: inline-flex; align-items: center; }
.menu .app-brand { height: 64px; margin-top: 12px; }
.app-brand-text { font-size: 1.35rem; letter-spacing: -0.3px; }
/* Font-Awesome-Symbole im Menü gleich breit, Abstand zum Text */
.menu-vertical .menu-icon { width: 1.5rem; margin-right: 0.6rem; text-align: center; }

/* Handy: Aktionsknöpfe in Listen gut treffbar */
@media (max-width: 575.98px) {
   .list-group-item .btn-sm { padding: 0.4rem 0.7rem; }
}

/* Excel-Import (S1.8): Ergebnis je Zeile */
.mp-import-neu { background: #e8fadf; color: #3f8f1a; }
.mp-import-geaendert { background: #fff2d6; color: #a36d00; }
.mp-import-unveraendert { background: #ececec; color: #555; }
.mp-import-uebersprungen { background: #f5f5f9; color: #8592a3; }
.mp-import-zeile-uebersprungen td, .mp-import-zeile-unveraendert td { color: #8592a3; }
.mp-import-tabelle .form-select-sm { min-width: 9rem; }

/* Freigabe-Status (S3.2) */
.mp-chip-frei { --k: #3f8f1a; font-weight: 500; vertical-align: middle; }
/* Terminliste: Randfarbe grün = neu, orange = geändert seit Freigabe (Abb. 4) */
.tabulator-row.mp-seit-neu { box-shadow: inset 4px 0 0 #71dd37; }
.tabulator-row.mp-seit-geaendert { box-shadow: inset 4px 0 0 #ffab00; }
.mp-termin-karte.mp-seit-neu { box-shadow: inset 4px 0 0 #71dd37; }
.mp-termin-karte.mp-seit-geaendert { box-shadow: inset 4px 0 0 #ffab00; }

/* Hinweisbox und Nachrichten (S3.7/S3.8, Abb. 6) */
.mp-hinweis-neu { background: var(--mp-akzent-hell); }
.mp-chat-verlauf { max-height: 60vh; overflow-y: auto; display: flex; flex-direction: column; gap: 0.6rem; }
.mp-nachricht { align-self: flex-start; max-width: 85%; padding: 0.5rem 0.75rem; border-radius: 0.75rem; background: #f5f5f9; }
.mp-nachricht-eigen { align-self: flex-end; background: var(--mp-akzent-hell); }
.mp-nachricht-text { white-space: normal; overflow-wrap: anywhere; }

/* Monatsauswahl (bootstrap-datepicker): lesbar wie ein Auswahlfeld */
.mp-monatswahl[readonly] { background-color: #fff; cursor: pointer; min-width: 9.5rem; }
.datepicker { z-index: 1100 !important; }
.datepicker table tr td span.active, .datepicker table tr td span.active:hover { background: var(--mp-akzent) !important; border-color: var(--mp-akzent) !important; }

/* Jubiläen-Zuordnen-Fenster (S4.5): Handy = Liste aller Tage, ab lg 7 Spalten wie ein Monatskalender */
.mp-jkal { display: grid; grid-template-columns: 1fr; gap: 4px; }
.mp-jkal-kopf, .mp-jkal-leer { display: none; }
.mp-jkal-tag { border: 1px solid #e4e6e8; border-radius: 6px; padding: 4px 6px; min-height: 2.2rem; background: #fff; font-size: .8125rem; }
.mp-jkal-sonntag { background: #FFFF99; }
.mp-jkal-jahrestag { outline: 2px solid #ffab00; outline-offset: -2px; }
.mp-jkal-termin { display: block; width: 100%; text-align: left; border: 0; border-left: 3px solid var(--k, #a8aaae); border-radius: 4px;
   background: #f5f5f9; padding: 2px 6px; font-size: .75rem; line-height: 1.25; color: #384551; }
.mp-jkal-termin:hover, .mp-jkal-termin:focus { background: #e7e7ff; }
.mp-jkal-gd { background: #ececff; }
.mp-jkal-gd.mp-jkal-passt { background: #e8fadf; font-weight: 500; }
.mp-jkal-vormerken { font-size: .75rem; }
@media (min-width: 992px) {
   .mp-jkal { grid-template-columns: repeat(7, minmax(0, 1fr)); }
   .mp-jkal-kopf { display: block; text-align: center; font-weight: 600; font-size: .8125rem; padding: 2px 0; }
   .mp-jkal-leer { display: block; }
   .mp-jkal-tag { min-height: 6.5rem; }
   .mp-jkal-wt { display: none; }
}

/* Einteilung direkt im Monatsplan-Entwurf (Planer): Planungsspalten-Zellen anklickbar */
.mp-einsatz-klick { cursor: pointer; }
.mp-einsatz-klick:hover, .mp-einsatz-klick:focus { background: #e7e7ff !important; outline: 1px dashed #696cff; outline-offset: -2px; }

/* „Bemerkung intern“ im Monatsplan-Entwurf (nur Berechtigte, nie im Druck) */
.mp-plan .mp-intern-kopf { background: #e7e7ff !important; color: #384551; vertical-align: middle; }
.mp-plan .mp-intern { background: #f5f5ff; font-size: .9em; color: #566a7f; white-space: normal; }
.mp-intern-klick { cursor: pointer; }
.mp-intern-klick:hover, .mp-intern-klick:focus { background: #e7e7ff !important; outline: 1px dashed #696cff; outline-offset: -2px; }
.mp-plan-mit-intern .mp-c-info { width: 20%; }
.mp-plan-mit-intern .mp-c-bemerkung { width: 16%; }
.mp-intern-handy { color: #566a7f; background: #f5f5ff; border-radius: 4px; padding: 2px 6px; margin-top: 2px; }

/* Planungsspalten-Kopf wie Excel: eine Zelle über beide Kopfzeilen, zweizeilig */
.mp-plan th.mp-kopf-spalte { vertical-align: middle; line-height: 1.25; }

/* Belastungsübersicht (S5.4): über der Warnschwelle */
.mp-belastung-hoch { background: #ffe0db !important; color: #b42318; }
