/* ==========================================================================
   Popup "Encontrá tu lugar en Almasierra"
   Colores y tipografías tomados del sitio: dorado #fbbc43 / #a26c0a
   (botones Divi) y familias HelveticaL/N/M declaradas en style.css
   ========================================================================== */

/* "Helvetica" real no está en Google Fonts (es de pago), así que para el
   texto sans-serif en negrita usamos Alegreya Sans Bold: ya está en /fonts
   pero nadie la había dado de alta como @font-face. */
@font-face {
	font-family: 'Alegreya Sans';
	font-style: normal;
	font-weight: 700;
	src: url('../fonts/AlegreyaSansBold.ttf') format('truetype');
	font-display: swap;
}

body.as-popup-locked {
	overflow: hidden;
}

.as-popup-overlay {
	position: fixed;
	inset: 0;
	background: rgba(20, 20, 20, 0.65);
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 20px;
	z-index: 999999;
	opacity: 0;
	visibility: hidden;
	transition: opacity 0.25s ease;
}

.as-popup-overlay.is-open {
	opacity: 1;
	visibility: visible;
}

.as-popup {
	position: relative;
	display: flex;
	align-items: stretch;
	background: #fdf7ea;
	width: 100%;
	max-width: 700px;
	max-height: 90vh;
	overflow: hidden;
	border-radius: 20px;
	box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
	transform: translateY(20px);
	transition: transform 0.25s ease;
	font-family: 'HelveticaN', Helvetica, Arial, sans-serif;
}

.as-popup-overlay.is-open .as-popup {
	transform: translateY(0);
}

.as-popup-form {
	flex: 1 1 58%;
	min-width: 0;
	box-sizing: border-box;
	padding: 28px 36px;
	max-height: 90vh;
	overflow-y: auto;
}

.as-popup-media {
	position: relative;
	flex: 1 1 42%;
	background-size: cover;
	background-position: center;
	background-color: #ddd;
}

/* onda decorativa que "muerde" la foto en la división entre columnas */
.as-popup-wave {
	position: absolute;
	left: -1px;
	top: 0;
	width: 48px;
	height: 100%;
	fill: #fdf7ea;
}

.as-popup-close {
	position: absolute;
	top: 14px;
	right: 14px;
	width: 38px;
	height: 38px;
	border: none;
	background: #4a3218;
	color: #fbbc43;
	font-size: 20px;
	line-height: 1;
	border-radius: 50%;
	cursor: pointer;
	display: flex;
	align-items: center;
	justify-content: center;
	box-shadow: 0 2px 8px rgba(0, 0, 0, 0.25);
	transition: background 0.2s ease;
	z-index: 2;
}

.as-popup-close:hover {
	background: #5f4020;
}

.as-popup-title {
	font-size: 36px;
	line-height: 1.15;
	font-weight: 700 !important;
	margin: 0 0 3px;
	color: #2b2b28;
	font-family: 'Alegreya', Georgia, 'Times New Roman', serif;
}

.as-popup-title-accent {
	color: #fbbc43;
}

.as-popup-title::after {
	content: "";
	display: block;
	width: 46px;
	height: 4px;
	margin: 12px 0 14px;
	background: #fbbc43;
	border-radius: 2px;
}

.as-popup .forminator-custom-form {
	margin-top: 0 !important;
}

.as-popup-subtitle {
	font-size: 16px;
	color: #6b6459;
	margin: 0 0 8px;
	line-height: 1.4;
	font-family: 'HelveticaL', Helvetica, Arial, sans-serif;
}

/* ---- Forminator field tweaks ---- */

/* Oculta solo las <label> de texto/teléfono (el texto "¿Qué te interesa más?"
   es un <span class="forminator-label">, no un <label>, y queda visible) */
.as-popup label.forminator-label {
	display: none !important;
}

.as-popup .forminator-row {
	margin-bottom: 12px !important;
}

.as-popup input[type="text"],
.as-popup input[type="tel"],
.as-popup input[type="email"] {
	width: 100%;
	box-sizing: border-box;
	padding: 14px 16px 14px 46px !important;
	border: 1px solid #e6d9bf !important;
	background-color: #fff !important;
	border-radius: 8px !important;
	font-size: 18px !important;
	line-height: 1 !important;
	font-family: 'HelveticaN', Helvetica, Arial, sans-serif !important;
	background-repeat: no-repeat !important;
	background-position: 16px center !important;
	background-size: 18px 18px !important;
}

.as-popup input[type="text"]:focus,
.as-popup input[type="tel"]:focus,
.as-popup input[type="email"]:focus {
	border-color: #fbbc43 !important;
	outline: none;
}

/* icono "persona" en Nombre e icono de Whatsapp en Teléfono
   (Forminator nombra los campos name-N / phone-N) */
.as-popup input[name^="name-"] {
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23a26c0a' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='8' r='3.2'/%3E%3Cpath d='M5 20c0-3.5 3-6 7-6s7 2.5 7 6'/%3E%3C/svg%3E") !important;
}

.as-popup input[name^="phone-"] {
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23a26c0a' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M7 17.2l-1.6 3.8L9.3 19.6c1 .5 2.1.8 3.2.8 4.4 0 8-3.6 8-8s-3.6-8-8-8-8 3.6-8 8c0 1.7.5 3.2 1.5 4.6z'/%3E%3Cpath d='M9.3 8.6c0-.5.4-1 1-1h.5c.3 0 .6.2.7.5l.6 1.4c.1.3.1.6-.1.8l-.5.6c.4 1 1.2 1.8 2.2 2.2l.6-.5c.2-.2.5-.2.8-.1l1.4.6c.3.1.5.4.5.7v.5c0 .6-.5 1-1 1-3.6 0-6.7-3.1-6.7-6.7z'/%3E%3C/svg%3E") !important;
}

/* ---- "¿Qué te interesa más?" + radios como botones táctiles grandes ---- */

.as-popup [role="radiogroup"] {
	display: flex !important;
	flex-wrap: wrap !important;
	align-items: stretch !important;
	gap: 10px;
}

.as-popup [role="radiogroup"] > .forminator-label {
	flex: 0 0 100% !important;
	width: 100%;
	display: block !important;
	margin: 0 0 6px;
	font-family: 'Alegreya Sans', 'HelveticaM', Helvetica, Arial, sans-serif;
	font-weight: 700;
	color: #3c3c3b;
	font-size: 16px;
}

/*
 * !important en todo lo que afecta tamaño/caja: Forminator imprime su propio
 * CSS del formulario en <head> y, ante un empate de especificidad, gana la
 * regla que carga después (la suya), lo que dejaba el botón seleccionado
 * con otra altura/relleno que los demás.
 */
.as-popup label.forminator-radio {
	/*
	 * Forminator trae "pointer-events: none" de fábrica en .forminator-radio
	 * (su diseño default espera que solo el bullet/texto interno reciban el
	 * click via su propio JS). Lo revertimos para que todo el botón, con su
	 * padding incluido, sea clickeable/tocable de forma nativa.
	 */
	pointer-events: auto !important;
	flex: 1 1 0 !important;
	min-width: 0 !important;
	box-sizing: border-box !important;
	display: flex !important;
	flex-direction: column !important;
	align-items: center !important;
	justify-content: center !important;
	gap: 3px;
	text-align: center;
	height: 58px !important;
	min-height: 58px !important;
	padding: 6px 8px !important;
	margin: 0 !important;
	background: #fff;
	border: 2px solid #e6d9bf !important;
	border-radius: 10px !important;
	box-shadow: none !important;
	transform: none !important;
	cursor: pointer !important;
	font-size: 16px;
	font-weight: 700;
	font-family: 'Alegreya Sans', 'HelveticaM', Helvetica, Arial, sans-serif;
	color: #3c3c3b;
	transition: border-color 0.15s ease, background 0.15s ease, color 0.15s ease;
	-webkit-tap-highlight-color: transparent;
	user-select: none;
}

.as-popup label.forminator-radio::before {
	content: "";
	width: 18px;
	height: 18px;
	background-repeat: no-repeat;
	background-position: center;
	background-size: contain;
}

.as-popup label.forminator-radio[title="Lote"]::before {
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23a26c0a' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='4'/%3E%3Cpath d='M12 2v3M12 19v3M4.2 4.2l2.1 2.1M17.7 17.7l2.1 2.1M2 12h3M19 12h3M4.2 19.8l2.1-2.1M17.7 6.3l2.1-2.1'/%3E%3C/svg%3E");
}

.as-popup label.forminator-radio[title="Departamento"]::before {
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23a26c0a' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='5' y='3' width='14' height='18' rx='1'/%3E%3Cpath d='M9 7h1M14 7h1M9 11h1M14 11h1'/%3E%3Cpath d='M10 21v-3h4v3'/%3E%3C/svg%3E");
}

.as-popup label.forminator-radio[title="Casa"]::before {
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23a26c0a' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 11.5L12 4l8 7.5'/%3E%3Cpath d='M6 10v10h12V10'/%3E%3Cpath d='M10 20v-5h4v5'/%3E%3C/svg%3E");
}

.as-popup label.forminator-radio.forminator-is_checked::before,
.as-popup label.forminator-radio.as-selected::before {
	filter: brightness(0) invert(1);
}

.as-popup label.forminator-radio input[type="radio"] {
	position: absolute !important;
	opacity: 0 !important;
	width: 1px !important;
	height: 1px !important;
	pointer-events: none;
}

/* el bullet nativo no hace falta: el botón entero indica la selección */
.as-popup label.forminator-radio .forminator-radio-bullet {
	display: none !important;
}

.as-popup label.forminator-radio .forminator-radio-label {
	/* Forminator trae margin-left:10px de fábrica (pensado para su diseño
	   bullet-izquierda + texto-derecha); con el ícono arriba y texto abajo
	   ese margen desplazaba el texto y no quedaba centrado */
	margin: 0 !important;
	font-weight: 700 !important;
	pointer-events: none;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

.as-popup label.forminator-radio.forminator-is_checked,
.as-popup label.forminator-radio.as-selected {
	border-color: #fbbc43 !important;
	background: #fbbc43 !important;
	color: #fff !important;
	box-shadow: none !important;
	transform: none !important;
}

/* ---- Submit button + estado de carga ---- */

.as-popup .forminator-button-submit {
	width: 100%;
	padding: 12px !important;
	border-radius: 8px !important;
	font-size: 17px !important;
	font-family: 'Alegreya Sans', 'HelveticaM', Helvetica, Arial, sans-serif !important;
	font-weight: 700 !important;
	position: relative;
	display: flex !important;
	align-items: center;
	justify-content: center;
	gap: 8px;
	background-color: #fbbc43 !important;
	color: #3c3c3b !important;
	border: none !important;
	cursor: pointer !important;
	transition: background-color 0.2s ease;
}

.as-popup .forminator-button-submit::after {
	content: "";
	width: 18px;
	height: 18px;
	background-repeat: no-repeat;
	background-position: center;
	background-size: contain;
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%233c3c3b' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12h13M13 6l6 6-6 6'/%3E%3C/svg%3E");
}

.as-popup .forminator-button-submit:hover {
	background-color: #e9ac2e !important;
}

.as-popup.as-is-loading .forminator-button-submit {
	color: transparent !important;
	pointer-events: none;
}

.as-popup.as-is-loading .forminator-button-submit::after {
	content: "";
	position: absolute;
	top: 50%;
	left: 50%;
	width: 20px;
	height: 20px;
	margin: -10px 0 0 -10px;
	background-image: none;
	border: 3px solid rgba(60, 60, 59, 0.35);
	border-top-color: #3c3c3b;
	border-radius: 50%;
	animation: as-spin 0.7s linear infinite;
}

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

/* ---- Mensaje de agradecimiento ---- */

.as-popup-thankyou {
	display: none;
	text-align: center;
	padding: 30px 10px;
	font-size: 19.6px;
	font-family: 'HelveticaM', Helvetica, Arial, sans-serif;
	color: #3c3c3b;
}

.as-popup.as-is-done .forminator-custom-form,
.as-popup.as-is-done .as-popup-title,
.as-popup.as-is-done .as-popup-subtitle {
	display: none !important;
}

.as-popup.as-is-done .as-popup-thankyou {
	display: block;
}

/* ---- Badge de confianza ---- */

.as-popup-trust {
	display: flex;
	align-items: center;
	gap: 8px;
	margin: 10px 0 0;
	font-size: 10px;
	color: #8a8272;
	font-family: 'HelveticaL', Helvetica, Arial, sans-serif;
}

.as-popup-trust-icon {
	flex: 0 0 auto;
	width: 16px;
	height: 16px;
	background-repeat: no-repeat;
	background-position: center;
	background-size: contain;
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%238a8272' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 3l7 3v6c0 4.5-3 7.5-7 9-4-1.5-7-4.5-7-9V6l7-3z'/%3E%3Cpath d='M9 12l2 2 4-4'/%3E%3C/svg%3E");
}

.as-popup.as-is-done .as-popup-trust {
	display: none;
}

/* debajo de 700px la foto no entra cómoda al lado del form: se oculta y
   queda una sola columna, como el popup original */
@media (max-width: 700px) {
	.as-popup {
		flex-direction: column;
		max-width: 460px;
		max-height: 92vh;
	}

	.as-popup-media {
		display: none;
	}

	.as-popup-form {
		flex: 1 1 auto;
		max-height: 92vh;
	}

	.as-popup-title {
		font-size: 30px;
		padding-right: 42px;
	}
}

@media (max-width: 480px) {
	.as-popup-form {
		padding: 34px 20px 24px;
	}

	/* en mobile, un botón debajo del otro, todos del mismo ancho (100%) */
	.as-popup label.forminator-radio {
		flex: 1 1 100% !important;
		width: 100% !important;
		flex-direction: row !important;
		justify-content: flex-start !important;
		height: auto !important;
		min-height: 56px !important;
		padding: 10px 16px !important;
	}

	.as-popup label.forminator-radio::before {
		width: 22px;
		height: 22px;
	}

	.as-popup label.forminator-radio .forminator-radio-label {
		white-space: normal;
	}
}
