.leaflet-popup-content-wrapper:has(.pgon-station-info) {
	width: auto !important;
	max-width: min(96vw, 460px) !important;
}

.leaflet-popup-content:has(.pgon-station-info) {
	width: max-content !important;
	min-width: 320px !important;
	max-width: min(96vw, 460px) !important;
	max-height: min(65vh, 420px);
	overflow-y: auto;
	overflow-x: auto;
}

.leaflet-popup-content .pgon-station-info {
	font-size: 13px;
	line-height: 1.35;
	margin: 0;
	/* Blocksy: --theme-button-transform przesuwa przycisk o -3px na hover i „skacze” tabela. */
	--theme-button-transform: none;
}

.leaflet-popup-content > h4 + .pgon-station-info h4,
.leaflet-popup-content > h4 + p .pgon-station-info h4 {
	display: none;
}

.leaflet-popup-content .pgon-station-info h4 {
	margin: 0 0 8px;
	font-size: 14px;
	font-weight: 600;
}

.leaflet-popup-content .pgon-station-table {
	width: max-content;
	min-width: 100%;
	border-collapse: collapse;
	margin: 0;
	table-layout: auto;
}

.leaflet-popup-content .pgon-station-table th,
.leaflet-popup-content .pgon-station-table td {
	padding: 4px 8px;
	border-bottom: 1px solid #e5e7eb;
	text-align: left;
	vertical-align: top;
}

.leaflet-popup-content .pgon-station-table th {
	font-weight: 600;
	white-space: nowrap;
	padding-right: 16px;
}

.leaflet-popup-content .pgon-station-table td {
	white-space: nowrap;
}

.leaflet-popup-content .pgon-station-table tr:last-child th,
.leaflet-popup-content .pgon-station-table tr:last-child td {
	border-bottom: 0;
}

.leaflet-popup-content .pgon-station-info .button,
.leaflet-popup-content .pgon-station-info .wp-element-button {
	display: inline-block;
	box-sizing: border-box;
	margin: 0;
	font-size: 12px;
	line-height: 1.4;
	padding: 12px;
	height: auto;
	text-decoration: none;
	/* Stały border w obu stanach — inaczej hover dokłada 1px i tabela skacze. */
	border: 1px solid var(--theme-button-background-initial-color);
	color: #fff !important;
}

.leaflet-popup-content .pgon-station-info .button:hover,
.leaflet-popup-content .pgon-station-info .wp-element-button:hover {
	transform: none;
	border: 1px solid var(--theme-button-background-initial-color);
	color: var(--theme-button-background-initial-color) !important;
}
