:root {
	--opp-ink: #102a43;
	--opp-muted: #627482;
	--opp-line: #dbe4e8;
	--opp-paper: #f7f7f2;
	--opp-panel: #ffffff;
	--opp-orange: #e9512c;
	--opp-orange-soft: #fff0e9;
	--opp-teal: #0d6b68;
	--opp-gold: #e5a11a;
}

body.opp-map-page {
	background: var(--opp-paper);
	overflow-x: hidden;
}

.opp-map-page .site-content,
.opp-map-page .content-area,
.opp-map-page .site-main,
.opp-map-page .entry-content,
.opp-map-page .wp-site-blocks,
.opp-map-page .container,
.opp-map-page .ast-container,
.opp-map-page .elementor-section-boxed > .elementor-container {
	margin: 0;
	max-width: none;
	padding: 0;
	width: 100%;
}

/* Neutralizacja kontenerów motywu nad mapą (klasa dodawana z JS) */
.opp-fullbleed {
	float: none !important;
	margin-left: 0 !important;
	margin-right: 0 !important;
	max-width: none !important;
	padding-left: 0 !important;
	padding-right: 0 !important;
	width: auto !important;
}

.opp-map-page .opp-app {
	grid-column: 1 / -1 !important;
	margin-left: 0;
	margin-right: 0;
	max-width: none !important;
	width: 100%;
}

.opp-app,
.opp-app * {
	box-sizing: border-box;
}

.opp-app {
	background: var(--opp-paper);
	display: grid;
	font-family: inherit;
	grid-template-columns: minmax(330px, 390px) minmax(0, 1fr);
	height: calc(100vh - 80px);
	min-height: 580px;
	overflow: hidden;
	position: relative;
	width: 100%;
}

.opp-panel {
	background: var(--opp-panel);
	border-right: 1px solid var(--opp-line);
	display: flex;
	flex-direction: column;
	min-height: 0;
	position: relative;
	z-index: 1001;
}

.opp-panel__header {
	border-bottom: 1px solid var(--opp-line);
	padding: 24px 24px 19px;
}

.opp-eyebrow {
	color: var(--opp-orange);
	font-size: 10px;
	font-weight: 800;
	letter-spacing: .13em;
	margin: 0 0 7px;
	text-transform: uppercase;
}

.opp-panel__header h2 {
	color: var(--opp-ink);
	font-size: clamp(23px, 2vw, 29px);
	font-weight: 800;
	letter-spacing: -.035em;
	line-height: 1.08;
	margin: 0;
}

.opp-panel__header p:last-child {
	color: var(--opp-muted);
	font-size: 13px;
	line-height: 1.55;
	margin: 11px 0 0;
}

.opp-search {
	align-items: center;
	border-bottom: 1px solid var(--opp-line);
	display: grid;
	grid-template-columns: 20px minmax(0, 1fr) 30px;
	margin: 0;
	padding: 10px 20px;
}

.opp-search svg {
	fill: none;
	height: 18px;
	stroke: var(--opp-muted);
	stroke-width: 1.8;
	width: 18px;
}

.opp-search input {
	background: transparent;
	border: 0;
	box-shadow: none;
	color: var(--opp-ink);
	font: inherit;
	font-size: 14px;
	height: 42px;
	min-width: 0;
	outline: 0;
	padding: 0 10px;
}

.opp-search input::placeholder {
	color: #8b999f;
}

.opp-search__clear {
	background: transparent;
	border: 0;
	color: var(--opp-muted);
	cursor: pointer;
	font-size: 22px;
	height: 30px;
	line-height: 1;
	padding: 0;
	width: 30px;
}

.opp-app .opp-types {
	border-bottom: 1px solid var(--opp-line);
	display: flex !important;
	flex-wrap: wrap !important;
	gap: 7px;
	height: auto !important;
	max-height: none !important;
	flex: 0 0 auto !important;
	min-height: 0;
	overflow: visible !important;
	padding: 11px 20px;
	visibility: visible !important;
}

.opp-app .opp-types .opp-type {
	-webkit-appearance: none;
	appearance: none;
	align-items: center;
	background: #fff;
	border: 1px solid var(--opp-line);
	border-radius: 999px;
	box-shadow: none;
	clip: auto;
	clip-path: none;
	color: #405462;
	cursor: pointer;
	display: inline-flex !important;
	flex: 0 0 auto;
	font: inherit;
	font-size: 11px !important;
	font-weight: 700;
	height: auto !important;
	justify-content: center;
	letter-spacing: 0;
	line-height: 1.1 !important;
	margin: 0;
	max-width: none;
	min-height: 32px;
	opacity: 1 !important;
	overflow: visible;
	padding: 0 11px !important;
	position: static !important;
	text-indent: 0;
	text-transform: none;
	visibility: visible !important;
	white-space: nowrap;
	width: auto !important;
}

.opp-app .opp-types .opp-type.is-active {
	background: var(--opp-ink);
	border-color: var(--opp-ink);
	color: #fff;
}

.opp-filter-row {
	align-items: center;
	border-bottom: 1px solid var(--opp-line);
	display: grid;
	gap: 7px;
	grid-template-columns: auto minmax(0, 1fr) auto;
	padding: 11px 20px;
}

.opp-filter-row label {
	color: var(--opp-muted);
	font-size: 10px;
	font-weight: 800;
	letter-spacing: .05em;
	text-transform: uppercase;
}

.opp-filter-row select {
	background-color: #fff;
	border: 1px solid var(--opp-line);
	border-radius: 4px;
	color: var(--opp-ink);
	font: inherit;
	font-size: 12px;
	height: 34px;
	min-width: 0;
	padding: 0 28px 0 9px;
}

.opp-reset {
	background: transparent;
	border: 0;
	color: var(--opp-orange);
	cursor: pointer;
	font: inherit;
	font-size: 11px;
	font-weight: 800;
	padding: 7px 0 7px 5px;
}

.opp-results-heading {
	align-items: center;
	border-bottom: 1px solid var(--opp-line);
	display: flex;
	justify-content: space-between;
	padding: 13px 20px;
}

.opp-results-heading div {
	align-items: baseline;
	display: flex;
	gap: 6px;
}

.opp-results-heading strong {
	color: var(--opp-ink);
	font-size: 18px;
	font-weight: 800;
}

.opp-results-heading span {
	color: var(--opp-muted);
	font-size: 10px;
}

/* Sekcje panelu nie mogą się kurczyć — inaczej filtry nachodzą na siebie */
.opp-app .opp-panel__header,
.opp-app .opp-search,
.opp-app .opp-filter-row,
.opp-app .opp-results-heading {
	flex: 0 0 auto;
}

.opp-results {
	flex: 1 1 auto;
	min-height: 0;
	overflow-y: auto;
	scrollbar-color: #c7d0d4 transparent;
	scrollbar-width: thin;
}

.opp-results__list {
	list-style: none;
	margin: 0;
	padding: 0;
}

.opp-result {
	border-bottom: 1px solid var(--opp-line);
	margin: 0;
}

.opp-result__button {
	background: #fff;
	border: 0;
	color: var(--opp-ink);
	cursor: pointer;
	display: flex;
	flex-direction: column;
	font: inherit;
	gap: 5px;
	padding: 13px 20px 14px;
	text-align: left;
	transition: background-color .16s ease, box-shadow .16s ease;
	width: 100%;
}

.opp-result__button:hover,
.opp-result__button:focus-visible,
.opp-result.is-active .opp-result__button {
	background: var(--opp-orange-soft);
	box-shadow: inset 4px 0 0 var(--opp-orange);
	outline: 0;
}

.opp-result__head {
	align-items: center;
	display: flex;
	gap: 8px;
}

.opp-road-badge {
	background: var(--opp-ink);
	border-radius: 3px;
	color: #fff;
	display: inline-flex;
	font-size: 10px;
	font-weight: 800;
	letter-spacing: .03em;
	line-height: 1;
	padding: 5px 7px;
}

.opp-length {
	color: var(--opp-orange);
	font-size: 11px;
	font-weight: 800;
}

.opp-result strong {
	font-size: 13px;
	font-weight: 750;
	line-height: 1.32;
}

.opp-result small {
	color: var(--opp-muted);
	font-size: 10px;
}

.opp-results__empty {
	color: var(--opp-muted);
	font-size: 13px;
	line-height: 1.5;
	margin: 0;
	padding: 30px 20px;
	text-align: center;
}

.opp-stage,
.opp-map {
	height: 100%;
	min-height: 0;
	width: 100%;
}

.opp-stage {
	background: #dfe9e3;
	position: relative;
}

.opp-map {
	z-index: 1;
}

.opp-map .leaflet-tile-pane {
	filter: saturate(.78) contrast(.96) brightness(1.03);
}

.opp-map .leaflet-control-zoom a {
	color: var(--opp-ink);
}

.opp-map .leaflet-popup-content-wrapper,
.opp-map .leaflet-popup-tip {
	border-radius: 5px;
}

.opp-map .leaflet-popup-content {
	margin: 15px;
}

.opp-popup {
	color: var(--opp-ink);
	font-family: inherit;
}

.opp-popup__meta {
	align-items: center;
	display: flex;
	gap: 8px;
	margin-bottom: 9px;
}

.opp-popup__title {
	display: block;
	font-size: 15px;
	line-height: 1.3;
	margin-bottom: 12px;
}

.opp-popup__points {
	border-bottom: 1px solid var(--opp-line);
	border-top: 1px solid var(--opp-line);
	display: grid;
	grid-template-columns: auto 1fr;
	margin: 0 0 12px;
	padding: 8px 0;
}

.opp-popup__points dt,
.opp-popup__points dd {
	font-size: 10px;
	line-height: 1.7;
	margin: 0;
}

.opp-popup__points dt {
	color: var(--opp-muted);
	font-weight: 800;
	padding-right: 9px;
	text-transform: uppercase;
}

.opp-popup__points dd {
	font-variant-numeric: tabular-nums;
}

.opp-popup__actions {
	display: grid;
	gap: 7px;
	grid-template-columns: 1fr 1fr;
}

.opp-popup__actions a {
	align-items: center;
	border: 1px solid var(--opp-line);
	border-radius: 3px;
	color: var(--opp-ink);
	display: flex;
	font-size: 11px;
	font-weight: 750;
	justify-content: center;
	min-height: 36px;
	padding: 6px;
	text-decoration: none;
}

.opp-popup__actions .opp-popup__primary {
	background: var(--opp-orange);
	border-color: var(--opp-orange);
	color: #fff;
}

.opp-loading,
.opp-error {
	background: rgba(255,255,255,.95);
	border: 1px solid rgba(16,42,67,.13);
	box-shadow: 0 10px 26px rgba(16,42,67,.12);
	color: var(--opp-ink);
	font-size: 12px;
	left: 50%;
	padding: 11px 15px;
	position: absolute;
	top: 18px;
	transform: translateX(-50%);
	z-index: 1000;
}

.opp-loading {
	align-items: center;
	display: flex;
	gap: 9px;
}

.opp-loading[hidden],
.opp-error[hidden] {
	display: none;
}

.opp-loading span {
	animation: opp-spin .8s linear infinite;
	border: 2px solid #d7e1e4;
	border-radius: 50%;
	border-top-color: var(--opp-orange);
	height: 15px;
	width: 15px;
}

.opp-map-actions {
	display: grid;
	gap: 8px;
	position: absolute;
	right: 12px;
	top: 92px;
	z-index: 999;
}

.opp-map-actions button {
	align-items: center;
	background: #fff;
	border: 1px solid rgba(16,42,67,.14);
	border-radius: 4px;
	box-shadow: 0 2px 8px rgba(16,42,67,.12);
	color: var(--opp-ink);
	cursor: pointer;
	display: flex;
	height: 36px;
	justify-content: center;
	padding: 0;
	width: 36px;
}

.opp-map-actions svg {
	fill: none;
	height: 18px;
	stroke: currentColor;
	stroke-width: 1.8;
	width: 18px;
}

.opp-legend {
	align-items: center;
	background: rgba(255,255,255,.94);
	border: 1px solid rgba(16,42,67,.14);
	bottom: 15px;
	display: flex;
	font-size: 10px;
	gap: 14px;
	left: 15px;
	padding: 9px 11px;
	position: absolute;
	z-index: 999;
}

.opp-legend span {
	align-items: center;
	color: #405462;
	display: inline-flex;
	gap: 6px;
}

.opp-legend__line {
	background: var(--opp-orange);
	border-radius: 99px;
	height: 4px;
	width: 20px;
}

.opp-legend__point {
	background: var(--opp-teal);
	border: 2px solid #fff;
	border-radius: 50%;
	box-shadow: 0 0 0 1px rgba(16,42,67,.25);
	height: 10px;
	width: 10px;
}

.opp-legend__point--end {
	background: var(--opp-gold);
}

.opp-mobile-toggle {
	display: none;
}

@keyframes opp-spin {
	to { transform: rotate(360deg); }
}

@media (max-width: 800px) {
	.opp-app {
		display: block;
		height: calc(100svh - 58px);
		min-height: 540px;
	}

	.opp-stage {
		inset: 0;
		position: absolute;
	}

	.opp-panel {
		border: 1px solid var(--opp-line);
		bottom: 72px;
		box-shadow: 0 18px 50px rgba(16,42,67,.22);
		left: 10px;
		max-height: calc(100% - 92px);
		position: absolute;
		right: 10px;
		transform: translateY(calc(100% + 90px));
		transition: transform .25s ease;
		z-index: 1200;
	}

	.opp-app.is-panel-open .opp-panel {
		transform: translateY(0);
	}

	.opp-panel__header {
		padding: 18px 18px 14px;
	}

	.opp-panel__header h2 {
		font-size: 22px;
	}

	.opp-panel__header p:last-child {
		display: none;
	}

	.opp-search,
	.opp-types,
	.opp-filter-row,
	.opp-results-heading {
		padding-left: 16px;
		padding-right: 16px;
	}

	.opp-mobile-toggle {
		background: var(--opp-ink);
		border: 0;
		border-radius: 999px;
		bottom: 18px;
		color: #fff;
		display: block;
		font: inherit;
		font-size: 12px;
		font-weight: 800;
		left: 50%;
		min-height: 43px;
		padding: 0 19px;
		position: absolute;
		transform: translateX(-50%);
		white-space: nowrap;
		z-index: 1300;
	}

	.opp-map-actions {
		top: 90px;
	}

	.opp-legend {
		bottom: 72px;
		flex-direction: column;
		gap: 6px;
		left: 10px;
		align-items: flex-start;
	}
}

@media (prefers-reduced-motion: reduce) {
	.opp-panel,
	.opp-result__button {
		transition: none;
	}
}

/* Zabezpieczenie przed stylami motywu na kontrolkach panelu */
.opp-app .opp-panel button,
.opp-app .opp-panel input,
.opp-app .opp-panel select {
	box-shadow: none;
	letter-spacing: normal;
	max-width: none;
	text-transform: none;
}

.opp-app .opp-filter-row select {
	-webkit-appearance: none;
	appearance: none;
	background-image: linear-gradient(45deg, transparent 50%, #627482 50%), linear-gradient(135deg, #627482 50%, transparent 50%);
	background-position: calc(100% - 14px) 15px, calc(100% - 9px) 15px;
	background-repeat: no-repeat;
	background-size: 5px 5px, 5px 5px;
	display: block;
	width: 100%;
}

.opp-route-pending {
	opacity: .55;
}
