/* Site Plan (libs/site-plan). Status colours follow the Unit Matrix. */
.hsp {
	--hsp-title: #2b211c;
	--hsp-line: #e6e0d8;
	--hsp-available: #dff3e4; --hsp-available-ink: #14532d; --hsp-available-dot: #5c9a4e;
	--hsp-open: #eff3ef; --hsp-open-ink: #557366; --hsp-open-dot: #5c9a4e;
	--hsp-reserved: #fdf0cc; --hsp-reserved-ink: #6b4a00; --hsp-reserved-dot: #d9a400;
	--hsp-onreq: #f3ecdf; --hsp-onreq-ink: #46433c; --hsp-onreq-dot: #b08a4a;
	--hsp-sold: #ececee; --hsp-sold-ink: #8a8a91; --hsp-sold-dot: #a3a3aa;
	--hsp-hot: #d6342c;
	--hsp-accent: #5f3838;
	margin: 0 0 24px;
}
.hsp .hsp__heading { margin: 15px 0 16px; padding: 0; font-family: Merriweather, sans-serif; font-size: 30px; font-weight: 600; line-height: 1.2em; color: #3e2f26; text-align: start; }
@media (max-width: 767px) {
	.hsp .hsp__heading { text-align: center; }
	/* Phones: the widget sits edge to edge in the template; keep its content off the screen edges. */
	.hsp { padding-left: 16px; padding-right: 16px; }
}

/* Bar: 2D / 3D switch + status chips. */
.hsp__bar { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 16px; margin: 0 0 12px; }
.hsp__modes { display: inline-flex; padding: 3px; border: 1px solid var(--hsp-line); border-radius: 999px; background: #f6f2ec; }
.hsp__mode { margin: 0; padding: 7px 16px; border: 0; border-radius: 999px; background: transparent; color: var(--hsp-title); font-family: Merriweather, Georgia, serif; font-size: 14px; font-weight: 700; line-height: 1.2; cursor: pointer; }
.hsp__mode[aria-pressed="true"] { background: var(--hsp-accent); color: #fff; }
.hsp__mode:focus-visible { outline: 2px solid var(--hsp-accent); outline-offset: 2px; }
.hsp__legend { display: flex; flex-wrap: wrap; gap: 8px; margin: 0; }
.hsp__note3d { display: none; margin: 4px 0 0; color: #6b625a; font-size: 12px; font-style: italic; line-height: 1.4; }
.hsp[data-mode="3d"] .hsp__note3d { display: block; }
.hsp__chip { display: inline-flex; align-items: center; gap: 7px; margin: 0; padding: 7px 12px; border: 1px solid var(--hsp-line); border-radius: 999px; background: #fff; color: var(--hsp-title); font-size: 14px; font-weight: 600; line-height: 1.2; cursor: pointer; }
.hsp__chip:hover { border-color: #cfc6ba; }
.hsp__chip[aria-pressed="false"] { opacity: .45; }
.hsp__chip[aria-pressed="false"] .hsp__dot { background: #fff !important; box-shadow: inset 0 0 0 2px #bbb; }
.hsp__chip:focus-visible { outline: 2px solid var(--hsp-accent); outline-offset: 2px; }
.hsp__dot { width: 10px; height: 10px; border-radius: 50%; background: var(--hsp-available-dot); }
.hsp__chip.is-reserved .hsp__dot { background: var(--hsp-reserved-dot); }
.hsp__chip.is-on_request .hsp__dot { background: var(--hsp-onreq-dot); }
.hsp__chip.is-sold .hsp__dot { background: var(--hsp-sold-dot); }
.hsp__n { color: #6b625a; font-weight: 400; }

/* Frame = proportions of the default view (lots area), so the plan fills it. */
.hsp__frame { position: relative; width: 100%; aspect-ratio: var(--hsp-ratio, 3 / 2); max-height: 78vh; min-height: 260px; overflow: hidden; border: 1px solid var(--hsp-line); border-radius: 12px; background: var(--hsp-bg, #fff); }

/* Phones: static preview in the page; the interactive plan opens as a full-screen layer. */
.hsp__preview { display: none; }
@media (max-width: 767px) {
	.hsp__frame.has-preview:not(.is-full) { display: none; }
	.hsp__preview:not(.is-active) { display: none !important; }
	.hsp__preview { position: relative; display: block; width: 100%; margin: 0; padding: 0; overflow: hidden; border: 1px solid var(--hsp-line); border-radius: 12px; background: var(--hsp-bg, #fff); aspect-ratio: var(--hsp-ratio, 3 / 2); cursor: zoom-in; -webkit-tap-highlight-color: transparent; }
	.hsp__preview img { display: block; width: 100%; height: 100%; object-fit: cover; margin: 0; border-radius: 0; }
	.hsp__pdots { position: absolute; inset: 0; pointer-events: none; }
	.hsp__pdot { position: absolute; width: 12px; height: 12px; margin: -6px 0 0 -6px; border: 2px solid #fff; border-radius: 50%; background: var(--hsp-available-dot); box-shadow: 0 1px 3px rgba(0, 0, 0, .4); }
	.hsp__pdot.is-reserved { background: var(--hsp-reserved-dot); }
	.hsp__pdot.is-on_request { background: var(--hsp-onreq-dot); }
	.hsp__pdot.is-sold { background: var(--hsp-sold-dot); }
	.hsp__pdot[hidden] { display: none; }
	.hsp__preview { touch-action: pan-y; } /* no page pinch-zoom on the preview (site-plan.js opens the plan) */
	.hsp__cta { animation: hsp-cta-pulse 1.4s ease-in-out .6s 2; }
	@keyframes hsp-cta-pulse { 0%, 100% { transform: translateX(-50%) scale(1); } 50% { transform: translateX(-50%) scale(1.08); box-shadow: 0 0 0 6px rgba(187, 155, 98, .35), 0 2px 8px rgba(0, 0, 0, .25); } }
	@media (prefers-reduced-motion: reduce) { .hsp__cta { animation: none; } }
	.hsp__cta { position: absolute; left: 50%; bottom: 12px; display: inline-flex; align-items: center; gap: 8px; padding: 9px 16px; border-radius: 999px; background: rgba(43, 33, 28, .88); color: #fff; font-size: 14px; font-weight: 600; line-height: 1.2; white-space: nowrap; box-shadow: 0 2px 8px rgba(0, 0, 0, .25); transform: translateX(-50%); }
	.hsp__preview:active .hsp__cta { background: #2b211c; }
	.hsp__preview:focus-visible { outline: 2px solid var(--hsp-accent); outline-offset: 2px; }
}
.hsp__map { position: absolute; inset: 0; background: var(--hsp-bg, #fff); font: inherit; }
.hsp__map:focus-visible { outline: 2px solid var(--hsp-accent); outline-offset: -2px; }
.hsp__hint { margin: 8px 0 0; color: #6b625a; font-size: 13px; line-height: 1.4; }

.hsp__controls { position: absolute; top: 12px; right: 12px; z-index: 1000; display: flex; flex-direction: column; gap: 6px; }
.hsp__btn { display: inline-flex; align-items: center; justify-content: center; width: 38px; height: 38px; margin: 0; padding: 0; border: 1px solid var(--hsp-line); border-radius: 10px; background: #fff; color: var(--hsp-title); font-size: 22px; line-height: 1; box-shadow: 0 1px 3px rgba(0, 0, 0, .12); cursor: pointer; }
.hsp__btn:hover { background: #f6f2ec; }
.hsp__btn:focus-visible { outline: 2px solid var(--hsp-accent); outline-offset: 2px; }

/* Full-screen layer (CSS only): below the Unit Matrix popup (99990) and the lead form (100050),
   so a pin opens the unit popup on top of it. */
.hsp__frame.is-full { position: fixed; inset: 0; z-index: 99980; display: block; width: 100%; height: 100%; height: 100dvh; max-height: none; min-height: 0; aspect-ratio: auto; border: 0; border-radius: 0; }
.hsp__frame.is-full .hsp__controls { top: calc(12px + env(safe-area-inset-top, 0px)); right: calc(12px + env(safe-area-inset-right, 0px)); }
html.hsp-lock, html.hsp-lock body { overflow: hidden; }
.hsp__ico-close { display: none; }
.hsp__frame.is-full .hsp__ico-open { display: none; }
.hsp__frame.is-full .hsp__ico-close { display: block; }
.hsp__frame.is-full .hsp__btn--full { order: -1; margin-bottom: 8px; background: #2b211c; border-color: #2b211c; color: #fff; }

/* Pins: a dot on the exact spot + a label above it. */
.leaflet-marker-icon.hsp-pin { width: 0; height: 0; background: none; border: 0; cursor: pointer; }
.hsp-pin::before { content: ""; position: absolute; left: 0; top: 0; width: 12px; height: 12px; border: 2px solid #fff; border-radius: 50%; background: var(--hsp-available-dot); box-shadow: 0 1px 3px rgba(0, 0, 0, .35); transform: translate(-50%, -50%); }
.hsp-pin__in { position: absolute; left: 0; top: 0; display: inline-flex; align-items: center; gap: 5px; padding: 4px 8px; border: 1px solid rgba(20, 83, 45, .25); border-radius: 8px; background: var(--hsp-available); color: var(--hsp-available-ink); font-family: Merriweather, Georgia, serif; font-size: 12px; font-weight: 700; line-height: 1.2; white-space: nowrap; box-shadow: 0 2px 6px rgba(0, 0, 0, .18); transform: translate(-50%, calc(-100% - 10px)); transition: transform .12s ease; }
.hsp-pin__in::after { content: ""; position: absolute; left: 50%; bottom: -5px; width: 8px; height: 8px; background: inherit; border-right: inherit; border-bottom: inherit; transform: translateX(-50%) rotate(45deg); }
.hsp-pin__price { font-family: -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif; font-weight: 600; opacity: .9; }
.hsp-pin__hot { padding: 1px 5px; border-radius: 4px; background: var(--hsp-hot); color: #fff; font-family: -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif; font-size: 10px; font-weight: 700; text-transform: uppercase; }

.hsp.is-presale .hsp-pin.is-available::before { background: var(--hsp-open-dot); }
.hsp.is-presale .hsp-pin.is-available .hsp-pin__in { background: var(--hsp-open); color: var(--hsp-open-ink); border-color: #d9e3da; }
.hsp-pin.is-reserved::before { background: var(--hsp-reserved-dot); }
.hsp-pin.is-reserved .hsp-pin__in { background: var(--hsp-reserved); color: var(--hsp-reserved-ink); border-color: rgba(107, 74, 0, .25); }
.hsp-pin.is-on_request::before { background: var(--hsp-onreq-dot); }
.hsp-pin.is-on_request .hsp-pin__in { background: var(--hsp-onreq); color: var(--hsp-onreq-ink); border-color: #e4d7c0; }
.hsp-pin.is-sold { cursor: default; }
.hsp-pin.is-sold::before { background: var(--hsp-sold-dot); }
.hsp-pin.is-sold .hsp-pin__in { background: var(--hsp-sold); color: var(--hsp-sold-ink); border-color: #dadadf; }
.hsp-pin.is-sold .hsp-pin__code { text-decoration: line-through; }

.hsp-pin:hover .hsp-pin__in, .hsp-pin:focus .hsp-pin__in, .hsp-pin.is-active .hsp-pin__in { transform: translate(-50%, calc(-100% - 10px)) scale(1.08); }
.hsp-pin.is-active .hsp-pin__in { box-shadow: 0 0 0 2px var(--hsp-accent), 0 2px 8px rgba(0, 0, 0, .25); }
.hsp-pin:focus { outline: none; }
.hsp-pin:focus-visible .hsp-pin__in { box-shadow: 0 0 0 2px var(--hsp-accent); }

/* Far view: code only (no price). Labels that would overlap another one: dot only (site-plan.js). */
.hsp.is-far .hsp-pin__price { display: none; }
.hsp-pin.is-dot .hsp-pin__in { display: none; }
.hsp-pin.is-dot::before { width: 14px; height: 14px; }

.hsp .leaflet-container { font-family: inherit; background: var(--hsp-bg, #fff); }
/* Tiles overlap by 1 px (site-plan.js). Leaflet 1.9 draws tiles with mix-blend-mode: plus-lighter,
   which adds the overlapping pixels up to white lines — draw them normally instead. */
.hsp .leaflet-container img.leaflet-tile { mix-blend-mode: normal; }
.hsp-tip { padding: 6px 9px; border: 0; border-radius: 8px; box-shadow: 0 2px 10px rgba(0, 0, 0, .2); font-size: 13px; line-height: 1.4; color: #1f2328; }
.hsp-pop .leaflet-popup-content { margin: 10px 14px; font-size: 14px; line-height: 1.5; }
