/**
 * MP Notifications - Styles
 * Gehört zum Snippet "MP Notifications (Universal)".
 * Ablage: wp-content/themes/EUER-CHILD-THEME/assets/css/mp-notification.css
 *
 * ARCHITEKTUR / KONVENTIONEN (bewusst identisch zu mp-user-menu.css +
 * ui-button.css gehalten, NICHT dem alten "ANB Notification Dropdown"-
 * Snippet, das dieses hier ablöst):
 *
 *   1. Nur Tokens aus mp-tokens.css, keine eigenen Hex-/px-Farbwerte
 *      (Stand 10.09.26-Architektur, siehe Kopf von ui-button.css).
 *      Einzige Ausnahme: der Panel-Schatten "0 16px 40px rgba(20,22,28,.18)"
 *      ist ein exakter Figma-Wert ohne passendes Token - genau wie
 *      .mp-um-panel seinen eigenen Schatten ebenfalls literal führt.
 *
 *   2. Der Trigger-Button und der Footer-Link sind KEINE eigenen
 *      Button-Styles, sondern nutzen im Markup zusätzlich die
 *      bestehenden .ui-button-Klassen (ui-button--icon-ghost bzw.
 *      ui-button--tertiary). Dadurch zieht "Alle Benachrichtigungen
 *      anzeigen" automatisch jede globale Tertiary-Änderung aus
 *      ui-button.css mit - wie gewünscht ("wenn ich global tertiary
 *      ändere, soll sich das hier mitändern"). .mp-notif-* Klassen
 *      liefern hier NUR Layout/Position, nie Farbe.
 *
 *   3. Öffnen/Schließen inkl. Mobile-Bottom-Sheet folgt 1:1 dem Muster
 *      von mp-user-menu.js/css (Portal ins <body>, Backdrop, fixed
 *      Panel unten). Ausnahme: kein Chevron (Glocke hat keinen Pfeil)
 *      und kein Notch-Dreieck am Panel - im Figma-Node ("Notifications
 *      · 336px") ist keines vorgesehen, anders als beim User-Menu.
 *
 * ANNAHME (nicht im Figma-Node "Notifications · 336px" enthalten,
 * siehe auch PHP-Snippet-Kommentar für die vollständige Liste):
 * die read/unread-Optik (ausgegrauter Punkt + normale statt fette
 * Schrift) ist eine eigene Ergänzung, keine Figma-Vorgabe.
 */

.mp-notif-root {
	position: relative;
	display: inline-block;
	font-family: var(--mp-font-body);
}

/* ---- Trigger --------------------------------------------------------
   Markup: <button class="mp-notif-trigger ui-button ui-button--icon-only
   ui-button--icon-ghost">. Farbe/Hover/Focus kommen dadurch komplett aus
   ui-button.css - .mp-notif-trigger selbst setzt nur die Position, damit
   das Badge passgenau sitzt. ---------------------------------------- */
.mp-notif-trigger {
	position: relative;
}

.mp-notif-badge {
	position: absolute;
	top: 2px;
	right: 2px;
	min-width: 16px;
	height: 16px;
	padding: 0 4px;
	border-radius: var(--mp-radius-pill);
	background: var(--mp-primary);
	color: var(--mp-surface);
	font-size: 10px;
	font-weight: 700;
	line-height: 16px;
	text-align: center;
	box-sizing: border-box;
	pointer-events: none;
}

/* ---- Panel ------------------------------------------------------------
   336px statt der 320px des User-Menüs (siehe Figma-Notiz oben), Radius/
   Border/Elevation/Notch ansonsten exakt wie mp-um-panel (KORRIGIERT:
   der Notch/das Dreieck war fälschlich als "keine Figma-Vorgabe" weg-
   gelassen worden - Container soll aber wie beim User-Menü sein, siehe
   ::before unten, 1:1 aus mp-um-panel übernommen). ---------------------*/
.mp-notif-panel {
	box-sizing: border-box;
	position: absolute;
	top: calc(100% + 8px);
	right: 0;
	width: 336px;
	max-width: calc(100vw - 32px);
	overflow: visible; /* WICHTIG: nicht auto - würde den Notch (top:-7px) abschneiden */
	background: var(--mp-surface);
	border: 1px solid var(--mp-ink-200);
	border-radius: var(--mp-radius-modal);
	box-shadow: 0 16px 40px rgba(20, 22, 28, .18);
	z-index: 200;
	animation: mpNotifFadeIn .12s ease;
}
.mp-notif-panel[hidden] { display: none; }
.mp-notif-panel::before {
	content: '';
	position: absolute;
	top: -7px;
	right: 22px;
	width: 14px;
	height: 14px;
	background: var(--mp-surface);
	border-top: 1px solid var(--mp-ink-200);
	border-left: 1px solid var(--mp-ink-200);
	transform: rotate(45deg);
}
/* Mobile Bottom-Sheet hat keinen Notch (wie beim User-Menü auch) */
@media (max-width: 480px) {
	.mp-notif-panel::before { display: none; }
}

@keyframes mpNotifFadeIn {
	from { opacity: 0; transform: translateY(-4px); }
	to   { opacity: 1; transform: translateY(0); }
}

.mp-notif-header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: var(--mp-space-4) var(--mp-space-5);
}
.mp-notif-header-title {
	font-size: 15px;
	font-weight: 600;
	color: var(--mp-ink-900);
}
.mp-notif-header-badge {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 22px;
	height: 22px;
	padding: 0 var(--mp-space-2);
	border-radius: var(--mp-radius-pill);
	background: var(--mp-primary);
	color: var(--mp-surface);
	font-size: var(--mp-fs-caption);
	font-weight: 600;
}

.mp-notif-list {
	list-style: none;
	margin: 0;
	padding: 0;
	max-height: calc(100vh - 260px); /* Annahme: genug für Header+Footer, bei Bedarf anpassen */
	overflow-y: auto;
}
.mp-notif-item {
	display: flex;
	gap: var(--mp-space-2);
	padding: 14px var(--mp-space-5);
	border-top: 1px solid var(--mp-ink-200);
	cursor: pointer;
}
.mp-notif-item:hover { background: var(--mp-ink-100); }
.mp-notif-item:focus-visible {
	outline: none;
	box-shadow: inset var(--mp-shadow-focus);
}

/* ---- AENDERUNG 24.09.26: klickbare Zeile (<a class="mp-notif-item">) ----
   Theme/Elementor faerben und unterstreichen Links global. Hier nur
   zuruecksetzen, damit die Link-Zeile exakt wie die bisherige <li>-Zeile
   aussieht - Farben kommen weiter aus Titel/Message/Time-Regeln unten.
   Kein neuer Wert, nur Reset. */
a.mp-notif-item,
a.mp-notif-item:hover,
a.mp-notif-item:focus,
a.mp-notif-item:visited {
	color: inherit;
	text-decoration: none;
}

.mp-notif-dot {
	flex: 0 0 auto;
	width: 8px;
	height: 8px;
	margin-top: 6px;
	border-radius: var(--mp-radius-pill);
	background: var(--mp-primary);
}
/* Annahme (siehe Kopf-Kommentar): read/unread ist keine Figma-Vorgabe */
.mp-notif-item--read .mp-notif-dot { background: var(--mp-ink-300); }

.mp-notif-item-body {
	display: flex;
	flex-direction: column;
	gap: 2px;
	min-width: 0;
}
.mp-notif-item-title {
	font-size: var(--mp-fs-body-s);
	font-weight: 600;
	color: var(--mp-ink-900);
}
.mp-notif-item--read .mp-notif-item-title {
	font-weight: 400;
	color: var(--mp-ink-700);
}
.mp-notif-item-message {
	font-size: 13px;
	color: var(--mp-ink-500);
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}
.mp-notif-item-time {
	font-size: var(--mp-fs-label);
	color: var(--mp-ink-500);
	margin-top: 2px;
}

/* ---- Footer -------------------------------------------------------
   .mp-notif-footer-link liefert NUR Layout (volle Breite, Zentrierung),
   Farbe kommt aus den zusätzlich gesetzten Klassen ui-button/
   ui-button--tertiary im Markup - siehe Kopf-Kommentar Punkt 2. -------*/
.mp-notif-footer {
	padding: var(--mp-space-4) var(--mp-space-5);
	border-top: 1px solid var(--mp-ink-200);
}
.mp-notif-footer-link.ui-button {
	display: flex;
	width: 100%;
	height: auto;
	padding: var(--mp-space-2) 0;
}
/* Elementor schreibt ".elementor-kit-XX a { color: ...; }" mit Spezifität
   (0,1,1) - höher als das bloße ".ui-button--tertiary" (0,1,0), siehe
   Kopf-Kommentar in ui-button.css zur analogen border-radius-Ausnahme.
   Fix hier LOKAL (statt global in ui-button.css) durch Verketten aller
   drei bereits vorhandenen Klassen -> (0,3,0), schlägt (0,1,1) ohne
   !important. Farbe kommt weiterhin ausschließlich aus --mp-primary. */
.mp-notif-footer-link.ui-button.ui-button--tertiary,
.mp-notif-footer-link.ui-button.ui-button--tertiary:hover,
.mp-notif-footer-link.ui-button.ui-button--tertiary:active {
	color: var(--mp-primary);
}
.mp-notif-footer-link i { font-size: 14px; }

.mp-notif-empty {
	padding: var(--mp-space-8) var(--mp-space-6) var(--mp-space-6);
	text-align: center;
}
.mp-notif-empty i { font-size: 28px; color: var(--mp-ink-300); }
.mp-notif-empty-title {
	margin: var(--mp-space-3) 0 4px;
	font-size: var(--mp-fs-body-s);
	font-weight: 600;
	color: var(--mp-ink-900);
}
.mp-notif-empty-text {
	margin: 0;
	font-size: 13px;
	color: var(--mp-ink-500);
}

/* ---- Mobile: Bottom-Sheet, identisches Muster zu mp-um-panel -------- */
@media (max-width: 480px) {
	.mp-notif-panel {
		position: fixed;
		top: auto;
		right: 0;
		bottom: 0;
		left: 0;
		width: 100%;
		max-width: none;
		max-height: 75vh;
		overflow-y: auto; /* hier wieder erlaubt - Notch ist auf Mobile eh ausgeblendet */
		border-radius: var(--mp-radius-xl) var(--mp-radius-xl) 0 0;
		z-index: 2147483000;
		animation: mpNotifSlideUp .2s ease;
	}
	/* Sonst würde innerhalb des schon scrollenden Sheets nochmal die
	   Liste separat scrollen - lieber nur eine Scrollbar auf Mobile */
	.mp-notif-list {
		max-height: none;
		overflow-y: visible;
	}
}
@keyframes mpNotifSlideUp {
	from { transform: translateY(100%); }
	to   { transform: translateY(0); }
}

.mp-notif-backdrop { display: none; }
@media (max-width: 480px) {
	.mp-notif-backdrop {
		display: block;
		position: fixed;
		inset: 0;
		background: var(--mp-overlay-60);
		z-index: 2147482999;
	}
}