/* HEART Apartments Filter — styles (edit freely; no CSS lives in the PHP) */

.heart-apts {
	--heart-ink: #151515;
	--heart-muted: #5e5e5e;
	--heart-card-bg: #ffffff;
	direction: rtl;
	width: 100%;
	max-width: 1220px;
	margin-inline: auto;
	font-family: "Heebo", sans-serif;
}

.heart-apts__sr {
	position: absolute;
	width: 1px;
	height: 1px;
	overflow: hidden;
	clip: rect(0 0 0 0);
	white-space: nowrap;
}

/* ---------- Filters (pills) ---------- */
.heart-apts__filters {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	align-items: center;
	gap: 13px;
	margin-bottom: 49px;
}

.heart-apts__select {
	position: relative;
	width: 233px;
	height: 51px;
}

.heart-apts__select select {
	-webkit-appearance: none;
	appearance: none;
	width: 100%;
	height: 100%;
	margin: 0;
	padding: 0 30px 0 56px;
	border: 1.5px solid var(--heart-ink);
	border-radius: 999px;
	background: transparent;
	color: var(--heart-ink);
	font: 600 18px/1 "Heebo", sans-serif;
	text-align: center;
	text-align-last: center;
	cursor: pointer;
}

/* Options with no apartments for the current choice: shown, greyed, not selectable.
   The "disabled" attribute blocks the choice in every browser; how grey it looks
   inside the native dropdown depends on the browser/OS. */
.heart-apts__select option {
	color: var(--heart-ink);
	background: #ffffff;
}

.heart-apts__select option:disabled,
.heart-apts__select option.is-unavailable {
	color: #b3b3b3;
}

.heart-apts__select select:focus-visible {
	outline: 2px solid var(--heart-ink);
	outline-offset: 3px;
}

/* White circle with a down chevron, pinned left (RTL) */
.heart-apts__chevron {
	position: absolute;
	left: 10px;
	top: 50%;
	width: 34px;
	height: 34px;
	margin-top: -17px;
	border-radius: 50%;
	background: #ffffff;
	pointer-events: none;
}

.heart-apts__chevron::after {
	content: "";
	position: absolute;
	left: 50%;
	top: 45%;
	width: 8px;
	height: 8px;
	border-right: 2.5px solid var(--heart-ink);
	border-bottom: 2.5px solid var(--heart-ink);
	transform: translate(-50%, -50%) rotate(45deg);
}

.heart-apts__reset {
	padding: 0;
	border: 0;
	background: none;
	color: var(--heart-ink);
	font: 400 16px/1 "Heebo", sans-serif;
	text-decoration: underline;
	cursor: pointer;
}

/* The theme's button styles override the [hidden] attribute */
.heart-apts__reset[hidden] {
	display: none;
}

/* Neutralize the theme's pink button hover/focus (Hello Elementor reset.css) */
.heart-apts .heart-apts__reset:hover,
.heart-apts .heart-apts__reset:focus {
	background: none;
	color: var(--heart-ink);
}

.heart-apts__submit {
	height: 51px;
	padding: 0 30px;
	border: 1.5px solid var(--heart-ink);
	border-radius: 999px;
	background: var(--heart-ink);
	color: #ffffff;
	font: 600 18px/1 "Heebo", sans-serif;
}

/* ---------- Results / slider ---------- */
.heart-apts__slider {
	position: relative;
	background: var(--heart-card-bg);
	min-height: 568px;
	padding: 40px 50px 24px;
	box-sizing: border-box;
}

.heart-apts__track {
	transition: opacity 0.2s ease;
}

.heart-apts.is-loading .heart-apts__track {
	opacity: 0.35;
	pointer-events: none;
}

.heart-apts__card {
	display: flex;
	align-items: flex-start;
	gap: 40px;
}

.heart-apts__card + .heart-apts__card {
	margin-top: 40px;
}

/* With JS: one apartment at a time */
.heart-apts.is-ready .heart-apts__card {
	display: none;
	margin-top: 0;
}

.heart-apts.is-ready .heart-apts__card.is-active {
	display: flex;
}

/* Info area hidden on all screens (kept in the markup).
   To show it again, delete this display rule. */
.heart-apts__info {
	display: none;
	flex: 0 0 160px;
	padding-top: 20px;
	color: var(--heart-ink);
	font-size: 15px;
	line-height: 1.6;
}

.heart-apts__type {
	margin: 0 0 4px;
	font-weight: 600;
	font-size: 17px;
}

.heart-apts__meta {
	margin: 0;
	padding: 0;
	list-style: none;
}

.heart-apts__plan {
	flex: 1 1 auto;
	min-width: 0;
	text-align: center;
}

.heart-apts__plan-img {
	display: block;
	margin-inline: auto;
}

/* Desktop plan: fits the width */
.heart-apts__plan-img--desktop {
	width: 100%;
	max-width: 900px;
	height: auto;
}

/* Mobile plan: hidden on desktop */
.heart-apts__plan-img--mobile {
	display: none;
}

.heart-apts__empty {
	margin: 0;
	padding: 120px 0;
	text-align: center;
	color: var(--heart-muted);
	font-size: 20px;
}

/* ---------- Navigation ---------- */
.heart-apts__nav {
	display: none;
	justify-content: center;
	align-items: center;
	gap: 24px;
	margin-top: 24px;
}

.heart-apts.is-ready.has-many .heart-apts__nav {
	display: flex;
}

.heart-apts__counter {
	min-width: 60px;
	text-align: center;
	color: var(--heart-muted);
	font: 500 15px/1 "Montserrat", "Heebo", sans-serif;
	direction: ltr;
}

.heart-apts__arrow {
	position: relative;
	width: 44px;
	height: 44px;
	padding: 0;
	border: 1.5px solid var(--heart-ink);
	border-radius: 50%;
	background: transparent;
	cursor: pointer;
}

.heart-apts__arrow::after {
	content: "";
	position: absolute;
	left: 50%;
	top: 50%;
	width: 9px;
	height: 9px;
	border-right: 2.5px solid var(--heart-ink);
	border-bottom: 2.5px solid var(--heart-ink);
}

/* RTL: "previous" points right, "next" points left */
.heart-apts__arrow--prev::after {
	transform: translate(-65%, -50%) rotate(-45deg);
}

.heart-apts__arrow--next::after {
	transform: translate(-35%, -50%) rotate(135deg);
}

.heart-apts__arrow:disabled {
	opacity: 0.3;
	cursor: default;
}

/* Neutralize the theme's pink button hover/focus (Hello Elementor reset.css) */
.heart-apts .heart-apts__arrow:hover,
.heart-apts .heart-apts__arrow:focus {
	background: transparent;
	color: var(--heart-ink);
	border-color: var(--heart-ink);
}

.heart-apts .heart-apts__arrow:focus {
	outline: none;
}

.heart-apts .heart-apts__arrow:focus-visible {
	outline: 2px solid var(--heart-ink);
	outline-offset: 3px;
}

/* ---------- Mobile ---------- */
@media (max-width: 767px) {
	.heart-apts__filters {
		gap: 10px;
		margin-bottom: 24px;
	}

	.heart-apts__select {
		width: calc(50% - 5px);
		height: 46px;
	}

	.heart-apts__select select {
		padding: 0 12px 0 44px;
		font-size: 15px;
	}

	.heart-apts__chevron {
		left: 6px;
		width: 30px;
		height: 30px;
		margin-top: -15px;
	}

	.heart-apts__slider {
		min-height: 0;
		padding: 20px 16px;
	}

	.heart-apts__card,
	.heart-apts.is-ready .heart-apts__card.is-active {
		flex-direction: column;
		gap: 16px;
	}

	/* Mobile: the slide takes the height of the image */
	.heart-apts__plan {
		width: 100%;
	}

	/* Mobile: swap images */
	.heart-apts__plan-img--desktop {
		display: none;
	}

	.heart-apts__plan-img--mobile {
		display: block;
		width: 100%;
		height: auto;
	}

	/* Mobile: arrows over the mobile plan, vertically centered on it
	   (the slide holds only the image, so the nav covers the slider's content box) */
	.heart-apts__nav {
		position: absolute;
		top: 20px;
		right: 16px;
		bottom: 20px;
		left: 16px;
		margin-top: 0;
		justify-content: space-between;
		pointer-events: none;
	}

	.heart-apts__arrow,
	.heart-apts .heart-apts__arrow:hover,
	.heart-apts .heart-apts__arrow:focus {
		background: rgba(255, 255, 255, 0.9);
	}

	.heart-apts__arrow {
		pointer-events: auto;
	}

	.heart-apts__counter {
		position: absolute;
		bottom: 8px;
		left: 50%;
		transform: translateX(-50%);
		padding: 5px 10px;
		border-radius: 999px;
		background: rgba(255, 255, 255, 0.9);
	}
}