/* PZ-PB Map - styles frontu */

.pzpb-map {
	display: grid;
	gap: 2rem;
	grid-template-columns: 1fr;
	align-items: start;
}

@media (min-width: 900px) {
	.pzpb-map {
		grid-template-columns: 1fr 1fr;
	}
}

/* Wizualna część mapy */
.pzpb-map__visual {
	position: relative;
	width: 100%;
}

.pzpb-map__canvas {
	position: relative;
	width: 100%;
	aspect-ratio: 2000 / 1892;
}

/* Podkład - mapa Polski jako tło */
.pzpb-map__base {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	user-select: none;
	pointer-events: none;
	display: block;
}

/* Warstwy gmin - granice */
.pzpb-map__layer {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	pointer-events: none;
}

.pzpb-map__layer svg {
	width: 100%;
	height: 100%;
	display: block;
	overflow: visible;
}

.pzpb-map__layer svg path {
	fill: #c8e6c9; /* nieaktywna gmina - jasna zieleń */
	transition: fill 0.25s ease;
}

.pzpb-map__layer.is-active svg path {
	fill: #2e7d32; /* aktywna gmina - intensywna zieleń */
}

/* Warstwa pinów */
.pzpb-map__pins {
	position: absolute;
	inset: 0;
	pointer-events: none;
}

.pzpb-pin {
	position: absolute;
	pointer-events: auto;
	background: transparent !important;
	background-color: transparent !important;
	background-image: none !important;
	border: 0 !important;
	border-radius: 0 !important;
	box-shadow: none !important;
	padding: 0 !important;
	margin: 0 !important;
	min-width: 0 !important;
	min-height: 0 !important;
	width: 32px;
	height: 42px;
	cursor: pointer;
	transform: translate(-50%, -100%); /* tip pina = punkt docelowy */
	color: #4caf50;
	transition: color 0.2s ease, transform 0.2s ease;
	font: inherit;
	line-height: 0;
	appearance: none;
	-webkit-appearance: none;
	-moz-appearance: none;
}

.pzpb-pin:hover,
.pzpb-pin:focus,
.pzpb-pin:active {
	background: transparent !important;
	background-color: transparent !important;
	background-image: none !important;
	box-shadow: none !important;
	border: 0 !important;
}

.pzpb-pin svg {
	width: 100%;
	height: 100%;
	fill: currentColor;
	display: block;
	filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.2));
	pointer-events: none;
}

.pzpb-pin:hover {
	color: #2e7d32;
	transform: translate(-50%, -100%) scale(1.1);
}

.pzpb-pin:focus-visible {
	outline: 2px solid #1565c0 !important;
	outline-offset: 4px;
}

.pzpb-pin.is-active {
	color: #1b5e20;
	transform: translate(-50%, -100%) scale(1.15);
}

/* Infoboxy - jeden widoczny na raz */
.pzpb-map__infoboxes {
	position: relative;
}

.pzpb-infobox {
	display: none;
}

.pzpb-infobox.is-active {
	display: block;
}

/* Reduced motion - wyłącz animacje */
@media (prefers-reduced-motion: reduce) {
	.pzpb-map__layer svg path,
	.pzpb-pin {
		transition: none;
	}
}
