/* ==========================================================================
   KI-Leiste „Mit KI deine Anfrage vorbereiten" (T44)
   Ausgabe: mu-plugins/hac-ki-anfrage.php
   Hof gruen, Elektro-Bereich (body.hac-elektro) blau. Keine :root-Variablen
   setzen – nur auf der Leiste selbst, sonst faerbt es die ganze Seite.
   Breite: Container-Abfrage auf die Leiste, nicht auf das Fenster. So passt
   sie sich an, egal in welcher Spalte sie steht.
   ========================================================================== */

.hac-ki-anfrage {
	--hac-ki-akzent: var(--hac-farbe-gruen, #bac6ae);
	--hac-ki-hover-grund: var(--hac-farbe-gruen, #bac6ae);
	--hac-ki-hover-text: var(--hac-farbe-text, #333333);
	container-type: inline-size;
	/* Oben kein Abstand: Der Einstiegsabschnitt endet schon mit einem
	   Abstandhalter (50 px). Unten etwa gleich viel bis zur Galerie. */
	margin: 0 0 48px;
}

body.hac-elektro .hac-ki-anfrage {
	--hac-ki-akzent: var(--hac-farbe-blau, #1d89f6);
	--hac-ki-hover-grund: var(--hac-farbe-blau, #1d89f6);
	--hac-ki-hover-text: #ffffff; /* Weiss auf Blau: bewusste Ausnahme (Tim, 24.09.2026) */
}

.hac-ki-anfrage__box {
	display: flex;
	align-items: center;
	gap: 14px 24px;
	padding: 16px 20px;
	background: #ffffff;
	border: 1px solid var(--hac-ki-akzent);
	border-radius: 8px;
}

.hac-ki-anfrage__text {
	display: flex;
	flex: 1 1 auto;
	flex-direction: column;
	gap: 2px;
	min-width: 0;
}

.hac-ki-anfrage__titel {
	color: var(--hac-farbe-text-dunkel, #1a1a1a);
	font-size: 17px;
	font-weight: 700;
	line-height: 1.35;
}

.hac-ki-anfrage__hinweis {
	color: var(--hac-farbe-text-leise, #6b6b6b);
	font-size: 14px;
	line-height: 1.45;
}

.hac-ki-anfrage .hac-ki-anfrage__knoepfe {
	display: flex;
	flex: 0 0 auto;
	flex-wrap: nowrap;
	gap: 8px;
	margin: 0;
	padding: 0;
	list-style: none;
}

.hac-ki-anfrage .hac-ki-anfrage__knoepfe li {
	margin: 0;
	padding: 0;
	list-style: none;
}

.hac-ki-anfrage .hac-ki-anfrage__knoepfe li::before {
	content: none;
}

.hac-ki-anfrage a.hac-ki-anfrage__knopf {
	display: flex;
	align-items: center;
	justify-content: center;
	min-height: 40px;
	padding: 8px 16px;
	color: var(--hac-farbe-text-dunkel, #1a1a1a);
	background: #ffffff;
	border: 1.5px solid var(--hac-ki-akzent);
	border-radius: 8px;
	font-size: 15px;
	font-weight: 700;
	line-height: 1.2;
	text-decoration: none;
	white-space: nowrap;
	transition: background-color 0.15s ease, color 0.15s ease;
}

/* Das Child-Theme unterstreicht jeden Link in einer Liste und erzwingt dessen
   Farbe (style.css, „Interne Text-Links", li a … !important). Fuer diese
   Knoepfe gilt das nicht – deshalb hier ebenfalls !important. */
.hac-ki-anfrage a.hac-ki-anfrage__knopf,
.hac-ki-anfrage a.hac-ki-anfrage__knopf:hover {
	color: var(--hac-farbe-text-dunkel, #1a1a1a) !important;
	text-decoration: none !important;
	text-shadow: none !important;
	transition: background-color 0.15s ease, color 0.15s ease !important;
}

.hac-ki-anfrage a.hac-ki-anfrage__knopf:hover,
.hac-ki-anfrage a.hac-ki-anfrage__knopf:focus-visible {
	color: var(--hac-ki-hover-text) !important;
	background: var(--hac-ki-hover-grund);
}

.hac-ki-anfrage a.hac-ki-anfrage__knopf:focus-visible {
	outline: 2px solid var(--hac-farbe-text-dunkel, #1a1a1a);
	outline-offset: 2px;
}

/* Nur fuer Screenreader („oeffnet in neuem Fenster"). Eigene Regel, damit es
   nicht davon abhaengt, ob das Theme .screen-reader-text kennt. */
.hac-ki-anfrage .screen-reader-text {
	position: absolute;
	width: 1px;
	height: 1px;
	margin: -1px;
	padding: 0;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	white-space: nowrap;
	border: 0;
}

/* Schmaler als eine Zeile: Knoepfe unter den Text, weiter in einer Reihe. */
@container (max-width: 720px) {
	.hac-ki-anfrage__box {
		flex-direction: column;
		align-items: stretch;
	}

	.hac-ki-anfrage .hac-ki-anfrage__knoepfe {
		flex-wrap: wrap;
	}
}

/* Handy: Knoepfe 2 × 2, gleich breit. */
@container (max-width: 460px) {
	.hac-ki-anfrage__box {
		gap: 10px;
		padding: 12px 14px;
	}

	.hac-ki-anfrage__titel {
		font-size: 16px;
	}

	.hac-ki-anfrage .hac-ki-anfrage__knoepfe {
		display: grid;
		grid-template-columns: 1fr 1fr;
		gap: 6px;
	}

	.hac-ki-anfrage a.hac-ki-anfrage__knopf {
		min-height: 36px;
		padding: 6px 12px;
	}
}

@media (prefers-reduced-motion: reduce) {
	.hac-ki-anfrage a.hac-ki-anfrage__knopf,
	.hac-ki-anfrage a.hac-ki-anfrage__knopf:hover {
		transition: none !important;
	}
}
