/* Evia Action Map — front end + admin preview */

.eam-wrap {
	position: relative;
	width: 100%;
	overflow: hidden;
	border-radius: 18px;
	background: var(--eam-sea, #495FA9);
	isolation: isolate;
	font-family: inherit;
}

.eam-map.leaflet-container {
	position: absolute;
	inset: 0;
	background: transparent;
	font: inherit;
	cursor: default;
	outline: none;
	touch-action: auto; /* map is locked, so page scroll must keep working on touch */
	-webkit-user-select: none;
	user-select: none;
}

/* Land (municipalities) */
.eam-land {
	fill: var(--eam-land, #fff);
	fill-opacity: 1;
	stroke: var(--eam-border, #C3D1E2);
	stroke-width: 1.2px;
	stroke-linejoin: round;
}
.eam-wrap .leaflet-overlay-pane svg {
	filter: drop-shadow(0 6px 16px rgba(10, 20, 60, 0.35));
}

/* Logo (bottom-left) */
.eam-logo {
	position: absolute;
	z-index: 450;
	left: 24px;
	bottom: 20px;
	width: clamp(120px, 22%, 210px);
	height: auto;
	pointer-events: none;
	user-select: none;
}

/* Credits: hidden behind a small info icon with a tooltip */
.eam-credit {
	position: relative;
	margin: 0 12px 12px 0 !important;
}
.eam-credit-btn {
	display: block;
	width: 22px;
	height: 22px;
	padding: 0;
	border: 0;
	border-radius: 50%;
	background: rgba(255, 255, 255, 0.22);
	color: #fff;
	font: italic 700 13px/22px Georgia, serif;
	text-align: center;
	cursor: help;
	opacity: 0.75;
	transition: opacity 0.15s ease, background 0.15s ease;
}
.eam-credit-btn:hover,
.eam-credit-btn:focus-visible,
.eam-credit.is-open .eam-credit-btn {
	opacity: 1;
	background: rgba(255, 255, 255, 0.4);
	outline: none;
}
.eam-credit-tip {
	position: absolute;
	right: 0;
	bottom: 30px;
	width: max-content;
	max-width: 260px;
	padding: 7px 10px;
	border-radius: 8px;
	background: #0C4A80;
	color: #fff;
	font-size: 12px;
	line-height: 1.4;
	font-weight: 600;
	box-shadow: 0 4px 12px rgba(12, 24, 48, 0.3);
	opacity: 0;
	visibility: hidden;
	transform: translateY(4px);
	transition: opacity 0.15s ease, transform 0.15s ease, visibility 0.15s;
	pointer-events: none;
}
.eam-credit:hover .eam-credit-tip,
.eam-credit:focus-within .eam-credit-tip,
.eam-credit.is-open .eam-credit-tip {
	opacity: 1;
	visibility: visible;
	transform: none;
}

/* Pins */
.eam-pin {
	background: none;
	border: 0;
	cursor: pointer;
}
.eam-pin:focus {
	outline: none;
}
.eam-pin-dot {
	position: absolute;
	left: 50%;
	top: 50%;
	width: 18px;
	height: 18px;
	margin: -9px 0 0 -9px;
	box-sizing: border-box;
	border-radius: 50%;
	background: var(--eam-pin, #F39200);
	border: 3px solid #fff;
	box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
	transition: transform 0.15s ease, background 0.15s ease;
}
.eam-pin-dot::after {
	content: "";
	position: absolute;
	inset: -10px;
	border-radius: 50%;
	border: 2px solid var(--eam-pin, #F39200);
	opacity: 0;
	animation: eam-pulse 2.6s ease-out infinite;
	pointer-events: none;
}
@keyframes eam-pulse {
	0%   { transform: scale(0.55); opacity: 0.75; }
	100% { transform: scale(1.5);  opacity: 0; }
}
@media (prefers-reduced-motion: reduce) {
	.eam-pin-dot::after { animation: none; }
}
.eam-pin:hover .eam-pin-dot,
.eam-pin:focus-visible .eam-pin-dot {
	transform: scale(1.2);
}
.eam-pin:focus-visible .eam-pin-dot {
	outline: 2px solid var(--eam-pin-active, #0C4A80);
	outline-offset: 3px;
}
.eam-pin.is-active .eam-pin-dot {
	background: var(--eam-pin-active, #0C4A80);
	transform: scale(1.25);
}
.eam-pin.is-active .eam-pin-dot::after {
	border-color: var(--eam-pin-active, #0C4A80);
}

/* Hover label */
.leaflet-tooltip.eam-tip {
	background: #0C4A80;
	color: #fff;
	border: 0;
	border-radius: 8px;
	padding: 5px 10px;
	font-size: 13px;
	font-weight: 700;
	box-shadow: 0 4px 12px rgba(12, 24, 48, 0.25);
}
.leaflet-tooltip-top.eam-tip::before {
	border-top-color: #0C4A80;
}

/* Detail card */
.eam-card {
	position: absolute;
	z-index: 1000;
	right: 20px;
	top: 20px;
	width: min(340px, calc(100% - 40px));
	max-height: calc(100% - 40px);
	overflow: auto;
	background: #fff;
	border-radius: 14px;
	box-shadow: 0 12px 36px rgba(12, 24, 48, 0.28);
	color: #182430;
}
.eam-card[hidden] { display: none; }
.eam-card-img {
	display: block;
	width: 100%;
	aspect-ratio: 16 / 9;
	object-fit: cover;
}
.eam-card-body { padding: 16px 18px 18px; }
.eam-card-date {
	margin: 0;
	font-size: 13px;
	font-weight: 700;
	letter-spacing: 0.3px;
	text-transform: uppercase;
	color: #F39200;
}
.eam-card-title {
	margin: 4px 0 2px;
	font-size: 18px;
	line-height: 1.3;
	font-weight: 700;
	color: #182430;
}
.eam-card-loc {
	margin: 0 0 8px;
	font-size: 14px;
	color: #4A5560;
}
.eam-card-desc {
	margin: 0 0 12px;
	font-size: 15px;
	line-height: 1.55;
	white-space: pre-line;
}
.eam-card-link {
	font-weight: 700;
	color: #0C4A80;
	text-decoration: none;
}
.eam-card-link:hover { text-decoration: underline; }
.eam-card-close {
	position: absolute;
	top: 8px;
	right: 8px;
	z-index: 2;
	width: 32px;
	height: 32px;
	padding: 0;
	border: 0;
	border-radius: 50%;
	background: rgba(255, 255, 255, 0.95);
	color: #182430;
	font-size: 20px;
	line-height: 1;
	cursor: pointer;
	box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}
@media (max-width: 640px) {
	.eam-card {
		left: 12px;
		right: 12px;
		top: auto;
		bottom: 12px;
		width: auto;
		max-height: 70%;
	}
	.eam-wrap.has-card .eam-logo { visibility: hidden; }
	.eam-logo { left: 16px; bottom: 14px; width: 110px; }
}

.eam-pin::before{content:'';position:absolute;inset:-9px}
.eam-credit-btn::before{content:'';position:absolute;inset:-11px}
.eam-credit-btn{position:relative}
.eam-card-close{min-width:44px;min-height:44px}
