/*
 * BM Real Estate — Favorites
 * ==================================================================
 * Header counter, the heart button (cards and single property page),
 * the click animation, and the favorites page tabs.
 * Loaded on every page. Colors come from global.css (tokens).
 * ================================================================== */

/* ---------- Header counter/link ---------- */
.bm-rlst-fav-counter{
	position: relative;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	text-decoration: none !important;
	color: #584D4D;
	width: 36px;
	height: 36px;
	-webkit-tap-highlight-color: transparent;
}
.bm-rlst-fav-counter__icon{
	width: 24px;
	height: 24px;
	fill: none;
	stroke: currentColor;
	stroke-width: 1.8;
	stroke-linecap: round;
	stroke-linejoin: round;
}
.bm-rlst-fav-counter__count{
	position: absolute;
	top: -4px;
	right: -6px;
	min-width: 16px;
	height: 16px;
	padding: 0 4px;
	border-radius: 999px;
	background: #FF0000;
	color: #fff;
	font-size: 10px;
	font-weight: 700;
	line-height: 16px;
	text-align: center;
	display: none;
}
.bm-rlst-fav-counter__count.is-visible{ display: block; }

/* ---------- Heart button (cards + single property page) ---------- */
/* MOBILE NOTE: :hover rules sit inside @media (hover: hover), taps get no
   highlight, and the white background is forced with !important (the red
   hover has its own !important inside the media query). Together these
   fixed red/blue backgrounds "sticking" after a tap on Android Chrome.
   Don't remove them. */
.bm-rlst-fav-btn{
	-webkit-appearance: none;
	appearance: none;
	-webkit-tap-highlight-color: transparent;
	touch-action: manipulation;
	-webkit-user-select: none;
	user-select: none;
	position: absolute;
	top: 12px; right: 12px;
	width: 38px; height: 38px;
	margin: 0;
	padding: 0;
	border: none;
	outline: none;
	border-radius: 50%;
	background-color: rgba(255,255,255,0.92) !important;
	box-shadow: 0 1px 4px rgba(0,0,0,0.15);
	display: flex; align-items: center; justify-content: center;
	cursor: pointer;
	z-index: 2;
	transition: transform .15s ease, background-color .15s ease;
}
.bm-rlst-fav-btn:focus{
	outline: none !important;
	box-shadow: 0 1px 4px rgba(0,0,0,0.15) !important;
	background-color: rgba(255,255,255,0.92) !important;
}
@media (hover: hover){
	.bm-rlst-fav-btn:hover{
		background-color: var(--bm-rlst-fav-active) !important;
		transform: scale(1.08);
		outline: none;
	}
	.bm-rlst-fav-btn:hover .bm-rlst-fav-btn__icon{
		fill: #ffffff;
		stroke: #ffffff;
	}
	.bm-rlst-fav-btn.is-active:hover .bm-rlst-fav-btn__icon{
		fill: #ffffff;
		stroke: #ffffff;
	}
}
.bm-rlst-fav-btn__icon{
	width: 19px;
	height: 19px;
	fill: none;
	stroke: #584D4D;
	stroke-width: 2;
	stroke-linecap: round;
	stroke-linejoin: round;
	pointer-events: none;
	transition: fill .15s ease, stroke .15s ease;
}
.bm-rlst-fav-btn.is-active .bm-rlst-fav-btn__icon{
	fill: var(--bm-rlst-fav-active);
	stroke: var(--bm-rlst-fav-active);
}

/* Single property page: same look as the cards' heart, but in the flow
   of the page instead of over a photo. "relative" (not static) so the
   click "splosh" below stays centred on the button. */
.bm-rlst-fav-btn--single{
	position: relative;
	top: auto;
	right: auto;
}

/* ---------- Click animation: subtle scale + tiny "splosh" ---------- */
/* Applied to ANY .bm-rlst-fav-btn (grid cards or single-post button)  */
.bm-rlst-fav-btn.is-animating{
	animation: bm-rlst-fav-pop .38s ease;
}
@keyframes bm-rlst-fav-pop{
	0%   { transform: scale(1); }
	30%  { transform: scale(1.25); }
	55%  { transform: scale(0.92); }
	100% { transform: scale(1); }
}
/* The splosh is positioned against the button itself: card hearts are
   position:absolute (above), the single-page heart position:relative.
   Never add a general ".bm-rlst-fav-btn { position: … }" rule here — it
   would override the card heart's absolute position and push the heart
   below the photo, where the card hides it (this happened in 0.1.0). */
.bm-rlst-fav-btn.is-animating::after{
	content: '';
	position: absolute;
	inset: 0;
	border-radius: 50%;
	background: rgba(255,0,0,0.35);
	transform: scale(1);
	opacity: 1;
	animation: bm-rlst-fav-splosh .45s ease-out forwards;
	pointer-events: none;
}
@keyframes bm-rlst-fav-splosh{
	0%   { transform: scale(0.4); opacity: .55; }
	100% { transform: scale(1.9); opacity: 0; }
}

/* ---------- Favorites listing page loading / empty hints ---------- */
/* Also used for the "nothing in this tab" message. */
.bm-rlst-favorites-empty-hint{
	grid-column: 1 / -1;
	text-align: center;
	padding: 40px 0;
	margin: 0;
	color: #7a7070;
}

/* ---------- Favorites filter tabs (All / Rent / Sale) ---------- */
/* Selectors are deliberately two classes deep (.bm-rlst-fav-filters
   .bm-rlst-fav-filter) so they beat theme/kit rules like Astra's
   "button:hover, button:focus" and Elementor's ".elementor-kit-X button",
   which would otherwise recolor these buttons — without !important. */
.bm-rlst-fav-filters{
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	align-items: center;
	gap: 8px;
	margin: 0 0 24px;
}
/* display:flex above overrides the [hidden] attribute — restore it. */
.bm-rlst-fav-filters[hidden]{ display: none !important; }

.bm-rlst-fav-filters .bm-rlst-fav-filter,
.bm-rlst-fav-filters .bm-rlst-fav-filter:focus{
	-webkit-appearance: none;
	appearance: none;
	-webkit-tap-highlight-color: transparent;
	touch-action: manipulation;
	display: inline-flex;
	align-items: center;
	gap: 4px;
	min-height: 38px;
	margin: 0;
	padding: 0 16px;
	border: 1px solid #e4dcd1;
	border-radius: 999px;
	background: #fff;
	color: var(--bm-rlst-title);
	box-shadow: none;
	outline: none;
	font-family: inherit;
	font-size: 14px;
	font-weight: 500;
	line-height: 1.2;
	letter-spacing: normal;
	text-transform: none;
	text-decoration: none;
	white-space: nowrap;
	cursor: pointer;
	transition: background-color .15s ease, color .15s ease, border-color .15s ease;
}
.bm-rlst-fav-filters .bm-rlst-fav-filter.is-active,
.bm-rlst-fav-filters .bm-rlst-fav-filter.is-active:focus{
	background: var(--bm-rlst-accent);
	border-color: var(--bm-rlst-accent);
	color: #fff;
}
/* Keyboard users still get a visible focus ring (taps don't trigger
   :focus-visible, so this never "sticks" on mobile). */
.bm-rlst-fav-filters .bm-rlst-fav-filter:focus-visible{
	outline: 2px solid var(--bm-rlst-accent);
	outline-offset: 2px;
}
@media (hover: hover){
	.bm-rlst-fav-filters .bm-rlst-fav-filter:hover{
		border-color: var(--bm-rlst-accent);
		background: #fff;
		color: var(--bm-rlst-title);
	}
	.bm-rlst-fav-filters .bm-rlst-fav-filter.is-active:hover{
		background: var(--bm-rlst-accent);
		color: #fff;
	}
}
.bm-rlst-fav-filter__count{ opacity: .85; }
.bm-rlst-fav-filter__count:empty{ display: none; }

/* Cards hidden by the active tab. !important because .bm-rlst-card is
   display:flex in the Shared Card Renderer. */
.bm-rlst-card.is-filtered-out{ display: none !important; }
