/* Scene Hounds Maps */
:root {
	--sh-ink: var(--wp--preset--color--contrast, #15171c);
	--sh-paper: var(--wp--preset--color--base, #faf8f4);
	--sh-muted: #6b6f78;
	--sh-line: rgba(21, 23, 28, 0.1);
	--sh-card: #ffffff;
	--sh-radius: 18px;
	--sh-shadow: 0 1px 2px rgba(21, 23, 28, .06), 0 8px 24px rgba(21, 23, 28, .06);
	--sh-confirmed: #16a34a;
	--sh-probable: #f59e0b;
	--sh-speculative: #94a3b8;
	--sh-accent: #e39b2d;
}

.sh-c-confirmed { --c: var(--sh-confirmed); }
.sh-c-probable { --c: var(--sh-probable); }
.sh-c-speculative { --c: var(--sh-speculative); }

/* ---------- Franchise cards ---------- */
.sh-franchises {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
	gap: 20px;
}
.sh-card {
	position: relative;
	display: flex;
	flex-direction: column;
	min-height: 210px;
	padding: 22px;
	border-radius: var(--sh-radius);
	background: var(--sh-card);
	border: 1px solid var(--sh-line);
	box-shadow: var(--sh-shadow);
	color: var(--sh-ink);
	text-decoration: none;
	overflow: hidden;
	transition: transform .18s ease, box-shadow .18s ease;
}
.sh-card::before {
	content: "";
	position: absolute;
	inset: 0 0 auto 0;
	height: 6px;
	background: var(--sh-accent);
}
a.sh-card:hover, a.sh-card:focus-visible {
	transform: translateY(-3px);
	box-shadow: 0 2px 4px rgba(21, 23, 28, .06), 0 18px 40px rgba(21, 23, 28, .12);
}
.sh-card-art {
	display: grid;
	place-items: center;
	width: 44px;
	height: 44px;
	border-radius: 12px;
	background: color-mix(in srgb, var(--sh-accent) 14%, white);
	margin-bottom: auto;
}
.sh-card-art svg { width: 24px; height: 24px; fill: var(--sh-accent); }
.sh-card-body { display: flex; flex-direction: column; gap: 4px; margin-top: 28px; }
.sh-card-meta { font-size: .78rem; letter-spacing: .08em; text-transform: uppercase; color: var(--sh-muted); font-weight: 600; }
.sh-card-title { font-size: 1.35rem; font-weight: 700; line-height: 1.2; }
.sh-card-stats { font-size: .92rem; color: var(--sh-muted); }
.sh-card-cta { margin-top: 10px; font-size: .95rem; font-weight: 700; color: var(--sh-ink); }
.sh-card.is-soon { box-shadow: none; background: transparent; border-style: dashed; }
.sh-card.is-soon .sh-card-art { filter: grayscale(.6); opacity: .7; }
.sh-card.is-soon .sh-card-title { color: color-mix(in srgb, var(--sh-ink) 70%, transparent); }

/* ---------- Franchise header ---------- */
.sh-crumbs { font-size: .9rem; color: var(--sh-muted); margin-bottom: 18px; }
.sh-crumbs a { color: inherit; text-decoration: none; }
.sh-crumbs a:hover { color: var(--sh-ink); text-decoration: underline; }
.sh-eyebrow { margin: 0 0 6px; font-size: .8rem; letter-spacing: .1em; text-transform: uppercase; font-weight: 700; color: var(--sh-accent); }
.sh-fheader { margin-bottom: 28px; }
.sh-fheader-title, .sh-loc-title { margin: 0; font-size: clamp(2rem, 4.5vw, 3.4rem); line-height: 1.05; letter-spacing: -.02em; }
.sh-fheader-desc { max-width: 60ch; color: color-mix(in srgb, var(--sh-ink) 80%, transparent); font-size: 1.1rem; }
.sh-stats { display: flex; gap: 22px; padding: 0; margin: 18px 0 0; list-style: none; color: var(--sh-muted); }
.sh-stats strong { color: var(--sh-ink); font-size: 1.4rem; margin-right: 4px; }
.sh-kids { margin: 16px 0 0; display: flex; flex-wrap: wrap; gap: 8px; }
.sh-pill { display: inline-block; padding: 6px 14px; border-radius: 999px; border: 1px solid var(--sh-line); text-decoration: none; color: var(--sh-ink); font-size: .9rem; background: var(--sh-card); }
.sh-pill:hover { border-color: var(--sh-ink); }

/* ---------- Map app ---------- */
.sh-map-app { display: flex; flex-direction: column; gap: 14px; }
.sh-map-toolbar { display: flex; flex-wrap: wrap; align-items: flex-start; justify-content: space-between; gap: 12px; }
.sh-chips { display: flex; flex-direction: column; gap: 8px; }
.sh-chip-row { display: flex; flex-wrap: wrap; gap: 8px; }
.sh-chip {
	appearance: none;
	font: inherit;
	font-size: .92rem;
	font-weight: 600;
	padding: 8px 16px;
	border-radius: 999px;
	border: 1px solid var(--sh-line);
	background: var(--sh-card);
	color: var(--sh-ink);
	cursor: pointer;
	transition: background .15s, color .15s, border-color .15s;
}
.sh-chip:hover { border-color: var(--sh-ink); }
.sh-chip[aria-pressed="true"] { background: var(--sh-ink); color: var(--sh-paper); border-color: var(--sh-ink); }
.sh-search input {
	font: inherit;
	width: min(320px, 100%);
	padding: 10px 16px 10px 40px;
	border-radius: 999px;
	border: 1px solid var(--sh-line);
	background: var(--sh-card) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%236b6f78' stroke-width='2'%3E%3Ccircle cx='11' cy='11' r='7'/%3E%3Cpath d='m20 20-3.5-3.5'/%3E%3C/svg%3E") no-repeat 14px center / 18px;
}
.sh-search input:focus { outline: 2px solid var(--sh-accent); outline-offset: 1px; }
.sh-map-layout {
	display: grid;
	grid-template-columns: minmax(0, 1fr) 340px;
	height: min(72vh, 720px);
	min-height: 460px;
	border-radius: var(--sh-radius);
	overflow: hidden;
	border: 1px solid var(--sh-line);
	box-shadow: var(--sh-shadow);
	background: var(--sh-card);
}
.sh-map { height: 100%; min-height: 300px; z-index: 0; background: #e9e6df; }
.sh-list { overflow-y: auto; border-left: 1px solid var(--sh-line); background: var(--sh-card); }
.sh-list-count { position: sticky; top: 0; margin: 0; padding: 14px 18px; font-size: .85rem; font-weight: 600; color: var(--sh-muted); background: rgba(255, 255, 255, .95); backdrop-filter: blur(6px); border-bottom: 1px solid var(--sh-line); z-index: 1; }
.sh-list-items { list-style: none; margin: 0; padding: 6px 0 12px; }
.sh-list-group { padding: 16px 18px 6px; font-size: .75rem; letter-spacing: .1em; text-transform: uppercase; font-weight: 700; color: var(--sh-muted); }
.sh-item {
	appearance: none;
	display: flex;
	gap: 12px;
	align-items: flex-start;
	width: 100%;
	padding: 10px 18px;
	border: 0;
	background: none;
	font: inherit;
	text-align: left;
	color: var(--sh-ink);
	cursor: pointer;
}
.sh-item:hover, .sh-list li.is-active .sh-item { background: color-mix(in srgb, var(--pin, var(--sh-accent)) 10%, white); }
.sh-item-dot { flex: none; width: 12px; height: 12px; margin-top: 5px; border-radius: 50%; background: var(--pin, var(--sh-accent)); box-shadow: 0 0 0 3px color-mix(in srgb, var(--c, #ccc) 55%, white); }
.sh-item-text { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.sh-item-title { font-weight: 600; line-height: 1.3; }
.sh-item-sub { font-size: .85rem; color: var(--sh-muted); line-height: 1.35; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.sh-list-empty { padding: 18px; color: var(--sh-muted); }

.sh-legend { display: flex; flex-wrap: wrap; gap: 8px 20px; font-size: .85rem; color: var(--sh-muted); }
.sh-legend span { display: inline-flex; align-items: center; gap: 8px; }
.sh-dot { display: inline-block; width: 10px; height: 10px; border-radius: 50%; background: var(--c); }
.sh-area-dot { background: transparent; border: 2px dashed var(--sh-muted); width: 12px; height: 12px; }

/* Pins */
.sh-pin { background: none; border: 0; }
.sh-pin > span {
	position: relative;
	display: block;
	width: 30px;
	height: 30px;
	border-radius: 50% 50% 50% 0;
	transform: rotate(-45deg);
	background: var(--pin);
	border: 2px solid #fff;
	box-shadow: 0 3px 8px rgba(0, 0, 0, .3);
	transition: transform .15s;
}
.sh-pin > span > i {
	position: absolute;
	inset: 8px;
	border-radius: 50%;
	background: #fff;
	box-shadow: inset 0 0 0 3px var(--c, #fff);
}
.sh-pin.is-area > span { background: color-mix(in srgb, var(--pin) 45%, white); border: 2px dashed var(--pin); }
.sh-pin:hover > span, .sh-pin.is-active > span { transform: rotate(-45deg) scale(1.15); }
.sh-cluster { background: none; }
.sh-cluster span {
	display: grid;
	place-items: center;
	width: 38px;
	height: 38px;
	border-radius: 50%;
	background: var(--sh-ink);
	color: #fff;
	font-weight: 700;
	font-size: .9rem;
	border: 3px solid rgba(255, 255, 255, .85);
	box-shadow: 0 0 0 6px rgba(21, 23, 28, .15);
}

/* Popups */
.sh-map-app .leaflet-popup-content-wrapper { border-radius: 14px; box-shadow: 0 10px 30px rgba(0, 0, 0, .18); }
.sh-map-app .leaflet-popup-content { margin: 16px 18px; font-family: inherit; font-size: .92rem; line-height: 1.45; }
.sh-pop h3 { margin: 0 0 6px; font-size: 1.1rem; line-height: 1.25; }
.sh-pop p { margin: 0 0 8px; }
.sh-pop-area { font-size: .72rem !important; letter-spacing: .08em; text-transform: uppercase; color: var(--sh-muted); font-weight: 700; }
.sh-pop-game { color: color-mix(in srgb, var(--sh-ink) 85%, transparent); }
.sh-pop-links { display: flex; justify-content: space-between; gap: 12px; margin: 10px 0 0 !important; padding-top: 10px; border-top: 1px solid var(--sh-line); }
.sh-pop-links a { font-weight: 600; text-decoration: none; }

/* Badges */
.sh-badges, .sh-pop-badges { display: flex; flex-wrap: wrap; gap: 6px; }
.sh-badge { display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px; border-radius: 999px; font-size: .78rem; font-weight: 700; background: color-mix(in srgb, var(--c, #999) 16%, white); color: color-mix(in srgb, var(--c, #555) 70%, black); }
.sh-badge::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--c, transparent); }
.sh-badge-quiet { --c: #d0d3d9; background: #f1f2f4; color: #4b5059; }
.sh-badge-quiet::before { display: none; }

/* ---------- Single location ---------- */
.sh-loc-head { margin-bottom: 26px; }
.sh-loc-head .sh-badges { margin: 14px 0 0; }
.sh-loc-grid { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, .9fr); gap: 40px; align-items: start; }
.sh-facts { margin: 0 0 24px; display: grid; gap: 0; border-top: 1px solid var(--sh-line); }
.sh-facts > div { display: grid; grid-template-columns: 160px 1fr; gap: 16px; padding: 14px 0; border-bottom: 1px solid var(--sh-line); }
.sh-facts dt { font-weight: 700; font-size: .85rem; letter-spacing: .04em; text-transform: uppercase; color: var(--sh-muted); }
.sh-facts dd { margin: 0; }
.sh-loc-content h2 { font-size: 1.35rem; margin: 1.6em 0 .4em; }
.sh-loc-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 28px; }
.sh-btn { display: inline-block; padding: 12px 20px; border-radius: 999px; background: var(--sh-ink); color: var(--sh-paper) !important; text-decoration: none !important; font-weight: 600; }
.sh-btn-ghost { background: transparent; color: var(--sh-ink) !important; border: 1px solid var(--sh-line); }
.sh-btn:hover { opacity: .88; }
.sh-loc-side { position: sticky; top: 24px; }
.sh-map-app.is-compact .sh-map { height: 420px; border-radius: var(--sh-radius); border: 1px solid var(--sh-line); box-shadow: var(--sh-shadow); overflow: hidden; }
.sh-note { font-size: .85rem; color: var(--sh-muted); margin-top: 12px; }

@media (max-width: 900px) {
	.sh-map-layout { grid-template-columns: 1fr; height: auto; }
	.sh-map { height: 60vh; min-height: 360px; }
	.sh-list { border-left: 0; border-top: 1px solid var(--sh-line); max-height: 60vh; }
	.sh-search, .sh-search input { width: 100%; }
	.sh-loc-grid { grid-template-columns: 1fr; gap: 28px; }
	.sh-loc-side { position: static; order: -1; }
	.sh-map-app.is-compact .sh-map { height: 300px; }
	.sh-facts > div { grid-template-columns: 1fr; gap: 4px; }
}

/* Softer, more modern look for the OSM tiles */
.sh-map .sh-tiles { filter: saturate(.75) contrast(.95) brightness(1.03); }
.sh-map .leaflet-control-attribution { font-size: 11px; background: rgba(255,255,255,.8); }
.sh-map .leaflet-bar a { color: var(--sh-ink); }
