/* ============================================================
   Kunstrasen Mikro-Spende Widget – Mobile-First CSS
   Scope: alle Regeln unter .krsm-widget → nie das Theme beeinflussen
   Passt sich dem Container an (Blog-Content-Spalte, Sidebar, etc.)
   ============================================================ */
.krsm-widget {
	/* Website-Design (anstoss-zukunft.de) */
	--krsm-green: #00452F;            /* Dunkelgrün — Hauptfarbe, Headings */
	--krsm-green-dark: #003020;
	--krsm-green-lite: #EEF5EA;       /* Heller Sektions-Hintergrund */
	--krsm-green-bg: #EEF5EA;
	--krsm-border: #d7e3d4;
	--krsm-text: #00452F;
	--krsm-ink: #25312B;              /* Textfarbe */
	--krsm-muted: #57615b;
	--krsm-border-neutral: #d7d3cf;
	--krsm-cta: #FFAE00;              /* CTA-Orange */
	--krsm-cta-dark: #cc8b00;
	--krsm-cta-ink: #25312B;

	box-sizing: border-box;
	width: 100%;
	max-width: 100%;
	margin: 1.5em 0;
	position: relative;
	font-family: inherit;             /* Theme-Font vom umgebenden Content erben */
	color: var(--krsm-ink);
	line-height: 1.4;
}
.krsm-widget *,
.krsm-widget *::before,
.krsm-widget *::after {
	box-sizing: border-box;
}

.krsm-card {
	background: #ffffff;
	border: 1px solid var(--krsm-border);
	border-radius: 14px;
	padding: 18px 16px;
	box-shadow: 0 1px 6px rgba(22, 163, 74, 0.08);
	width: 100%;
	max-width: 100%;
	overflow: hidden;
}

.krsm-head {
	margin: 0 0 4px;
	font-size: 1.15em;
	font-weight: 800;
	color: var(--krsm-text);
	line-height: 1.25;
	text-align: center;
	text-transform: uppercase;
	letter-spacing: 0.02em;
	font-family: inherit;
}

.krsm-sub {
	margin: 0 0 14px;
	font-size: 0.88em;
	color: var(--krsm-muted);
	text-align: center;
	line-height: 1.4;
}

.krsm-form {
	margin: 0;
	padding: 0;
	width: 100%;
}

/* ---- Felder ---- */
.krsm-field {
	display: block;
	width: 100%;
	margin-bottom: 10px;
}
.krsm-field > span {
	display: block;
	font-size: 0.8em;
	font-weight: 600;
	color: #374151;
	margin-bottom: 4px;
}
.krsm-field > span small {
	font-weight: 400;
	color: #9ca3af;
	margin-left: 2px;
	font-size: 0.9em;
}
.krsm-field input {
	display: block;
	width: 100%;
	max-width: 100%;
	padding: 10px 12px;
	font-size: 16px; /* 16px verhindert iOS-Auto-Zoom */
	font-family: inherit;
	border: 1px solid var(--krsm-border-neutral);
	border-radius: 8px;
	background: #ffffff;
	color: var(--krsm-ink);
	transition: border-color 0.15s, box-shadow 0.15s;
}
.krsm-field input:focus {
	outline: none;
	border-color: var(--krsm-green);
	box-shadow: 0 0 0 3px rgba(22, 163, 74, 0.15);
}

/* Zweispalter nur ab ~400px, sonst gestapelt */
.krsm-row-2 {
	display: flex;
	flex-direction: column;
	gap: 0;
}
@media (min-width: 420px) {
	.krsm-row-2 {
		flex-direction: row;
		gap: 10px;
	}
	.krsm-row-2 .krsm-field { flex: 1 1 0; min-width: 0; }
}

/* ---- Betrags-Auswahl ---- */
.krsm-amount {
	margin: 14px 0 12px;
	padding: 14px;
	background: #fafafa;
	border: 1px solid #f3f4f6;
	border-radius: 12px;
}
.krsm-amount-label {
	display: block;
	font-size: 0.85em;
	font-weight: 700;
	color: #1f2937;
	margin-bottom: 10px;
	text-align: center;
}

/* Großer 1-€-Button — klar als Auswahl-Kachel erkennbar */
.krsm-amount-btn {
	display: flex;
	align-items: center;
	gap: 14px;
	width: 100%;
	padding: 14px 18px;
	background: #ffffff;
	border: 2px solid var(--krsm-border-neutral);
	border-radius: 12px;
	cursor: pointer;
	color: var(--krsm-ink);
	font-family: inherit;
	transition: all 0.18s;
	min-height: 64px;
	text-align: left;
	position: relative;
}
.krsm-amount-btn:hover {
	border-color: var(--krsm-green);
	background: #f0fdf4;
}
.krsm-amount-btn:focus-visible {
	outline: 3px solid rgba(22, 163, 74, 0.35);
	outline-offset: 2px;
}

/* "Haken-Kreis" links – zeigt Auswahl wie bei Radio-Button */
.krsm-amount-check {
	flex: 0 0 24px;
	width: 24px;
	height: 24px;
	border: 2px solid var(--krsm-border-neutral);
	border-radius: 50%;
	background: #ffffff;
	display: inline-block;
	position: relative;
	transition: all 0.18s;
}
.krsm-amount-btn.is-active .krsm-amount-check {
	border-color: #ffffff;
	background: #ffffff;
}
.krsm-amount-btn.is-active .krsm-amount-check::after {
	content: "✓";
	position: absolute;
	top: 50%;
	left: 50%;
	transform: translate(-50%, -50%);
	color: var(--krsm-green);
	font-weight: 900;
	font-size: 15px;
	line-height: 1;
}

.krsm-amount-value {
	font-size: 1.5em;
	font-weight: 800;
	line-height: 1;
}
.krsm-amount-sub {
	margin-left: auto;
	font-size: 0.78em;
	font-weight: 600;
	color: var(--krsm-muted);
	text-transform: uppercase;
	letter-spacing: 0.5px;
}
.krsm-amount-btn.is-active {
	background: var(--krsm-green);
	border-color: var(--krsm-green);
	color: #ffffff;
	box-shadow: 0 4px 12px rgba(22, 163, 74, 0.25);
}
.krsm-amount-btn.is-active .krsm-amount-sub {
	color: rgba(255, 255, 255, 0.85);
}

.krsm-amount-or {
	display: block;
	text-align: center;
	font-size: 0.78em;
	color: #9ca3af;
	font-style: italic;
	margin: 10px 0;
}

.krsm-custom {
	display: flex;
	align-items: center;
	gap: 4px;
	background: #ffffff;
	border: 2px solid var(--krsm-border-neutral);
	border-radius: 12px;
	padding: 0 12px 0 0;
	transition: all 0.18s;
	min-height: 54px;
}
.krsm-custom input {
	flex: 1 1 auto;
	min-width: 0;
	width: 100%;
	padding: 14px 10px 14px 16px;
	font-size: 17px;
	font-weight: 600;
	font-family: inherit;
	border: none;
	background: transparent;
	color: var(--krsm-ink);
	text-align: right;
	border-radius: 12px;
}
.krsm-custom input:focus { outline: none; }
.krsm-custom:focus-within {
	border-color: var(--krsm-green);
	box-shadow: 0 0 0 3px rgba(22, 163, 74, 0.15);
	background: #f0fdf4;
}
.krsm-euro {
	flex: 0 0 auto;
	font-size: 18px;
	font-weight: 800;
	color: #6b7280;
}

/* ---- Checkbox ---- */
.krsm-cbox {
	display: flex;
	gap: 8px;
	align-items: flex-start;
	margin: 10px 0;
	font-size: 0.82em;
	color: #374151;
	cursor: pointer;
	line-height: 1.4;
}
.krsm-cbox input[type="checkbox"] {
	flex: 0 0 auto;
	margin-top: 2px;
}

/* ---- Honeypot (immer unsichtbar) ---- */
.krsm-hp {
	position: absolute !important;
	left: -9999px !important;
	top: auto !important;
	width: 1px !important;
	height: 1px !important;
	overflow: hidden !important;
}

/* ---- Datenschutz-Hinweis ---- */
.krsm-privacy {
	margin: 12px 0 10px;
	padding: 10px 12px;
	background: #f9fafb;
	border: 1px solid #e5e7eb;
	border-radius: 8px;
	font-size: 0.75em;
	line-height: 1.45;
	color: #4b5563;
}
.krsm-privacy a {
	color: var(--krsm-green-dark);
	text-decoration: underline;
}

/* ---- PayPal (Website-Design) ---- */
.krsm-paypal-wrap {
	margin-top: 14px;
	padding: 14px 12px 10px;
	background: #fff8ed;
	border: 2px solid var(--krsm-cta);
	border-radius: 4px;
	min-height: 70px;
}
.krsm-paypal-label {
	text-align: center;
	font-size: 0.8em;
	font-weight: 800;
	color: var(--krsm-cta-ink);
	margin-bottom: 8px;
	letter-spacing: 0.04em;
	text-transform: uppercase;
	font-family: inherit;
}
.krsm-paypal {
	min-height: 55px;
	width: 100%;
	max-width: 100%;
	position: relative;
	z-index: 1;      /* über eventuellen Overlay-Sheets, falls Theme reinspielt */
	pointer-events: auto;
}
.krsm-paypal iframe {
	max-width: 100% !important;
	width: 100% !important;
}
.krsm-err {
	padding: 10px 12px;
	background: #fef2f2;
	border: 1px solid #fecaca;
	border-radius: 8px;
	color: #991b1b;
	font-size: 0.82em;
	margin: 0;
}

/* ---- Status-Zeile ---- */
.krsm-status {
	margin-top: 8px;
	min-height: 18px;
	font-size: 0.82em;
	text-align: center;
	color: var(--krsm-muted);
}
.krsm-status.is-error { color: #b91c1c; }
.krsm-status.is-info  { color: #0369a1; }

/* ---- Danke-Overlay ---- */
.krsm-thanks {
	position: absolute;
	inset: 0;
	background: rgba(255, 255, 255, 0.98);
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 18px;
	border-radius: 14px;
	z-index: 10;
}
.krsm-thanks[hidden] { display: none !important; }
.krsm-thanks-inner {
	width: 100%;
	max-width: 100%;
	text-align: center;
}
.krsm-thanks-icon {
	font-size: 2.5em;
	line-height: 1;
	margin-bottom: 4px;
	animation: krsm-pop 0.5s cubic-bezier(.3, 1.6, .6, 1);
}
@keyframes krsm-pop {
	0%   { transform: scale(0); }
	100% { transform: scale(1); }
}
.krsm-thanks-inner h3 {
	margin: 0 0 8px;
	font-size: 1.15em;
	color: var(--krsm-text);
	line-height: 1.25;
}
.krsm-thanks-inner > p {
	margin: 0 0 14px;
	color: #4b5563;
	font-size: 0.9em;
	line-height: 1.5;
}
.krsm-stand {
	background: var(--krsm-green-bg);
	border: 1px solid var(--krsm-border);
	border-radius: 12px;
	padding: 12px;
	margin-bottom: 14px;
}
.krsm-stand-label {
	font-size: 0.65em;
	color: var(--krsm-muted);
	text-transform: uppercase;
	letter-spacing: 1px;
}
.krsm-stand-val {
	font-size: 1.6em;
	font-weight: 800;
	color: var(--krsm-green-dark);
	line-height: 1.2;
	margin: 2px 0;
	word-break: break-word;
}
.krsm-stand-sub {
	font-size: 0.78em;
	color: var(--krsm-muted);
}
.krsm-thanks-close {
	background: var(--krsm-green);
	color: #ffffff;
	border: none;
	padding: 10px 24px;
	font-size: 0.88em;
	font-weight: 600;
	border-radius: 999px;
	cursor: pointer;
	font-family: inherit;
	min-height: 44px;
}
.krsm-thanks-close:hover { background: var(--krsm-green-dark); }
