﻿/* Glenwood Cemetery map. The drawing keeps its own colors. Chrome uses the site gold and ink. */

.scm-stage {
	position: relative;
	overflow: hidden;
	background: #d7e3cf;
	color: #1c1b21;
	font-family: inherit;
}

.scm-canvas {
	position: absolute;
	inset: 0;
	overflow: hidden;
	touch-action: none;
	overscroll-behavior: contain;
	-webkit-tap-highlight-color: transparent;
	-webkit-touch-callout: none;
}

/* The script sizes this wrapper a little larger than the stage and moves it with a GPU transform while panning. */
.scm-layer {
	position: absolute;
	inset: 0;
	will-change: transform;
}

#scm-map {
	display: block;
	width: 100%;
	height: 100%;
	background: #d7e3cf;
	touch-action: none;
	user-select: none;
	-webkit-user-select: none;
	-webkit-tap-highlight-color: transparent;
}

#scm-map #gullies,
#scm-map #roads,
#scm-map #road-islands,
#scm-map #section-labels,
#scm-map #compass,
#scm-map #map-key,
#scm-map #visitor-note {
	pointer-events: none;
}

#scm-map #historic-lots g[data-lot],
#scm-map #bridges g[data-bridge-id],
#scm-map #bridges #western-bridge,
#scm-map #bridges #eastern-bridge,
#scm-map #bridges #iron-bridge,
#scm-map #gates g[data-gate-id] {
	cursor: pointer;
	pointer-events: auto;
}

#scm-map #bridges g[data-bridge-id]:hover,
#scm-map #bridges #western-bridge:hover,
#scm-map #bridges #eastern-bridge:hover,
#scm-map #bridges #iron-bridge:hover,
#scm-map #gates g[data-gate-id]:hover,
#scm-map #bridges g[data-bridge-id]:focus-visible,
#scm-map #gates g[data-gate-id]:focus-visible,
#scm-map #bridges g.scm-landmark-selected,
#scm-map #gates g.scm-landmark-selected {
	filter: drop-shadow(0 0 5px rgba(87, 40, 125, 0.85));
}

#scm-map #bridges g[data-bridge-id]:focus,
#scm-map #gates g[data-gate-id]:focus {
	outline: none;
}

#scm-map #historic-lots g[data-lot]:hover > path {
	stroke: #1c1b21;
	stroke-width: 0.45;
}

#scm-map #historic-lots g[data-lot].scm-has-info > path {
	fill: #ffc955;
	stroke: #8a5a00;
	stroke-width: 0.55;
}

#scm-map #historic-lots g[data-lot].scm-has-info > text {
	fill: #1c1b21;
	font-weight: 700;
}

#scm-map #historic-lots g[data-lot].scm-draft > path {
	fill: #f3e2b0;
	stroke: #8a5a00;
}

#scm-map #historic-lots g[data-lot].scm-selected > path {
	fill: #ffb020;
	stroke: #1c1b21;
	stroke-width: 0.85;
}

.scm-toolbar {
	position: absolute;
	z-index: 3;
	top: 12px;
	left: 12px;
	right: 12px;
	display: flex;
	gap: 8px;
	align-items: flex-start;
	pointer-events: none;
}

.scm-toolbar > * {
	pointer-events: auto;
}

.scm-brand,
.scm-hint {
	margin: 0;
	background: rgba(255, 255, 255, 0.94);
	border-radius: 8px;
	padding: 10px 12px;
	font-size: 13px;
	line-height: 20px;
	box-shadow: 0 4px 16px rgba(28, 27, 33, 0.08);
}

.scm-brand {
	font-weight: 700;
	letter-spacing: 0.01em;
}

.scm-hint {
	color: #3d4a40;
	margin-left: 12px;
}

.scm-search {
	position: relative;
	flex: 1 1 240px;
	max-width: 360px;
}

.scm-search input,
.scm-controls button {
	height: 40px;
	border: 0;
	border-radius: 8px;
	background: #fff;
	box-shadow: 0 4px 16px rgba(28, 27, 33, 0.12);
	font: inherit;
	color: #1c1b21;
}

.scm-search input {
	box-sizing: border-box;
	width: 100%;
	max-width: 100%;
	min-width: 0;
	padding: 0 12px;
}

.scm-controls {
	display: flex;
	gap: 6px;
	margin-left: auto;
}

.scm-controls button {
	padding: 0 12px;
	cursor: pointer;
	min-width: 40px;
}

.scm-controls .scm-ctrl-icon {
	display: none;
}

.scm-sidebar-head {
	display: block;
}

.scm-sheet-close {
	display: none;
}

.scm-sheet-backdrop {
	display: none;
}

.scm-controls button:hover,
.scm-search input:focus,
.scm-controls button:focus-visible,
.scm-panel a:focus-visible,
.scm-close:focus-visible,
.scm-results button:focus-visible {
	outline: 2px solid #1c1b21;
	outline-offset: 2px;
}

.scm-results {
	position: absolute;
	z-index: 5;
	top: calc(100% + 4px);
	left: 0;
	right: 0;
	margin: 0;
	padding: 4px;
	list-style: none;
	background: #fff;
	border-radius: 8px;
	box-shadow: 0 8px 24px rgba(28, 27, 33, 0.16);
	max-height: 280px;
	overflow: auto;
}

.scm-results button {
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	gap: 2px;
	width: 100%;
	text-align: left;
	background: transparent;
	border: 0;
	border-radius: 6px;
	padding: 8px;
	cursor: pointer;
	font: inherit;
	color: inherit;
}

.scm-results button[aria-selected="true"],
.scm-results button:hover {
	background: #f6f1e4;
}

.scm-results small {
	color: #5c6758;
}

.scm-results .scm-more {
	margin: 0;
	padding: 8px;
	color: #5c6758;
	font-size: 12px;
}

.scm-tooltip {
	position: absolute;
	z-index: 4;
	pointer-events: none;
	background: #1c1b21;
	color: #fff;
	font-size: 12px;
	line-height: 1.3;
	padding: 4px 8px;
	border-radius: 6px;
	white-space: nowrap;
}

.scm-panel {
	position: absolute;
	z-index: 4;
	top: 64px;
	right: 12px;
	width: min(320px, calc(100% - 24px));
	padding: 18px 18px 16px;
	background: #ffffff;
	color: #1c1b21;
	border: 1px solid rgba(0, 0, 0, 0.08);
	border-radius: 12px;
	box-shadow: 0 12px 32px rgba(28, 27, 33, 0.16);
}

.scm-panel h2 {
	margin: 0 0 8px;
	font-size: 22px !important;
	line-height: 1.25;
	color: #1c1b21 !important;
	font-family: inherit;
}

/* Large centered photo popup for bridges and gates. */
.scm-lightbox {
	position: fixed;
	inset: 0;
	z-index: 100001;
	display: flex;
	align-items: center;
	justify-content: center;
	--scm-pad: 24px;
	padding: var(--scm-pad);
	animation: scm-fade-in 0.18s ease-out;
}

.scm-lightbox[hidden] {
	display: none;
}

.scm-lightbox-backdrop {
	position: absolute;
	inset: 0;
	background: rgba(28, 27, 33, 0.78);
	cursor: zoom-out;
}

/* Photo left, details right. Dialog height follows the text; the photo fills that height edge to edge. */
.scm-lightbox-dialog {
	position: relative;
	display: grid;
	grid-template-columns: minmax(0, 1.35fr) minmax(240px, 300px);
	align-items: stretch;
	width: min(760px, 100%);
	min-height: 280px;
	max-height: calc(100vh - var(--scm-pad) * 2);
	max-height: calc(100dvh - var(--scm-pad) * 2);
	background: #ffffff;
	border-radius: 14px;
	overflow: hidden;
	box-shadow: 0 24px 80px rgba(0, 0, 0, 0.45);
}

.scm-lightbox-photo {
	position: relative;
	min-width: 0;
	min-height: 0;
	overflow: hidden;
	background: #1a1a20;
}

/* Beat the theme's "#theme-page img { height: auto; max-width: 100% }". Cover fills the column end to end. */
#theme-page .scm-lightbox-photo img,
.scm-lightbox-photo img {
	position: absolute;
	inset: 0;
	display: block;
	width: 100% !important;
	height: 100% !important;
	max-width: none !important;
	max-height: none !important;
	object-fit: cover !important;
	object-position: center;
	vertical-align: middle;
	transition: opacity 0.2s ease;
}

.scm-lightbox-loading .scm-lightbox-photo img {
	opacity: 0;
}

.scm-lightbox-loading .scm-lightbox-photo::after {
	content: "Loading photo\2026";
	position: absolute;
	inset: 0;
	display: flex;
	align-items: center;
	justify-content: center;
	color: #d9d9de;
	font-size: 14px;
}

.scm-lightbox-caption {
	display: flex;
	flex-direction: column;
	justify-content: flex-start;
	gap: 10px;
	min-width: 0;
	padding: 28px 26px 26px;
	background: #ffffff;
}

.scm-lightbox-kicker {
	margin: 0;
	color: #57287D !important;
	font-size: 12px;
	font-weight: 700;
	letter-spacing: 0.03em;
	text-transform: uppercase;
}

.scm-lightbox-title {
	margin: 0;
	font-family: inherit;
	font-size: 28px !important;
	line-height: 1.15;
	color: #1c1b21 !important;
}

.scm-lightbox-note {
	margin: 0;
	color: #4a4a50 !important;
	font-size: 15px;
	line-height: 1.5;
}

.scm-lightbox-open {
	display: inline-flex;
	align-self: flex-start;
	align-items: center;
	gap: 6px;
	margin-top: auto;
	padding: 10px 16px;
	border-radius: 999px;
	background: #57287d;
	color: #fff !important;
	font-size: 13px;
	font-weight: 600;
	line-height: 1.2;
	text-decoration: none !important;
}

.scm-lightbox-open[hidden] {
	display: none !important;
}

.scm-lightbox-open:hover {
	background: #44206a;
}

.scm-lightbox-open:focus-visible {
	outline: 3px solid #ffc955;
	outline-offset: 2px;
}

.scm-lightbox-close {
	position: absolute;
	top: 10px;
	right: 10px;
	z-index: 2;
	width: 40px;
	height: 40px;
	border: 0;
	border-radius: 50%;
	background: rgba(28, 27, 33, 0.72);
	color: #ffffff;
	font-size: 26px;
	line-height: 1;
	cursor: pointer;
}

.scm-lightbox-close:hover {
	background: #57287D;
}

.scm-lightbox-close:focus-visible {
	outline: 3px solid #ffc955;
	outline-offset: 2px;
}

@keyframes scm-fade-in {
	from {
		opacity: 0;
	}

	to {
		opacity: 1;
	}
}

@media (prefers-reduced-motion: reduce) {
	.scm-lightbox {
		animation: none;
	}

	.scm-lightbox-photo img {
		transition: none;
	}
}

@media (max-width: 720px) {
	.scm-lightbox {
		--scm-pad: 10px;
	}

	.scm-lightbox-dialog {
		grid-template-columns: 1fr;
		grid-template-rows: minmax(200px, 42vh) auto;
		width: min(520px, 100%);
		min-height: 0;
	}

	.scm-lightbox-caption {
		padding: 18px 18px 20px;
	}

	.scm-lightbox-title {
		font-size: 22px !important;
	}

	.scm-lightbox-close {
		background: rgba(28, 27, 33, 0.8);
	}
}

.scm-kicker {
	margin: 0 28px 8px 0;
	color: #57287D !important;
	font-size: 13px;
	font-weight: 700;
	letter-spacing: 0.02em;
}

.scm-note {
	margin: 0 0 14px;
	color: #4a4a50 !important;
	font-size: 14px;
	line-height: 1.45;
}

.scm-open {
	display: inline-block;
	background: #57287D;
	color: #ffffff !important;
	text-decoration: none;
	font-weight: 700;
	border-radius: 8px;
	padding: 10px 14px;
	transition: background 0.15s ease;
}

.scm-open:hover {
	background: #6e339e;
	color: #ffffff !important;
}

.scm-close {
	position: absolute;
	top: 8px;
	right: 8px;
	width: 32px;
	height: 32px;
	border: 0;
	border-radius: 8px;
	background: transparent;
	color: #646970;
	font-size: 22px;
	line-height: 1;
	cursor: pointer;
}

.scm-close:hover {
	background: #f0f0f1;
	color: #1c1b21;
}

.scm-missing {
	position: relative;
	z-index: 2;
	margin: 16px;
	padding: 12px;
	background: #fff;
}

.scm-backlink {
	margin: 28px auto;
	max-width: 760px;
	padding: 14px 16px;
	background: #1c1b21;
	border-radius: 8px;
}

.scm-backlink a {
	color: #ffc955;
	font-weight: 700;
	text-decoration: none;
}

.scm-backlink a:hover {
	text-decoration: underline;
}

body.scm-map-page {
	background: #d7e3cf;
}

body.scm-map-page #pacz-boxed-layout,
body.scm-map-page .theme-main-wrapper,
body.scm-map-page #theme-page {
	max-width: none !important;
	width: 100% !important;
	padding: 0 !important;
	margin: 0 !important;
	background: #d7e3cf;
}

body.scm-map-page #pacz-footer,
body.scm-map-page #sub-footer,
body.scm-map-page #colophon,
body.scm-map-page .goto-top-btn,
body.scm-map-page #pacz-page-title {
	display: none !important;
}

body.scm-map-page .scm-stage {
	width: 100%;
	height: calc(100vh - 90px);
	min-height: 480px;
}

body.scm-fullscreen-open {
	overflow: hidden;
	overscroll-behavior: none;
}

body.scm-fullscreen-open #masthead,
body.scm-fullscreen-open #pacz-header,
body.scm-fullscreen-open .sticky-header-padding,
body.scm-fullscreen-open #pacz-page-title,
body.scm-fullscreen-open #pacz-footer,
body.scm-fullscreen-open #sub-footer,
body.scm-fullscreen-open #colophon,
body.scm-fullscreen-open .elementor-location-header,
body.scm-fullscreen-open .elementor-location-footer,
body.scm-fullscreen-open #wpadminbar,
body.scm-fullscreen-open .goto-top-btn,
body.scm-fullscreen-open .pacz-go-top {
	display: none !important;
}

html.scm-fullscreen-open {
	margin-top: 0 !important;
	overflow: hidden;
	overscroll-behavior: none;
}

/* Pinned to all four edges, so it always matches what is visible, even as a phone's address bar slides. */
.scm-stage.scm-fullscreen {
	position: fixed !important;
	inset: 0 !important;
	width: auto !important;
	height: auto !important;
	min-height: 0 !important;
	max-height: none !important;
	z-index: 100000;
	margin: 0 !important;
}



/* ── Notable People sidebar ─────────────────────────────────────────── */

.scm-layout {
	display: grid;
	grid-template-columns: 280px minmax(0, 1fr);
	height: calc(100vh - 90px);
	min-height: 480px;
}

.scm-sidebar {
	padding: 20px 16px;
	border-right: 1px solid #c3c4c7;
	overflow: auto;
	background: #f0f4ec;
}

.scm-sidebar h2 {
	margin: 0 0 4px;
	font-size: 22px;
	font-family: inherit;
	color: #1c1b21;
}

.scm-sidebar .scm-sidebar-subtitle {
	font-size: 12px;
	color: #5c6758;
	margin: 0 0 16px;
}

.scm-sidebar .scm-section-title {
	font-size: 11px;
	text-transform: uppercase;
	letter-spacing: 1.4px;
	font-weight: 650;
	margin: 20px 0 10px;
	color: #3d4a40;
}

.scm-person-list {
	display: grid;
	gap: 4px;
}

.scm-person {
	display: flex;
	align-items: center;
	text-align: left;
	gap: 10px;
	border: 1px solid transparent;
	background: transparent;
	padding: 8px 7px;
	width: 100%;
	line-height: 1.3;
	border-radius: 7px;
	cursor: pointer;
	font: inherit;
	color: #1c1b21;
}

.scm-person:hover {
	background: #e0e8d7;
	border-color: #c4d1b9;
}

.scm-person.scm-person-active {
	background: #e0e8d7;
	border-color: #c4d1b9;
}

.scm-person .scm-person-number {
	border: 1px solid #c6d1bd;
	border-radius: 50%;
	width: 28px;
	height: 28px;
	flex: 0 0 28px;
	display: grid;
	place-items: center;
	font-size: 11px;
	font-weight: 650;
	color: #8a5a00;
	background: #fff;
}

.scm-person .scm-person-name {
	font-size: 14px;
	font-weight: 600;
}

.scm-person .scm-person-caption {
	display: block;
	font-size: 11px;
	color: #5c6758;
	margin-top: 2px;
	font-weight: 400;
}

.scm-hint-landmarks {
	background: #fcf8e3 !important;
	border: 1px solid #faebcc;
	color: #6c5418 !important;
	font-size: 12px !important;
	line-height: 1.45 !important;
	margin-top: 8px !important;
}

.scm-person .scm-landmark-badge {
	background: #57287D !important;
	color: #ffffff !important;
	border-color: #57287D !important;
}

.scm-sidebar-toggle {
	display: none;
}

.scm-sidebar-empty {
	padding: 14px;
	border: 1px dashed #bbc8ae;
	border-radius: 8px;
	margin: 10px 0;
	font-size: 13px;
	color: #5c6758;
}

.scm-fullscreen .scm-sidebar,
body.scm-fullscreen-open .scm-sidebar,
body.scm-fullscreen-open .scm-sidebar-toggle,
body.scm-fullscreen-open .scm-sheet-backdrop {
	display: none !important;
}

/* ── Mobile layout ─────────────────────────────────────────────────────
   Chrome bar above the map (search + controls). Map fills the rest.
   Notable People opens as a bottom sheet over a dimmed backdrop. */
@media (max-width: 720px) {
	body.scm-map-page #theme-page {
		padding: 0 !important;
	}

	body.scm-map-page .scm-layout {
		display: flex;
		flex-direction: column;
		grid-template-columns: none;
		height: calc(100dvh - 56px);
		height: calc(100vh - 56px);
		min-height: 0;
		max-height: calc(100dvh - 56px);
		overflow: hidden;
		background: #d7e3cf;
	}

	body.scm-map-page .scm-layout .scm-stage,
	body.scm-map-page .scm-stage {
		position: relative;
		display: flex;
		flex-direction: column;
		flex: 1 1 auto;
		width: 100%;
		height: auto !important;
		min-height: 0 !important;
		max-height: none !important;
		overflow: hidden;
	}

	/* Solid chrome above the map — not floating on top of the drawing. */
	.scm-toolbar {
		position: relative;
		inset: auto;
		z-index: 4;
		top: auto;
		left: auto;
		right: auto;
		flex: 0 0 auto;
		flex-wrap: wrap;
		align-items: stretch;
		gap: 8px;
		padding: 10px;
		background: #f4f7f0;
		border-bottom: 1px solid #c9d3c0;
		box-shadow: none;
		pointer-events: auto;
	}

	.scm-brand,
	.scm-hint {
		display: none !important;
	}

	/* Row 1: search full width. Row 2: map controls. */
	.scm-search {
		flex: 1 1 100%;
		max-width: none;
		min-width: 0;
		order: 1;
	}

	.scm-search input,
	.scm-controls button {
		height: 42px;
		border-radius: 10px;
		box-shadow: none;
		border: 1px solid #c3cbb8;
		background: #ffffff;
	}

	.scm-search input {
		box-sizing: border-box;
		width: 100% !important;
		max-width: 100% !important;
		padding: 0 14px;
		font-size: 15px;
	}

	.scm-controls button {
		box-sizing: border-box;
	}

	.scm-controls {
		flex: 1 1 100%;
		order: 2;
		gap: 6px;
		margin-left: 0;
		justify-content: space-between;
	}

	.scm-controls button {
		flex: 1 1 0;
		min-width: 0;
		padding: 0 8px;
		font-weight: 700;
	}

	.scm-controls .scm-ctrl-label {
		display: none;
	}

	.scm-controls .scm-ctrl-icon {
		display: inline;
		font-size: 16px;
		line-height: 1;
	}

	.scm-sidebar-toggle {
		display: block;
		flex: 1.6 1 0 !important;
		text-align: center;
		min-width: 0;
		padding: 0 6px !important;
		background: #57287d !important;
		color: #fff !important;
		border-color: #57287d !important;
		font-size: 12px !important;
		font-weight: 700;
		white-space: nowrap;
		overflow: hidden;
		text-overflow: ellipsis;
	}

	.scm-sidebar-toggle[aria-expanded="true"] {
		background: #1c1b21 !important;
		border-color: #1c1b21 !important;
	}

	.scm-results {
		box-sizing: border-box;
		left: 0;
		right: 0;
		width: auto;
		max-width: 100%;
		max-height: 40vh;
		overflow-x: hidden;
	}

	/* Map canvas fills everything under the chrome. */
	.scm-canvas {
		position: relative;
		flex: 1 1 auto;
		inset: auto;
		width: 100%;
		min-height: 0;
	}

	.scm-panel {
		left: 10px;
		right: 10px;
		top: auto;
		bottom: 12px;
		width: auto;
		max-width: none;
	}

	/* Bottom sheet for Notable People. */
	.scm-sheet-backdrop {
		display: block;
		position: fixed;
		inset: 0;
		z-index: 20;
		background: rgba(28, 27, 33, 0.45);
	}

	.scm-sheet-backdrop[hidden] {
		display: none !important;
	}

	.scm-sidebar {
		display: flex;
		flex-direction: column;
		position: fixed;
		left: 0;
		right: 0;
		bottom: 0;
		z-index: 21;
		width: 100%;
		max-height: min(78dvh, 640px);
		padding: 0 0 env(safe-area-inset-bottom, 0);
		border: 0;
		border-radius: 18px 18px 0 0;
		background: #f7faf3;
		box-shadow: 0 -12px 40px rgba(28, 27, 33, 0.22);
		transform: translateY(105%);
		transition: transform 0.22s ease;
		overflow: hidden;
		pointer-events: none;
	}

	.scm-sidebar.scm-sidebar-open {
		transform: translateY(0);
		pointer-events: auto;
	}

	.scm-sidebar-head {
		display: flex;
		align-items: flex-start;
		justify-content: space-between;
		gap: 12px;
		flex: 0 0 auto;
		padding: 16px 16px 8px;
		border-bottom: 1px solid #d5decc;
	}

	.scm-sidebar-head h2 {
		margin: 0 0 2px;
		font-size: 18px;
	}

	.scm-sidebar-head .scm-sidebar-subtitle {
		margin: 0;
	}

	.scm-sheet-close {
		display: grid;
		place-items: center;
		flex: 0 0 36px;
		width: 36px;
		height: 36px;
		margin: 0;
		border: 0;
		border-radius: 50%;
		background: #e4ebdc;
		color: #1c1b21;
		font-size: 22px;
		line-height: 1;
		cursor: pointer;
	}

	.scm-sidebar > .scm-hint,
	.scm-sidebar > .scm-hint-landmarks,
	.scm-sidebar > .scm-section-title,
	.scm-sidebar > .scm-person-list,
	.scm-sidebar > .scm-sidebar-empty {
		padding-left: 16px;
		padding-right: 16px;
	}

	.scm-sidebar > .scm-hint,
	.scm-sidebar > .scm-hint-landmarks {
		margin: 10px 16px 0 !important;
	}

	.scm-sidebar {
		overflow: hidden;
	}

	.scm-sidebar.scm-sidebar-open {
		overflow: auto;
	}

	body.scm-sheet-open {
		overflow: hidden;
	}
}

.scm-layout .scm-stage {
	height: 100%;
	min-height: 480px;
}

body.scm-map-page .scm-layout .scm-stage {
	height: 100%;
}

/* Match the site font on the drawing's own labels too. */
#scm-map text,
#scm-map tspan {
	font-family: inherit;
}
