/* ============================================================
   mod_bhg_map – mapa OpenStreetMap + tlačítka na Google Maps (rodina mod_bhg_*)
   Náhrada mod_spmap (Smile Pack). Leaflet 1.9.4 z media modulu (css/vendor, js/vendor).

   ARCHITEKTURA:
   - Rozměry z inline proměnných kořene: --bhg-map-h / -h-t (do 1024 px) / -h-m (do 575 px) – zlomy jako Smile Pack.
   - Tón dlaždic (--bhg-map-tile-filter) a zaoblení (--bhg-map-radius) z voleb modulu; značka a ovládání bez filtru.
   - Výchozí VZHLED tlačítek a bubliny v :where(…) = nulová specificita, třídy z administrace (button_class) vyhrají.
   ============================================================ */

.bhg-map__canvas {
	position: relative;
	z-index: 0; /* vrstvy Leafletu (z-index 400–1000) zůstanou pod hlavičkou a modály šablony */
	width: 100%;
	height: var(--bhg-map-h, 600px);
	border-radius: var(--bhg-map-radius, 0);
	overflow: hidden;
	background: var(--bhg-map-bg, #e8e4dc);
}

@media (max-width: 1024px) {
	.bhg-map__canvas { height: var(--bhg-map-h-t, var(--bhg-map-h, 500px)); }
}

@media (max-width: 575px) {
	.bhg-map__canvas { height: var(--bhg-map-h-m, var(--bhg-map-h-t, 400px)); }
}

.bhg-map .leaflet-tile {
	filter: var(--bhg-map-tile-filter, none);
}

/* ---------- Zástupný prvek „Zobrazit mapu“ (click_to_load) ---------- */
.bhg-map__placeholder {
	position: absolute;
	inset: 0;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: 1rem;
	padding: 1.5rem;
	text-align: center;
}

:where(.bhg-map__placeholder-text) {
	max-width: 32rem;
	margin: 0;
	font-family: var(--bhg-font-body, inherit);
	font-size: .95rem;
	line-height: 1.5;
	color: #333;
}

/* ---------- Značka ---------- */
.bhg-map__pin {
	background: none;
	border: 0;
}

.bhg-map__pin img,
.bhg-map__pin svg {
	display: block;
	width: 100%;
	height: auto;
}

:where(.bhg-map__pin svg) {
	color: var(--bhg-color-accent, var(--c-grain-400, #b8955a));
	filter: drop-shadow(0 2px 3px rgb(0 0 0 / .35));
}

/* ---------- Bublina ---------- */
:where(.bhg-map .leaflet-popup-content) {
	margin: .75rem 1rem;
	font-family: var(--bhg-font-body, inherit);
	font-size: 1.1rem;
	font-weight: 700;
	line-height: 1.4;
	color: #333;
}

/* ---------- Tlačítka pod mapou ---------- */
.bhg-map__actions {
	display: flex;
	flex-wrap: wrap;
	gap: .75rem;
	margin: var(--bhg-map-actions-gap, 1rem) 0 0;
	padding: 0;
	list-style: none;
}

.bhg-map__actions--center { justify-content: center; }
.bhg-map__actions--end { justify-content: flex-end; }

.bhg-map__btn {
	display: inline-flex;
	align-items: center;
	gap: .5rem;
	text-decoration: none; /* tlačítko, ne odkaz v textu – šablony podtrhávají a */
}

.bhg-map__btn-icon {
	flex-shrink: 0;
	width: 1.25em;
	height: 1.25em;
}

:where(.bhg-map__btn) {
	padding: .6rem 1.1rem;
	border: 1px solid color-mix(in srgb, currentColor 35%, transparent);
	border-radius: var(--bhg-radius-btn, 999px);
	color: var(--bhg-color-link, inherit);
	font-family: var(--bhg-font-body, inherit);
	font-size: var(--bhg-fs-sm, .875rem);
	font-weight: var(--bhg-fw-ui, 500);
	line-height: 1.2;
	transition: background-color .15s ease, border-color .15s ease;
}

:where(.bhg-map__btn:hover) {
	background-color: var(--bhg-color-surface-soft, color-mix(in srgb, currentColor 8%, transparent));
	border-color: currentColor;
	color: var(--bhg-color-link-hover, var(--bhg-color-link, inherit));
}

.bhg-map__btn:focus-visible {
	outline: none;
	box-shadow: var(--bhg-focus-ring, 0 0 0 3px color-mix(in srgb, currentColor 40%, transparent));
}

@media (max-width: 575px) {
	.bhg-map__actions > li { flex: 1 1 100%; }
	.bhg-map__btn { width: 100%; justify-content: center; }
}

@media (prefers-reduced-motion: reduce) {
	:where(.bhg-map__btn) { transition: none; }
}
