/** START PROPERTY SEARCH WIDGET **/

/* Search form */

.se-property-search__form-wrap {
	display: flex;
	justify-content: center;
	width: 100%;
}

.se-property-search__form {
	display: inline-flex;
	align-items: stretch;
	background-color: #0e0e0e;
	height: 56px;
	position: relative;
}

.se-property-search__operation {
	display: flex;
	align-items: center;
	flex-shrink: 0;
	padding: 0 26px;
	background-color: var(--color-sand-300);
	color: #ffffff;
	font-family: var(--font-primary);
	font-size: 16px;
	font-weight: 700;
	letter-spacing: 0.1em;
	text-transform: uppercase;
	white-space: nowrap;
}

.se-property-search__fields {
	display: flex;
	align-items: center;
	justify-content: flex-start;
	flex: 1;
	min-width: 0;
	padding-left: 8px;
}

.se-property-search__field {
	display: flex;
	align-items: center;
	flex: 0 0 auto;
	gap: 3px;
	padding: 0 22px;
	position: relative;
}

.se-property-search__field-icon {
	display: flex;
	align-items: center;
	flex-shrink: 0;
	color: var(--color-sand-300);
}

.se-property-search__field-icon svg {
	height: 25px;
	width: auto;
}

.se-property-search__field-icon--euro svg {
	width: 14px;
	height: 14px;
}

.se-property-search__select {
	-webkit-appearance: none;
	appearance: none;
	background: transparent;
	border: none;
	border-bottom: 1px solid rgba(255, 255, 255, 0.4);
	color: rgba(255, 255, 255, 0.85);
	font-family: var(--font-primary);
	font-size: 18px;
	font-weight: 400;
	cursor: pointer;
	outline: none;
	width: 150px;
	padding: 3px 4px 6px 0;
	text-overflow: ellipsis;
	padding-bottom: 0;
}

.se-property-search__select option {
	background: #1a1a1a;
	color: #ffffff;
}

.se-property-search__field-arrow {
	display: flex;
	align-items: center;
	flex-shrink: 0;
	margin-left: -2px;
	color: rgba(255, 255, 255, 0.6);
	pointer-events: none;
}

.se-property-search__field-arrow svg {
	width: 14px;
	height: 14px;
}

/* Contenedor padre del botón: mitad izquierda negra, mitad derecha blanca
   para crear el efecto de split detrás del botón (desktop + iPad). */
.se-property-search__submit-wrap {
	display: flex;
	align-items: stretch;
	justify-content: center;
	flex-shrink: 0;
	padding: 30px 0;
	background: linear-gradient(to right, #0e0e0e 50%, #ffffff 50%);
}

.se-property-search__submit {
	display: flex;
	align-items: center;
	flex-shrink: 0;
	padding: 0 36px;
	background-color: var(--color-sand-300);
	color: #ffffff !important;
	border: none;
	font-family: var(--font-primary);
	font-size: 16px;
	font-weight: 700;
	letter-spacing: 0.1em;
	text-transform: uppercase;
	cursor: pointer;
	white-space: nowrap;
	transition: background-color var(--transition-fast);
	min-width: 150px;
}

.se-property-search__submit:hover {
	background-color: var(--color-sand-400);
}

/* Results title */

.se-property-search__results-title {
	/* !important: overrides Elementor's cached per-widget CSS for the
	   grid_top_gap control, which keeps printing the old 40px default
	   until the site's Elementor CSS cache is regenerated. */
	margin: 120px 0 0 !important;
	text-align: center;
	font-family: var(--font-primary);
	font-size: 34px;
	font-weight: 500;
	color: var(--color-text);
}

/* Grid */

.se-property-search__grid {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 80px 10%;
	/* !important: same reason as .se-property-search__results-title above.
	   This is the form → grid distance, for when there is no title. */
	margin-top: 80px !important;
	transition: opacity var(--transition-fast);
}

/* With a title in between, the grid sits further down so the title reads
   as its own block instead of hugging the cards. */
.se-property-search__results-title + .se-property-search__grid {
	margin-top: 120px !important;
}

.se-property-search__grid.is-loading {
	opacity: 0.4;
	pointer-events: none;
}

.se-property-search__no-results {
	grid-column: 1 / -1;
	text-align: center;
	color: var(--color-sand-400);
	font-family: var(--font-primary);
	font-size: 20px;
	padding: 60px 0;
}

/* Load more */

.se-property-search__load-more-wrap {
	display: flex;
	justify-content: center;
	margin-top: 60px;
}

.se-property-search__load-more {
	display: inline-flex;
	align-items: center;
	padding: 16px 40px;
	height: auto;
	background-color: transparent;
	color: var(--color-text, #000000) !important;
	border: none;
	border-radius: 0;
	font-family: var(--font-primary);
	font-size: 20px;
	font-weight: 400;
	letter-spacing: normal;
	text-transform: none !important;
	text-decoration: underline;
	cursor: pointer;
	white-space: nowrap;
	transition: opacity var(--transition-fast);
}

.se-property-search__load-more:hover {
	background-color: transparent;
	opacity: 0.7;
}

.se-property-search__load-more:disabled {
	opacity: 0.6;
	cursor: default;
}

/* Estado cargando: mismo estilo de tipografia, solo pulso de opacidad */
.se-property-search__load-more.is-loading {
	opacity: 1;
	cursor: default;
}

.se-property-search__load-more.is-loading .se-property-search__load-more-label {
	animation: se-load-more-pulse 1.1s ease-in-out infinite;
}

@keyframes se-load-more-pulse {
	0%, 100% { opacity: 1; }
	50%      { opacity: 0.35; }
}

/* Fix Elementor — el widget y el contenedor padre (e-con) deben crecer con
   el listado completo. Si el e-con tiene altura fija/min-height, el grid se
   desborda y la sección siguiente lo tapa. Forzamos altura automática y
   neutralizamos cualquier límite de altura o recorte. */
.elementor-widget-se_property_search,
.elementor-widget-se_property_search > .elementor-widget-container,
.elementor-widget-se_property_search .se-property-search {
	height: auto !important;
	min-height: 0 !important;
	max-height: none !important;
	overflow: visible !important;
	/* por si es item de un flex y lo están estirando/comprimiendo */
	flex: 0 0 auto !important;
	align-self: stretch !important;
}

.e-con:has(.elementor-widget-se_property_search),
.e-con-inner:has(.elementor-widget-se_property_search) {
	height: auto !important;
	min-height: 0 !important;
	max-height: none !important;
	overflow: visible !important;
}

/* Responsive form */

/* Tablet grid — 2 columnas */
@media (min-width: 769px) and (max-width: 1024px) {
    .se-property-search__grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 48px 6%;
    }

    .se-property-search__results-title {
        font-size: 27px;
    }
}

/* Tablet form — misma barra horizontal pero con tipografía más compacta */
@media (min-width: 769px) and (max-width: 1024px) {
	.se-property-search__operation {
		font-size: 12px;
		padding: 0 12px;
		letter-spacing: 0.06em;
	}

	.se-property-search__field {
		padding: 0 10px;
	}

	.se-property-search__select {
		font-size: 13px;
		width: 95px;
	}

	.se-property-search__field-icon svg {
		height: 20px;
	}

	.se-property-search__submit {
		font-size: 12px;
		min-width: 105px;
		padding: 0 18px;
		letter-spacing: 0.06em;
	}
}

/* Móvil — grid de resultados 1 columna, form en vertical */
@media (max-width: 768px) {
    .se-property-search__grid {
        grid-template-columns: 1fr;
        gap: 40px;
    }

    .se-property-search__results-title {
        font-size: 22px;
    }

	.se-property-search__form {
		display: flex;
		flex-direction: column;
		height: auto !important;
		width: 100%;
	}

	.se-property-search__operation {
		width: 100%;
		padding: 14px 18px;
		justify-content: center;
	}

	.se-property-search__fields {
		flex-direction: column;
		align-items: stretch;
		width: 100%;
		padding: 0;
	}

	.se-property-search__field {
		flex: 1 1 100%;
		min-width: 0;
		padding: 20px 10px;
		border-top: 1px solid rgba(255, 255, 255, 0.12);
	}

	.se-property-search__select {
		flex: 1;
		width: 100%;
		min-width: 0;
		overflow: hidden;
		white-space: nowrap;
		border-bottom: none;
	}

	.se-property-search__submit-wrap {
		width: 100%;
		padding: 0;
		background: none;
	}

	.se-property-search__submit {
		width: 100%;
		height: auto;
		min-width: 0;
		margin: 0;
		padding: 16px;
		justify-content: center;
	}
}

/* Desktop: boton See More mas grande */
@media (min-width: 1025px) {
	.se-property-search__load-more {
		font-size: 24px;
	}
}

/** END PROPERTY SEARCH WIDGET **/