/**
 * Legacy Listings Map — front end styles.
 *
 * Everything is scoped under .ll-app and uses its own tokens, so the widget
 * looks the same whatever theme it lands in. Override the tokens below in your
 * theme's stylesheet to match brand colours.
 */

.ll-app {
	--ll-ink: #16191d;
	--ll-ink-soft: #5b636e;
	--ll-line: #e2e5ea;
	--ll-bg: #ffffff;
	--ll-bg-soft: #f6f7f9;
	--ll-accent: #14532d;
	--ll-accent-ink: #ffffff;
	--ll-radius: 10px;
	--ll-shadow: 0 1px 2px rgba(16, 24, 40, 0.06), 0 4px 14px rgba(16, 24, 40, 0.06);
	--ll-map-height: 560px;

	color: var(--ll-ink);
	font-size: 15px;
	line-height: 1.5;
	box-sizing: border-box;
}

.ll-app *,
.ll-app *::before,
.ll-app *::after {
	box-sizing: inherit;
}

.ll-app .screen-reader-text {
	position: absolute !important;
	width: 1px;
	height: 1px;
	padding: 0;
	margin: -1px;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	white-space: nowrap;
	border: 0;
}

/* ----------------------------------------------------------- filter bar */

.ll-filters {
	display: flex;
	flex-direction: column;
	gap: 14px;
	margin-bottom: 18px;
}

.ll-filter-row {
	display: flex;
	flex-wrap: wrap;
	align-items: flex-end;
	gap: 10px 12px;
}

.ll-field {
	display: flex;
	flex-direction: column;
	gap: 4px;
	min-width: 0;
}

.ll-field > span {
	font-size: 11px;
	font-weight: 700;
	letter-spacing: 0.04em;
	text-transform: uppercase;
	color: var(--ll-ink-soft);
}

.ll-app .ll-field input[type="search"],
.ll-app .ll-field input[type="number"],
.ll-app .ll-field input[type="date"],
.ll-app .ll-field select,
.ll-app .ll-sort select {
	appearance: none;
	-webkit-appearance: none;
	font: inherit;
	font-size: 14px;
	color: var(--ll-ink);
	background: var(--ll-bg);
	border: 1px solid var(--ll-line);
	border-radius: 8px;
	padding: 9px 12px;
	height: 40px;
	max-width: 100%;
	line-height: 1.2;
}

.ll-app .ll-field select,
.ll-app .ll-sort select {
	padding-right: 30px;
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'%3E%3Cpath fill='%235b636e' d='M0 0h10L5 6z'/%3E%3C/svg%3E");
	background-repeat: no-repeat;
	background-position: right 11px center;
}

.ll-app .ll-field input:focus,
.ll-app .ll-field select:focus,
.ll-app .ll-sort select:focus {
	outline: 2px solid var(--ll-accent);
	outline-offset: 1px;
	border-color: var(--ll-accent);
}

.ll-field-search {
	flex: 1 1 240px;
	min-width: 200px;
}

.ll-price-pair,
.ll-pet-pair {
	display: flex;
	gap: 6px;
	align-items: center;
}

.ll-app .ll-price-pair input {
	width: 92px;
}

.ll-field-pets {
	display: flex;
	flex-direction: column;
	gap: 4px;
}

.ll-field-pets > span {
	font-size: 11px;
	font-weight: 700;
	letter-spacing: 0.04em;
	text-transform: uppercase;
	color: var(--ll-ink-soft);
}

.ll-chk {
	display: inline-flex;
	align-items: center;
	gap: 5px;
	height: 40px;
	font-size: 14px;
	white-space: nowrap;
}

.ll-app .ll-clear {
	appearance: none;
	background: transparent;
	border: 1px solid transparent;
	color: var(--ll-ink-soft);
	font: inherit;
	font-size: 14px;
	text-decoration: underline;
	text-underline-offset: 3px;
	cursor: pointer;
	height: 40px;
	padding: 0 6px;
}

.ll-app .ll-clear:hover {
	color: var(--ll-ink);
}

/* --------------------------------------------------------------- layout */

.ll-body {
	display: grid;
	grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
	gap: 20px;
	align-items: start;
}

.ll-map-pane {
	position: sticky;
	top: 20px;
	border-radius: var(--ll-radius);
	overflow: hidden;
	border: 1px solid var(--ll-line);
	box-shadow: var(--ll-shadow);
}

.ll-map {
	height: var(--ll-map-height);
	width: 100%;
	background: var(--ll-bg-soft);
}

.ll-map-controls {
	position: absolute;
	z-index: 500;
	top: 12px;
	right: 12px;
	display: flex;
	flex-direction: column;
	align-items: flex-end;
	gap: 8px;
}

.ll-app .ll-reset-map,
.ll-app .ll-expand-map {
	appearance: none;
	background: var(--ll-bg);
	color: var(--ll-ink);
	border: 1px solid var(--ll-line);
	border-radius: 8px;
	box-shadow: var(--ll-shadow);
	font: inherit;
	font-size: 13px;
	font-weight: 600;
	padding: 8px 12px;
	cursor: pointer;
	white-space: nowrap;
}

.ll-app .ll-reset-map:hover,
.ll-app .ll-expand-map:hover {
	background: var(--ll-bg-soft);
}

/* Map expanded: the results grid stands down and the map takes the page. */
.ll-app.is-map-expanded .ll-body {
	grid-template-columns: minmax(0, 1fr);
}

.ll-app.is-map-expanded .ll-results-pane {
	display: none;
}

.ll-app.is-map-expanded .ll-map {
	height: min(80vh, 900px);
}

.ll-app.is-map-expanded .ll-map-pane {
	position: static;
}

/* -------------------------------------------------------------- results */

.ll-results-head {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	margin-bottom: 12px;
	min-height: 40px;
}

.ll-app .ll-count {
	margin: 0;
	font-size: 14px;
	color: var(--ll-ink-soft);
}

.ll-cards {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(205px, 1fr));
	gap: 16px;
}

/* Grouped by submarket: the outer container becomes a plain stack of sections,
   and each section carries its own card grid. */
.ll-cards.is-grouped {
	display: block;
}

.ll-group + .ll-group {
	margin-top: 26px;
}

.ll-app .ll-group-head {
	margin: 0 0 12px;
	padding-bottom: 8px;
	border-bottom: 2px solid var(--ll-line);
	font-size: 15px;
	font-weight: 700;
	line-height: 1.3;
}

.ll-app .ll-group-zoom,
.ll-app .ll-group-static {
	display: inline-flex;
	align-items: center;
	gap: 9px;
	font: inherit;
	color: inherit;
	background: none;
	border: 0;
	padding: 0;
	text-align: left;
}

.ll-app .ll-group-zoom {
	cursor: pointer;
}

.ll-app .ll-group-zoom:hover .ll-group-name {
	color: var(--ll-accent);
	text-decoration: underline;
	text-underline-offset: 3px;
}

.ll-group-count {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 22px;
	height: 22px;
	padding: 0 7px;
	background: var(--ll-bg-soft);
	border: 1px solid var(--ll-line);
	border-radius: 999px;
	font-size: 12px;
	font-weight: 600;
	color: var(--ll-ink-soft);
}

.ll-group-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(205px, 1fr));
	gap: 16px;
}

.ll-app .ll-group-toggle {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	font-size: 13px;
	color: var(--ll-ink-soft);
	white-space: nowrap;
	cursor: pointer;
	margin-left: auto;
	margin-right: 10px;
}

.ll-card {
	background: var(--ll-bg);
	border: 1px solid var(--ll-line);
	border-radius: var(--ll-radius);
	overflow: hidden;
	display: flex;
	flex-direction: column;
	transition: box-shadow 0.15s ease, border-color 0.15s ease, transform 0.15s ease;
}

.ll-card:hover,
.ll-card.is-active {
	box-shadow: var(--ll-shadow);
	border-color: #c9cfd8;
	transform: translateY(-1px);
}

.ll-card.is-active {
	border-color: var(--ll-accent);
}

.ll-card-media {
	position: relative;
	display: block;
	aspect-ratio: 16 / 10;
	max-height: 240px;
	background: var(--ll-bg-soft);
	overflow: hidden;
}

.ll-card-media img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
}

.ll-card-noimg {
	position: absolute;
	inset: 0;
	background-color: var(--ll-bg-soft);
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='44' height='44' viewBox='0 0 24 24' fill='none' stroke='%23c2c8d0' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M3 10.5 12 3l9 7.5'/%3E%3Cpath d='M5 9.5V21h14V9.5'/%3E%3Cpath d='M9.5 21v-6h5v6'/%3E%3C/svg%3E");
	background-repeat: no-repeat;
	background-position: center;
}

.ll-card-status,
.ll-badge {
	display: inline-block;
	background: var(--ll-badge, #1f8a4c);
	color: #fff;
	font-size: 11px;
	font-weight: 700;
	letter-spacing: 0.03em;
	text-transform: uppercase;
	padding: 4px 9px;
	border-radius: 999px;
	line-height: 1.4;
}

.ll-card-status {
	position: absolute;
	top: 10px;
	left: 10px;
	box-shadow: 0 1px 3px rgba(0, 0, 0, 0.25);
}

/* Media badges over the card photo: 3D tour, video, floor plan. */
.ll-card-chips {
	position: absolute;
	left: 10px;
	bottom: 10px;
	display: flex;
	flex-wrap: wrap;
	gap: 5px;
	max-width: calc(100% - 20px);
}

.ll-chip {
	display: inline-flex;
	align-items: center;
	gap: 4px;
	padding: 3px 8px;
	border-radius: 999px;
	background: rgba(12, 16, 20, 0.82);
	color: #fff;
	font-size: 11px;
	font-weight: 600;
	line-height: 1.5;
	white-space: nowrap;
	backdrop-filter: saturate(140%) blur(2px);
}

.ll-chip svg {
	flex: none;
	display: block;
}

.ll-card-body {
	padding: 12px 14px 14px;
	display: flex;
	flex-direction: column;
	gap: 4px;
	flex: 1;
}

.ll-app .ll-card-submarket {
	margin: 0 0 1px;
	font-size: 11px;
	font-weight: 700;
	letter-spacing: 0.05em;
	text-transform: uppercase;
	color: var(--ll-ink-soft);
}

.ll-app .ll-card-price {
	margin: 0;
	font-size: 18px;
	font-weight: 700;
	letter-spacing: -0.01em;
}

.ll-app .ll-card-title {
	margin: 0;
	font-size: 15px;
	font-weight: 600;
	line-height: 1.3;
}

.ll-app .ll-card-title a {
	color: inherit;
	text-decoration: none;
}

.ll-app .ll-card-title a:hover {
	text-decoration: underline;
}

.ll-app .ll-card-address,
.ll-app .ll-card-specs,
.ll-app .ll-card-meta {
	margin: 0;
	font-size: 13px;
	color: var(--ll-ink-soft);
}

.ll-app .ll-card-specs {
	color: var(--ll-ink);
	font-weight: 500;
}

.ll-app .ll-card-actions {
	margin: 8px 0 0;
	padding-top: 10px;
	border-top: 1px solid var(--ll-line);
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 8px;
	font-size: 13px;
}

.ll-app .ll-card-locate {
	appearance: none;
	background: none;
	border: 0;
	padding: 0;
	font: inherit;
	font-size: 13px;
	font-weight: 600;
	color: var(--ll-accent);
	cursor: pointer;
	text-decoration: underline;
	text-underline-offset: 3px;
}

.ll-card-nopin {
	color: var(--ll-ink-soft);
	font-size: 12px;
	font-style: italic;
}

.ll-app .ll-card-link {
	color: var(--ll-ink);
	font-weight: 600;
	text-decoration: none;
	white-space: nowrap;
}

.ll-app .ll-card-link:hover {
	text-decoration: underline;
}

.ll-app .ll-empty {
	margin: 24px 0;
	padding: 28px 20px;
	text-align: center;
	background: var(--ll-bg-soft);
	border: 1px dashed var(--ll-line);
	border-radius: var(--ll-radius);
	color: var(--ll-ink-soft);
}

.ll-app .ll-empty strong {
	color: var(--ll-ink);
}

.ll-app .ll-more {
	display: block;
	width: 100%;
	margin-top: 16px;
	appearance: none;
	background: var(--ll-bg);
	border: 1px solid var(--ll-line);
	border-radius: 8px;
	font: inherit;
	font-weight: 600;
	color: var(--ll-ink);
	padding: 12px;
	cursor: pointer;
}

.ll-app .ll-more:hover {
	background: var(--ll-bg-soft);
}

/* Feature chips: pet policy and amenities, the things people actually filter on. */
.ll-app .ll-card-tags {
	margin: 6px 0 0;
	display: flex;
	flex-wrap: wrap;
	gap: 5px;
}

.ll-tag {
	display: inline-block;
	padding: 3px 8px;
	border: 1px solid var(--ll-line);
	border-radius: 5px;
	background: var(--ll-bg-soft);
	font-size: 11px;
	font-weight: 600;
	line-height: 1.5;
	color: var(--ll-ink-soft);
	white-space: nowrap;
}

.ll-tag-more {
	background: transparent;
	border-style: dashed;
}

/* Call and tour, reachable without opening the listing. */
.ll-app .ll-card-cta {
	margin: 10px 0 0;
	display: flex;
	flex-direction: column;
	gap: 8px;
}

.ll-app .ll-card-call,
.ll-app .ll-card-tour {
	flex: 1;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 6px;
	min-height: 38px;
	padding: 8px 10px;
	border-radius: 8px;
	font-size: 13px;
	font-weight: 700;
	text-decoration: none;
	text-align: center;
	line-height: 1.2;
	white-space: nowrap;
}

.ll-app .ll-card-call {
	border: 1px solid var(--ll-line);
	background: var(--ll-bg);
	color: var(--ll-ink);
}

.ll-app .ll-card-call:hover {
	background: var(--ll-bg-soft);
	border-color: #c9cfd8;
}

.ll-app .ll-card-call svg {
	flex: none;
}

.ll-app .ll-card-tour {
	background: var(--ll-accent);
	color: var(--ll-accent-ink);
	border: 1px solid var(--ll-accent);
}

.ll-app .ll-card-tour:hover {
	opacity: 0.9;
}

/* ----------------------------------------------------------- map pins */

/* The marker box is zero-sized and sits exactly on the coordinate; the pill
   below centres itself off it. That way the label can be any width — "$950",
   "$4.3k", "$12.8k" — and the pin still points at the right place. */
.ll-pin-wrap {
	background: none !important;
	border: 0 !important;
	width: 0 !important;
	height: 0 !important;
}

.ll-pin {
	position: absolute;
	left: 0;
	top: 0;
	transform: translate(-50%, -100%);
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 46px;
	height: 24px;
	padding: 0 9px;
	background: var(--ll-pin, #1f8a4c);
	color: #fff;
	font-size: 12px;
	font-weight: 700;
	font-family: inherit;
	border-radius: 999px;
	border: 2px solid #fff;
	box-shadow: 0 1px 4px rgba(16, 24, 40, 0.35);
	white-space: nowrap;
	transition: transform 0.12s ease;
}

/* Must repeat the centring translate — a bare scale() would replace it and
   drop the pill back onto the coordinate's top-left corner. */
.ll-pin-wrap.is-active .ll-pin,
.ll-pin-wrap:hover .ll-pin {
	transform: translate(-50%, -100%) scale(1.16);
	z-index: 1000;
}

/* The cluster plugin's own look lives in a second stylesheet
   (MarkerCluster.Default.css). We style the clusters here instead, so they
   match the pins and cost no extra request. */
.ll-app .marker-cluster {
	background: transparent;
}

.ll-app .marker-cluster div {
	width: 32px;
	height: 32px;
	margin: 4px;
	display: flex;
	align-items: center;
	justify-content: center;
	background: var(--ll-accent);
	color: #fff;
	border: 2px solid #fff;
	border-radius: 50%;
	box-shadow: 0 1px 4px rgba(16, 24, 40, 0.35);
	font-size: 13px;
	font-weight: 700;
	font-family: inherit;
}

.ll-app .marker-cluster-large div {
	width: 38px;
	height: 38px;
	margin: 1px;
	font-size: 14px;
}

.ll-app .marker-cluster span {
	line-height: 1;
}

.ll-popup .leaflet-popup-content-wrapper {
	border-radius: var(--ll-radius);
	padding: 0;
	overflow: hidden;
}

/* Leaflet sizes popups from their content; our card needs a fixed width or it
   collapses to the longest unbreakable word. */
.ll-popup .leaflet-popup-content {
	margin: 0;
	width: 232px !important;
}

/* Leaflet ships ".leaflet-container a { color: #0078A8 }", which outranks a
   single class. Two classes take the popup text back. */
.ll-app .ll-popup-inner,
.ll-app .ll-popup-inner:hover,
.ll-app .ll-popup-inner:focus {
	display: block;
	text-decoration: none;
	color: var(--ll-ink);
}

.ll-popup-img {
	display: block;
	height: 120px;
	background-size: cover;
	background-position: center;
	background-color: #f6f7f9;
}

.ll-popup-body {
	display: block;
	padding: 10px 12px 12px;
}

.ll-popup-price {
	display: block;
	font-size: 16px;
	font-weight: 700;
}

.ll-popup-title {
	display: block;
	font-size: 13px;
	font-weight: 600;
	margin-top: 1px;
}

.ll-popup-specs {
	display: block;
	font-size: 12px;
	color: #5b636e;
	margin-top: 2px;
}

.ll-popup-status {
	display: inline-block;
	margin-top: 7px;
	background: var(--ll-badge, #1f8a4c);
	color: #fff;
	font-size: 10px;
	font-weight: 700;
	letter-spacing: 0.03em;
	text-transform: uppercase;
	padding: 3px 8px;
	border-radius: 999px;
}

/* --------------------------------------------------- single listing page */

.ll-single {
	margin: 0 0 28px;
}

.ll-single-head {
	display: flex;
	flex-wrap: wrap;
	align-items: baseline;
	gap: 8px 14px;
	padding-bottom: 14px;
	border-bottom: 1px solid #e2e5ea;
}

.ll-single-price {
	margin: 0;
	font-size: 28px;
	font-weight: 700;
	letter-spacing: -0.02em;
}

.ll-single-price span {
	font-size: 16px;
	font-weight: 500;
	color: #5b636e;
}

.ll-single-address {
	margin: 0;
	flex-basis: 100%;
	color: #5b636e;
}

.ll-single-submarket {
	margin: 0;
	flex-basis: 100%;
	font-size: 12px;
	font-weight: 700;
	letter-spacing: 0.05em;
	text-transform: uppercase;
	color: #5b636e;
}

/* Keep the eyebrow reading as an eyebrow, not as a theme link. */
.ll-single-submarket a {
	color: inherit;
	text-decoration: none;
}

.ll-single-submarket a:hover,
.ll-single-submarket a:focus {
	color: #14532d;
	text-decoration: underline;
	text-underline-offset: 3px;
}

.ll-single-facts {
	list-style: none;
	margin: 18px 0;
	padding: 0;
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
}

.ll-single-facts li {
	flex: 1 1 120px;
	background: #f6f7f9;
	border-radius: 10px;
	padding: 12px 14px;
	text-align: center;
}

.ll-single-facts strong {
	display: block;
	font-size: 19px;
}

.ll-single-facts span {
	font-size: 12px;
	text-transform: uppercase;
	letter-spacing: 0.04em;
	color: #5b636e;
}

.ll-single-tags {
	list-style: none;
	margin: 0 0 18px;
	padding: 0;
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
}

.ll-single-tags li {
	border: 1px solid #e2e5ea;
	border-radius: 999px;
	padding: 4px 12px;
	font-size: 13px;
	color: #5b636e;
}

.ll-single-cta {
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
	margin: 0 0 8px;
}

.ll-btn {
	display: inline-block;
	background: #14532d;
	color: #fff !important;
	text-decoration: none;
	font-weight: 600;
	padding: 12px 22px;
	border-radius: 8px;
}

.ll-btn:hover {
	opacity: 0.92;
}

.ll-btn-ghost {
	background: transparent;
	color: #14532d !important;
	border: 1px solid #14532d;
}

/* Tours, floor plans and photos on a single listing page */

.ll-media-title {
	margin: 32px 0 12px;
	font-size: 19px;
	font-weight: 700;
	letter-spacing: -0.01em;
}

.ll-embed {
	position: relative;
	width: 100%;
	aspect-ratio: 16 / 9;
	background: #0c1014;
	border-radius: 10px;
	overflow: hidden;
}

.ll-embed iframe {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	border: 0;
	display: block;
}

.ll-floorplan-grid {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
	gap: 14px;
}

/* Plans are line art: contain rather than crop, on a white ground. */
.ll-floorplan {
	display: block;
	background: #fff;
	border: 1px solid #e2e5ea;
	border-radius: 10px;
	padding: 10px;
}

.ll-floorplan img {
	width: 100%;
	height: auto;
	max-height: 460px;
	object-fit: contain;
	display: block;
}

.ll-gallery {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
	gap: 10px;
}

.ll-gallery-item img {
	width: 100%;
	height: 100%;
	aspect-ratio: 4 / 3;
	object-fit: cover;
	border-radius: 8px;
	display: block;
}

/* ---------------------------------------------------------- responsive */

@media (max-width: 980px) {
	.ll-body {
		grid-template-columns: minmax(0, 1fr);
	}

	.ll-map-pane {
		position: relative;
		top: 0;
		order: -1;
	}

	.ll-map {
		height: min(var(--ll-map-height), 380px);
	}
}

@media (max-width: 600px) {
	.ll-filter-row {
		gap: 8px;
	}

	.ll-field-search {
		flex-basis: 100%;
	}

	.ll-cards,
	.ll-group-grid {
		grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
	}
}

/* Scoped to our own components on purpose. A blanket ".ll-app *" also strips the
   transitions Leaflet drives its zoom and marker animations with, which can
   leave the map stuck mid-move. */
@media (prefers-reduced-motion: reduce) {
	.ll-app .ll-card,
	.ll-app .ll-pin,
	.ll-app .ll-chip,
	.ll-app .ll-clear,
	.ll-app .ll-more {
		transition: none !important;
	}
}
