/* Equal Map — front-end styles */

.equal-map-embed {
	position: relative;
	width: 100%;
	aspect-ratio: 11175 / 5481;
	height: auto;
	overflow: hidden;
	background: #F4F1EA;
	border-radius: 8px;
	outline: none;
	-webkit-user-select: none;
	user-select: none;
}

.equal-map-embed:focus-visible {
	box-shadow: 0 0 0 3px rgba( 46, 125, 107, 0.55 );
}

.equal-map-embed svg {
	display: block;
	width: 100%;
	height: 100%;
}

.equal-map-embed.equal-map-loading::after {
	content: "Loading map…";
	position: absolute;
	inset: 0;
	display: flex;
	align-items: center;
	justify-content: center;
	color: #666;
	font-size: 0.9rem;
}

/* ---- Zoom & pan -------------------------------------------------- */

.equal-map-zoomable {
	cursor: grab;
	touch-action: pan-y; /* at full view one finger scrolls the page */
}

.equal-map-zoomable.is-zoomed {
	touch-action: none; /* once zoomed, gestures belong to the map */
}

.equal-map-zoomable.is-dragging,
.equal-map-zoomable.is-dragging .is-linked {
	cursor: grabbing;
}

.equal-map-controls {
	position: absolute;
	top: 10px;
	left: 10px;
	display: flex;
	flex-direction: column;
	gap: 4px;
	z-index: 3;
}

.equal-map-btn {
	width: 32px;
	height: 32px;
	padding: 0;
	border: 1px solid rgba( 0, 0, 0, 0.15 );
	border-radius: 6px;
	background: rgba( 255, 255, 255, 0.92 );
	color: #2B2B2B;
	font: 600 18px/1 system-ui, -apple-system, "Segoe UI", sans-serif;
	cursor: pointer;
	box-shadow: 0 1px 3px rgba( 0, 0, 0, 0.15 );
}

.equal-map-btn:hover:not( :disabled ) {
	background: #fff;
}

.equal-map-btn:focus-visible {
	outline: 2px solid #2E7D6B;
	outline-offset: 1px;
}

.equal-map-btn:disabled {
	opacity: 0.4;
	cursor: default;
}

.equal-map-btn-reset,
.equal-map-btn-full {
	font-size: 16px;
}

.equal-map-hint {
	position: absolute;
	inset: 0;
	display: flex;
	align-items: center;
	justify-content: center;
	background: rgba( 0, 0, 0, 0.45 );
	color: #fff;
	font: 500 15px/1.3 system-ui, -apple-system, "Segoe UI", sans-serif;
	opacity: 0;
	transition: opacity 0.2s ease;
	pointer-events: none;
	z-index: 4;
}

.equal-map-embed.show-hint .equal-map-hint {
	opacity: 1;
}

.equal-map-embed.is-fullscreen {
	aspect-ratio: auto;
	border-radius: 0;
	background: #D6E9F2;
}

/* ---- Layers -------------------------------------------------------- */
/* Stroke widths are set by the renderer so they follow the zoom. */

.equal-map-sphere {
	stroke: #9DB8C4;
}

.equal-map-graticule {
	stroke: #FFFFFF;
	stroke-opacity: 0.55;
	pointer-events: none;
}

.equal-map-countries {
	stroke: #FFFFFF;
	stroke-linejoin: round;
}

.equal-map-country {
	transition: fill 0.15s ease;
}

.equal-map-relief,
.equal-map-tiles.equal-map-relief {
	mix-blend-mode: multiply;
	pointer-events: none;
}

.equal-map-module path {
	pointer-events: none;
}

.equal-map-point,
.equal-map-marker {
	stroke: #FFFFFF;
	stroke-width: 1;
	vector-effect: non-scaling-stroke;
}

.equal-map-marker {
	stroke-width: 1.5;
}

.equal-map-embed .is-linked {
	cursor: pointer;
}

/* ---- Labels ---------------------------------------------------------- */

.equal-map-labels {
	pointer-events: none;
}

.equal-map-name {
	font-family: "Helvetica Neue", Arial, sans-serif;
	paint-order: stroke;
	stroke: rgba( 255, 255, 255, 0.9 );
	stroke-linejoin: round;
	fill: #2F2A25;
}

.equal-map-name-country {
	font-weight: 700;
	letter-spacing: 0.06em;
	fill: #5A4632;
}

.equal-map-name-capitals {
	font-weight: 600;
}

.equal-map-name-peaks {
	font-style: italic;
	fill: #6B4F2E;
}

/* ---- Misc ------------------------------------------------------------ */

.equal-map-tooltip {
	position: absolute;
	pointer-events: none;
	background: rgba( 20, 20, 20, 0.85 );
	color: #fff;
	font-size: 13px;
	line-height: 1.3;
	padding: 4px 8px;
	border-radius: 4px;
	white-space: nowrap;
	z-index: 2;
}

.equal-map-mode-poster {
	aspect-ratio: 8244 / 4380;
	background: #FFFFFF;
}

.equal-map-error {
	color: #a33;
}

@media ( max-width: 600px ) {
	.equal-map-controls {
		top: 6px;
		left: 6px;
		gap: 3px;
	}

	.equal-map-btn {
		width: 26px;
		height: 26px;
		font-size: 15px;
		border-radius: 5px;
	}

	.equal-map-btn-reset,
	.equal-map-btn-full {
		font-size: 13px;
	}
}
