/* Geography map and city passports */

/* The flex rules below outrank the browser's [hidden] rule, so it is restated. */
.lbgeo-toggle[hidden],
.lbgeo-wrap[hidden],
.lbgeo-status[hidden] {
	display: none;
}

/* ── Cards | Map toggle ──────────────────────────────────────────────────── */
.lbgeo-toggle {
	display: inline-flex;
	gap: 0.25rem;
	margin-left: auto;
}

.lbgeo-toggle-btn {
	background: var(--lbfe-card-bg);
	border: 2px solid var(--lbfe-text);
	border-radius: 999px;
	color: var(--lbfe-text);
	cursor: pointer;
	font: inherit;
	font-weight: 700;
	padding: 0.35rem 0.9rem;
}

.lbgeo-toggle-btn.is-active {
	background: var(--lbfe-text);
	color: var(--lbfe-bg);
}

.lbgeo-toggle-btn:focus-visible {
	outline: 3px solid var(--lbfe-yellow);
	outline-offset: 2px;
}

.lbgeo-sr {
	position: absolute;
	clip: rect(0 0 0 0);
	height: 1px;
	overflow: hidden;
	width: 1px;
}

/* ── Toolbar ─────────────────────────────────────────────────────────────── */
.lbgeo-wrap {
	background: var(--lbfe-bg);
	display: flex;
	flex-direction: column;
	gap: 0.75rem;
}

.lbgeo-toolbar {
	display: flex;
	flex-wrap: wrap;
	gap: 0.75rem;
}

.lbgeo-search-wrap {
	position: relative;
	flex: 1 1 260px;
}

.lbgeo-field {
	background: var(--lbfe-card-bg);
	border: 2px solid var(--lbfe-border);
	border-radius: 6px;
	color: var(--lbfe-text);
	font: inherit;
	padding: 0.5rem 0.75rem;
	width: 100%;
}

.lbgeo-field:focus-visible {
	border-color: var(--lbfe-text);
	outline: 3px solid var(--lbfe-yellow);
	outline-offset: 1px;
}

.lbgeo-country {
	flex: 0 1 240px;
}

.lbgeo-results {
	position: absolute;
	left: 0;
	right: 0;
	top: calc(100% + 4px);
	background: var(--lbfe-card-bg);
	border: 2px solid var(--lbfe-text);
	border-radius: 6px;
	list-style: none;
	margin: 0;
	max-height: 320px;
	overflow-y: auto;
	padding: 0.25rem;
	z-index: 5;
}

.lbgeo-result {
	background: none;
	border: 0;
	border-radius: 4px;
	color: var(--lbfe-text);
	cursor: pointer;
	display: block;
	font: inherit;
	padding: 0.45rem 0.6rem;
	text-align: left;
	width: 100%;
}

.lbgeo-result:hover,
.lbgeo-result:focus-visible {
	background: var(--lbfe-yellow);
	color: var(--lbfe-black);
	outline: none;
}

.lbgeo-result span,
.lbgeo-result-empty {
	color: var(--lbfe-muted);
}

.lbgeo-result:hover span,
.lbgeo-result:focus-visible span {
	color: inherit;
}

.lbgeo-result-empty {
	padding: 0.45rem 0.6rem;
}

.lbgeo-note {
	color: var(--lbfe-muted);
	margin: 0;
}

/* ── Map ─────────────────────────────────────────────────────────────────── */
.lbgeo-map {
	position: relative;
	border: 2px solid var(--lbfe-text);
	border-radius: var(--lbfe-radius);
	height: clamp(420px, calc(100vh - var(--lbfe-nav-h) - 220px), 820px);
	overflow: hidden;
	width: 100%;
}

.lbgeo-status {
	position: absolute;
	bottom: 0;
	left: 0;
	right: 0;
	top: 0;
	align-items: center;
	background: var(--lbfe-gate-bg);
	display: flex;
	flex-direction: column;
	gap: 0.75rem;
	justify-content: center;
	padding: 1rem;
	text-align: center;
	z-index: 4;
}

.lbgeo-status p {
	font-weight: 700;
	margin: 0;
}

.lbgeo-status-actions {
	display: flex;
	flex-wrap: wrap;
	gap: 0.5rem;
	justify-content: center;
}

.lbgeo-btn-plain {
	background: var(--lbfe-card-bg);
	border: 2px solid var(--lbfe-text);
	color: var(--lbfe-text);
}

.lbgeo-wrap:fullscreen {
	padding: 1rem;
}

.lbgeo-wrap:fullscreen .lbgeo-map {
	flex: 1;
	height: auto;
}

.lbgeo-reset i {
	font-size: 15px;
}

/* ── Markers ─────────────────────────────────────────────────────────────── */
.lbgeo-marker {
	background: none;
	border: 0;
	cursor: pointer;
	display: block;
	height: 47px;
	padding: 0;
	width: 42px;
}

.lbgeo-marker img {
	display: block;
	height: 47px;
	width: 42px;
}

.lbgeo-marker:focus-visible {
	border-radius: 50% 50% 50% 4px;
	outline: 3px solid var(--lbfe-yellow);
	outline-offset: 2px;
}

.lbgeo-marker.is-selected img {
	filter: drop-shadow(0 0 3px #fff) drop-shadow(0 0 5px var(--lbfe-yellow));
}

.lbgeo-marker--stack {
	position: relative;
}

.lbgeo-stack-count {
	position: absolute;
	right: -6px;
	top: -6px;
	background: var(--lbfe-black);
	border-radius: 999px;
	color: #fff;
	font-size: 0.7rem;
	font-weight: 700;
	line-height: 18px;
	min-width: 18px;
	padding: 0 4px;
	text-align: center;
}

.lbgeo-cluster {
	align-items: center;
	background: var(--lbfe-red);
	border: 2px solid var(--lbfe-black);
	border-radius: 50%;
	box-shadow: 2px 3px 0 rgba(41, 59, 53, 0.25);
	color: #fff;
	cursor: pointer;
	display: flex;
	font: inherit;
	font-size: 1rem;
	font-weight: 800;
	justify-content: center;
	padding: 0;
}

.lbgeo-cluster:focus-visible {
	outline: 3px solid var(--lbfe-yellow);
	outline-offset: 2px;
}

/* ── Popup ───────────────────────────────────────────────────────────────── */
.lbgeo-popup .maplibregl-popup-content {
	background: var(--lbfe-card-bg);
	border: 2px solid var(--lbfe-black);
	border-radius: var(--lbfe-radius);
	box-shadow: 3px 4px 0 rgba(26, 26, 26, 0.25);
	color: var(--lbfe-text);
	max-height: min(70vh, 560px);
	overflow-y: auto;
	padding: 0;
	width: 360px;
}

.lbgeo-popup .maplibregl-popup-close-button {
	position: absolute;
	right: 6px;
	top: 6px;
	background: var(--lbfe-card-bg);
	border-radius: 50%;
	color: var(--lbfe-text);
	font-size: 1.4rem;
	height: 28px;
	line-height: 1;
	width: 28px;
	z-index: 1;
}

.lbgeo-popup .maplibregl-popup-close-button:focus-visible {
	outline: 3px solid var(--lbfe-yellow);
}

.lbgeo-popup.maplibregl-popup-anchor-bottom .maplibregl-popup-tip {
	border-top-color: var(--lbfe-black);
}

.lbgeo-popup.maplibregl-popup-anchor-top .maplibregl-popup-tip {
	border-bottom-color: var(--lbfe-black);
}

.lbgeo-popup.maplibregl-popup-anchor-left .maplibregl-popup-tip {
	border-right-color: var(--lbfe-black);
}

.lbgeo-popup.maplibregl-popup-anchor-right .maplibregl-popup-tip {
	border-left-color: var(--lbfe-black);
}

/* ── Bottom sheet ────────────────────────────────────────────────────────── */
.lbgeo-sheet {
	position: fixed;
	bottom: 0;
	left: 0;
	right: 0;
	background: var(--lbfe-card-bg);
	border-top: 2px solid var(--lbfe-black);
	border-radius: 12px 12px 0 0;
	box-shadow: 0 -4px 16px rgba(0, 0, 0, 0.2);
	color: var(--lbfe-text);
	max-height: 75vh;
	overflow-y: auto;
	z-index: 1000;
}

.lbgeo-sheet-close {
	position: absolute;
	right: 8px;
	top: 8px;
	align-items: center;
	background: var(--lbfe-card-bg);
	border: 2px solid var(--lbfe-text);
	border-radius: 50%;
	color: var(--lbfe-text);
	cursor: pointer;
	display: flex;
	height: 36px;
	justify-content: center;
	width: 36px;
	z-index: 1;
}

.lbgeo-sheet-close:focus-visible {
	outline: 3px solid var(--lbfe-yellow);
}

/* ── Passport ────────────────────────────────────────────────────────────── */
.lbgeo-pp {
	display: flex;
	flex-direction: column;
	font-size: 0.92rem;
}

.lbgeo-pp-thumb {
	aspect-ratio: 16 / 9;
	display: block;
	object-fit: cover;
	width: 100%;
}

.lbgeo-pp-head {
	padding: 0.75rem 2.5rem 0 1rem;
}

.lbgeo-pp-city {
	font-size: 1.4rem;
	font-weight: 800;
	letter-spacing: -0.02em;
	line-height: 1.1;
	margin: 0;
}

.lbgeo-pp-country {
	color: var(--lbfe-muted);
	margin: 0.1rem 0 0;
}

.lbgeo-pp-heading {
	border-bottom: 2px solid var(--lbfe-border);
	font-size: 0.78rem;
	letter-spacing: 0.08em;
	margin: 0.75rem 1rem 0;
	padding-bottom: 0.35rem;
	text-transform: uppercase;
}

.lbgeo-pp-body {
	padding: 0 1rem;
}

.lbgeo-pp-section {
	border-bottom: 1px solid var(--lbfe-border);
	padding: 0.6rem 0;
}

.lbgeo-pp-section-title {
	font-size: 1rem;
	margin: 0 0 0.25rem;
}

.lbgeo-pp-line,
.lbgeo-pp-note {
	margin: 0.15rem 0;
}

.lbgeo-pp-note {
	color: var(--lbfe-muted);
}

.lbgeo-pp-good {
	color: var(--lbfe-red);
	font-weight: 700;
}

.lbgeo-pp-date {
	color: var(--lbfe-muted);
	display: block;
	font-size: 0.8rem;
}

.lbgeo-pp-details summary {
	cursor: pointer;
	font-weight: 700;
}

.lbgeo-pp-list {
	list-style: none;
	margin: 0.25rem 0 0;
	padding: 0;
}

.lbgeo-pp-list li {
	padding: 0.2rem 0;
}

.lbfe-page a.lbgeo-pp-link {
	color: var(--lbfe-red);
	display: inline-block;
	font-weight: 700;
	margin-top: 0.25rem;
	text-decoration: underline;
}

.lbgeo-pp .lbgeo-pp-explore {
	margin: 0.75rem 1rem 1rem;
}

.lbgeo-chooser-wrap {
	padding: 1rem 2.5rem 1rem 1rem;
}

.lbgeo-chooser {
	list-style: none;
	margin: 0.5rem 0 0;
	padding: 0;
}

.lbgeo-chooser button {
	background: none;
	border: 0;
	border-bottom: 1px solid var(--lbfe-border);
	color: var(--lbfe-text);
	cursor: pointer;
	display: block;
	font: inherit;
	font-weight: 700;
	padding: 0.5rem 0;
	text-align: left;
	width: 100%;
}

.lbgeo-chooser button:focus-visible {
	outline: 3px solid var(--lbfe-yellow);
}

@media (max-width: 700px) {
	.lbgeo-toggle {
		margin-left: 0;
	}

	.lbgeo-map {
		height: min(70vh, 520px);
	}
}
