/* Ethos property map. Colours come from the theme tokens so light and dark mode follow the site switch. */
.ethos-pmap {
	--pm-base: var(--wp--preset--color--base, #0a0b0a);
	--pm-surface: var(--wp--preset--color--surface, #151815);
	--pm-line: var(--wp--preset--color--line, #262a26);
	--pm-muted: var(--wp--preset--color--muted, #a9aba3);
	--pm-ink: var(--wp--preset--color--ink, #f2f2ee);
	--pm-accent: var(--wp--preset--color--accent, #199e70);
	--pm-mono: var(--wp--preset--font-family--mono, ui-monospace, monospace);
	margin-block: 1.5rem 2.5rem;
}

/* The main map breaks out of the reading column. */
.ethos-pmap:not(.ethos-pmap--single):not(.ethos-pmap--pick) {
	width: min(1280px, calc(100vw - 32px));
	max-width: none;
	position: relative;
	left: 50%;
	transform: translateX(-50%);
}

.ethos-pmap__bar {
	display: flex;
	flex-wrap: wrap;
	gap: 0.5rem;
	align-items: center;
	margin-bottom: 0.75rem;
}

.ethos-pmap__chip,
.ethos-pmap__status select {
	font: 500 0.8rem/1 var(--pm-mono);
	letter-spacing: 0.02em;
	color: var(--pm-ink);
	background: var(--pm-surface);
	border: 1px solid var(--pm-line);
	border-radius: 2px;
	padding: 0.55rem 0.75rem;
	cursor: pointer;
	display: inline-flex;
	align-items: center;
	gap: 0.45rem;
}

.ethos-pmap__chip span { color: var(--pm-muted); }
.ethos-pmap__chip.is-active { border-color: var(--pm-accent); box-shadow: inset 0 0 0 1px var(--pm-accent); }
.ethos-pmap__chip:focus-visible,
.ethos-pmap__status select:focus-visible { outline: 2px solid var(--pm-accent); outline-offset: 2px; }
.ethos-pmap__status { margin-left: auto; }

.ethos-pmap__swatch {
	width: 10px;
	height: 10px;
	border-radius: 50%;
	display: inline-block;
}
.ethos-pmap__swatch--project { background: #199e70; }
.ethos-pmap__swatch--plot { background: #d95926; }
.ethos-pmap__swatch--sale { background: #3987e5; }
.ethos-pmap__swatch--rent { box-shadow: inset 0 0 0 2.5px #3987e5; }

.ethos-pmap__stage {
	position: relative;
	border: 1px solid var(--pm-line);
	border-radius: 2px;
	overflow: hidden;
	background: var(--pm-surface);
}

.ethos-pmap__map { height: min(72vh, 720px); min-height: 460px; }
.ethos-pmap--single .ethos-pmap__map { height: 320px; min-height: 0; }
.ethos-pmap--pick .ethos-pmap__map { height: 380px; min-height: 0; cursor: crosshair; }

.ethos-pmap__hint {
	position: absolute;
	left: 0.75rem;
	top: 0.75rem;
	margin: 0;
	padding: 0.4rem 0.6rem;
	font: 0.75rem/1.3 var(--pm-mono);
	color: var(--pm-muted);
	background: color-mix(in srgb, var(--pm-base) 85%, transparent);
	border: 1px solid var(--pm-line);
	pointer-events: none;
	max-width: calc(100% - 1.5rem);
}

/* Detail panel */
.ethos-pmap__panel {
	position: absolute;
	top: 0.75rem;
	left: 0.75rem;
	bottom: 0.75rem;
	width: min(360px, calc(100% - 1.5rem));
	overflow: auto;
	padding: 1.25rem;
	background: var(--pm-base);
	color: var(--pm-ink);
	border: 1px solid var(--pm-line);
	box-shadow: 0 12px 40px rgb(0 0 0 / 0.35);
	z-index: 3;
}

.ethos-pmap__close {
	position: absolute;
	top: 0.5rem;
	right: 0.5rem;
	width: 2rem;
	height: 2rem;
	font-size: 1.4rem;
	line-height: 1;
	color: var(--pm-ink);
	background: none;
	border: 1px solid var(--pm-line);
	cursor: pointer;
}

.ethos-pmap__photo { width: calc(100% + 2.5rem); margin: -1.25rem -1.25rem 1rem; aspect-ratio: 16 / 10; object-fit: cover; display: block; }
.ethos-pmap__eyebrow { font: 500 0.72rem/1.3 var(--pm-mono); letter-spacing: 0.06em; text-transform: uppercase; color: var(--pm-accent); margin: 0 2.5rem 0.4rem 0; }
.ethos-pmap__title { font-size: 1.5rem; line-height: 1.15; margin: 0 0 0.6rem; }
.ethos-pmap__summary { color: var(--pm-muted); font-size: 0.95rem; margin: 0 0 1rem; }
.ethos-pmap__facts { margin: 0 0 1rem; display: grid; gap: 0.35rem; }
.ethos-pmap__facts div { display: flex; justify-content: space-between; gap: 1rem; border-bottom: 1px solid var(--pm-line); padding-bottom: 0.35rem; }
.ethos-pmap__facts dt { color: var(--pm-muted); font: 0.8rem/1.4 var(--pm-mono); }
.ethos-pmap__facts dd { margin: 0; text-align: right; }
.ethos-pmap__source { font: 0.75rem/1.4 var(--pm-mono); color: var(--pm-muted); }
.ethos-pmap__ctas { display: flex; flex-wrap: wrap; gap: 0.5rem; margin: 0; }

.ethos-pmap__cta,
.ethos-pfacts__cta {
	display: inline-block;
	font: 500 0.8rem/1 var(--pm-mono, ui-monospace, monospace);
	letter-spacing: 0.03em;
	padding: 0.7rem 0.9rem;
	background: var(--wp--preset--color--accent, #199e70);
	/* The page background reads on the accent in both modes: light green in dark mode, deep green in light. */
	color: var(--wp--preset--color--base, #0a0b0a);
	border: 1px solid var(--wp--preset--color--accent, #199e70);
	text-decoration: none;
	cursor: pointer;
}
.ethos-pmap__cta--ghost,
.ethos-pfacts__cta--ghost { background: none; color: var(--wp--preset--color--ink, #f2f2ee); border-color: var(--wp--preset--color--line, #262a26); }
.ethos-pmap__cta:hover,
.ethos-pfacts__cta:hover { transform: translateY(-1px); }

/* Photo cards, shown when zoomed in */
.ethos-pcard {
	display: flex;
	flex-direction: column;
	width: 160px;
	padding: 0;
	text-align: left;
	color: var(--pm-ink);
	background: var(--pm-base);
	border: 1px solid var(--pm-line);
	border-top: 3px solid #199e70;
	box-shadow: 0 8px 24px rgb(0 0 0 / 0.3);
	cursor: pointer;
	font: inherit;
}
.ethos-pcard--plot { border-top-color: #d95926; }
.ethos-pcard--sale,
.ethos-pcard--rent { border-top-color: #3987e5; }
.ethos-pcard:hover,
.ethos-pcard:focus-visible { outline: 2px solid var(--pm-accent); outline-offset: 1px; z-index: 2; }

.ethos-pcard__media { display: block; aspect-ratio: 16 / 9; background: var(--pm-surface); overflow: hidden; }
.ethos-pcard__media img { width: 100%; height: 100%; object-fit: cover; display: block; }
.ethos-pcard__placeholder {
	box-sizing: border-box;
	display: flex;
	align-items: flex-end;
	height: 100%;
	padding: 0.5rem;
	font: 500 0.68rem/1.2 var(--pm-mono);
	letter-spacing: 0.04em;
	text-transform: uppercase;
	color: var(--pm-muted);
	background-image: repeating-linear-gradient(135deg, transparent 0 7px, var(--pm-line) 7px 8px);
}
.ethos-pcard__body { display: grid; gap: 0.15rem; padding: 0.5rem 0.6rem 0.6rem; }
.ethos-pcard__title { font-weight: 600; font-size: 0.9rem; line-height: 1.2; }
.ethos-pcard__meta,
.ethos-pcard__dev { font: 0.7rem/1.3 var(--pm-mono); color: var(--pm-muted); }

/* District chips at island zoom */
.ethos-pdistrict {
	display: grid;
	gap: 0.1rem;
	padding: 0.45rem 0.6rem;
	text-align: left;
	color: var(--pm-ink);
	background: color-mix(in srgb, var(--pm-base) 92%, transparent);
	border: 1px solid var(--pm-line);
	border-left: 3px solid var(--pm-accent);
	cursor: pointer;
	font: inherit;
}
.ethos-pdistrict__name { font-weight: 600; font-size: 0.85rem; }
.ethos-pdistrict__value,
.ethos-pdistrict__change { font: 0.7rem/1.3 var(--pm-mono); color: var(--pm-muted); }

/* Property and developer pages */
.ethos-pfacts { margin-block: 1.5rem; }
.ethos-pfacts__list { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 0; margin: 0 0 1.5rem; border-top: 1px solid var(--wp--preset--color--line, #262a26); }
.ethos-pfacts__list div { padding: 0.75rem 0.5rem 0.75rem 0; border-bottom: 1px solid var(--wp--preset--color--line, #262a26); }
.ethos-pfacts__list dt { font: 0.75rem/1.3 var(--wp--preset--font-family--mono, monospace); color: var(--wp--preset--color--muted, #a9aba3); text-transform: uppercase; letter-spacing: 0.05em; }
.ethos-pfacts__list dd { margin: 0.2rem 0 0; font-size: 1.05rem; }
.ethos-pfacts__gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 0.5rem; margin-bottom: 1.5rem; }
.ethos-pfacts__gallery img { width: 100%; height: auto; aspect-ratio: 4 / 3; object-fit: cover; }
.ethos-pfacts__ctas { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.ethos-pfacts__note,
.ethos-pdev__note { font-size: 0.9rem; color: var(--wp--preset--color--muted, #a9aba3); }
.ethos-pdev__list { padding-left: 1.1rem; }
.ethos-pdev__list li { margin-bottom: 0.4rem; }
.ethos-pdev__list span { color: var(--wp--preset--color--muted, #a9aba3); font-size: 0.9rem; }

/* Submission form */
.ethos-psubmit fieldset { border: 1px solid var(--wp--preset--color--line, #262a26); padding: 1rem; margin: 0 0 1.25rem; }
.ethos-psubmit legend { font: 500 0.8rem/1 var(--wp--preset--font-family--mono, monospace); text-transform: uppercase; letter-spacing: 0.05em; padding: 0 0.4rem; }
.ethos-psubmit__kinds { display: flex; flex-wrap: wrap; gap: 0.5rem 1.25rem; }
.ethos-psubmit__grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 0.9rem 1rem; margin-bottom: 1.25rem; }
.ethos-psubmit__grid label { display: grid; gap: 0.3rem; font-size: 0.85rem; color: var(--wp--preset--color--muted, #a9aba3); }
.ethos-psubmit__wide { grid-column: 1 / -1; }
.ethos-psubmit input[type=text],
.ethos-psubmit input[type=url],
.ethos-psubmit input[type=email],
.ethos-psubmit input[type=tel],
.ethos-psubmit select,
.ethos-psubmit textarea {
	font: inherit;
	color: var(--wp--preset--color--ink, #f2f2ee);
	background: var(--wp--preset--color--surface, #151815);
	border: 1px solid var(--wp--preset--color--line, #262a26);
	padding: 0.6rem 0.7rem;
	width: 100%;
	box-sizing: border-box;
}
.ethos-psubmit__check { display: flex; gap: 0.6rem; align-items: flex-start; margin-bottom: 0.75rem; font-size: 0.9rem; }
.ethos-psubmit__help,
.ethos-psubmit__picked { font-size: 0.85rem; color: var(--wp--preset--color--muted, #a9aba3); }
.ethos-psubmit__msg { font-weight: 600; }
.ethos-psubmit__hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.ethos-psubmit [hidden] { display: none; }

@media (max-width: 640px) {
	.ethos-pmap__status { margin-left: 0; }
	.ethos-pmap__panel { top: auto; left: 0.5rem; right: 0.5rem; bottom: 0.5rem; width: auto; max-height: 70%; }
	.ethos-pcard { width: 148px; }
}
