/* =========================================================================
   Chat-Knopf (inc/chat.php)

   Drei schwebende Knöpfe, aber nicht drei in einer Reihe: „Was suchst du?"
   steht links unten, Chat und Spenden stehen rechts (René, 19.9.2026). So
   hat jeder Knopf Luft, und wenn das Chatfenster aufgeht, verdeckt es nur
   den Spendenknopf – nicht die Suche.

   DIE DREI FARBEN SIND EINE RANGFOLGE

   Rot ist die Handlung (Spenden), Tinte ist die Navigation (Suche), und der
   Chat steht dazwischen: weiß mit Linie. Er ist ein Angebot, kein Ruf. Drei
   volle Farbflächen übereinander würden sich gegenseitig aufheben.

   HÖHEN

   Der Spendenknopf misst außen 48 px (13 + 22 + 13). Der Chat-Knopf hat
   1 px Linie, deshalb 12 px Innenabstand – macht außen dieselben 48. Wer
   einen der beiden ändert, ändert --nl-chat-hoch mit.
   ====================================================================== */

:root {
	--nl-chat-hoch: 58px; /* Höhe des Spendenknopfs (48) plus Abstand (10) */
}

/* Ohne border-box wüchse die Karte um Innenabstand und Linie über die
   Bildschirmbreite hinaus – auf 375 px wären es 379. */
.nl-chat-ecke,
.nl-chat-ecke * {
	box-sizing: border-box;
}

.nl-chat-ecke {
	position: fixed;
	right: var(--nl-schwebt-rand, 16px);
	bottom: var(--nl-schwebt-rand, 16px);
	z-index: 9001; /* über dem Spendenknopf (9000), unter Brevos Fenster (9500) */
	display: flex;
	flex-direction: column;
	align-items: flex-end;
	gap: 12px;
	transition: transform .15s ease;
}

/* Sitzt ein Spendenknopf darunter, rückt die Ecke eine Knopfhöhe hoch. */
.nl-chat-ecke--ueber-spenden {
	bottom: calc(var(--nl-schwebt-rand, 16px) + var(--nl-chat-hoch));
}

/* Fußzeile im Bild: ausweichen wie der Spendenknopf. */
.nl-chat-ecke.nl-chat-ecke--weg {
	transform: translateY(calc(100% + var(--nl-schwebt-rand, 16px) + 8px));
	box-shadow: none;
	pointer-events: none;
}

.nl-chat-ecke--ueber-spenden.nl-chat-ecke--weg {
	transform: translateY(calc(100% + var(--nl-schwebt-rand, 16px) + var(--nl-chat-hoch) + 8px));
}

/* --- Der Knopf --------------------------------------------------------- */

.nl-chat,
.nl-chat.nl-chat {
	display: inline-flex;
	align-items: center;
	gap: 9px;
	margin: 0;
	padding: 10px 17px;
	border: 1px solid var(--nl-tinte, #161616);
	border-radius: 0;
	background: #fff;
	color: var(--nl-tinte, #161616);
	font-family: inherit;
	font-size: 16px;
	font-weight: 700;
	line-height: 1;
	text-align: left;
	cursor: pointer;
	box-shadow: 0 2px 16px rgba(0, 0, 0, .18);
	transition: background-color .15s ease, color .15s ease, transform .15s ease;
}

.nl-chat.nl-chat:hover,
.nl-chat.nl-chat:focus-visible {
	background: var(--nl-tinte, #161616);
	color: #fff;
	transform: translateY(-2px);
}

.nl-chat:focus-visible {
	outline: 3px solid var(--nl-tinte, #161616);
	outline-offset: 2px;
}

/* René, 19.9.2026: Icons größer. 26 statt 22 px – der Innenabstand geht im
   Gegenzug um 2 px zurück, damit die Knöpfe weiter genau 48 px hoch bleiben
   und --nl-chat-hoch stimmt. */
/* Hausicon statt SVG: Die Größe steuert jetzt die Schriftgröße.
   22 px entspricht dem, was das alte SVG maß. */
.nl-chat__blase {
	flex: 0 0 auto;
	font-size: 26px; line-height: 26px; height: 26px; display: inline-block;
}

/* --- Die Karte, die vor dem Laden fragt -------------------------------- */

.nl-chat__karte {
	width: min(320px, calc(100vw - 2 * var(--nl-schwebt-rand, 16px)));
	padding: 18px;
	border: 1px solid var(--nl-tinte, #161616);
	background: #fff;
	box-shadow: 0 6px 28px rgba(0, 0, 0, .22);
	text-align: left;
}

.nl-chat__karte[hidden] {
	display: none;
}

.nl-chat__text {
	margin: 0;
	font-size: 15px;
	line-height: 1.45;
	color: var(--nl-tinte, #161616);
}

.nl-chat__zeiten {
	margin: 10px 0 0;
	padding-top: 10px;
	border-top: 1px solid rgba(22, 22, 22, .14);
	font-size: 14px;
	line-height: 1.45;
	color: #3a3a3a;
}

.nl-chat__wahl {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	margin: 14px 0 0;
}

.nl-chat__ja,
.nl-chat__nein {
	margin: 0;
	padding: 10px 16px;
	border: 1px solid var(--nl-tinte, #161616);
	border-radius: 0;
	font-family: inherit;
	font-size: 15px;
	font-weight: 700;
	line-height: 1.2;
	cursor: pointer;
	transition: background-color .15s ease, color .15s ease;
}

.nl-chat__ja {
	background: var(--nl-tinte, #161616);
	color: #fff;
}

.nl-chat__ja:hover,
.nl-chat__ja:focus-visible {
	background: var(--nl-marke, #ff194e);
	border-color: var(--nl-marke, #ff194e);
	color: var(--nl-auf-marke, #fff);
}

.nl-chat__nein {
	background: #fff;
	color: var(--nl-tinte, #161616);
}

.nl-chat__nein:hover,
.nl-chat__nein:focus-visible {
	background: #f1f1f1;
}

.nl-chat__klein {
	margin: 12px 0 0;
	font-size: 13px;
	line-height: 1.4;
}

.nl-chat__klein a {
	color: #3a3a3a;
}

/* --- Handy: nur die Sprechblase ---------------------------------------- */

@media (max-width: 575.98px) {

	.nl-chat,
	.nl-chat.nl-chat {
		padding: 10px;
		gap: 0;
	}

	.nl-chat__beschriftung {
		position: absolute;
		width: 1px;
		height: 1px;
		overflow: hidden;
		clip-path: inset(50%);
		white-space: nowrap;
	}
}

@media (prefers-reduced-motion: reduce) {

	.nl-chat-ecke,
	.nl-chat {
		transition: none;
	}
}

@media print {

	.nl-chat-ecke {
		display: none !important;
	}
}
