/* ============================================================
 * revolv® — Zillow-style portal v2 (v1.43.3)
 * Split-pane (map ↔ cards), hover sync, filter dropdowns, sort,
 * Save Search, Search this area, photo carousel, mobile bottom sheet.
 * Loaded in addition to revolv-zillow-ui.css (v1).
 * ============================================================ */

/* ---------- Layout shell ---------- */
.rlp-zshell {
	display: flex;
	flex-direction: column;
	gap: 0;
	background: #fff;
	border: 1px solid #E5E7EB;
	border-radius: 14px;
	overflow: hidden;
	margin: 14px 0 24px;
	box-shadow: 0 1px 3px rgba(15,23,42,.05);
}

/* Top filter bar */
.rlp-zfilters {
	display: flex;
	align-items: center;
	gap: 8px;
	padding: 10px 14px;
	border-bottom: 1px solid #E5E7EB;
	background: #fff;
	flex-wrap: wrap;
	min-height: 56px;
}
.rlp-zsearchbox {
	display: flex;
	align-items: center;
	flex: 1 1 220px;
	min-width: 180px;
	max-width: 320px;
	padding: 8px 12px;
	border: 1.5px solid #E5E7EB;
	border-radius: 999px;
	background: #fff;
}
.rlp-zsearchbox input {
	flex: 1;
	border: 0;
	outline: 0;
	font: 500 14px/1 -apple-system, "SF Pro Text", "Segoe UI", sans-serif;
	color: #0f172a;
	background: transparent;
}
.rlp-zsearchbox input::placeholder { color: #94A3B8; }
.rlp-zfilter-btn {
	position: relative;
	display: inline-flex;
	align-items: center;
	gap: 6px;
	padding: 8px 14px;
	background: #fff;
	border: 1.5px solid #E5E7EB;
	border-radius: 999px;
	color: #0f172a;
	font: 600 13px/1 -apple-system, "SF Pro Text", "Segoe UI", sans-serif;
	cursor: pointer;
	white-space: nowrap;
	transition: border-color .12s ease, background .12s ease;
}
.rlp-zfilter-btn:hover { border-color: #94A3B8; }
.rlp-zfilter-btn[aria-expanded="true"] { background: #0f172a; color: #fff; border-color: #0f172a; }
.rlp-zfilter-btn.is-active { border-color: #0f172a; }
.rlp-zfilter-btn__caret { font-size: 9px; opacity: .65; }
.rlp-zsavebtn {
	margin-left: auto;
	padding: 9px 18px;
	background: #3563E9;
	color: #fff;
	border: 0;
	border-radius: 999px;
	font: 700 13px/1 -apple-system, "SF Pro Text", "Segoe UI", sans-serif;
	cursor: pointer;
	box-shadow: 0 1px 3px rgba(53,99,233,.35);
	transition: background .12s ease, transform .12s ease;
}
.rlp-zsavebtn:hover { background: #2747B0; }
.rlp-zsavebtn:active { transform: scale(.97); }
.rlp-zsavebtn[disabled] { background: #94A3B8; cursor: default; }

/* Filter popover */
.rlp-zpop {
	position: absolute;
	top: calc(100% + 6px);
	left: 0;
	min-width: 280px;
	background: #fff;
	border: 1px solid #E5E7EB;
	border-radius: 12px;
	box-shadow: 0 10px 32px rgba(15,23,42,.18);
	padding: 14px;
	z-index: 50;
	font: 500 13px/1.4 -apple-system, "SF Pro Text", "Segoe UI", sans-serif;
}
.rlp-zpop[hidden] { display: none; }
.rlp-zpop h4 {
	margin: 0 0 8px;
	font: 700 12px/1 -apple-system, "SF Pro Text", "Segoe UI", sans-serif;
	color: #475569;
	letter-spacing: .04em;
	text-transform: uppercase;
}
.rlp-zpop label { display: block; margin-bottom: 4px; color: #64748B; font-size: 12px; font-weight: 600; }
.rlp-zpop input[type="number"], .rlp-zpop select {
	width: 100%;
	padding: 8px 12px;
	border: 1.5px solid #E5E7EB;
	border-radius: 8px;
	font: 500 14px/1 -apple-system, sans-serif;
	color: #0f172a;
	background: #fff;
}
.rlp-zpop__row { display: flex; gap: 10px; margin-bottom: 12px; }
.rlp-zpop__row > div { flex: 1; }
.rlp-zpop__pillrow { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 12px; }
.rlp-zpop__pill {
	padding: 8px 14px;
	background: #fff;
	border: 1.5px solid #E5E7EB;
	border-radius: 999px;
	font: 600 13px/1 -apple-system, sans-serif;
	color: #0f172a;
	cursor: pointer;
	transition: background .12s ease, border-color .12s ease, color .12s ease;
}
.rlp-zpop__pill.is-on { background: #0f172a; border-color: #0f172a; color: #fff; }
.rlp-zpop__check { display: flex; align-items: center; gap: 8px; padding: 6px 0; cursor: pointer; }
.rlp-zpop__check input { width: 18px; height: 18px; accent-color: #3563E9; }
.rlp-zpop__actions { display: flex; gap: 8px; justify-content: space-between; margin-top: 10px; padding-top: 10px; border-top: 1px solid #F1F5F9; }
.rlp-zpop__btn-clear { background: none; border: 0; color: #64748B; font: 600 13px/1 -apple-system,sans-serif; cursor: pointer; }
.rlp-zpop__btn-apply { background: #0f172a; color: #fff; border: 0; padding: 8px 18px; border-radius: 8px; font: 700 13px/1 -apple-system,sans-serif; cursor: pointer; }

/* Split body: map left, cards right */
/* v1.45.12 zillow 2-up — map narrower (~44%), cards wider (~56%) to fit
   two-up card grid like zillow.com. Cards collapse to 1-up below 900px. */
.rlp-zbody {
	display: grid;
	grid-template-columns: minmax(420px, 44%) minmax(0, 1fr);
	grid-template-rows: 1fr;
	height: calc(100vh - 60px);
	min-height: 640px;
	max-height: calc(100vh - 60px);
	width: 100vw;
	margin-left: calc(50% - 50vw);
	margin-right: calc(50% - 50vw);
}
/* The shell that contains the filter bar above the body should also stretch
   full-width so it lines up visually with the split below. */
.rlp-zshell {
	width: 100vw;
	margin-left: calc(50% - 50vw);
	margin-right: calc(50% - 50vw);
}
.rlp-zmap-col {
	position: relative;
	background: #F1F5F9;
	min-height: 0;	/* v1.45.4 — match list-col so map fills viewport height, not card-list height */
	height: 100%;
}
.rlp-zmap {
	position: absolute;
	inset: 0;
}
.rlp-zlist-col {
	display: flex;
	flex-direction: column;
	background: #fff;
	border-left: 1px solid #E5E7EB;
	min-height: 0;	/* v1.45.4 — allow the column to shrink so .rlp-zlist's overflow-y:auto can scroll */
	height: 100%;
	overflow: hidden;
}
.rlp-zlist-head {
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 14px 18px 8px;
	border-bottom: 1px solid #F1F5F9;
}
.rlp-zlist-head__count {
	font: 700 18px/1.2 -apple-system, "SF Pro Display", "Segoe UI", sans-serif;
	color: #0f172a;
}
.rlp-zlist-head__count small { font-weight: 500; color: #64748B; font-size: 13px; }
.rlp-zsort {
	position: relative;
}
.rlp-zsort__btn {
	display: inline-flex;
	align-items: center;
	gap: 4px;
	padding: 6px 0;
	background: none;
	border: 0;
	color: #3563E9;
	font: 700 13px/1 -apple-system, sans-serif;
	cursor: pointer;
}
.rlp-zsort__pop {
	position: absolute;
	top: calc(100% + 4px);
	right: 0;
	min-width: 200px;
	background: #fff;
	border: 1px solid #E5E7EB;
	border-radius: 10px;
	box-shadow: 0 8px 28px rgba(15,23,42,.18);
	padding: 6px;
	z-index: 30;
}
.rlp-zsort__pop[hidden] { display: none; }
.rlp-zsort__pop button {
	display: block;
	width: 100%;
	padding: 9px 12px;
	background: none;
	border: 0;
	text-align: left;
	color: #0f172a;
	font: 500 13px/1.2 -apple-system, sans-serif;
	border-radius: 6px;
	cursor: pointer;
}
.rlp-zsort__pop button:hover { background: #F1F5F9; }
.rlp-zsort__pop button.is-on { color: #3563E9; font-weight: 700; }

.rlp-zlist {
	flex: 1;
	overflow-y: auto;
	overflow-x: hidden;
	padding: 12px 14px 24px;
	/* v1.45.12 zillow 2-up — grid layout, two cards per row */
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 14px;
	align-content: start;
	scrollbar-width: thin;
}
@media (max-width: 1100px) {
	.rlp-zlist { grid-template-columns: 1fr; }
}
.rlp-zlist::-webkit-scrollbar { width: 8px; }
.rlp-zlist::-webkit-scrollbar-thumb { background: #CBD5E1; border-radius: 4px; }

/* Card design */
/* v1.45.5 card-flex-shrink — parent .rlp-zlist is flex column with 45 children;
   default flex-shrink:1 squishes each card to ~3px when content overflows.
   Lock natural height so the parent's overflow-y:auto scrolls instead. */
.rlp-zcard {
	position: relative;
	flex-shrink: 0;
	background: #fff;
	border-radius: 12px;
	overflow: hidden;
	border: 1.5px solid transparent;
	box-shadow: 0 1px 3px rgba(15,23,42,.08);
	transition: box-shadow .15s ease, border-color .15s ease, transform .15s ease;
	cursor: pointer;
	/* v1.45.13 card-min-h — force the card box to contain photo (200px) + body (~115px) */
	display: flex;
	flex-direction: column;
	min-height: 320px;
}
.rlp-zcard:hover, .rlp-zcard.is-hover {
	box-shadow: 0 8px 24px rgba(15,23,42,.18);
	border-color: #3563E9;
	transform: translateY(-1px);
}
.rlp-zcard.is-disq { opacity: .55; filter: saturate(.7); }
.rlp-zcard__photo-wrap {
	position: relative;
	height: 200px;
	background: linear-gradient(135deg, #1e293b, #475569);
	overflow: hidden;
}
.rlp-zcard__photo {
	position: absolute;
	inset: 0;
	background-size: cover;
	background-position: center;
	transition: transform .25s ease;
}
.rlp-zcard:hover .rlp-zcard__photo { transform: scale(1.04); }
.rlp-zcard__badge {
	position: absolute;
	top: 12px;
	left: 12px;
	background: rgba(15, 23, 42, .85);
	color: #fff;
	font: 700 11px/1 -apple-system, sans-serif;
	letter-spacing: .04em;
	padding: 6px 9px;
	border-radius: 6px;
	z-index: 4;
	backdrop-filter: blur(4px);
}
.rlp-zcard__badge--new { background: #DC2626; text-transform: uppercase; }
.rlp-zcard__heart {
	position: absolute;
	top: 10px;
	right: 10px;
	width: 36px;
	height: 36px;
	border: 0;
	background: rgba(255,255,255,.92);
	border-radius: 50%;
	color: #0f172a;
	font-size: 17px;
	cursor: pointer;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	box-shadow: 0 2px 6px rgba(0,0,0,.18);
	z-index: 5;
	transition: background .12s ease, color .12s ease, transform .12s ease;
}
.rlp-zcard__heart:hover { background: #fff; transform: scale(1.07); }
.rlp-zcard__heart.is-on { background: #B45309; color: #fff; }
.rlp-zcard__menu {
	position: absolute;
	bottom: 10px;
	right: 10px;
	width: 32px;
	height: 32px;
	border: 0;
	background: rgba(255,255,255,.92);
	color: #0f172a;
	border-radius: 50%;
	font-size: 18px;
	cursor: pointer;
	z-index: 5;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	box-shadow: 0 2px 6px rgba(0,0,0,.18);
	transition: background .12s ease;
	letter-spacing: -.05em;
	font-weight: 900;
}
.rlp-zcard__menu:hover { background: #fff; }
.rlp-zcard__menu-pop {
	position: absolute;
	bottom: 50px;
	right: 10px;
	background: #fff;
	border: 1px solid #E5E7EB;
	border-radius: 10px;
	box-shadow: 0 8px 28px rgba(15,23,42,.22);
	padding: 6px;
	z-index: 6;
	min-width: 160px;
}
.rlp-zcard__menu-pop[hidden] { display: none; }
.rlp-zcard__menu-pop button {
	display: block;
	width: 100%;
	padding: 8px 12px;
	background: none;
	border: 0;
	text-align: left;
	color: #0f172a;
	font: 500 13px/1.2 -apple-system, sans-serif;
	border-radius: 6px;
	cursor: pointer;
}
.rlp-zcard__menu-pop button:hover { background: #F1F5F9; }
.rlp-zcard__menu-pop button.is-danger { color: #DC2626; }

/* Photo dots (carousel indicators) */
.rlp-zcard__dots {
	position: absolute;
	bottom: 14px;
	left: 50%;
	transform: translateX(-50%);
	display: flex;
	gap: 4px;
	z-index: 4;
}
.rlp-zcard__dot {
	width: 6px;
	height: 6px;
	border-radius: 50%;
	background: rgba(255,255,255,.55);
	transition: background .12s ease, width .12s ease;
}
.rlp-zcard__dot.is-on { background: #fff; width: 18px; border-radius: 3px; }

/* Photo nav arrows (desktop hover) */
.rlp-zcard__nav {
	position: absolute;
	top: 50%;
	transform: translateY(-50%);
	width: 32px;
	height: 32px;
	border: 0;
	background: rgba(255,255,255,.92);
	color: #0f172a;
	border-radius: 50%;
	font-size: 16px;
	cursor: pointer;
	z-index: 4;
	opacity: 0;
	transition: opacity .15s ease, background .15s ease;
	box-shadow: 0 2px 6px rgba(0,0,0,.2);
}
.rlp-zcard__photo-wrap:hover .rlp-zcard__nav { opacity: 1; }
.rlp-zcard__nav--prev { left: 10px; }
.rlp-zcard__nav--next { right: 10px; }

/* Card body */
.rlp-zcard__body { padding: 12px 14px 14px; }
.rlp-zcard__price {
	font: 700 22px/1.1 -apple-system, "SF Pro Display", "Segoe UI", sans-serif;
	color: #0f172a;
	letter-spacing: -.02em;
}
.rlp-zcard__specs {
	margin-top: 6px;
	font: 500 13px/1.3 -apple-system, sans-serif;
	color: #475569;
}
.rlp-zcard__specs strong { font-weight: 700; color: #0f172a; }
.rlp-zcard__addr {
	margin-top: 4px;
	font: 500 13px/1.3 -apple-system, sans-serif;
	color: #64748B;
}
.rlp-zcard__brokerage {
	margin-top: 6px;
	font: 600 10.5px/1.2 -apple-system, sans-serif;
	color: #94A3B8;
	letter-spacing: .04em;
	text-transform: uppercase;
}

/* "Search this area" floating button */
.rlp-zsearch-here {
	position: absolute;
	top: 14px;
	left: 50%;
	transform: translateX(-50%);
	z-index: 400;
	padding: 9px 16px;
	background: #fff;
	color: #0f172a;
	border: 0;
	border-radius: 999px;
	font: 700 13px/1 -apple-system, sans-serif;
	cursor: pointer;
	box-shadow: 0 4px 14px rgba(15,23,42,.22);
	display: inline-flex;
	align-items: center;
	gap: 6px;
	transition: background .12s ease, transform .12s ease;
}
.rlp-zsearch-here:hover { background: #0f172a; color: #fff; }
.rlp-zsearch-here[hidden] { display: none; }

/* Map zoom controls override (more Apple-style) */
.leaflet-control-zoom {
	border: none !important;
	border-radius: 10px !important;
	overflow: hidden;
	box-shadow: 0 2px 10px rgba(15,23,42,.18) !important;
}
.leaflet-control-zoom a {
	background: #fff !important;
	color: #0f172a !important;
	border: none !important;
	font: 700 16px/30px -apple-system, sans-serif !important;
}
.leaflet-control-zoom a:hover { background: #F1F5F9 !important; }

/* Empty state */
.rlp-zempty {
	flex: 1;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	padding: 40px 20px;
	color: #64748B;
	text-align: center;
	font: 500 14px/1.5 -apple-system, sans-serif;
}
.rlp-zempty strong { display: block; color: #0f172a; font-size: 17px; margin-bottom: 6px; font-weight: 700; }

/* ---------- Mobile bottom-sheet ---------- */
@media (max-width: 768px) {
	.rlp-zfilters { padding: 10px; gap: 6px; min-height: 52px; }
	.rlp-zsearchbox { display: none; }
	.rlp-zfilter-btn { padding: 7px 11px; font-size: 12px; }
	.rlp-zsavebtn { padding: 8px 12px; font-size: 12px; }
	.rlp-zbody {
		display: block;
		min-height: 0;
		max-height: none;
		position: relative;
		height: calc(100vh - 56px - 56px);
	}
	.rlp-zmap-col {
		position: absolute;
		inset: 0;
		min-height: 0;
	}
	.rlp-zlist-col {
		position: absolute;
		left: 0;
		right: 0;
		bottom: 0;
		top: auto;
		max-height: 80%;
		min-height: 110px;
		height: 50%;
		border-left: none;
		border-top: 1px solid #E5E7EB;
		border-top-left-radius: 18px;
		border-top-right-radius: 18px;
		box-shadow: 0 -8px 28px rgba(15,23,42,.18);
		transition: height .25s ease;
		z-index: 500;
		touch-action: none;
	}
	.rlp-zlist-col.is-collapsed { height: 110px; }
	.rlp-zlist-col.is-expanded { height: 90%; }
	.rlp-zlist-col::before {
		content: "";
		display: block;
		width: 36px;
		height: 4px;
		background: #CBD5E1;
		border-radius: 2px;
		margin: 8px auto 4px;
		flex: 0 0 auto;
		cursor: grab;
	}
	.rlp-zlist-col.is-dragging::before { background: #94A3B8; cursor: grabbing; }
	.rlp-zlist-head { padding: 6px 16px 6px; }
	.rlp-zlist-head__count { font-size: 15px; }
	.rlp-zlist { padding: 8px 12px 80px; }
	.rlp-zcard__photo-wrap { height: 160px; }
}

/* v1.43.4 — All / Saved / Hidden tabs */
.rlp-ztabs {
	display: flex;
	gap: 4px;
	padding: 6px 14px 0;
	border-bottom: 1px solid #F1F5F9;
	background: #fff;
}
.rlp-ztab {
	background: none;
	border: 0;
	padding: 10px 14px;
	font: 600 13px/1 -apple-system, "SF Pro Text", "Segoe UI", sans-serif;
	color: #64748B;
	cursor: pointer;
	border-bottom: 2px solid transparent;
	transition: color .12s ease, border-color .12s ease;
}
.rlp-ztab:hover { color: #0f172a; }
.rlp-ztab.is-on { color: #3563E9; border-bottom-color: #3563E9; }
.rlp-ztab__count {
	display: inline-block;
	margin-left: 4px;
	padding: 1px 7px;
	background: #EEF2FF;
	color: #3730A3;
	border-radius: 999px;
	font-size: 11px;
	font-weight: 700;
}
.rlp-ztab.is-on .rlp-ztab__count { background: #3563E9; color: #fff; }


/* v1.45.7 cluster style — match revolv pin design */
.revolv-cluster { background: #fff; border: 2px solid #FF6B35; border-radius: 14px; padding: 4px 10px; box-shadow: 0 2px 8px rgba(0,0,0,0.18); display: flex; align-items: center; justify-content: center; }
.revolv-cluster__inner { font: 700 12px/1 -apple-system,sans-serif; color: #FF6B35; white-space: nowrap; }
/* Tone down the default markercluster animation halo */
.marker-cluster-small, .marker-cluster-medium, .marker-cluster-large { background-color: transparent !important; }
.marker-cluster-small div, .marker-cluster-medium div, .marker-cluster-large div { background-color: transparent !important; }


/* v1.45.8 static credit — non-clickable attribution overlay (no links) */
.rlp-zmap-col::after {
	content: 'Map data \00a9 OpenStreetMap contributors';
	position: absolute;
	bottom: 4px;
	left: 8px;
	font: 400 10px/1 -apple-system, sans-serif;
	color: rgba(15, 23, 42, 0.55);
	background: rgba(255, 255, 255, 0.7);
	padding: 2px 6px;
	border-radius: 4px;
	pointer-events: none;
	z-index: 400;
}


/* v1.45.11 pin-popup css — thumbnail popup card for map pins */
.leaflet-popup-content-wrapper { padding: 0; border-radius: 12px; box-shadow: 0 8px 24px rgba(0,0,0,0.18); }
.leaflet-popup-content { margin: 0; width: 240px !important; }
.revolv-pin-popup { width: 240px; overflow: hidden; border-radius: 12px; background: #fff; }
.revolv-pin-popup__photo { width: 100%; height: 140px; background-size: cover; background-position: center; background-color: #E2E8F0; }
.revolv-pin-popup__body { padding: 10px 12px 12px; font: 400 13px/1.4 -apple-system,sans-serif; color: #0F172A; }
.revolv-pin-popup__price { font-weight: 800; font-size: 17px; margin-bottom: 2px; }
.revolv-pin-popup__specs { color: #475569; font-size: 12px; margin-bottom: 4px; }
.revolv-pin-popup__addr { color: #64748B; font-size: 12px; margin-bottom: 8px; line-height: 1.3; }
.revolv-pin-popup__view { display: inline-block; color: #FF6B35; font-weight: 700; text-decoration: none; font-size: 13px; }
.revolv-pin-popup__view:hover { text-decoration: underline; }

/* v1.45.15 — Pass-with-reason form (overlay on listing card photo) */
.rlp-zcard__pass-form {
	position: absolute;
	inset: 0;
	background: rgba(255,255,255,0.97);
	backdrop-filter: blur(4px);
	-webkit-backdrop-filter: blur(4px);
	display: flex;
	flex-direction: column;
	justify-content: center;
	padding: 14px 16px;
	z-index: 5;
	border-radius: 12px 12px 0 0;
}
.rlp-zcard__pass-form[hidden] { display: none; }
.rlp-zcard__pass-title {
	font-size: 15px;
	font-weight: 700;
	color: #0f172a;
	margin-bottom: 4px;
	line-height: 1.3;
}
.rlp-zcard__pass-help {
	font-size: 12px;
	color: #64748b;
	margin-bottom: 10px;
	line-height: 1.4;
}
.rlp-zcard__pass-form textarea {
	width: 100%;
	box-sizing: border-box;
	border: 1.5px solid #e2e8f0;
	border-radius: 8px;
	padding: 8px 10px;
	font-size: 13px;
	font-family: inherit;
	color: #0f172a;
	background: #fff;
	resize: none;
	min-height: 60px;
	transition: border-color .15s ease;
}
.rlp-zcard__pass-form textarea:focus {
	outline: none;
	border-color: #FF6B35;
}
.rlp-zcard__pass-actions {
	display: flex;
	gap: 8px;
	margin-top: 10px;
	justify-content: flex-end;
}
.rlp-zcard__pass-actions button {
	padding: 7px 14px;
	border-radius: 6px;
	font-size: 13px;
	font-weight: 600;
	cursor: pointer;
	border: 1px solid transparent;
	font-family: inherit;
	transition: background .15s ease, border-color .15s ease;
}
.rlp-zcard__pass-cancel {
	background: #fff;
	color: #475569;
	border-color: #cbd5e1;
}
.rlp-zcard__pass-cancel:hover { background: #f8fafc; }
.rlp-zcard__pass-send {
	background: #FF6B35;
	color: #fff;
}
.rlp-zcard__pass-send:hover { background: #e85a26; }
.rlp-zcard__pass-send:disabled {
	background: #cbd5e1;
	cursor: not-allowed;
}
