/**
 * Stylesheet für das Professor-Dashboard ([nbc_professor_dashboard]).
 *
 * Baut auf public.css auf (Basis-Klassen .nbc-dashboard, .nbc-karte,
 * .nbc-btn, .nbc-feld, .nbc-tabs, .nbc-tab, .nbc-avatar, .nbc-badge usw.
 * werden bereits von dort geladen, siehe NBC_Plugin::professor_assets_laden()).
 * Diese Datei ergänzt nur die Klassen, die spezifisch für die
 * Listen-/Formular-Bausteine dieses neuen Frontend-Bereichs sind – viele
 * davon sind bewusst 1:1 aus admin/css/admin.css übernommen (Katalog-Liste,
 * Graduierungs-Checkbox-Grid, QR-Scanner-Modal, Badges), damit Backend und
 * Professor-Frontend optisch/funktional konsistent bleiben.
 *
 * @package NBC_Verwaltung
 */

/* --------------------------------------------------------------
 * ALLGEMEINE LISTEN-BAUSTEINE (Anwesenheit, Genehmigungen, Kalender,
 * Neuigkeiten, Schüler)
 * ------------------------------------------------------------*/

.nbc-prof-liste {
	list-style: none;
	margin: 14px 0 0;
	padding: 0;
	display: flex;
	flex-direction: column;
	gap: 8px;
}

.nbc-prof-zeile {
	display: flex;
	align-items: center;
	gap: 12px;
	background: #fbfbfb;
	border: 1px solid #dcdcde;
	border-radius: 10px;
	padding: 10px 14px;
	flex-wrap: wrap;
}

.nbc-prof-zeile-info {
	flex: 1;
	min-width: 180px;
	line-height: 1.4;
}

.nbc-prof-zeile-info small {
	color: #757575;
}

.nbc-prof-zeile-aktion {
	display: flex;
	gap: 6px;
	flex-wrap: wrap;
}

.nbc-avatar-platzhalter {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 40px;
	height: 40px;
	border-radius: 50%;
	background: #f3f3f4;
	font-size: 1.2rem;
}

/* --------------------------------------------------------------
 * FILTERLEISTE (Tab "Anwesenheit")
 * ------------------------------------------------------------*/

.nbc-prof-filterleiste {
	display: flex;
	flex-wrap: wrap;
	align-items: flex-end;
	gap: 12px;
	margin-bottom: 10px;
}

.nbc-prof-filterleiste .nbc-feld {
	margin-bottom: 0;
	min-width: 160px;
}

.nbc-prof-statistik {
	font-size: 0.95rem;
	margin: 6px 0 4px;
	color: #50575e;
}

/* --------------------------------------------------------------
 * TOOLBAR (Tab "Kommunikation": Alle auswählen / Auswahl leeren)
 * ------------------------------------------------------------*/

.nbc-prof-toolbar {
	display: flex;
	gap: 8px;
	margin: 6px 0 14px;
}

.nbc-prof-platzhalter-chips {
	margin-top: 8px;
	display: flex;
	flex-wrap: wrap;
	gap: 6px;
	align-items: center;
}

.nbc-prof-platzhalter-label {
	font-size: 0.8rem;
	color: #757575;
	margin-right: 4px;
}

.nbc-prof-platzhalter-chip {
	background: #f3f3f4;
	border: 1px solid #dcdcde;
	border-radius: 999px;
	padding: 3px 10px;
	font-size: 0.78rem;
	cursor: pointer;
	color: #3c3c3c;
}

.nbc-prof-platzhalter-chip:hover {
	background: var(--nbc-vermelho, #8a0a0c);
	color: #fff;
	border-color: var(--nbc-vermelho, #8a0a0c);
}

/* --------------------------------------------------------------
 * BADGES (Status Anwesend/Nicht markiert, Aktiv/Inaktiv) – dieselben
 * Farben wie im Backend (admin/css/admin.css), hier für den Fall
 * dupliziert, dass public.css sie (noch) nicht kennt.
 * ------------------------------------------------------------*/

.nbc-badge--aktiv,
.nbc-badge--erfolg {
	background: #e5f6ec;
	color: #1c8a4b;
}

.nbc-badge--inaktiv {
	background: #f3f3f4;
	color: #757575;
}

/*
 * Familienkonten (siehe NBC_Capabilities-Klassendocblock
 * "FAMILIENKONTEN"): Hinweis in Genehmigungen/Schüler-Tab, falls ein
 * Eintrag ein Unterkonto (Kind ohne eigenes Login) ist.
 */
.nbc-familie-hinweis {
	display: inline-block;
	font-size: 0.78rem;
	color: #757575;
	font-style: italic;
}

/* --------------------------------------------------------------
 * KATALOG-LISTE (Tab "Übungen Verwalten") – 1:1 aus admin.css portiert.
 * ------------------------------------------------------------*/

.nbc-katalog-liste {
	display: flex;
	flex-direction: column;
	gap: 10px;
	margin-bottom: 18px;
}

.nbc-katalog-item {
	background: #fbfbfb;
	border: 1px solid #dcdcde;
	border-radius: 10px;
	padding: 12px 16px;
}

.nbc-katalog-item-kopf {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 10px;
}

.nbc-katalog-item-titel {
	font-weight: 600;
	display: inline-flex;
	align-items: center;
	gap: 8px;
}

.nbc-katalog-hinzufuegen-titel {
	font-size: 1rem;
	margin: 4px 0 10px;
	padding-top: 14px;
	border-top: 1px solid #dcdcde;
}

.nbc-verein-entfernen {
	background: none;
	border: none;
	color: #b32d2e;
	cursor: pointer;
	font-weight: 700;
	padding: 2px 8px;
	border-radius: 999px;
}

.nbc-verein-entfernen:hover {
	background: #fdf1f1;
}

/* --------------------------------------------------------------
 * GRADUIERUNGS-CHECKBOX-GRID – 1:1 aus admin.css portiert.
 * ------------------------------------------------------------*/

.nbc-grad-details {
	margin-top: 8px;
}

.nbc-grad-details summary {
	cursor: pointer;
	color: #50575e;
	font-size: 0.85rem;
	font-weight: 600;
	padding: 4px 0;
}

.nbc-grad-details summary:hover {
	color: var(--nbc-vermelho, #8a0a0c);
}

.nbc-grad-fieldset {
	border: none;
	padding: 0;
	margin: 0 0 10px;
}

.nbc-grad-fieldset legend {
	font-size: 0.78rem;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.4px;
	color: #757575;
	padding: 0 0 4px;
}

.nbc-grad-checkbox-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
	gap: 6px 12px;
}

.nbc-grad-checkbox {
	display: flex;
	align-items: center;
	gap: 6px;
	font-size: 0.85rem;
	font-weight: 400;
}

.nbc-grad-checkbox input[type="checkbox"] {
	accent-color: var(--nbc-vermelho, #8a0a0c);
}

/* --------------------------------------------------------------
 * QR-SCANNER-MODAL (Tab "Anwesenheit") – 1:1 aus admin.css portiert,
 * damit der Frontend-Scanner optisch identisch zum Backend-Scanner ist.
 * ------------------------------------------------------------*/

.nbc-aw-modal {
	position: fixed;
	inset: 0;
	background: rgba(15, 15, 16, 0.75);
	display: flex;
	align-items: center;
	justify-content: center;
	z-index: 100000;
}

.nbc-aw-modal[hidden] {
	display: none;
}

.nbc-aw-modal-inhalt {
	background: #fff;
	border-radius: 12px;
	padding: 24px;
	max-width: 420px;
	width: 90%;
	text-align: center;
	position: relative;
}

.nbc-aw-modal-schliessen {
	position: absolute;
	top: 10px;
	right: 14px;
	background: none;
	border: none;
	font-size: 1.2rem;
	cursor: pointer;
	color: #646970;
}

.nbc-aw-modal-inhalt video {
	width: 100%;
	border-radius: 8px;
	background: #000;
	margin-top: 10px;
}

.nbc-aw-scan-status {
	color: #646970;
	margin-top: 10px;
}

.nbc-aw-letzter-treffer {
	margin-top: 12px;
	padding: 10px 14px;
	background: #e5f6ec;
	border-radius: 8px;
	color: #1c8a4b;
}

/* --------------------------------------------------------------
 * FORMULARE (Kalender-/Übungs-Anlegen: zweispaltige Zeilen)
 * ------------------------------------------------------------*/

.nbc-prof-dashboard .nbc-formular-zeile {
	display: flex;
	gap: 16px;
	flex-wrap: wrap;
}

.nbc-prof-dashboard .nbc-formular-zeile .nbc-feld {
	flex: 1;
	min-width: 200px;
}

#nbc-prof-kom-empfaenger {
	width: 100%;
	max-width: 480px;
}

@media (max-width: 600px) {
	.nbc-prof-filterleiste {
		flex-direction: column;
		align-items: stretch;
	}
	.nbc-prof-zeile {
		flex-direction: column;
		align-items: flex-start;
	}
	.nbc-stat-grid {
		grid-template-columns: 1fr;
	}
}

/* --------------------------------------------------------------
 * TAB "DASHBOARD" – Kennzahlen-Karten, Verein-Übersicht und Tabellen,
 * identische Optik wie das Backend-Dashboard (siehe admin/css/admin.css),
 * hier für das Frontend nachgebaut, da public.css diese Klassen (bislang
 * nur im Backend benötigt) noch nicht mitbringt.
 * ------------------------------------------------------------*/

.nbc-stat-grid {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
	gap: 16px;
	margin: 4px 0 0;
}

.nbc-stat-card {
	background: var(--nbc-flaeche, #fff);
	border: 1px solid var(--nbc-border, #dcdcde);
	border-top: 4px solid var(--nbc-vermelho);
	border-radius: 8px;
	padding: 18px 20px;
	display: flex;
	flex-direction: column;
	gap: 4px;
}

.nbc-stat-card--akzent {
	background: #fdf1f1;
}

.nbc-stat-zahl {
	font-size: 2rem;
	font-weight: 700;
	color: var(--nbc-text, #1d2327);
}

.nbc-stat-zahl--erfolg {
	color: #1c8a4b;
}

.nbc-stat-zahl--gefahr {
	color: #b32d2e;
}

.nbc-stat-label {
	color: #646970;
	font-size: 0.9rem;
}

.nbc-verein-uebersicht {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
	gap: 12px;
	margin: 4px 0 0;
}

.nbc-verein-uebersicht-item {
	background: #f6f7f7;
	border-radius: 8px;
	padding: 12px 14px;
}

.nbc-verein-uebersicht-item strong {
	display: block;
	font-size: 1.3rem;
}

.nbc-verein-uebersicht-item span {
	color: #646970;
	font-size: 0.85rem;
}

.nbc-grad-zelle {
	display: flex;
	align-items: center;
	gap: 8px;
}

#nbc-prof-tab-dashboard .nbc-tabelle {
	width: 100%;
	border-collapse: collapse;
}

#nbc-prof-tab-dashboard .nbc-tabelle th,
#nbc-prof-tab-dashboard .nbc-tabelle td {
	text-align: left;
	padding: 8px 12px;
	border-bottom: 1px solid var(--nbc-border, #e2e2e2);
}

#nbc-prof-tab-dashboard .nbc-tabelle th {
	font-weight: 700;
}

/* Musik-Tab: Favorit-Stern (Bugfix/Platzersparnis) – ersetzt den vorherigen
   textbeschrifteten "⭐ Als Favorit markieren"/"⭐ Favorit entfernen"-Button
   (siehe musikItemHtml() in professor.js) durch einen kompakten, runden
   Icon-Button nach demselben Muster wie .nbc-musik-play-btn in public.css.
   Zustand wird über die Farbe kommuniziert (aktiv = golden, wie der
   bestehende "Favorit der Woche"-Akzent in .nbc-musik-favorit-karte),
   Beschriftung bleibt als aria-label/title für Screenreader erhalten. */
.nbc-musik-favorit-btn {
	flex-shrink: 0;
	width: 40px;
	height: 40px;
	border-radius: 50%;
	border: 1px solid var(--nbc-border);
	background: var(--nbc-surface);
	color: var(--nbc-text-soft, #6b6b6f);
	font-size: 1.2rem;
	line-height: 1;
	display: flex;
	align-items: center;
	justify-content: center;
	cursor: pointer;
	touch-action: manipulation;
	transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}

.nbc-musik-favorit-btn:hover {
	border-color: #e0a530;
	color: #e0a530;
}

.nbc-musik-favorit-btn-aktiv {
	background: #e0a530;
	border-color: #e0a530;
	color: #fff;
}

.nbc-musik-favorit-btn-aktiv:hover {
	color: #fff;
	opacity: 0.9;
}

/* Auf schmalen Bildschirmen greift dieselbe Grid-Umstellung wie bei
   .nbc-musik-item-kopf in public.css (siehe dortige @media (max-width: 480px)):
   Titel bekommt eine eigene volle Zeile, Play-Button + Fortschrittsleiste
   teilen sich die zweite Zeile. Der Favorit-Stern reiht sich dort als
   dritte Spalte neben den Play-Button, statt (wie vorher mit dem breiten
   Text-Button) zusätzlich Platz vom Titel wegzunehmen. */
@media ( max-width: 480px ) {
	.nbc-musik-item-kopf {
		grid-template-columns: 48px 1fr 40px;
		grid-template-areas:
			'titel titel    titel'
			'play  progress favorit';
	}

	.nbc-prof-zeile-aktion {
		grid-area: favorit;
		display: flex;
		justify-content: center;
	}
}
