/**
 * Na Beira do Cais – Schulverwaltung
 * Öffentliches Stylesheet (Front-end: Registrierung, Login, Dashboard).
 *
 * Feste Farbpalette nach dem offiziellen Logo: Text schwarz, Hintergrund
 * weiß, Buttons/Rahmen/Details in Rot (--nbc-vermelho). Bewusst KEIN Dark
 * Mode mehr (siehe public/js/public.js) – frühere Versionen boten einen
 * Umschalter über data-theme="dark" an, das führte dazu, dass Texte/Icons
 * je nach Systemeinstellung des Browsers kaum lesbar waren. Die Palette
 * ist deshalb jetzt fix und unabhängig vom Betriebssystem-Farbschema.
 *
 * Geladen über wp_enqueue_style() in includes/class-nbc-plugin.php.
 */

:root {
	--nbc-vermelho: #8a0a0c;
	--nbc-vermelho-hover: #a40d10;
	--nbc-preto: #000000;
	--nbc-bg: #ffffff;
	--nbc-surface: #ffffff;
	--nbc-surface-soft: #f7f7f7;
	--nbc-text: #000000;
	--nbc-text-soft: #333333;
	--nbc-border: #c9797b;
	--nbc-whats: #25d366;
	--nbc-shadow: 0 6px 20px rgba(15, 15, 16, 0.08);
	--nbc-radius: 14px;
}

#nbc-registrierung,
#nbc-login,
.nbc-dashboard {
	font-family: 'Nunito', -apple-system, BlinkMacSystemFont, sans-serif;
	color: var(--nbc-text);
	line-height: 1.55;
}

.nbc-karte {
	background: var(--nbc-surface);
	border: 1px solid var(--nbc-border);
	border-top: 5px solid var(--nbc-vermelho);
	border-radius: var(--nbc-radius);
	box-shadow: var(--nbc-shadow);
	padding: 24px;
	margin-bottom: 20px;
}

.nbc-formular-karte {
	max-width: 480px;
	margin: 0 auto;
}

.nbc-titel {
	font-family: 'Bebas Neue', 'Nunito', sans-serif;
	letter-spacing: 0.5px;
	font-size: 2rem;
	color: var(--nbc-text);
	border-bottom: 2px solid var(--nbc-vermelho);
	padding-bottom: 10px;
	margin: 0 0 6px;
}

.nbc-untertitel {
	color: var(--nbc-text-soft);
	margin: 0 0 20px;
	font-size: 0.95rem;
}

.nbc-feld {
	margin-bottom: 16px;
	display: flex;
	flex-direction: column;
	gap: 6px;
}

/*
 * Honeypot-Feld gegen Formular-Bots (siehe public/views/registrierung.php
 * und includes/class-nbc-sicherheit.php). Bewusst NICHT "display:none"
 * oder "type=hidden" – manche Bots ignorieren solche Felder gezielt.
 * Stattdessen wird das Feld optisch aus dem sichtbaren Bereich
 * herausgeschoben, bleibt für einen Screenreader-losen Bot im DOM aber
 * ganz normal "sichtbar" und ausfüllbar.
 */
.nbc-hp-feld {
	position: absolute;
	left: -9999px;
	top: -9999px;
	width: 1px;
	height: 1px;
	overflow: hidden;
}

/* Einwilligungs-Checkbox bei der Registrierung (siehe registrierung.php). */
.nbc-feld-checkbox label {
	display: flex;
	align-items: flex-start;
	gap: 8px;
	font-weight: 400;
	font-size: 0.85rem;
	color: var(--nbc-text-soft);
}

.nbc-feld-checkbox input[type="checkbox"] {
	margin-top: 3px;
	flex-shrink: 0;
}

.nbc-feld label {
	font-weight: 700;
	font-size: 0.85rem;
	color: var(--nbc-text-soft);
}

.nbc-feld input,
.nbc-feld select,
.nbc-feld textarea {
	background: var(--nbc-surface-soft);
	border: 1px solid var(--nbc-border);
	border-radius: 10px;
	padding: 12px 14px;
	color: var(--nbc-text);
	font-family: inherit;
	font-size: 1rem;
}

.nbc-feld input:focus,
.nbc-feld select:focus,
.nbc-feld textarea:focus {
	outline: none;
	border-color: var(--nbc-vermelho);
}

.nbc-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	border: none;
	border-radius: 12px;
	padding: 13px 20px;
	font-weight: 800;
	font-size: 1rem;
	cursor: pointer;
	width: 100%;
	transition: filter 0.15s ease, transform 0.05s ease;
	/* .nbc-btn wird auch auf <a>-Elementen verwendet (z. B. "Abmelden" im
	   Tab "Meine Daten") – Standard-Link-Unterstreichung unterdrücken. */
	text-decoration: none;
}

.nbc-btn-primary {
	background: var(--nbc-vermelho);
	color: #fff;
}

.nbc-btn-primary:hover {
	background: var(--nbc-vermelho-hover);
}

.nbc-btn-primary:active {
	transform: translateY(1px);
}

.nbc-btn-whatsapp,
.nbc-btn-whatsapp:visited {
	background: var(--nbc-whats);
	color: #fff;
}

/* Datenschutz-Karte im Dashboard-Tab "Meine Daten" (Export/Löschungsantrag). */
.nbc-datenschutz-aktionen {
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
}

.nbc-datenschutz-aktionen .nbc-btn {
	width: auto;
	flex: 1 1 200px;
}

.nbc-btn-gefahr {
	background: transparent;
	color: #d63638;
	border: 1.5px solid #d63638;
}

.nbc-btn-gefahr:hover {
	background: #d63638;
	color: #fff;
}

.nbc-btn-gefahr:disabled {
	opacity: 0.6;
	cursor: default;
}

.nbc-formular-meldung {
	font-size: 0.9rem;
	margin: 4px 0 14px;
	min-height: 1.2em;
}

.nbc-formular-meldung.erfolg { color: #1c8a4b; }
.nbc-formular-meldung.fehler { color: var(--nbc-vermelho); }

.nbc-formular-fusszeile {
	text-align: center;
	margin-top: 14px;
	font-size: 0.9rem;
}

.nbc-formular-fusszeile a {
	color: var(--nbc-vermelho);
	text-decoration: none;
}

/* --------------------------------------------------------------
 * DASHBOARD
 * ------------------------------------------------------------ */

.nbc-dashboard-kopf {
	margin-bottom: 20px;
}

/* Nachrichten-Liste – früher im Dropdown-Panel des entfernten Header-
   Icon-Menüs (daher die "mailbox"-Klassennamen), jetzt Inhalt des
   vollwertigen Tabs "Nachricht". Keine max-height/overflow-y mehr nötig,
   da die Liste jetzt in einer normalen Tab-Karte steht statt in einem
   platzbeschränkten Dropdown. */
.nbc-mailbox-liste {
	list-style: none;
	margin: 0;
	padding: 0;
}

.nbc-mailbox-eintrag {
	border-bottom: 1px solid var(--nbc-border);
}

.nbc-mailbox-eintrag:last-child {
	border-bottom: none;
}

.nbc-mailbox-eintrag-ungelesen .nbc-mailbox-titel {
	font-weight: 700;
}

.nbc-mailbox-eintrag-ungelesen .nbc-mailbox-titel::before {
	content: '●';
	color: var(--nbc-vermelho);
	margin-right: 6px;
	font-size: 0.7rem;
}

.nbc-mailbox-eintrag-kopf {
	width: 100%;
	background: none;
	border: none;
	cursor: pointer;
	padding: 10px 8px;
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	gap: 2px;
	text-align: left;
}

.nbc-mailbox-eintrag-kopf:hover {
	background: var(--nbc-surface-soft);
	border-radius: 8px;
}

.nbc-mailbox-titel {
	color: var(--nbc-text);
	font-size: 0.92rem;
}

.nbc-mailbox-datum {
	color: var(--nbc-text-soft);
	font-size: 0.78rem;
}

.nbc-mailbox-eintrag-inhalt {
	padding: 0 8px 12px 24px;
	color: var(--nbc-text-soft);
	font-size: 0.88rem;
	line-height: 1.5;
}

/* Reine Icon-Tabs statt Textlinks – aufgeräumteres, professionelleres
   Erscheinungsbild. Beschriftung bleibt über aria-label/title (Tooltip
   bei Maus-Hover) verfügbar, siehe public/views/dashboard.php. Der
   aktive Zustand wird über Hintergrundfarbe signalisiert statt über
   Textfarbe, da ohne sichtbaren Text eine reine Farbänderung kaum
   auffallen würde. */
.nbc-tabs {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	border-bottom: none;
	padding-bottom: 4px;
	margin-bottom: 24px;
}

.nbc-tab {
	background: var(--nbc-surface-soft);
	border: 1px solid var(--nbc-border);
	border-radius: 999px;
	width: 46px;
	height: 46px;
	padding: 0;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	cursor: pointer;
	transition: transform 0.12s ease, box-shadow 0.12s ease, border-color 0.12s ease, background-color 0.12s ease;
}

.nbc-tab-icon {
	font-size: 1.3rem;
	line-height: 1;
}

.nbc-tab:hover,
.nbc-tab:focus-visible {
	border-color: var(--nbc-vermelho);
	transform: translateY(-1px);
	box-shadow: 0 3px 10px rgba(15, 15, 16, 0.12);
}

.nbc-tab.active {
	background: var(--nbc-vermelho);
	border-color: var(--nbc-vermelho);
	box-shadow: 0 4px 12px rgba(138, 10, 12, 0.32);
}

.nbc-tab-inhalt[hidden] {
	display: none;
}

.nbc-readonly-liste {
	display: grid;
	grid-template-columns: max-content 1fr;
	gap: 4px 14px;
	font-size: 0.92rem;
}

.nbc-readonly-liste dt {
	color: var(--nbc-text-soft);
}

.nbc-readonly-liste dd {
	margin: 0;
	font-weight: 700;
}

.nbc-feld-gruppe-readonly {
	background: var(--nbc-surface-soft);
	border-radius: 10px;
	padding: 12px 14px;
	margin-bottom: 16px;
}

/* Profilfoto (nur Anzeige – Bearbeitung ausschließlich im Backend). */
.nbc-profilfoto-zeile {
	display: flex;
	align-items: center;
	gap: 12px;
	margin-bottom: 14px;
}

.nbc-avatar {
	width: 56px;
	height: 56px;
	border-radius: 50%;
	border: 2px solid var(--nbc-vermelho);
	overflow: hidden;
	background: var(--nbc-surface);
	display: flex;
	align-items: center;
	justify-content: center;
	font-weight: 800;
	color: var(--nbc-text-soft);
	flex-shrink: 0;
}

.nbc-avatar img {
	width: 100%;
	height: 100%;
	object-fit: cover;
}

/* Corda-Farbbalken (dieselbe Optik wie im Backend, siehe admin.css). */
.nbc-grad-balken {
	display: inline-flex;
	width: 46px;
	height: 14px;
	border: 1px solid var(--nbc-border);
	border-radius: 3px;
	overflow: hidden;
	vertical-align: middle;
	margin-right: 6px;
}

.nbc-grad-haelfte {
	flex: 1 1 50%;
}

.nbc-geburtstag-liste {
	list-style: none;
	margin: 0;
	padding: 0;
}

.nbc-geburtstag-liste li {
	display: flex;
	justify-content: space-between;
	padding: 10px 0;
	border-bottom: 1px solid var(--nbc-border);
}

.nbc-geburtstag-liste li:last-child {
	border-bottom: none;
}

.nbc-geburtstag-name {
	display: flex;
	flex-direction: column;
}

.nbc-geburtstag-verein {
	color: var(--nbc-text-soft);
	font-size: 0.8rem;
	font-weight: 400;
}

.nbc-geburtstag-apelido {
	color: var(--nbc-text-soft);
	font-weight: 400;
	font-size: 0.92rem;
}

/* Zwischenüberschrift je Bestellweg im zusammengelegten Tab
   "Bestellungen & Pedidos" (Online-Shop vs. Abholung in der Schule). */
.nbc-bestellweg-titel {
	display: flex;
	align-items: center;
	gap: 8px;
}

.nbc-produkt-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
	gap: 16px;
}

.nbc-produkt-karte {
	border: 1px solid var(--nbc-border);
	border-radius: 12px;
	padding: 14px;
	text-align: center;
	background: var(--nbc-surface-soft);
}

.nbc-produkt-karte img {
	max-width: 100%;
	border-radius: 8px;
	margin-bottom: 10px;
}

.nbc-lade-hinweis {
	color: var(--nbc-text-soft);
	font-style: italic;
}

.nbc-hinweis {
	background: var(--nbc-surface-soft);
	border-left: 4px solid var(--nbc-vermelho);
	padding: 14px 16px;
	border-radius: 8px;
}

/* --------------------------------------------------------------
 * ANWESENHEIT (QR-Code, Anwesenheitsquote, gemeldete Fehltage)
 * ------------------------------------------------------------ */

.nbc-qr-karte {
	text-align: center;
}

.nbc-qr-code-anzeige {
	display: flex;
	justify-content: center;
	align-items: center;
	min-height: 60px;
	margin-top: 14px;
}

.nbc-qr-code-anzeige canvas,
.nbc-qr-code-anzeige img {
	border-radius: 8px;
	background: #fff;
	padding: 10px;
}

/* Klartext-Fallback des QR-Inhalts – immer sichtbar, unabhängig davon,
   ob die externe QR-Bibliothek erfolgreich geladen werden konnte. */
.nbc-qr-code-text {
	font-family: 'Courier New', monospace;
	font-size: 0.9rem;
	letter-spacing: 0.5px;
	color: var(--nbc-text-soft);
	background: var(--nbc-surface-soft);
	border-radius: 8px;
	padding: 6px 12px;
	margin-top: 10px;
	display: inline-block;
}

.nbc-frequenz-zahl {
	font-family: 'Bebas Neue', 'Nunito', sans-serif;
	font-size: 3rem;
	color: var(--nbc-vermelho);
	line-height: 1;
}

.nbc-frequenz-details {
	color: var(--nbc-text-soft);
	margin: 6px 0 0;
}

.nbc-abwesenheit-liste-titel {
	margin-top: 24px;
	font-size: 1rem;
}

.nbc-abwesenheit-liste {
	list-style: none;
	margin: 0;
	padding: 0;
}

.nbc-abwesenheit-liste li {
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 10px 0;
	border-bottom: 1px solid var(--nbc-border);
}

.nbc-abwesenheit-liste li:last-child {
	border-bottom: none;
}

.nbc-abwesenheit-stornieren {
	background: none;
	border: 1px solid var(--nbc-border);
	border-radius: 8px;
	padding: 4px 10px;
	color: var(--nbc-vermelho);
	cursor: pointer;
	font-size: 0.85rem;
}

.nbc-abwesenheit-stornieren:hover {
	background: var(--nbc-surface-soft);
}

/* --------------------------------------------------------------
 * PEDIDOS (fester Artikelkatalog, Warenkorb, WhatsApp-Versand)
 * ------------------------------------------------------------ */

.nbc-pedido-toolbar {
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
	align-items: center;
	margin-bottom: 16px;
}

.nbc-pedido-suche {
	flex: 1 1 220px;
	display: flex;
	align-items: center;
	gap: 8px;
	background: var(--nbc-surface-soft);
	border: 1px solid var(--nbc-border);
	border-radius: 10px;
	padding: 0 12px;
}

.nbc-pedido-suche input {
	border: none;
	background: none;
	padding: 10px 0;
	flex: 1;
}

.nbc-pedido-suche input:focus {
	outline: none;
}

.nbc-btn-klein {
	border: 1px solid var(--nbc-border);
	background: var(--nbc-surface);
	color: var(--nbc-text);
	border-radius: 10px;
	padding: 10px 14px;
	font-weight: 700;
	font-size: 0.88rem;
	white-space: nowrap;
}

.nbc-btn-klein:hover {
	border-color: var(--nbc-vermelho);
	color: var(--nbc-vermelho);
}

.nbc-pedido-kategorie-label {
	font-size: 0.8rem;
	font-weight: 800;
	color: var(--nbc-vermelho);
	text-transform: uppercase;
	letter-spacing: 0.6px;
	border-left: 3px solid var(--nbc-vermelho);
	padding-left: 10px;
	margin: 20px 0 10px;
}

.nbc-pedido-kategorie:first-child .nbc-pedido-kategorie-label {
	margin-top: 0;
}

.nbc-pedido-kategorie.nbc-versteckt {
	display: none;
}

.nbc-pedido-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
	gap: 10px;
}

.nbc-pedido-item {
	position: relative;
	border: 1px solid var(--nbc-border);
	background: var(--nbc-surface);
	color: var(--nbc-text);
	border-radius: 12px;
	padding: 14px 12px;
	text-align: center;
	font-weight: 700;
	font-size: 0.9rem;
	min-height: 60px;
	display: flex;
	align-items: center;
	justify-content: center;
}

.nbc-pedido-item:hover {
	border-color: var(--nbc-vermelho);
	background: var(--nbc-surface-soft);
}

.nbc-pedido-item.ausgewaehlt {
	border-color: var(--nbc-vermelho);
	color: var(--nbc-vermelho);
	box-shadow: inset 0 0 0 1px var(--nbc-vermelho);
}

.nbc-pedido-item.nbc-versteckt {
	display: none;
}

.nbc-pedido-badge {
	position: absolute;
	top: 6px;
	right: 8px;
	background: var(--nbc-vermelho);
	color: #fff;
	font-size: 0.72rem;
	font-weight: 800;
	padding: 2px 6px;
	border-radius: 999px;
}

.nbc-pedido-warenkorb-liste {
	list-style: none;
	margin: 0;
	padding: 0;
}

.nbc-pedido-warenkorb-liste li {
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 10px 0;
	border-bottom: 1px dashed var(--nbc-border);
	gap: 10px;
}

.nbc-pedido-warenkorb-liste li:last-child {
	border-bottom: none;
}

.nbc-pedido-warenkorb-aktionen {
	display: flex;
	align-items: center;
	gap: 8px;
}

.nbc-pedido-warenkorb-aktionen button {
	width: 30px;
	height: 30px;
	border-radius: 50%;
	border: 1px solid var(--nbc-border);
	background: var(--nbc-surface-soft);
	color: var(--nbc-text);
	font-weight: 800;
	line-height: 1;
}

.nbc-pedido-warenkorb-aktionen button:hover {
	border-color: var(--nbc-vermelho);
	color: var(--nbc-vermelho);
}

.nbc-pedido-warenkorb-aktionen strong {
	min-width: 18px;
	text-align: center;
}

.nbc-pedido-aktionen {
	margin-top: 16px;
}

.nbc-pedido-liste {
	list-style: none;
	margin: 0;
	padding: 0;
}

.nbc-pedido-liste li {
	padding: 12px 0;
	border-bottom: 1px solid var(--nbc-border);
}

.nbc-pedido-liste li:last-child {
	border-bottom: none;
}

.nbc-pedido-liste-kopf {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 10px;
	margin-bottom: 4px;
}

.nbc-pedido-liste-datum {
	color: var(--nbc-text-soft);
	font-size: 0.85rem;
}

.nbc-pedido-liste-artikel {
	margin: 0;
	font-size: 0.94rem;
}

.nbc-badge {
	display: inline-block;
	padding: 2px 10px;
	border-radius: 999px;
	font-size: 0.78rem;
	font-weight: 700;
}

.nbc-badge--pedido-ausstehend {
	background: rgba(184, 106, 0, 0.12);
	color: var(--warning, #b86a00);
}

.nbc-badge--pedido-erledigt {
	background: rgba(31, 122, 57, 0.12);
	color: var(--success, #1c8a4b);
}

.nbc-badge--pedido-storniert {
	background: var(--nbc-surface-soft);
	color: var(--nbc-text-soft);
}

/* --------------------------------------------------------------
 * TRAININGSPLAN (zugewiesene Übungen, Protokoll, Downloads)
 * ------------------------------------------------------------ */

.nbc-training-item {
	padding: 14px 0;
	border-bottom: 1px solid var(--nbc-border);
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 10px;
}

.nbc-training-item:last-child {
	border-bottom: none;
}

.nbc-training-kopf {
	display: flex;
	flex-direction: column;
	gap: 2px;
}

.nbc-training-meta {
	color: var(--nbc-text-soft);
	font-size: 0.85rem;
}

.nbc-training-formular {
	display: flex;
	gap: 8px;
	align-items: center;
}

.nbc-training-wert {
	width: 90px;
}

.nbc-download-liste {
	list-style: none;
	margin: 0;
	padding: 0;
}

.nbc-download-liste li {
	padding: 10px 0;
	border-bottom: 1px solid var(--nbc-border);
}

.nbc-download-liste li:last-child {
	border-bottom: none;
}

.nbc-download-liste a {
	color: var(--nbc-vermelho);
	text-decoration: none;
	font-weight: 700;
}

.nbc-download-liste a:hover {
	text-decoration: underline;
}

/* --------------------------------------------------------------
 * TRAININGSPLAN – ERWEITERUNGEN: Trainingsvorschlag, Fortschritt,
 * Gewicht/Chart, Bester Tag & Zusammenfassung
 * ------------------------------------------------------------ */

.nbc-vorschlag-karte {
	background: linear-gradient(135deg, var(--nbc-vermelho), #b5171a);
	border-top: none;
	color: #ffffff;
}

.nbc-vorschlag-karte h2 {
	color: #ffffff;
	border-bottom-color: rgba(255, 255, 255, 0.3);
}

.nbc-vorschlag-karte p {
	margin: 0;
	opacity: 0.95;
}

.nbc-fortschritt-wrap {
	background: var(--nbc-surface-soft);
	border: 1px solid var(--nbc-border);
	border-radius: 999px;
	height: 16px;
	overflow: hidden;
}

.nbc-fortschritt-balken {
	height: 100%;
	min-width: 2ch;
	background: linear-gradient(90deg, var(--nbc-vermelho), #c94245);
	color: #ffffff;
	font-size: 0.7rem;
	font-weight: 800;
	display: flex;
	align-items: center;
	justify-content: center;
	transition: width 0.4s ease;
}

.nbc-gewicht-formular {
	display: flex;
	flex-wrap: wrap;
	align-items: flex-end;
	gap: 14px;
}

.nbc-gewicht-formular .nbc-feld {
	flex: 1;
	min-width: 160px;
	margin-bottom: 0;
}

.nbc-gewicht-chart-wrap {
	margin-top: 18px;
}

.nbc-gewicht-chart-wrap h3 {
	font-size: 1rem;
	color: var(--nbc-text);
	margin: 0 0 10px;
}

.nbc-grid-2 {
	display: grid;
	grid-template-columns: 1fr;
	gap: 20px;
	margin-bottom: 20px;
}

.nbc-grid-2 .nbc-karte {
	margin-bottom: 0;
}

@media (min-width: 640px) {
	.nbc-grid-2 {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}
}

.nbc-bester-tag-datum {
	font-family: 'Bebas Neue', 'Nunito', sans-serif;
	font-size: 1.6rem;
	color: var(--nbc-vermelho);
	letter-spacing: 0.4px;
}

.nbc-zusammenfassung-liste {
	list-style: none;
	margin: 0;
	padding: 0;
}

.nbc-zusammenfassung-liste li {
	padding: 8px 0;
	border-bottom: 1px solid var(--nbc-border);
	font-size: 0.92rem;
}

.nbc-zusammenfassung-liste li:last-child {
	border-bottom: none;
}

/* --------------------------------------------------------------
 * KALENDER (nur lesend – Events kommen ausschließlich aus dem Backend)
 * ------------------------------------------------------------ */

.nbc-kal-kopf {
	display: flex;
	align-items: center;
	justify-content: space-between;
	margin-bottom: 14px;
}

.nbc-kal-kopf h2 {
	font-family: 'Bebas Neue', 'Nunito', sans-serif;
	font-size: 1.4rem;
	letter-spacing: 0.5px;
}

.nbc-kal-wochentage {
	display: grid;
	grid-template-columns: repeat(7, 1fr);
	margin-bottom: 4px;
}

.nbc-kal-wochentage span {
	text-align: center;
	font-size: 0.72rem;
	font-weight: 800;
	color: var(--nbc-text-soft);
	text-transform: uppercase;
	padding: 4px 0;
}

.nbc-kal-grid {
	display: grid;
	grid-template-columns: repeat(7, 1fr);
	gap: 4px;
}

.nbc-kal-zelle {
	min-height: 64px;
	border: 1px solid var(--nbc-border);
	border-radius: 8px;
	padding: 4px;
}

.nbc-kal-zelle.nbc-kal-leer {
	border: none;
}

.nbc-kal-zelle.nbc-kal-heute {
	background: rgba(138, 10, 12, 0.06);
	border-color: var(--nbc-vermelho);
}

.nbc-kal-zelle.nbc-kal-belegt {
	background: rgba(138, 10, 12, 0.1);
}

.nbc-kal-tagnummer {
	font-size: 0.8rem;
	font-weight: 700;
	color: var(--nbc-text-soft);
}

.nbc-kal-event-label {
	display: block;
	font-size: 0.62rem;
	background: var(--nbc-vermelho);
	color: #fff;
	padding: 1px 4px;
	border-radius: 4px;
	margin-top: 2px;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

.nbc-kal-event-karte {
	display: flex;
	gap: 14px;
	padding: 14px 0;
	border-bottom: 1px solid var(--nbc-border);
}

.nbc-kal-event-karte:last-child {
	border-bottom: none;
}

.nbc-kal-event-cartaz {
	width: 80px;
	height: 80px;
	object-fit: cover;
	border-radius: 10px;
	border: 1px solid var(--nbc-border);
	flex-shrink: 0;
}

.nbc-kal-event-inhalt {
	flex: 1;
	min-width: 0;
}

.nbc-kal-event-kategorie {
	display: inline-block;
	background: var(--nbc-surface-soft);
	border-radius: 999px;
	padding: 2px 10px;
	font-size: 0.78rem;
	font-weight: 700;
	margin-bottom: 4px;
}

.nbc-kal-event-inhalt h3 {
	font-family: 'Bebas Neue', 'Nunito', sans-serif;
	font-size: 1.2rem;
	letter-spacing: 0.4px;
}

.nbc-kal-event-zeitraum {
	color: var(--nbc-text-soft);
	font-size: 0.9rem;
	margin: 2px 0 4px;
}

.nbc-kal-event-preis {
	font-size: 0.9rem;
	margin: 2px 0;
}

.nbc-kal-event-inhalt .nbc-btn-klein {
	display: inline-block;
	margin-top: 8px;
	text-decoration: none;
}

/* Export-Buttons je Event (.ics-Download + "Zu Google Kalender hinzufügen"). */
.nbc-kal-event-aktionen {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	margin-top: 8px;
}

.nbc-kal-event-aktionen .nbc-btn-klein {
	margin-top: 0;
	cursor: pointer;
}

@media (max-width: 480px) {
	.nbc-kal-event-karte {
		flex-direction: column;
	}
}

/* ---------------------------------------------------------------
 * NEUIGKEITEN: Pflicht-Popup (siehe NBC_Neuigkeiten + dashboard.php)
 * Liegt als Overlay über dem gesamten Dashboard, bis der Schüler die
 * angezeigte Neuigkeit gelesen und geschlossen hat.
 * -------------------------------------------------------------*/
.nbc-neuigkeit-overlay {
	position: fixed;
	inset: 0;
	z-index: 9999;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 20px;
	background: rgba(15, 15, 16, 0.6);
}

/* WICHTIG: das [hidden]-Attribut allein reicht nicht, da die obige Regel
   "display: flex" mit derselben Spezifität wie die Browser-Standardregel
   "[hidden] { display: none }" konkurriert und als Autoren-Stylesheet
   gewinnt – ohne diese Override-Regel bliebe das Popup dauerhaft sichtbar
   und ließe sich nicht mehr schließen (siehe auch .nbc-tab-inhalt[hidden]
   weiter unten, das denselben Mechanismus schon richtig behandelt). */
.nbc-neuigkeit-overlay[hidden] {
	display: none;
}

.nbc-neuigkeit-modal {
	width: 100%;
	max-width: 480px;
	max-height: 80vh;
	overflow-y: auto;
	background: var(--nbc-surface);
	border: 1px solid var(--nbc-border);
	border-top: 5px solid var(--nbc-vermelho);
	border-radius: var(--nbc-radius);
	box-shadow: var(--nbc-shadow);
	padding: 28px;
}

.nbc-neuigkeit-modal h2 {
	margin-top: 0;
	color: var(--nbc-text);
}

.nbc-neuigkeit-inhalt {
	color: var(--nbc-text);
	line-height: 1.6;
	margin-bottom: 16px;
}

.nbc-neuigkeit-inhalt p:first-child {
	margin-top: 0;
}

.nbc-neuigkeit-zaehler {
	color: var(--nbc-text-soft);
	font-size: 0.85rem;
	margin: 0 0 16px;
}

.nbc-neuigkeit-modal .nbc-btn {
	width: 100%;
}

/* Mobile-first: Karten nehmen ab 640px mehr Innenabstand,
   darunter bleibt es kompakt für kleine Displays. */
@media (min-width: 640px) {
	.nbc-karte {
		padding: 32px;
	}
}

/* --------------------------------------------------------------
 * MUSIK-PLAYER (Tab "Musik", siehe NBC_Musik + public.js)
 * Mobile-first gestaltet: große Tap-Fläche für Play/Pause und den
 * Fortschrittsbalken, da die Schüler das Dashboard überwiegend am
 * Smartphone nutzen.
 * ------------------------------------------------------------ */

/* Player "Alle Musiken abspielen": spielt automatisch den gesamten
   Katalog durch (siehe musikKatalog + musikMaster*() in public.js).
   Eigener roter Rahmen oben, damit sich die Karte optisch von der
   Favorit- und der Listen-Karte darunter abhebt. */
.nbc-musik-master-karte {
	border-top-color: var(--nbc-vermelho);
	background: linear-gradient(180deg, rgba(138, 10, 12, 0.05) 0%, var(--nbc-surface) 55%);
}

.nbc-musik-master-anzeige {
	margin: 10px 0 14px;
}

.nbc-musik-master-titel {
	display: block;
	color: var(--nbc-text);
	font-size: 1.05rem;
	margin-bottom: 8px;
}

.nbc-musik-master-steuerung {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 10px;
	flex-wrap: wrap;
}

.nbc-musik-master-btn {
	flex-shrink: 0;
	width: 46px;
	height: 46px;
	border-radius: 50%;
	border: 1px solid var(--nbc-border);
	background: var(--nbc-surface);
	color: var(--nbc-text);
	font-size: 1.1rem;
	cursor: pointer;
	display: flex;
	align-items: center;
	justify-content: center;
	transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}

.nbc-musik-master-btn:hover {
	border-color: var(--nbc-vermelho);
	color: var(--nbc-vermelho);
}

.nbc-musik-master-btn-primaer {
	width: 58px;
	height: 58px;
	background: var(--nbc-vermelho);
	border-color: var(--nbc-vermelho);
	color: #fff;
	font-size: 1.3rem;
}

.nbc-musik-master-btn-primaer:hover {
	color: #fff;
	opacity: 0.9;
}

.nbc-musik-master-loop-btn.nbc-musik-master-loop-aktiv {
	background: var(--nbc-vermelho);
	border-color: var(--nbc-vermelho);
	color: #fff;
}

.nbc-musik-favorit-karte {
	border-top-color: #e0a530;
	background: linear-gradient(180deg, #fff8ec 0%, var(--nbc-surface) 55%);
}

/* Suche + Ritmo-Filter: gleiches Muster wie die Pedido-Artikelsuche
   (Icon + Input in abgerundeter Umrandung), siehe .nbc-pedido-suche /
   .nbc-glossar-suche. Beide Filter wirken gleichzeitig (siehe
   musikFilterAnwenden() in public.js). */
.nbc-musik-toolbar {
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
	align-items: center;
	margin-bottom: 16px;
}

.nbc-musik-suche {
	flex: 1 1 220px;
	display: flex;
	align-items: center;
	gap: 8px;
	background: var(--nbc-surface-soft);
	border: 1px solid var(--nbc-border);
	border-radius: 10px;
	padding: 0 12px;
}

.nbc-musik-suche input {
	border: none;
	background: none;
	padding: 10px 0;
	flex: 1;
	color: var(--nbc-text);
	font-size: 0.92rem;
}

.nbc-musik-suche input:focus {
	outline: none;
}

.nbc-musik-ritmo-filter {
	flex: 1 1 180px;
	border: 1px solid var(--nbc-border);
	border-radius: 10px;
	background: var(--nbc-surface-soft);
	color: var(--nbc-text);
	padding: 10px 12px;
	font-size: 0.92rem;
}

.nbc-musik-item.nbc-versteckt {
	display: none;
}

.nbc-musik-item {
	border: 1px solid var(--nbc-border);
	border-radius: 12px;
	padding: 12px;
	margin-bottom: 12px;
	background: var(--nbc-surface-soft);
	transition: border-color 0.2s ease;
}

.nbc-musik-item:last-child {
	margin-bottom: 0;
}

.nbc-musik-item-aktiv {
	border-color: var(--nbc-vermelho);
}

.nbc-musik-item-kopf {
	display: flex;
	align-items: center;
	gap: 12px;
}

.nbc-musik-play-btn {
	flex-shrink: 0;
	width: 48px;
	height: 48px;
	border-radius: 50%;
	border: none;
	background: var(--nbc-vermelho);
	color: #fff;
	font-size: 1.1rem;
	display: flex;
	align-items: center;
	justify-content: center;
	cursor: pointer;
	touch-action: manipulation;
}

.nbc-musik-play-btn:active {
	transform: scale(0.94);
}

.nbc-musik-info {
	flex: 1 1 auto;
	min-width: 0;
}

.nbc-musik-titel {
	display: block;
	margin-bottom: 6px;
	font-weight: 700;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

/* Ritmo in Klammern neben dem Titel, z. B. "Paranauê (Angola)" – bewusst
   dezenter als der fett gesetzte Titel (siehe musikItemHtml() in public.js). */
.nbc-musik-ritmo {
	font-weight: 400;
	color: var(--nbc-text-soft, #6b6b6f);
}

.nbc-musik-progress-wrap {
	display: flex;
	align-items: center;
	gap: 10px;
}

.nbc-musik-progress {
	flex: 1 1 auto;
	height: 28px;
	accent-color: var(--nbc-vermelho);
}

.nbc-musik-zeit {
	flex-shrink: 0;
	font-size: 0.78rem;
	color: var(--nbc-text-soft, #6b6b6f);
	min-width: 5.2ch;
	text-align: right;
}

.nbc-musik-letra {
	margin: 14px 0 0;
	padding: 14px;
	background: var(--nbc-surface);
	border-left: 4px solid var(--nbc-vermelho);
	border-radius: 8px;
	white-space: pre-wrap;
	word-break: break-word;
	font-family: inherit;
	font-size: 0.92rem;
	line-height: 1.6;
	max-height: 260px;
	overflow-y: auto;
}

/* --------------------------------------------------------------
 * CAPOEIRA GLOSSAR (Tab "Capoeira Glossar")
 * Mobile-first: großer Tap-Bereich fürs Wort, Bedeutung immer sichtbar
 * (siehe NBC_Glossar + public.js).
 * ------------------------------------------------------------ */

/* Titelbild: von der Gruppe Na Beira do Cais Capoeira im Backend
   hochgeladen (siehe NBC_Glossar::titelbild_url()), erscheint vor der
   Suchleiste/Wortliste. Ohne Bild bleibt der Container "hidden" (siehe
   Markup in public/views/dashboard.php + glossarTitelbildAnzeigen()).
   "object-fit: contain" statt "cover", damit das Bild immer vollständig
   (nicht beschnitten) zu sehen ist – der Button ist zusätzlich klickbar
   und öffnet eine vergrößerte Zoom-Ansicht (siehe .nbc-bild-zoom-overlay
   + glossarTitelbildZoomOeffnen() in public.js). */
.nbc-glossar-titelbild {
	margin: 14px 0;
}

.nbc-glossar-titelbild-btn {
	display: block;
	position: relative;
	width: 100%;
	border: 1px solid var(--nbc-border);
	border-radius: var(--nbc-radius, 12px);
	overflow: hidden;
	background: var(--nbc-surface-soft);
	box-shadow: var(--nbc-shadow, none);
	padding: 0;
	cursor: zoom-in;
}

.nbc-glossar-titelbild-btn img {
	display: block;
	width: 100%;
	height: auto;
	max-height: 320px;
	object-fit: contain;
	background: var(--nbc-surface-soft);
}

.nbc-glossar-titelbild-hinweis {
	position: absolute;
	right: 10px;
	bottom: 10px;
	background: rgba(0, 0, 0, 0.6);
	color: #fff;
	font-size: 0.72rem;
	font-weight: 700;
	letter-spacing: 0.02em;
	padding: 4px 10px;
	border-radius: 999px;
	pointer-events: none;
	transition: background 0.15s ease;
}

.nbc-glossar-titelbild-btn:hover .nbc-glossar-titelbild-hinweis,
.nbc-glossar-titelbild-btn:focus-visible .nbc-glossar-titelbild-hinweis {
	background: var(--nbc-vermelho);
}

/* Zoom-Overlay: fürs Titelbild (weitere Verwendungen möglich, daher der
   allgemeine Klassenname "nbc-bild-zoom-*"), Markup liegt außerhalb der
   Tabs in public/views/dashboard.php – gleiches Grundmuster wie das
   Neuigkeiten-Popup (.nbc-neuigkeit-overlay). */
.nbc-bild-zoom-overlay {
	position: fixed;
	inset: 0;
	z-index: 9999;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 24px;
	background: rgba(15, 15, 16, 0.88);
}

.nbc-bild-zoom-overlay[hidden] {
	display: none;
}

.nbc-bild-zoom-overlay img {
	max-width: 100%;
	max-height: 100%;
	object-fit: contain;
	border-radius: 8px;
	box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
}

.nbc-bild-zoom-schliessen {
	position: absolute;
	top: 20px;
	right: 20px;
	width: 40px;
	height: 40px;
	border-radius: 50%;
	border: none;
	background: rgba(255, 255, 255, 0.15);
	color: #fff;
	font-size: 1.1rem;
	line-height: 1;
	cursor: pointer;
	display: flex;
	align-items: center;
	justify-content: center;
}

.nbc-bild-zoom-schliessen:hover {
	background: rgba(255, 255, 255, 0.3);
}

/* Suchleiste: gleiches Muster wie die Pedido-Artikelsuche (Icon + Input
   in einer abgerundeten Umrandung), siehe .nbc-pedido-suche. */
.nbc-glossar-suche {
	display: flex;
	align-items: center;
	gap: 8px;
	background: var(--nbc-surface-soft);
	border: 1px solid var(--nbc-border);
	border-radius: 10px;
	padding: 0 12px;
	margin: 14px 0;
}

.nbc-glossar-suche input {
	border: none;
	background: none;
	padding: 10px 0;
	flex: 1;
	color: var(--nbc-text);
	font-size: 0.92rem;
}

.nbc-glossar-suche input:focus {
	outline: none;
}

.nbc-glossar-buchstabe {
	margin: 20px 0 8px;
	padding-bottom: 4px;
	border-bottom: 2px solid var(--nbc-vermelho);
	color: var(--nbc-vermelho);
	font-size: 1rem;
	letter-spacing: 0.04em;
}

.nbc-glossar-buchstabe:first-child {
	margin-top: 0;
}

.nbc-glossar-buchstabe.nbc-versteckt,
.nbc-glossar-item.nbc-versteckt {
	display: none;
}

.nbc-glossar-item {
	border: 1px solid var(--nbc-border);
	border-radius: 12px;
	padding: 12px;
	margin-bottom: 10px;
	background: var(--nbc-surface-soft);
	transition: border-color 0.2s ease;
}

.nbc-glossar-item:last-child {
	margin-bottom: 0;
}

.nbc-glossar-item-aktiv {
	border-color: var(--nbc-vermelho);
}

.nbc-glossar-wort-btn {
	/* Bewusst kein volle-Breite-Button (siehe Anfrage) – ein kompakter,
	   "Pill"-förmiger Button, der sich an den Wortinhalt anpasst. Das Wort
	   steht in Weiß auf dem roten Hintergrund (guter Kontrast, kein Risiko
	   der früheren "weißer Text auf hellem Hintergrund"-Unsichtbarkeit). */
	display: inline-flex;
	align-items: center;
	gap: 8px;
	width: auto;
	max-width: 100%;
	border: none;
	border-radius: 999px;
	background: var(--nbc-vermelho);
	padding: 8px 16px 8px 8px;
	cursor: pointer;
	touch-action: manipulation;
	transition: background 0.15s ease;
}

.nbc-glossar-wort-btn:active {
	transform: scale(0.98);
}

.nbc-glossar-play-icon {
	flex-shrink: 0;
	width: 28px;
	height: 28px;
	border-radius: 50%;
	background: rgba(255, 255, 255, 0.25);
	color: #fff;
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: 0.85rem;
}

.nbc-glossar-wort {
	color: #fff;
	font-weight: 700;
	font-size: 1.05rem;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.nbc-glossar-details {
	margin: 12px 0 0;
	display: flex;
	flex-direction: column;
	gap: 8px;
}

/* Jedes Detail (Bedeutung/Erklärung/Beispiel) bekommt eine eigene, klar
   abgegrenzte Karte mit farbiger Randlinie + Icon-Label, statt nur
   fett gedrucktem Text – so lässt sich auf einen Blick unterscheiden,
   um welche Art von Information es sich handelt. */
.nbc-glossar-info {
	border-left: 4px solid var(--nbc-vermelho);
	border-radius: 8px;
	background: var(--nbc-surface, #fff);
	padding: 10px 12px;
	box-shadow: var(--nbc-shadow, none);
}

.nbc-glossar-info-label {
	display: block;
	font-size: 0.72rem;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.06em;
	margin-bottom: 4px;
	color: var(--nbc-vermelho);
}

.nbc-glossar-info-text {
	margin: 0;
	color: var(--nbc-text, #1a1a1a);
	font-size: 0.92rem;
	line-height: 1.55;
	white-space: pre-wrap;
}

/* Bedeutung: die primäre, kurze Definition – roter Akzent, wie die
   Marke des Vereins. */
.nbc-glossar-info--bedeutung {
	border-left-color: var(--nbc-vermelho);
	background: rgba(138, 10, 12, 0.05);
}

.nbc-glossar-info--bedeutung .nbc-glossar-info-label {
	color: var(--nbc-vermelho);
}

/* Erklärung: die ausführlichere Zusatzerklärung – bewusst neutral
   (schwarz/grau) gehalten, damit sie sich optisch von Bedeutung und
   Beispiel absetzt. */
.nbc-glossar-info--erklaerung {
	border-left-color: var(--nbc-text, #1a1a1a);
	background: var(--nbc-surface-soft, #f4f4f4);
}

.nbc-glossar-info--erklaerung .nbc-glossar-info-label {
	color: var(--nbc-text, #1a1a1a);
}

/* Beispiel: Verwendungsbeispiel – kursiv wie ein Zitat, eigener
   dezenter roter Farbton. */
.nbc-glossar-info--beispiel {
	border-left-color: var(--nbc-vermelho);
	background: rgba(138, 10, 12, 0.08);
}

.nbc-glossar-info--beispiel .nbc-glossar-info-label {
	color: var(--nbc-vermelho);
}

.nbc-glossar-info--beispiel .nbc-glossar-info-text {
	font-style: italic;
}

@media (min-width: 640px) {
	.nbc-glossar-info-text {
		font-size: 0.95rem;
	}
}
