/**
 * Gastoro Einkaufscheck – Frontend-Styles
 *
 * Übernimmt Schriftart vom Theme (font-family: inherit), nutzt aber bewusst
 * das Gastoro-Türkis als Markenfarbe statt sie vom Theme zu erben – so bleibt
 * das Formular auf jeder Seite eindeutig als Gastoro-Aktion erkennbar.
 */

.gastoro-ec-wrapper {
	--gec-primary: #14A79E;
	--gec-primary-dark: #0F8B83;
	--gec-primary-tint: rgba(20, 167, 158, 0.08);
	--gec-primary-tint-strong: rgba(20, 167, 158, 0.14);
	--gec-text: #1f2937;
	--gec-text-muted: #6b7280;
	--gec-border: #e2e5e9;
	--gec-border-strong: #d1d5db;
	--gec-bg-muted: #f7f8f9;
	--gec-card-bg: #ffffff;
	--gec-radius: 10px;
	--gec-radius-lg: 16px;
	--gec-gap: 1rem;
	--gec-shadow: 0 4px 24px rgba(15, 23, 42, 0.06), 0 1px 3px rgba(15, 23, 42, 0.05);

	max-width: 780px;
	margin: 0 auto;
	font-family: inherit;
	color: var(--gec-text);
}

.gastoro-ec-form * {
	box-sizing: border-box;
}

.gastoro-ec-form {
	background: var(--gec-card-bg);
	border-radius: var(--gec-radius-lg);
	box-shadow: var(--gec-shadow);
	padding: 2rem 2.25rem 1.75rem;
	border: 1px solid var(--gec-border);
}

/* --- Fix: manche Themes überschreiben das native [hidden]-Verhalten
   (z. B. via CSS-Reset "* { display: revert }"). Wir erzwingen es hart,
   sonst bleiben bei Step-Wechseln alle Schritte gleichzeitig sichtbar. --- */
.gastoro-ec-wrapper [hidden],
.gastoro-ec-wrapper .gastoro-ec-step-hidden {
	display: none !important;
}

/* Step-Indikator (Punkte + Linie) */
.gastoro-ec-steps-indicator {
	display: flex;
	align-items: center;
	margin-bottom: 1.25rem;
}

.gastoro-ec-step-dot {
	flex: 0 0 auto;
	width: 30px;
	height: 30px;
	border-radius: 50%;
	background: var(--gec-bg-muted);
	border: 2px solid var(--gec-border-strong);
	color: var(--gec-text-muted);
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: 0.8rem;
	font-weight: 700;
	transition: all 0.25s ease;
}

.gastoro-ec-step-dot.is-active {
	background: var(--gec-primary);
	border-color: var(--gec-primary);
	color: #fff;
	box-shadow: 0 0 0 4px var(--gec-primary-tint);
}

.gastoro-ec-step-dot.is-complete {
	background: var(--gec-primary-dark);
	border-color: var(--gec-primary-dark);
	color: #fff;
}

.gastoro-ec-step-connector {
	flex: 1 1 auto;
	height: 2px;
	background: var(--gec-border-strong);
	margin: 0 4px;
	transition: background 0.25s ease;
}

.gastoro-ec-step-connector.is-complete {
	background: var(--gec-primary);
}

/* Progress-Bar (feiner Fortschritt zusätzlich zu den Punkten) */
.gastoro-ec-progress {
	margin-bottom: 1.75rem;
}

.gastoro-ec-progress-bar {
	width: 100%;
	height: 6px;
	background: var(--gec-bg-muted);
	border-radius: 999px;
	overflow: hidden;
}

.gastoro-ec-progress-fill {
	height: 100%;
	background: linear-gradient(90deg, var(--gec-primary), var(--gec-primary-dark));
	transition: width 0.35s ease;
}

.gastoro-ec-progress-label {
	margin-top: 0.6rem;
	font-size: 0.85rem;
	color: var(--gec-text-muted);
	text-align: center;
}

/* Message */
.gastoro-ec-message {
	display: none;
	padding: 0.85rem 1rem;
	border-radius: var(--gec-radius);
	margin-bottom: 1.25rem;
	font-size: 0.95rem;
}

.gastoro-ec-message.is-success {
	display: block;
	background: rgba(20, 167, 158, 0.1);
	color: var(--gec-primary-dark);
}

.gastoro-ec-message.is-error {
	display: block;
	background: rgba(220, 53, 69, 0.08);
	color: #b02a37;
}

/* Honeypot: unsichtbar, aber für Screenreader/Bots technisch vorhanden */
.gastoro-ec-honeypot {
	position: absolute !important;
	left: -9999px !important;
	width: 1px;
	height: 1px;
	overflow: hidden;
}

/* Step-Inhalt */
.gastoro-ec-step {
	animation: gastoro-ec-fade-in 0.3s ease;
}

@keyframes gastoro-ec-fade-in {
	from {
		opacity: 0;
		transform: translateY(6px);
	}
	to {
		opacity: 1;
		transform: translateY(0);
	}
}

.gastoro-ec-step-title {
	margin: 0 0 1.5rem;
	font-size: 1.4rem;
	font-weight: 700;
	color: var(--gec-text);
}

.gastoro-ec-field {
	margin-bottom: 1.4rem;
}

.gastoro-ec-field label:not(.gastoro-ec-radio):not(.gastoro-ec-checkbox) {
	display: block;
	margin-bottom: 0.5rem;
	font-weight: 600;
	font-size: 0.95rem;
	color: var(--gec-text);
}

.gastoro-ec-field input[type="text"],
.gastoro-ec-field input[type="email"],
.gastoro-ec-field input[type="tel"],
.gastoro-ec-field textarea {
	width: 100%;
	padding: 0.75rem 0.9rem;
	border: 1.5px solid var(--gec-border-strong);
	border-radius: var(--gec-radius);
	font-family: inherit;
	font-size: 1rem;
	background: #fff;
	color: var(--gec-text);
	transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.gastoro-ec-field input:focus,
.gastoro-ec-field textarea:focus {
	outline: none;
	border-color: var(--gec-primary);
	box-shadow: 0 0 0 4px var(--gec-primary-tint);
}

.gastoro-ec-field textarea {
	resize: vertical;
}

.gastoro-ec-field textarea::placeholder,
.gastoro-ec-field input::placeholder {
	color: #9ca3af;
}

.gastoro-ec-field-row {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: var(--gec-gap);
}

.gastoro-ec-field-row .gastoro-ec-field {
	margin-bottom: 0;
}

.gastoro-ec-options {
	display: flex;
	flex-wrap: wrap;
	gap: 0.6rem;
}

.gastoro-ec-options-grid {
	display: grid;
	grid-template-columns: repeat(2, 1fr);
	gap: 0.6rem;
}

.gastoro-ec-radio,
.gastoro-ec-checkbox {
	display: flex;
	align-items: flex-start;
	gap: 0.6rem;
	padding: 0.65rem 0.9rem;
	border: 1.5px solid var(--gec-border-strong);
	border-radius: var(--gec-radius);
	cursor: pointer;
	font-size: 0.92rem;
	flex: 1 1 auto;
	background: #fff;
	transition: border-color 0.15s ease, background 0.15s ease, box-shadow 0.15s ease;
}

.gastoro-ec-radio:hover,
.gastoro-ec-checkbox:hover {
	border-color: var(--gec-primary);
	background: var(--gec-primary-tint);
}

.gastoro-ec-radio:has(input:checked),
.gastoro-ec-checkbox:has(input:checked) {
	border-color: var(--gec-primary);
	background: var(--gec-primary-tint-strong);
	box-shadow: 0 0 0 1px var(--gec-primary);
}

.gastoro-ec-radio input,
.gastoro-ec-checkbox input {
	margin-top: 0.2rem;
	width: 17px;
	height: 17px;
	accent-color: var(--gec-primary);
	cursor: pointer;
	flex-shrink: 0;
}

.gastoro-ec-hint {
	font-size: 0.85rem;
	color: #b02a37;
	margin: 0.5rem 0 0;
}

.gastoro-ec-conditional {
	margin-top: 0.85rem;
	padding: 0.9rem 1rem;
	background: var(--gec-bg-muted);
	border-radius: var(--gec-radius);
	border-left: 3px solid var(--gec-primary);
}

.gastoro-ec-privacy {
	font-size: 0.9rem;
	background: var(--gec-bg-muted);
	padding: 1rem 1.1rem;
	border-radius: var(--gec-radius);
}

.gastoro-ec-privacy a {
	color: var(--gec-primary-dark);
	font-weight: 600;
	text-decoration: underline;
}

/* Navigation */
.gastoro-ec-nav {
	display: flex;
	justify-content: space-between;
	align-items: center;
	gap: 1rem;
	margin-top: 2rem;
	padding-top: 1.5rem;
	border-top: 1px solid var(--gec-border);
}

.gastoro-ec-btn {
	appearance: none;
	cursor: pointer;
	border: none;
	border-radius: var(--gec-radius);
	padding: 0.85rem 1.9rem;
	font-size: 1rem;
	font-weight: 700;
	font-family: inherit;
	background: var(--gec-primary);
	color: #fff;
	transition: background 0.15s ease, transform 0.1s ease, box-shadow 0.15s ease;
}

.gastoro-ec-btn:hover {
	background: var(--gec-primary-dark);
	box-shadow: 0 4px 14px rgba(20, 167, 158, 0.3);
}

.gastoro-ec-btn:active {
	transform: translateY(1px);
}

.gastoro-ec-btn-prev {
	background: transparent;
	color: var(--gec-text-muted);
	border: 1.5px solid var(--gec-border-strong);
}

.gastoro-ec-btn-prev:hover {
	background: var(--gec-bg-muted);
	color: var(--gec-text);
	box-shadow: none;
}

.gastoro-ec-btn:disabled {
	opacity: 0.5;
	cursor: not-allowed;
	box-shadow: none;
}

/* Mobile */
@media (max-width: 600px) {
	.gastoro-ec-form {
		padding: 1.5rem 1.25rem 1.25rem;
		border-radius: var(--gec-radius);
	}

	.gastoro-ec-field-row,
	.gastoro-ec-options-grid {
		grid-template-columns: 1fr;
	}

	.gastoro-ec-step-dot {
		width: 26px;
		height: 26px;
		font-size: 0.72rem;
	}

	.gastoro-ec-nav {
		flex-direction: column-reverse;
	}

	.gastoro-ec-btn {
		width: 100%;
	}
}
