/* Amann Kontakt – passt sich über die Theme-Variablen an (Fallbacks für andere Themes). */
.ak-form {
	--ak-cyan: var(--wp--preset--color--primary, #2bd9ff);
	--ak-text: var(--wp--preset--color--contrast, #ffffff);
	--ak-muted: var(--wp--preset--color--muted, #a9b8d3);
	--ak-field-bg: rgba(5, 11, 26, 0.65);
	--ak-border: rgba(43, 217, 255, 0.35);
	--ak-error: #ff8a8a;
	--ak-ok: #5ef0b0;
	display: grid;
	gap: 1.1rem;
	color: var(--ak-text);
}

.ak-grid {
	display: grid;
	grid-template-columns: 1fr;
	gap: 1.1rem;
}
@media (min-width: 640px) {
	.ak-grid { grid-template-columns: 1fr 1fr; }
	.ak-field--full { grid-column: 1 / -1; }
}

.ak-field { display: flex; flex-direction: column; gap: 0.4rem; min-width: 0; }
.ak-field > label {
	font-family: var(--wp--preset--font-family--heading, inherit);
	font-weight: 600;
	font-size: 0.92rem;
	letter-spacing: 0.01em;
}
.ak-req { color: var(--ak-cyan); }
.ak-opt { color: var(--ak-muted); font-weight: 400; font-size: 0.85em; }

.ak-form input[type="text"],
.ak-form input[type="email"],
.ak-form input[type="tel"],
.ak-form select,
.ak-form textarea {
	width: 100%;
	box-sizing: border-box;
	font: inherit;
	font-size: 1rem; /* ≥16px: kein Auto-Zoom auf iOS */
	color: var(--ak-text);
	background: var(--ak-field-bg);
	border: 1px solid var(--ak-border);
	border-radius: 12px;
	padding: 0.8rem 0.95rem;
	transition: border-color .2s ease, box-shadow .2s ease, background-color .2s ease;
	-webkit-appearance: none;
	appearance: none;
}
.ak-form textarea { resize: vertical; min-height: 9rem; line-height: 1.5; }
.ak-form select {
	padding-right: 2.5rem;
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%232bd9ff' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
	background-repeat: no-repeat;
	background-position: right 0.9rem center;
	background-size: 1.1rem;
}
.ak-form select option { background: #0b1730; color: #fff; }
.ak-form ::placeholder { color: var(--ak-muted); opacity: 0.8; }

.ak-form input:hover,
.ak-form select:hover,
.ak-form textarea:hover { border-color: rgba(43, 217, 255, 0.6); }

.ak-form input:focus,
.ak-form select:focus,
.ak-form textarea:focus {
	outline: none;
	border-color: var(--ak-cyan);
	background-color: rgba(11, 23, 48, 0.9);
	box-shadow: 0 0 0 3px rgba(43, 217, 255, 0.22), 0 0 18px rgba(43, 217, 255, 0.35);
}

.ak-field.has-error input,
.ak-field.has-error select,
.ak-field.has-error textarea { border-color: var(--ak-error); }
.ak-error { margin: 0; color: var(--ak-error); font-size: 0.88rem; }
.ak-error[hidden] { display: none; }

/* Checkbox */
.ak-check {
	display: grid;
	grid-template-columns: auto 1fr;
	gap: 0.75rem;
	align-items: start;
	font-size: 0.92rem;
	color: var(--ak-muted);
	cursor: pointer;
	line-height: 1.5;
}
.ak-check a { color: var(--ak-cyan); }
.ak-check input[type="checkbox"] {
	-webkit-appearance: none;
	appearance: none;
	width: 1.3rem;
	height: 1.3rem;
	margin: 0.1rem 0 0;
	border: 1.5px solid var(--ak-cyan);
	border-radius: 6px;
	background: var(--ak-field-bg);
	cursor: pointer;
	display: grid;
	place-content: center;
	transition: box-shadow .2s ease, background-color .2s ease;
}
.ak-check input[type="checkbox"]::after {
	content: "";
	width: 0.7rem;
	height: 0.7rem;
	transform: scale(0);
	transition: transform .15s ease;
	background: #03101f;
	clip-path: polygon(14% 44%, 0 65%, 50% 100%, 100% 16%, 80% 0%, 43% 62%);
}
.ak-check input[type="checkbox"]:checked { background: var(--ak-cyan); box-shadow: 0 0 12px rgba(43, 217, 255, 0.55); }
.ak-check input[type="checkbox"]:checked::after { transform: scale(1); }
.ak-check input[type="checkbox"]:focus-visible { outline: 2px solid var(--ak-cyan); outline-offset: 3px; }
.ak-field--privacy.has-error .ak-check input[type="checkbox"] { border-color: var(--ak-error); }

/* Honeypot – für Menschen unsichtbar, aber nicht display:none (manche Bots prüfen das). */
.ak-hp {
	position: absolute !important;
	left: -10000px !important;
	width: 1px; height: 1px;
	overflow: hidden;
}

/* Absenden */
.ak-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 0.75rem 1.25rem; }
.ak-submit {
	cursor: pointer;
	border: 0;
	font-family: var(--wp--preset--font-family--heading, inherit);
	font-weight: 700;
	font-size: 1rem;
	color: #03101f;
	background: var(--wp--preset--gradient--cyan-blue, linear-gradient(135deg, #2bd9ff, #1f7bff));
	border-radius: 999px;
	padding: 0.9em 1.9em;
	transition: box-shadow .25s ease, transform .25s ease, opacity .2s ease;
}
.ak-submit:hover { box-shadow: 0 0 24px rgba(43, 217, 255, 0.55); transform: translateY(-1px); }
.ak-submit:focus-visible { outline: 2px solid var(--ak-text); outline-offset: 3px; }
.ak-submit:disabled { opacity: 0.7; cursor: progress; transform: none; }
@media (max-width: 480px) { .ak-submit { width: 100%; } }
.ak-note { margin: 0; font-size: 0.85rem; color: var(--ak-muted); }

/* Status */
.ak-status {
	border-radius: 12px;
	padding: 0.9rem 1.1rem;
	font-weight: 600;
	border: 1px solid;
}
.ak-status[hidden] { display: none; }
.ak-status:focus { outline: none; }
.ak-status.is-success { color: var(--ak-ok); border-color: rgba(94, 240, 176, 0.5); background: rgba(94, 240, 176, 0.08); }
.ak-status.is-error { color: var(--ak-error); border-color: rgba(255, 138, 138, 0.5); background: rgba(255, 138, 138, 0.08); }

/* reCAPTCHA: Badge ausblenden ist erlaubt, wenn der Hinweistext sichtbar ist. */
.grecaptcha-badge { visibility: hidden !important; }
.ak-recaptcha-note { margin: 0; font-size: 0.8rem; color: var(--ak-muted); line-height: 1.5; }
.ak-recaptcha-note a { color: var(--ak-muted); }

@media (prefers-reduced-motion: reduce) {
	.ak-form *, .ak-submit { transition: none !important; }
}
