/**
 * gescheit.IT – Interesse-Formular
 * Eigenständige, theme-unabhängige Styles. Alles unter .gi-wrap gescopet.
 */

.gi-wrap {
	--gi-accent: #3b52d9;
	--gi-accent-hover: #2c3fb0;
	--gi-text: #1f2937;
	--gi-text-strong: #111827;
	--gi-muted: #6b7280;
	--gi-border: #d7dbe7;
	--gi-border-strong: #c3c9da;
	--gi-surface: #ffffff;
	--gi-backdrop: #eef2ff;
	--gi-radius: 12px;

	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
	color: var(--gi-text);
	font-size: 16px;
	line-height: 1.6;
	max-width: 100%;
}

.gi-wrap *,
.gi-wrap *::before,
.gi-wrap *::after {
	box-sizing: border-box;
}

.gi-wrap--framed {
	background: var(--gi-backdrop);
	border-radius: 24px;
	padding: clamp(12px, 3vw, 28px);
}

/* ----------------------------------------------------------------- Karte */

.gi-card {
	background: var(--gi-surface);
	border: 1px solid #e6e8f0;
	border-radius: 18px;
	padding: clamp(20px, 4vw, 44px);
	box-shadow: 0 1px 2px rgba(16, 24, 40, 0.04);
}

/* ---------------------------------------------------------------- Layout */

.gi-form {
	margin: 0;
	padding: 0;
	border: 0;
}

.gi-field {
	margin: 0 0 24px;
	min-width: 0;
}

.gi-row {
	display: grid;
	gap: 0 28px;
	margin: 0;
}

.gi-row--2 {
	grid-template-columns: repeat(2, minmax(0, 1fr));
}

.gi-row .gi-field {
	margin-bottom: 24px;
}

/* ---------------------------------------------------------------- Labels */

.gi-label {
	display: block;
	margin: 0 0 8px;
	padding: 0;
	font-size: 16px;
	font-weight: 500;
	line-height: 1.4;
	color: var(--gi-text-strong);
}

.gi-label--legend {
	float: none;
	width: auto;
	max-width: 100%;
}

.gi-req {
	color: var(--gi-accent);
	font-weight: 600;
}

/* ---------------------------------------------------------------- Felder */

.gi-input {
	display: block;
	width: 100%;
	max-width: 100%;
	margin: 0;
	padding: 13px 16px;
	font-family: inherit;
	font-size: 16px; /* < 16px löst auf iOS Auto-Zoom aus */
	line-height: 1.5;
	color: var(--gi-text-strong);
	background: #fff;
	background-image: none;
	border: 1px solid var(--gi-border);
	border-radius: var(--gi-radius);
	box-shadow: none;
	appearance: none;
	-webkit-appearance: none;
	transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.gi-input:hover {
	border-color: var(--gi-border-strong);
}

.gi-input:focus,
.gi-input:focus-visible {
	outline: none;
	border-color: var(--gi-accent);
	box-shadow: 0 0 0 3px rgba(59, 82, 217, 0.16);
}

.gi-textarea {
	min-height: 180px;
	resize: vertical;
}

.gi-field--error .gi-input {
	border-color: #d64545;
}

.gi-field--error .gi-input:focus {
	box-shadow: 0 0 0 3px rgba(214, 69, 69, 0.16);
}

.gi-error {
	margin: 8px 0 0;
	font-size: 14px;
	line-height: 1.45;
	color: #b32d2d;
}

/* ------------------------------------------------------------ Checkboxen */

.gi-fieldset {
	margin: 0 0 24px;
	padding: 0;
	border: 0;
	min-width: 0;
}

.gi-checks {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 14px 28px;
	margin-top: 14px;
}

.gi-check {
	display: flex;
	align-items: flex-start;
	gap: 12px;
	margin: 0;
	font-size: 16px;
	font-weight: 400;
	line-height: 1.5;
	color: var(--gi-text);
	cursor: pointer;
}

.gi-check input[type="checkbox"] {
	flex: 0 0 auto;
	position: relative;
	width: 22px;
	height: 22px;
	margin: 1px 0 0;
	padding: 0;
	background: #fff;
	border: 1.5px solid var(--gi-border);
	border-radius: 6px;
	appearance: none;
	-webkit-appearance: none;
	cursor: pointer;
	transition: border-color 0.15s ease, background-color 0.15s ease;
}

.gi-check input[type="checkbox"]:hover {
	border-color: var(--gi-accent);
}

.gi-check input[type="checkbox"]:checked {
	background: var(--gi-accent);
	border-color: var(--gi-accent);
}

.gi-check input[type="checkbox"]:checked::after {
	content: "";
	position: absolute;
	left: 7px;
	top: 3px;
	width: 5px;
	height: 10px;
	border: solid #fff;
	border-width: 0 2px 2px 0;
	transform: rotate(45deg);
}

.gi-check input[type="checkbox"]:focus-visible {
	outline: 2px solid var(--gi-accent);
	outline-offset: 2px;
}

.gi-check--consent {
	align-items: flex-start;
}

.gi-field--consent {
	margin: 28px 0 24px;
}

.gi-check a {
	color: var(--gi-accent);
	text-decoration: underline;
	text-underline-offset: 2px;
}

.gi-check a:hover {
	color: var(--gi-accent-hover);
}

/* --------------------------------------------------------------- Aktionen */

.gi-actions {
	margin: 0 0 16px;
}

.gi-button {
	display: inline-block;
	margin: 0;
	padding: 15px 34px;
	font-family: inherit;
	font-size: 17px;
	font-weight: 700;
	line-height: 1.2;
	color: #fff;
	background: var(--gi-accent);
	border: 0;
	border-radius: 999px;
	cursor: pointer;
	text-decoration: none;
	transition: background-color 0.15s ease, transform 0.05s ease;
}

.gi-button:hover,
.gi-button:focus {
	background: var(--gi-accent-hover);
	color: #fff;
}

.gi-button:active {
	transform: translateY(1px);
}

.gi-button:focus-visible {
	outline: 2px solid var(--gi-accent);
	outline-offset: 3px;
}

.gi-note {
	margin: 0;
	font-size: 15px;
	line-height: 1.55;
	color: var(--gi-muted);
}

/* --------------------------------------------------------------- Hinweise */

.gi-notice {
	margin: 0 0 24px;
	padding: 16px 18px;
	border-radius: var(--gi-radius);
	border: 1px solid transparent;
	font-size: 16px;
	line-height: 1.55;
}

.gi-notice p {
	margin: 0;
}

.gi-notice--success {
	background: #edf7f0;
	border-color: #bfe0ca;
	color: #1c5333;
}

.gi-notice--error {
	background: #fdf0f0;
	border-color: #f0c6c6;
	color: #8f2323;
}

/* -------------------------------------------------------------- Honeypot */

.gi-hp {
	position: absolute !important;
	left: -9999px !important;
	width: 1px;
	height: 1px;
	overflow: hidden;
}

/* ------------------------------------------------------------ Responsive */

@media (max-width: 782px) {
	.gi-checks {
		gap: 14px 20px;
	}
}

@media (max-width: 640px) {
	.gi-row--2 {
		grid-template-columns: minmax(0, 1fr);
	}

	.gi-checks {
		grid-template-columns: minmax(0, 1fr);
		gap: 16px;
	}

	.gi-wrap--framed {
		border-radius: 16px;
		padding: 0;
		background: transparent;
	}

	.gi-card {
		border-radius: 14px;
		padding: 22px 18px;
	}

	.gi-textarea {
		min-height: 150px;
	}

	.gi-actions {
		margin-bottom: 18px;
	}

	.gi-button {
		display: block;
		width: 100%;
		padding: 16px 24px;
		text-align: center;
	}
}

@media (prefers-reduced-motion: reduce) {
	.gi-wrap * {
		transition: none !important;
	}
}
