/*
 * Oh My Gos – Ayuda personalizada
 * Versión 0.6.12
 */

/* En la página pública, los resultados permanecen ocultos hasta terminar el formulario. */
body.omg-ayuda-page:not(.elementor-editor-active):not(.omg-ayuda-con-resultados) .omg-resultados {
	display: none !important;
}

/* En resultados solo se muestra el resumen y la selección preparada. */
body.omg-ayuda-con-resultados:not(.elementor-editor-active) form[name="Ayuda personalizada OMG"],
body.omg-ayuda-con-resultados:not(.elementor-editor-active) .omg-results-form-hidden,
body.omg-ayuda-con-resultados:not(.elementor-editor-active) .omg-results-form-widget-hidden {
	display: none !important;
}

/* Estado de espera después de enviar el formulario. */
.omg-ayuda-form.omg-is-submitting {
	display: none !important;
}

.omg-form-waiting[hidden] {
	display: none !important;
}

.omg-form-waiting {
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	box-sizing: border-box;
	min-height: 240px;
	padding: 34px 24px;
	border: 1px solid #d8e6cf;
	border-radius: 18px;
	background: #f6faf3;
	color: #243018;
	text-align: center;
	box-shadow: 0 8px 24px rgba(36, 48, 24, 0.06);
}

.omg-form-waiting strong {
	margin-top: 16px;
	font-size: clamp(19px, 2vw, 24px);
	line-height: 1.3;
}

.omg-form-waiting > span:last-child {
	max-width: 520px;
	margin-top: 8px;
	color: #66745f;
	font-size: 14px;
	line-height: 1.5;
}

.omg-form-waiting__spinner {
	display: block;
	width: 42px;
	height: 42px;
	border: 4px solid #d8e6cf;
	border-top-color: #6f9f52;
	border-radius: 50%;
	animation: omg-ayuda-spin 0.8s linear infinite;
}

@keyframes omg-ayuda-spin {
	to {
		transform: rotate(360deg);
	}
}

.omg-ayuda-empty {
	display: none !important;
}

.omg-ayuda-resumen-generado {
	margin: 10px 0 0;
	font-weight: 600;
}

.omg-ayuda-modificar {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	margin-top: 14px;
	padding: 10px 16px;
	border: 1px solid #91c571;
	border-radius: 999px;
	background: #ffffff;
	color: #243018;
	text-decoration: none;
	font-weight: 600;
}

.omg-ayuda-modificar:hover,
.omg-ayuda-modificar:focus {
	background: #eaf5e3;
	color: #243018;
}

.omg-ayuda-sin-resultados {
	margin: 24px 0;
	padding: 18px;
	border: 1px solid #d8e6cf;
	border-radius: 14px;
	background: #f6faf3;
	color: #243018;
}

@media (prefers-reduced-motion: reduce) {
	html {
		scroll-behavior: auto !important;
	}

	.omg-form-waiting__spinner {
		animation-duration: 1.8s;
	}
}

.omg-ayuda-variaciones-compatibles {
	display: block;
	position: relative !important;
	inset: auto !important;
	z-index: 1;
	box-sizing: border-box;
	width: 100%;
	max-width: 100%;
	margin: 10px 0;
	padding: 10px 12px;
	border: 1px solid #d8e6cf;
	border-radius: 10px;
	background: #f6faf3;
	color: #243018;
	font-size: 0.9em;
	line-height: 1.4;
	overflow-wrap: anywhere;
}

/* ==========================================================
 * Formulario público — diseño visual v0.6.17
 * Solo presentación: no altera valores ni lógica del formulario.
 * ========================================================== */
.omg-ayuda-form {
	--omg-form-green: #91c571;
	--omg-form-green-dark: #6f9f52;
	--omg-form-ink: #243018;
	--omg-form-muted: #66745f;
	--omg-form-border: #d8e6cf;
	--omg-form-soft: #f6faf3;
	--omg-form-white: #ffffff;
	--omg-choice-width: 190px;
	--omg-choice-gap: 10px;
}

.omg-ayuda-form .elementor-field-group.omg-choice-group {
	box-sizing: border-box;
	width: 100%;
	margin: 0 0 18px !important;
	padding: 20px 22px 22px !important;
	border: 1px solid var(--omg-form-border);
	border-radius: 18px;
	background: var(--omg-form-white);
	box-shadow: 0 8px 24px rgba(36, 48, 24, 0.06);
}

.omg-ayuda-form .omg-choice-group > .elementor-field-label,
.omg-ayuda-form .omg-choice-group .elementor-field-label {
	width: 100%;
	margin: 0 0 4px !important;
	padding: 0 !important;
	color: var(--omg-form-ink) !important;
	font-family: inherit !important;
	font-size: clamp(19px, 2vw, 24px) !important;
	font-weight: 700 !important;
	line-height: 1.25 !important;
	letter-spacing: -0.015em;
}

.omg-ayuda-form .omg-field-help {
	width: 100%;
	margin: 0 0 15px;
	color: var(--omg-form-muted);
	font-size: 14px;
	line-height: 1.45;
}

/* Todas las opciones mantienen la misma medida y separación. */
.omg-ayuda-form .elementor-field-group.omg-choice-group .omg-choice-options:not(.omg-ingredient-groups) {
	display: flex !important;
	flex-wrap: wrap !important;
	align-items: stretch !important;
	justify-content: center !important;
	gap: var(--omg-choice-gap) !important;
	width: 100% !important;
	margin: 0 !important;
}

.omg-ayuda-form .elementor-field-group.omg-choice-group .omg-choice-options:not(.omg-ingredient-groups) > .elementor-field-option {
	flex: 0 0 var(--omg-choice-width) !important;
	width: var(--omg-choice-width) !important;
	max-width: var(--omg-choice-width) !important;
}

.omg-ayuda-form .elementor-field-option {
	position: relative;
	box-sizing: border-box;
	margin: 0 !important;
	padding: 0 !important;
}

.omg-ayuda-form .elementor-field-option > input[type="radio"],
.omg-ayuda-form .elementor-field-option > input[type="checkbox"] {
	position: absolute !important;
	width: 1px !important;
	height: 1px !important;
	margin: 0 !important;
	opacity: 0 !important;
	overflow: hidden;
}

.omg-ayuda-form .elementor-field-option > label {
	display: flex !important;
	align-items: center;
	justify-content: center;
	box-sizing: border-box;
	width: 100% !important;
	min-width: 0 !important;
	min-height: 46px;
	height: 46px;
	margin: 0 !important;
	padding: 5px 11px !important;
	border: 1px solid var(--omg-form-border) !important;
	border-radius: 12px;
	background: var(--omg-form-white);
	color: var(--omg-form-ink) !important;
	font-size: 14px !important;
	font-weight: 600 !important;
	line-height: 1.18 !important;
	text-align: center;
	white-space: normal !important;
	overflow-wrap: break-word;
	word-break: normal;
	cursor: pointer;
	transition: border-color 160ms ease, background-color 160ms ease, color 160ms ease, transform 160ms ease, box-shadow 160ms ease;
}

.omg-ayuda-form .elementor-field-option > label:hover {
	border-color: var(--omg-form-green) !important;
	background: var(--omg-form-soft);
	transform: translateY(-1px);
}

.omg-ayuda-form .elementor-field-option.is-selected > label,
.omg-ayuda-form .elementor-field-option > input:checked + label {
	border-color: var(--omg-form-green-dark) !important;
	background: var(--omg-form-green-dark) !important;
	color: var(--omg-form-white) !important;
	box-shadow: 0 5px 14px rgba(111, 159, 82, 0.22);
}

.omg-ayuda-form .elementor-field-option.is-selected > label::before,
.omg-ayuda-form .elementor-field-option > input:checked + label::before {
	content: "✓";
	display: inline-flex;
	flex: 0 0 auto;
	align-items: center;
	justify-content: center;
	margin-right: 7px;
	font-size: 14px;
	font-weight: 800;
	line-height: 1;
}

.omg-ayuda-form .elementor-field-option > input:focus-visible + label {
	outline: 3px solid rgba(145, 197, 113, 0.38);
	outline-offset: 2px;
}

/* Ingredientes: cuatro grupos visuales, sin modificar sus valores. */
.omg-ayuda-form .elementor-field-group.omg-choice-ingredients .omg-choice-options.omg-ingredient-groups {
	display: grid !important;
	grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
	align-items: start !important;
	gap: 14px !important;
	width: 100% !important;
	margin: 0 !important;
}

.omg-ayuda-form .elementor-field-group.omg-choice-ingredients .omg-ingredient-group {
	box-sizing: border-box;
	width: 100% !important;
	min-width: 0;
	padding: 14px;
	border: 1px solid var(--omg-form-border);
	border-radius: 14px;
	background: var(--omg-form-soft);
}

.omg-ayuda-form .elementor-field-group.omg-choice-ingredients .omg-ingredient-group--pescados,
.omg-ayuda-form .elementor-field-group.omg-choice-ingredients .omg-ingredient-group--cereales,
.omg-ayuda-form .elementor-field-group.omg-choice-ingredients .omg-ingredient-group--otros {
	grid-column: 1 / -1 !important;
}

.omg-ayuda-form .omg-ingredient-group__title {
	margin: 0 0 10px;
	color: var(--omg-form-ink);
	font-size: 15px;
	font-weight: 700;
	line-height: 1.3;
}

.omg-ayuda-form .elementor-field-group.omg-choice-ingredients .omg-ingredient-group__options {
	display: flex !important;
	flex-wrap: wrap !important;
	align-items: stretch !important;
	justify-content: center !important;
	gap: 8px !important;
	width: 100% !important;
}

.omg-ayuda-form .elementor-field-group.omg-choice-ingredients .omg-ingredient-group__options > .elementor-field-option {
	flex: 0 0 var(--omg-choice-width) !important;
	width: var(--omg-choice-width) !important;
	max-width: var(--omg-choice-width) !important;
}

/* Indicador de pasos. */
.omg-ayuda-form .e-form__indicators {
	box-sizing: border-box;
	margin-bottom: 18px !important;
	padding: 2px 8px 8px !important;
}

.omg-ayuda-form .e-form__indicators__indicator {
	min-width: 0;
}

.omg-ayuda-form .e-form__indicators__indicator__number {
	display: inline-flex !important;
	align-items: center;
	justify-content: center;
	width: 36px !important;
	height: 36px !important;
	min-width: 36px;
	border: 2px solid var(--omg-form-border) !important;
	border-radius: 50% !important;
	background: var(--omg-form-white) !important;
	color: var(--omg-form-ink) !important;
	font-family: inherit !important;
	font-size: 15px !important;
	font-weight: 700 !important;
	line-height: 1 !important;
}

.omg-ayuda-form .e-form__indicators__indicator__label {
	margin-top: 7px !important;
	color: var(--omg-form-muted) !important;
	font-family: inherit !important;
	font-size: 12px !important;
	font-weight: 600 !important;
	line-height: 1.25 !important;
	text-align: center;
}

.omg-ayuda-form .e-form__indicators__indicator--state-active .e-form__indicators__indicator__number,
.omg-ayuda-form [class*="state-active"] .e-form__indicators__indicator__number {
	border-color: var(--omg-form-green-dark) !important;
	background: var(--omg-form-green-dark) !important;
	color: var(--omg-form-white) !important;
	box-shadow: 0 0 0 5px rgba(145, 197, 113, 0.18);
}

.omg-ayuda-form .e-form__indicators__indicator--state-active .e-form__indicators__indicator__label,
.omg-ayuda-form [class*="state-active"] .e-form__indicators__indicator__label {
	color: var(--omg-form-ink) !important;
	font-weight: 700 !important;
}

.omg-ayuda-form .e-form__indicators__indicator--state-completed .e-form__indicators__indicator__number,
.omg-ayuda-form [class*="state-completed"] .e-form__indicators__indicator__number {
	border-color: var(--omg-form-green) !important;
	background: var(--omg-form-soft) !important;
	color: var(--omg-form-green-dark) !important;
}

.omg-ayuda-form .e-form__indicators__indicator__separator {
	height: 2px !important;
	margin: 17px 10px 0 !important;
	background: var(--omg-form-border) !important;
}

/* Navegación compacta: nunca ocupa todo el ancho. */
.omg-ayuda-form .e-form__buttons {
	display: flex !important;
	align-items: center;
	justify-content: flex-end;
	gap: 11px;
	width: 100%;
	margin-top: 2px !important;
}

.omg-ayuda-form .e-form__buttons__wrapper {
	flex: 0 0 auto !important;
	width: auto !important;
	margin: 0 !important;
	padding: 0 !important;
}

.omg-ayuda-form .e-form__buttons__wrapper:has(.e-form__buttons__wrapper__button-previous) {
	margin-right: auto !important;
}

.omg-ayuda-form .e-form__buttons button,
.omg-ayuda-form .e-form__buttons .elementor-button {
	box-sizing: border-box;
	width: auto !important;
	min-width: 126px;
	min-height: 42px;
	padding: 10px 18px !important;
	border-radius: 999px !important;
	font-size: 14px !important;
	font-weight: 700 !important;
	line-height: 1.2 !important;
}

.omg-ayuda-form .e-form__buttons__wrapper__button-next,
.omg-ayuda-form .e-form__buttons__wrapper__button-submit {
	border: 1px solid var(--omg-form-green-dark) !important;
	background: var(--omg-form-green) !important;
	color: var(--omg-form-ink) !important;
}

.omg-ayuda-form .e-form__buttons__wrapper__button-previous {
	border: 1px solid var(--omg-form-border) !important;
	background: var(--omg-form-white) !important;
	color: var(--omg-form-ink) !important;
}

.omg-ayuda-form .e-form__buttons button:hover,
.omg-ayuda-form .e-form__buttons .elementor-button:hover {
	filter: brightness(0.97);
	transform: translateY(-1px);
}

@media (max-width: 767px) {
	.omg-ayuda-form {
		--omg-choice-width: min(190px, calc(50% - 5px));
	}

	.omg-ayuda-form .elementor-field-group.omg-choice-group {
		padding: 17px 15px 18px !important;
		border-radius: 15px;
	}

	.omg-ayuda-form .elementor-field-group.omg-choice-ingredients .omg-choice-options.omg-ingredient-groups {
		grid-template-columns: 1fr !important;
	}

	.omg-ayuda-form .elementor-field-group.omg-choice-ingredients .omg-ingredient-group--pescados,
	.omg-ayuda-form .elementor-field-group.omg-choice-ingredients .omg-ingredient-group--cereales,
	.omg-ayuda-form .elementor-field-group.omg-choice-ingredients .omg-ingredient-group--otros {
		grid-column: auto !important;
	}

	.omg-ayuda-form .e-form__indicators__indicator__number {
		width: 32px !important;
		height: 32px !important;
		min-width: 32px;
		font-size: 13px !important;
	}

	.omg-ayuda-form .e-form__indicators__indicator__label {
		font-size: 10px !important;
	}

	.omg-ayuda-form .e-form__indicators__indicator__separator {
		margin-top: 15px !important;
	}

	.omg-ayuda-form .e-form__buttons__wrapper {
		flex: 0 0 auto !important;
		width: auto !important;
	}

	.omg-ayuda-form .e-form__buttons button,
	.omg-ayuda-form .e-form__buttons .elementor-button {
		width: auto !important;
		min-width: 112px;
		padding-inline: 14px !important;
	}
}

@media (max-width: 420px) {
	.omg-ayuda-form {
		--omg-choice-width: min(190px, 100%);
	}

	.omg-ayuda-form .elementor-field-option > label {
		min-height: 46px;
		height: auto;
	}
}

