/* Schilling Development: merged lot map. */
.sd-map {
	display: grid;
	grid-template-columns: minmax(0, 1fr) minmax(260px, 320px);
	grid-template-areas: "canvas list" "legend legend";
	gap: 16px;
	font-size: 15px;
}
.sd-map__canvas { grid-area: canvas; border-radius: 8px; overflow: hidden; background: #e9ecef; }
.sd-map__list { grid-area: list; max-height: 650px; overflow-y: auto; border: 1px solid #e3e3e3; border-radius: 8px; padding: 12px; background: #fff; }
.sd-map__legend { grid-area: legend; display: flex; flex-wrap: wrap; gap: 8px 20px; list-style: none; margin: 0; padding: 0; }
.sd-map__legend li { display: flex; align-items: center; gap: 6px; }
.sd-map__swatch { display: inline-block; width: 14px; height: 14px; border-radius: 3px; margin-right: 6px; vertical-align: -2px; }

.sd-map__filters { display: flex; gap: 6px; margin-bottom: 10px; flex-wrap: wrap; }
.sd-map .sd-map__filters button { border: 1px solid #c9c9c9; background: #fff; color: #1f2937; border-radius: 999px; padding: 4px 12px; font-size: 13px; line-height: 1.4; cursor: pointer; text-transform: none; letter-spacing: normal; box-shadow: none; }
.sd-map .sd-map__filters button:hover { background: #eef4fa; color: #1f2937; }
.sd-map .sd-map__filters button .sd-map__swatch { width: 10px; height: 10px; margin-right: 5px; vertical-align: 0; }
.sd-map .sd-map__filters button.is-active { background: #1f5f99; border-color: #1f5f99; color: #fff; }

.sd-map__group h3 { font-size: 15px; margin: 12px 0 6px; }
.sd-map__group ul { list-style: none; margin: 0; padding: 0; }
.sd-map__group li a { display: block; padding: 8px 10px; border-radius: 6px; color: inherit; text-decoration: none; border-bottom: 1px solid #f0f0f0; }
.sd-map__group li a small { display: block; color: #666; font-size: 12px; margin-top: 2px; }
.sd-map__group li.is-active a, .sd-map__group li a:hover, .sd-map__group li a:focus { background: #eef4fa; outline: none; }
.sd-map__empty { color: #555; }

/* Lot number labels: shown per lot by the script when the lot is drawn
   large enough (Leaflet sets opacity inline, so visibility is used). */
.sd-map__label { background: transparent; border: 0; box-shadow: none; color: #fff; font-weight: 700; font-size: 11px; text-shadow: 0 0 3px #000, 0 0 3px #000; padding: 0; visibility: hidden; }
.sd-map__label::before { display: none; }

/* List items. */
.sd-map__row { display: flex; align-items: baseline; gap: 8px; }
.sd-map__price { margin-left: auto; font-weight: 600; }
.sd-map__badge { font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: .03em; color: #1f5f99; background: #e3eef8; border-radius: 4px; padding: 1px 6px; }
.sd-map__who { display: block; color: #333; font-size: 13px; }
.sd-map__facts { display: block; color: #333; font-size: 13px; }
.sd-map__item--spec a, .sd-map__item--model a { border-left: 3px solid #20659d; }

.sd-map__builder-contact { margin: -2px 0 6px 20px; font-size: 13px; display: flex; gap: 12px; }

.sd-map__disclaimer { grid-area: disclaimer; margin: 0; font-size: 12px; line-height: 1.5; color: #666; }
.sd-map { grid-template-areas: "canvas list" "legend legend" "disclaimer disclaimer"; }
.sd-map--compact { grid-template-columns: 1fr; grid-template-areas: "canvas" "disclaimer"; }

/* Popup card. Even padding all round (Leaflet's default margins are uneven). */
.sd-map-popup .leaflet-popup-content-wrapper { border-radius: 10px; padding: 0; overflow: hidden; }
.sd-map-popup .leaflet-popup-content { margin: 0; width: auto !important; min-width: 220px; }
.sd-map-popup a.leaflet-popup-close-button { top: 6px; right: 6px; width: 24px; height: 24px; line-height: 22px; background: rgba(255,255,255,.9); border-radius: 50%; color: #333; }
.sd-map-card__media { padding: 10px 10px 0; }
.sd-map-card__media img { width: 100%; height: 130px; object-fit: cover; border-radius: 6px; display: block; }
.sd-map-card__body { padding: 10px 12px 12px; display: flex; flex-direction: column; gap: 5px; font-size: 14px; line-height: 1.35; }
.sd-map-card--small .sd-map-card__body { padding-right: 34px; }
.sd-map-card__head { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.sd-map-card:not(.has-media) .sd-map-card__head { padding-right: 26px; } /* room for the close button */
.sd-map-card__head strong { font-size: 17px; }
.sd-map-card__pill { display: inline-flex; align-items: center; justify-content: center; padding: 2px 10px; border: 1px solid; border-radius: 999px; font-size: 12px; font-weight: 700; line-height: 1.4; color: #111; white-space: nowrap; }
.sd-map-card__type { color: #555; font-size: 13px; }
.sd-map-card__price { font-size: 18px; font-weight: 700; }
.sd-map-card__contact { font-size: 14px; }
.sd-map-card__features { display: flex; flex-wrap: wrap; gap: 4px; }
.sd-map-card__features span { background: #f1f3f5; border-radius: 4px; padding: 1px 6px; font-size: 12px; color: #444; }
.sd-map-card__link { margin-top: 4px; display: block; text-align: center; background: #1f5f99; color: #fff !important; border-radius: 6px; padding: 7px 10px; font-weight: 600; text-decoration: none; }
.sd-map-card__link:hover { background: #174a78; }

@media (max-width: 900px) {
	.sd-map { grid-template-columns: 1fr; grid-template-areas: "canvas" "legend" "list" "disclaimer"; }
	.sd-map--compact { grid-template-areas: "canvas" "disclaimer"; }
	.sd-map--compact .sd-map__canvas { height: 360px !important; }
	.sd-map__canvas { height: 420px !important; }
	.sd-map__list { max-height: none !important; }
	.sd-map-card__media img { height: 100px; }
	.sd-map-popup .leaflet-popup-content { min-width: 200px; }
}

/* List search */
.sd-map__search { position: sticky; top: 0; z-index: 2; background: #fff; padding: 0 0 8px; }
.sd-map__search input[type="search"] { width: 100% !important; box-sizing: border-box; margin: 0 !important; padding: 8px 12px 8px 34px !important; border: 1px solid #c9ced3 !important; border-radius: 999px !important; font-size: 14px !important; line-height: 1.3 !important; background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23666' stroke-width='2.5' stroke-linecap='round'%3E%3Ccircle cx='11' cy='11' r='7'/%3E%3Cpath d='M20 20l-3.5-3.5'/%3E%3C/svg%3E") no-repeat 12px center !important; box-shadow: none !important; height: auto !important; }
.sd-map__search input[type="search"]:focus { outline: none; border-color: #1f5f99 !important; box-shadow: 0 0 0 3px rgba(31,95,153,.2) !important; }
.sd-map__nomatch { margin: 8px 2px; color: #666; font-size: 14px; }
.sd-map__list li[hidden] { display: none !important; }
.sd-map__addr { display: block; font-size: 13px; color: #555; }
.sd-map-card__addr { font-size: 13px; color: #555; margin: -2px 0 4px; }

/* Phones: short list under the map (0.15.0) */
.sd-map__listmore { display: none; }
@media (max-width: 900px) {
	.sd-map__list.is-collapsed { max-height: 330px !important; overflow: hidden !important; position: relative; }
	.sd-map__list.is-collapsed::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 80px; background: linear-gradient(rgba(255,255,255,0), #fff 70%); pointer-events: none; z-index: 2; }
	.sd-map__listmore { display: block; margin: 12px auto 4px; padding: 8px 18px; border: 1px solid #1f5f99; border-radius: 999px; background: #fff; color: #1f5f99; font-weight: 700; font-size: 14px; line-height: 1.2; cursor: pointer; }
	.sd-map__list.is-collapsed .sd-map__listmore { position: absolute; left: 50%; bottom: 10px; transform: translateX(-50%); margin: 0; z-index: 3; white-space: nowrap; }
}

/* Two-finger hint on touch screens */
.sd-gesture-hint { position: absolute; inset: 0; z-index: 800; display: flex; align-items: center; justify-content: center; padding: 20px; background: rgba(10,25,40,.55); color: #fff; font-size: 17px; font-weight: 700; text-align: center; pointer-events: none; opacity: 0; transition: opacity .2s; }
.sd-gesture-hint.is-on { opacity: 1; }

/* Compact maps on phones: compact popup cards (0.24.4) */
@media (max-width: 768px) {
	.sd-map--compact .sd-map-card__media, .sd-arch__lotmap .sd-map-card__media { display: none !important; }
	.sd-map--compact .sd-map-card__features, .sd-arch__lotmap .sd-map-card__features { display: none !important; }
	.sd-map--compact .sd-map-popup .leaflet-popup-content, .sd-arch__lotmap .sd-map-popup .leaflet-popup-content { margin: 12px 14px; }
}
.sd-map-popup .leaflet-popup-content { overscroll-behavior: contain; }

/* Full screen (0.29.0): button on the map; map fills the window under the site header */
.sd-map__canvas { position: relative; }
.sd-map .sd-map__fs { position: absolute; top: 12px; right: 12px; z-index: 800; display: inline-flex; align-items: center; gap: 6px; min-height: 40px; margin: 0 !important; padding: 0 14px !important; border: 0 !important; border-radius: 8px !important; background: #fff !important; color: #10324f !important; font: inherit; font-size: 14px !important; font-weight: 700 !important; line-height: 1.2 !important; text-transform: none !important; letter-spacing: normal !important; box-shadow: 0 2px 10px rgba(16,50,79,.22) !important; cursor: pointer; }
.sd-map .sd-map__fs:hover, .sd-map .sd-map__fs:focus-visible { color: #1f5f99 !important; background: #eef4fa !important; }
.sd-map .sd-map__fs svg { width: 18px; height: 18px; flex: none; }
.sd-map--full { position: fixed !important; left: 0; right: 0; bottom: 0; z-index: 1150; margin: 0 !important; padding: 12px; background: #fff; grid-template-areas: "canvas list" !important; align-items: start; overflow: hidden; }
.sd-map--full .sd-map__canvas { height: var(--sdm-h, 80vh) !important; border-radius: 10px; }
.sd-map--full .sd-map__list { max-height: var(--sdm-h, 80vh) !important; }
.sd-map--full .sd-map__disclaimer { display: none !important; }
body.sd-map-full-open { overflow: hidden; }
body.sd-map-full-open .sd-secnav, body.sd-map-full-open .sd-actionbar { visibility: hidden !important; }
.sd-map__key { position: absolute; left: 12px; bottom: 26px; z-index: 800; display: flex; flex-direction: column; align-items: flex-start; gap: 6px; }
.sd-map__key .sd-map__legend { display: flex !important; flex-direction: column; gap: 6px; margin: 0 !important; padding: 10px 12px !important; background: rgba(255,255,255,.95); border-radius: 10px; box-shadow: 0 2px 10px rgba(16,50,79,.2); font-size: 13px; line-height: 1.3; color: #222; }
.sd-map__key .sd-map__swatch { width: 14px; height: 14px; border-radius: 3px; flex: none; }
.sd-map .sd-map__keybtn { display: none; min-height: 36px; padding: 0 14px !important; border: 0 !important; border-radius: 999px !important; background: #fff !important; color: #10324f !important; font: inherit; font-size: 14px !important; font-weight: 700 !important; box-shadow: 0 2px 10px rgba(16,50,79,.2) !important; cursor: pointer; }
.sd-map__sheet { display: none !important; }
@media (max-width: 900px) {
	.sd-map .sd-map__fs span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
	.sd-map .sd-map__fs { width: 44px; height: 44px; padding: 0 !important; justify-content: center; }
	.sd-map--full { display: block !important; padding: 0; }
	.sd-map--full .sd-map__canvas { height: var(--sdm-full, 90vh) !important; border-radius: 0; }
	.sd-map--full .sd-map__fs { top: 10px; right: 10px; }
	.sd-map--full .leaflet-top.leaflet-left { top: auto !important; bottom: 90px; left: auto; right: 10px; }
	.sd-map--full .leaflet-bottom.leaflet-right { bottom: 76px; }
	.sd-map .sd-map__keybtn { display: inline-flex; align-items: center; }
	.sd-map__key { bottom: 90px; left: 10px; }
	.sd-map__key .sd-map__legend { display: none !important; }
	.sd-map__key.is-open .sd-map__legend { display: flex !important; }
	.sd-map--full .sd-map__list { position: fixed !important; left: 0; right: 0; bottom: 0; z-index: 1200; max-height: 76px !important; overflow: hidden !important; margin: 0 !important; padding: 0 14px 14px !important; border: 0 !important; border-radius: 16px 16px 0 0 !important; background: #fff !important; box-shadow: 0 -4px 18px rgba(16,50,79,.22); transition: max-height .25s ease; }
	.sd-map--full .sd-map__list.is-open { max-height: 75vh !important; max-height: 75dvh !important; overflow-y: auto !important; }
	.sd-map--full .sd-map__list:not(.is-open) > :not(.sd-map__sheet) { display: none !important; }
	.sd-map--full .sd-map__sheet { position: sticky; top: 0; z-index: 2; display: flex !important; align-items: center; justify-content: space-between; width: calc(100% + 28px); margin: 0 -14px 10px; min-height: 64px; padding: 16px 18px 10px !important; border: 0 !important; border-radius: 16px 16px 0 0; background: #fff !important; color: #10324f !important; font: inherit; font-size: 16px; cursor: pointer; box-shadow: none !important; text-transform: none !important; }
	.sd-map__grip { position: absolute; top: 7px; left: 50%; width: 40px; height: 4px; margin-left: -20px; border-radius: 2px; background: #c9d3dd; }
	.sd-map__sheetact { color: #1f5f99; font-weight: 700; font-size: 15px; }
	/* Phones (not full screen): the list collapses as before. */
	.sd-map--full .sd-map__list.is-collapsed::after, .sd-map--full .sd-map__listmore { display: none !important; }
}
