/* ---- Mobile: disable double-tap zoom and pull-to-refresh ---- */
* {
	touch-action: manipulation;
}

html,
body {
	overscroll-behavior: none;
}

html {
	overflow: hidden;
	position: fixed;
	width: 100%;
	height: 100%;
}

/* ---- Main layout ---- */

.main-layout {
	position: relative;
}

.stream-col {
	width: 100%;
}

/* ---- Map ---- */

.map-container {
	overflow: hidden;
}

#leaflet-map {
	width: 100%;
	height: 100vh;
	height: 100dvh;
	background: var(--app-bg);
}

/* Prevent map tile shrinking */
#leaflet-map img {
	max-width: none !important;
	max-height: none !important;
}

/* Leaflet overrides — #leaflet-map ID specificity beats library class selectors */

#leaflet-map {
	font-size: 14px;
}

#leaflet-map .leaflet-bottom {
	margin-bottom: 26px;
}

#leaflet-map .leaflet-control-zoom {
	border: none;
	border-radius: 0;
	box-shadow: none;
	margin-bottom: 0;
}

#leaflet-map .leaflet-control-recenter {
	margin: 0;
	margin-inline-start: 10px !important;
	margin-inline-end: 10px !important;
	box-shadow: 0 1px 5px var(--app-shadow-drop);
	border-bottom: none;
}

#leaflet-map .leaflet-control-zoom a,
#leaflet-map .leaflet-control-recenter {
	width: 32px;
	height: 32px;
	line-height: 32px;
	font-size: 18px;
	text-indent: 0;
	text-align: center;
	display: flex;
	align-items: center;
	justify-content: center;
	color: var(--app-leaflet-control-color);
	background: var(--app-leaflet-control-bg);
	border: none;
	border-radius: 0;
	border-bottom: 1px solid var(--app-leaflet-control-border);
	cursor: pointer;
	box-sizing: border-box;
	padding: 0;
	margin: 0;
}

#leaflet-map .leaflet-control-zoom a:hover,
#leaflet-map .leaflet-control-recenter:hover {
	background: var(--app-leaflet-control-bg-hover);
}

#leaflet-map .leaflet-control-recenter svg {
	width: 16px;
	height: 16px;
}

/* Map markers and tooltips */

.alert-marker {
	width: 14px;
	height: 14px;
	border-radius: 50%;
	background: var(--app-overlay);
	border: 2px solid var(--app-overlay-light);
	transition: all 0.3s;
}

.alert-marker.threat-high {
	background: var(--app-color-danger);
	border-color: var(--app-red-light);
	box-shadow:
		0 0 10px var(--app-color-danger),
		0 0 20px var(--app-red-glow);
	animation: marker-pulse 1.5s ease-in-out infinite;
}

.alert-marker.threat-mid {
	background: var(--app-color-primary);
	border-color: var(--app-green-light);
	box-shadow: 0 0 10px var(--app-color-primary);
}

.city-tooltip {
	font-size: 12px;
	font-weight: bold;
	background: var(--app-bg-overlay);
	color: var(--app-text-on-color);
	border: 1px solid var(--app-border);
	border-radius: var(--app-radius);
	padding: 2px 6px;
}

.city-tooltip.threat-high {
	color: var(--app-red-light);
	border-color: var(--app-color-danger);
}

.user-tooltip {
	font-size: 11px;
	font-weight: bold;
	background: var(--app-bg-overlay-mid);
	color: var(--app-text-on-color);
	border: 1px solid var(--app-overlay-light);
	border-radius: var(--app-radius);
	padding: 2px 6px;
}

.user-tooltip::before {
	display: none;
}

/* ---- Auth portals — above game dialogs, below Shoelace toasts ---- */

.portal {
	position: relative;
	z-index: 99999;
}

/* ---- Shoelace toast stack — above game overlays ---- */

.sl-toast-stack {
	z-index: 100000 !important;
	top: auto !important;
	bottom: 0 !important;
	right: 0 !important;
	left: auto !important;
}
