/* Spenden per QR-Code – Mission Tierrettung
   Farben und Typografie folgen dem Theme (inspiro): Akzent #0bb4aa, Onest/Inter. */

.mtr-girocode {
	--mtr-akzent: #0bb4aa;
	--mtr-akzent-dunkel: #099a91;
	--mtr-text: #101010;
	--mtr-text-2: #6c6c77;
	--mtr-rand: #e3e6ec;
	--mtr-flaeche: #f9fafd;

	max-width: 760px;
	margin: 2.5em auto;
	padding: 28px;
	text-align: left;
	background: #fff;
	border: 1px solid var(--mtr-rand);
	border-radius: 18px;
	box-shadow: 0 10px 30px rgba(16, 16, 16, 0.06);
	color: var(--mtr-text);
	container: mtr-girocode / inline-size;
}

/* In einer Spalte (Text links, Code rechts) fuellt die Box die Spalte aus. */
.wp-block-column .mtr-girocode {
	max-width: none;
	margin: 0;
}

.mtr-girocode__kopf {
	text-align: center;
	margin-bottom: 22px;
}

.mtr-girocode .mtr-girocode__titel {
	font-family: 'Onest', sans-serif;
	font-size: 22px;
	font-weight: 600;
	line-height: 1.3;
	margin: 0 0 6px;
	color: var(--mtr-text);
}

.mtr-girocode__sub {
	font-size: 15px;
	line-height: 1.6;
	color: var(--mtr-text-2);
	margin: 0;
}

.mtr-girocode__grid {
	display: grid;
	grid-template-columns: 1fr;
	gap: 24px;
	align-items: start;
}

/* Das interne Grid richtet sich nach der Breite der Box selbst, nicht nach dem
   Fenster – so bleibt der Block in einer schmalen Spalte sauber gestapelt. */
@container mtr-girocode (min-width: 560px) {
	.mtr-girocode__grid {
		grid-template-columns: 1fr 220px;
	}
}

.mtr-girocode__auswahl {
	display: flex;
	flex-direction: column;
	gap: 18px;
}

.mtr-feld__label {
	display: block;
	font-family: 'Onest', sans-serif;
	font-size: 13px;
	font-weight: 600;
	letter-spacing: 0.04em;
	text-transform: uppercase;
	color: var(--mtr-text-2);
	margin-bottom: 9px;
}

.mtr-chips {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	align-items: center;
}

.mtr-girocode .mtr-chip {
	font-family: inherit;
	font-size: 14px;
	font-weight: 500;
	line-height: 1.2;
	color: var(--mtr-text);
	background: var(--mtr-flaeche);
	border: 1.5px solid var(--mtr-rand);
	border-radius: 999px;
	padding: 9px 16px;
	margin: 0;
	cursor: pointer;
	text-transform: none;
	letter-spacing: normal;
	transition: border-color 0.15s, background 0.15s, color 0.15s;
}

.mtr-girocode .mtr-chip:hover,
.mtr-girocode .mtr-chip:focus-visible {
	border-color: var(--mtr-akzent);
	color: var(--mtr-akzent-dunkel);
	background: #fff;
}

.mtr-girocode .mtr-chip--aktiv,
.mtr-girocode .mtr-chip--aktiv:hover,
.mtr-girocode .mtr-chip--aktiv:focus-visible {
	background: var(--mtr-akzent);
	border-color: var(--mtr-akzent);
	color: #fff;
}

.mtr-frei {
	flex: 1 1 170px;
	min-width: 170px;
	margin: 0;
}

.mtr-girocode .mtr-frei input {
	font-family: inherit;
	font-size: 14px;
	color: var(--mtr-text);
	background: var(--mtr-flaeche);
	border: 1.5px solid var(--mtr-rand);
	border-radius: 999px;
	padding: 9px 16px;
	width: 100%;
	outline: none;
	box-shadow: none;
}

.mtr-girocode .mtr-frei input:focus {
	border-color: var(--mtr-akzent);
	background: #fff;
}

.mtr-feld__hinweis {
	font-size: 13.5px;
	line-height: 1.6;
	color: var(--mtr-text-2);
	margin: 9px 0 0;
}

.mtr-girocode__code {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 8px;
}

.mtr-girocode__qr {
	display: flex;
	justify-content: center;
	padding: 10px;
	background: #fff;
	border: 1px solid var(--mtr-rand);
	border-radius: 14px;
}

.mtr-girocode__qr img {
	display: block;
	width: 200px;
	height: 200px;
	max-width: 100%;
	/* Scharfe Modulkanten statt Weichzeichnung – wichtig fuers Scannen. */
	image-rendering: pixelated;
}

.mtr-girocode__betrag {
	font-family: 'Onest', sans-serif;
	font-size: 17px;
	font-weight: 600;
	color: var(--mtr-akzent-dunkel);
	text-align: center;
	min-height: 1.4em;
}

.mtr-girocode__konto {
	display: flex;
	flex-direction: column;
	gap: 2px;
	font-size: 14px;
	line-height: 1.7;
	color: var(--mtr-text-2);
	border-top: 1px solid var(--mtr-rand);
	margin-top: 22px;
	padding-top: 16px;
}

.mtr-girocode__konto strong {
	font-family: 'Onest', sans-serif;
	font-size: 13px;
	font-weight: 600;
	letter-spacing: 0.04em;
	text-transform: uppercase;
	color: var(--mtr-text);
	margin-bottom: 4px;
}

@media screen and (max-width: 480px) {
	.mtr-girocode {
		padding: 22px 18px;
		border-radius: 14px;
	}
}

/* Ohne wiederholte Bankdaten: nur die Verwendungszweck-Zeile, zentriert. */
.mtr-girocode__konto--schmal {
	text-align: center;
	font-size: 13.5px;
}

.mtr-girocode__konto--schmal strong {
	font-family: inherit;
	font-size: inherit;
	font-weight: 600;
	letter-spacing: normal;
	text-transform: none;
	color: var(--mtr-text);
	margin: 0;
}

/* Mobil: Die Box laeuft ueber die volle Bildschirmbreite – in der schmalen
   Spalte blieb sonst nur gut die Haelfte des Schirms uebrig. Steht bewusst am
   Dateiende, damit sie die Spalten-Regel weiter oben ueberschreibt. */
@media screen and (max-width: 991px) {
	.mtr-girocode,
	.wp-block-column .mtr-girocode {
		width: 100vw;
		max-width: 100vw;
		margin-left: calc(50% - 50vw);
		margin-right: calc(50% - 50vw);
		padding: 26px 20px;
		border-radius: 0;
		border-left: 0;
		border-right: 0;
		box-shadow: none;
	}

	/* Mehr Platz heisst groesserer Code – das erleichtert das Scannen. */
	.mtr-girocode__qr img {
		width: 240px;
		height: 240px;
	}
}

/* Zwischen 782 und 991 px (z. B. Tablet hochkant) stellt WordPress die Spalten
   noch nebeneinander – die Box waere dort nur gut 270 px breit. Daher in diesem
   Bereich untereinander stellen, damit Text und Code je die volle Breite haben. */
@media screen and (min-width: 782px) and (max-width: 991px) {
	.wp-block-columns:has(.mtr-girocode) {
		flex-wrap: wrap !important;
	}

	.wp-block-columns:has(.mtr-girocode) > .wp-block-column {
		flex-basis: 100% !important;
	}
}
