/**
 * Mapa placówek SFP — styl wzorowany na map-form (store locator).
 */

:root {
	--sfp-brand-color: #2ab159;
	--sfp-alt-color: #e3eee7;
	--sfp-cta-color: #fe7b1f;
	--sfp-text-color: #031424;
}

/* Przycisk obok selecta */
.sfp-location-map-trigger-wrap {
	display: flex !important;
	align-items: stretch !important;
	gap: 10px !important;
	width: 100% !important;
}

.sfp-location-map-trigger-wrap .stores-input-wrap-hospital,
.sfp-location-map-trigger-wrap > select,
.sfp-location-map-trigger-wrap .select2-container {
	flex: 1 1 auto !important;
	min-width: 0 !important;
}

.sfp-location-map-trigger {
	flex: 0 0 auto !important;
	display: inline-flex !important;
	align-items: center !important;
	justify-content: center !important;
	width: 48px !important;
	min-width: 48px !important;
	height: 48px !important;
	padding: 0 !important;
	border: 1px solid var(--sfp-brand-color) !important;
	border-radius: 10px !important;
	background: #fff !important;
	color: var(--sfp-text-color) !important;
	cursor: pointer;
	transition: background-color 0.15s ease, border-color 0.15s ease;
}

.sfp-location-map-trigger:hover,
.sfp-location-map-trigger:focus {
	background: var(--sfp-alt-color) !important;
	outline: none !important;
}

.sfp-location-map-trigger__icon {
	display: inline-block !important;
	width: 22px !important;
	height: 22px !important;
	background-color: var(--sfp-brand-color) !important;
	mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolygon points='1 6 1 22 8 18 16 22 23 18 23 2 16 6 8 2 1 6'/%3E%3Cline x1='8' y1='2' x2='8' y2='18'/%3E%3Cline x1='16' y1='6' x2='16' y2='22'/%3E%3C/svg%3E") center / contain no-repeat;
	-webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolygon points='1 6 1 22 8 18 16 22 23 18 23 2 16 6 8 2 1 6'/%3E%3Cline x1='8' y1='2' x2='8' y2='18'/%3E%3Cline x1='16' y1='6' x2='16' y2='22'/%3E%3C/svg%3E") center / contain no-repeat;
}

/* Modal */
body.sfp-map-modal-open {
	overflow: hidden !important;
}

.sfp-location-map-modal {
	position: fixed !important;
	inset: 0 !important;
	z-index: 100000 !important;
	display: none !important;
	align-items: center !important;
	justify-content: center !important;
	padding: 16px !important;
}

.sfp-location-map-modal.is-open {
	display: flex !important;
}

.sfp-location-map-modal__overlay {
	position: absolute !important;
	inset: 0 !important;
	background: rgba(3, 20, 36, 0.55) !important;
}

.sfp-location-map-modal__dialog {
	position: relative !important;
	z-index: 1 !important;
	width: min(1280px, 100%) !important;
	max-height: calc(100vh - 32px) !important;
	background: #fff !important;
	border-radius: 12px !important;
	box-shadow: 0 20px 60px rgba(3, 20, 36, 0.25) !important;
	display: flex !important;
	flex-direction: column !important;
	overflow: hidden !important;
}

.sfp-location-map-modal__close {
	position: absolute !important;
	top: 10px !important;
	right: 12px !important;
	z-index: 2 !important;
	width: 36px !important;
	height: 36px !important;
	border: none !important;
	border-radius: 50% !important;
	background: #fff !important;
	color: var(--sfp-text-color) !important;
	font-size: 24px !important;
	line-height: 1 !important;
	cursor: pointer;
	box-shadow: none !important;
	padding: 0 !important;
	margin: 0 !important;
}

.sfp-location-map-modal__title,
#sfp-location-map-title {
	margin: 24px 0 12px !important;
	padding: 0 56px 0 20px !important;
	font-size: 20px !important;
	font-weight: 700 !important;
	color: var(--sfp-text-color) !important;
}

.sfp-map-plugin-container {
	padding: 0 20px 20px !important;
	overflow: hidden !important;
}

.sfp-punkty-pobran-wrapper {
	width: 100% !important;
	height: min(600px, calc(100vh - 140px)) !important;
	border: 1px solid #9fddb5 !important;
	border-radius: 10px !important;
	overflow: hidden !important;
	display: flex !important;
	flex-direction: column !important;
}

@media (min-width: 992px) {
	.sfp-punkty-pobran-wrapper {
		flex-direction: row !important;
	}
}

.sfp-punkty-pobran-left-col {
	width: 100% !important;
	flex-shrink: 0 !important;
	display: flex !important;
	flex-direction: column !important;
	max-height: 100% !important;
}

@media (min-width: 992px) {
	.sfp-punkty-pobran-left-col {
		width: 420px !important;
		max-width: 40% !important;
	}
}

.sfp-punkty-pobran-right-col {
	flex: 1 1 auto !important;
	position: relative !important;
	min-width: 0 !important;
	min-height: 280px !important;
}

.sfp-location-map-canvas {
	width: 100% !important;
	height: 100% !important;
	min-height: 280px !important;
}

.sfp-map-unavailable-msg {
	position: absolute !important;
	inset: 0 !important;
	display: none !important;
	align-items: center !important;
	justify-content: center !important;
	padding: 20px !important;
	margin: 0 !important;
	text-align: center !important;
	background: var(--sfp-alt-color) !important;
	color: var(--sfp-text-color) !important;
	z-index: 3 !important;
	font-size: 15px !important;
	line-height: 1.45 !important;
}

.sfp-map-unavailable-msg.is-visible {
	display: flex !important;
}

.sfp-punkty-pobran-right-col.is-loading::after {
	content: attr(data-loading-label);
	position: absolute !important;
	inset: 0 !important;
	display: flex !important;
	align-items: center !important;
	justify-content: center !important;
	background: var(--sfp-alt-color) !important;
	color: var(--sfp-text-color) !important;
	font-size: 15px !important;
	font-weight: 600 !important;
	z-index: 2 !important;
}

.sfp-punkty-pobran-left-col__top {
	display: flex !important;
	gap: 10px !important;
	padding: 15px !important;
	background-color: var(--sfp-alt-color) !important;
	font-weight: 600 !important;
}

.sfp-punkty-pobran-searchbar {
	flex: 1 1 auto !important;
	display: flex !important;
	align-items: center !important;
	background: #fff !important;
	border: 1px solid var(--sfp-brand-color) !important;
	border-radius: 10px !important;
	overflow: hidden !important;
	max-height: 40px !important;
	padding-right: 10px !important;
}

.sfp-punkty-pobran-searchbar input,
#sfp-punkty-search,
.sfp-locations-embed-map .sfp-punkty-pobran-searchbar input {
	flex: 1 1 auto !important;
	width: 100% !important;
	padding: 10px 12px !important;
	border: none !important;
	font-size: 14px !important;
	margin: 0 !important;
	margin-bottom: 0 !important;
	outline: none !important;
	box-shadow: none !important;
	background: transparent !important;
	color: var(--sfp-text-color) !important;
	line-height: normal !important;
	height: auto !important;
	min-height: 0 !important;
	border-radius: 0 !important;
}

.sfp-punkty-search-btn,
.sfp-punkty-pobran-location-btn {
	display: inline-flex !important;
	align-items: center !important;
	justify-content: center !important;
	border: none !important;
	background: transparent !important;
	cursor: pointer;
	padding: 0 !important;
	margin: 0 !important;
	box-shadow: none !important;
}

.sfp-punkty-pobran-location-btn {
	width: 40px !important;
	height: 40px !important;
	flex: 0 0 40px !important;
	border: 1px solid var(--sfp-brand-color) !important;
	border-radius: 10px !important;
	background: #fff !important;
}

.sfp-icon-search,
.sfp-icon-locate {
	display: inline-block !important;
	width: 18px !important;
	height: 18px !important;
	background-color: var(--sfp-brand-color) !important;
}

.sfp-icon-search {
	mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2'%3E%3Ccircle cx='11' cy='11' r='8'/%3E%3Cline x1='21' y1='21' x2='16.65' y2='16.65'/%3E%3C/svg%3E") center / contain no-repeat;
	-webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2'%3E%3Ccircle cx='11' cy='11' r='8'/%3E%3Cline x1='21' y1='21' x2='16.65' y2='16.65'/%3E%3C/svg%3E") center / contain no-repeat;
}

.sfp-icon-locate {
	mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2'%3E%3Ccircle cx='12' cy='12' r='3'/%3E%3Cpath d='M12 2v3M12 19v3M2 12h3M19 12h3'/%3E%3C/svg%3E") center / contain no-repeat;
	-webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2'%3E%3Ccircle cx='12' cy='12' r='3'/%3E%3Cpath d='M12 2v3M12 19v3M2 12h3M19 12h3'/%3E%3C/svg%3E") center / contain no-repeat;
}

.sfp-punkty-pobran-left-col__bottom {
	flex: 1 1 auto !important;
	overflow-y: auto !important;
	padding: 0 15px 15px !important;
	scrollbar-color: var(--sfp-brand-color) #0314240d;
}

.sfp-punkty-col-bottom-inner {
	padding: 10px 0 !important;
	font-weight: 700 !important;
	font-size: 16px !important;
}

.sfp-punkty-list-label {
	font-weight: 700 !important;
	font-size: 16px !important;
	color: var(--sfp-text-color) !important;
}

.sfp-punkty-pobran-list {
	list-style: none !important;
	margin: 0 !important;
	padding: 0 !important;
}

.sfp-punkty-pobran-item {
	padding: 14px 0 !important;
	border-bottom: 1px solid #0314241a !important;
	background: none !important;
}

.sfp-punkty-pobran-item address,
.sfp-punkty-pobran-address {
	font-style: normal !important;
}

.sfp-punkty-pobran-name {
	display: block !important;
	color: var(--sfp-text-color) !important;
	font-weight: 700 !important;
	margin-bottom: 4px !important;
}

.sfp-punkty-pobran-address {
	display: block !important;
	color: #666 !important;
	font-size: 14px !important;
}

.sfp-punkty-pobran-distance {
	display: inline-block !important;
	margin-top: 6px !important;
	color: #666 !important;
	font-size: 14px !important;
	padding-left: 22px !important;
	position: relative !important;
}

.sfp-punkty-pobran-distance::before {
	content: "" !important;
	position: absolute !important;
	left: 0 !important;
	top: 2px !important;
	width: 16px !important;
	height: 16px !important;
	background-color: var(--sfp-brand-color) !important;
	mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2'%3E%3Cpath d='M3 12h18M12 3v18'/%3E%3C/svg%3E") center / contain no-repeat;
	-webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2'%3E%3Cpath d='M3 12h18M12 3v18'/%3E%3C/svg%3E") center / contain no-repeat;
}

.sfp-punkty-pobran-row-btns {
	display: flex !important;
	gap: 10px !important;
	margin-top: 10px !important;
}

.sfp-btn--show,
.sfp-btn--cta,
.sfp-map-plugin-container .sfp-btn--show,
.sfp-map-plugin-container .sfp-btn--cta,
.sfp-locations-embed-map .sfp-btn--show,
.sfp-locations-embed-map .sfp-btn--cta {
	width: 87px !important;
	height: 40px !important;
	display: inline-flex !important;
	align-items: center !important;
	justify-content: center !important;
	border-radius: 10px !important;
	padding: 12px 15px !important;
	font-size: 12px !important;
	font-weight: 700 !important;
	cursor: pointer;
	line-height: 1.2 !important;
	text-transform: none !important;
	letter-spacing: normal !important;
	box-shadow: none !important;
}

.sfp-btn--show,
.sfp-map-plugin-container .sfp-btn--show,
.sfp-locations-embed-map .sfp-btn--show {
	background: #fff !important;
	border: 1px solid #0314244d !important;
	color: var(--sfp-text-color) !important;
}

.sfp-btn--cta,
.sfp-map-plugin-container .sfp-btn--cta,
.sfp-locations-embed-map .sfp-btn--cta {
	background-color: var(--sfp-cta-color) !important;
	border: none !important;
	color: #fff !important;
}

.sfp-punkty-no-results {
	margin: 12px 0 0 !important;
	color: #666 !important;
	font-size: 14px !important;
}

.sfp-infowindow {
	padding: 4px 0 !important;
	max-width: 260px !important;
}

.sfp-infowindow__name {
	font-weight: 700 !important;
	margin: 0 0 6px !important;
	color: var(--sfp-text-color) !important;
}

.sfp-infowindow__address {
	margin: 0 0 10px !important;
	font-size: 14px !important;
	color: #666 !important;
}

.sfp-infowindow .sfp-btn--cta {
	width: auto !important;
	min-width: 120px !important;
}

.gm-style-iw-chr {
	display: none !important;
}

.gm-style-iw.gm-style-iw-c {
	max-width: none !important;
	padding: 12px 16px !important;
}

@media (max-width: 991px) {
	.sfp-location-map-trigger-wrap {
		flex-wrap: wrap !important;
	}

	.sfp-location-map-trigger {
		width: 48px !important;
	}

	.sfp-location-map-modal {
		padding: 0 !important;
		align-items: stretch !important;
	}

	.sfp-location-map-modal__dialog {
		width: 100% !important;
		max-height: 100vh !important;
		height: 100vh !important;
		height: 100dvh !important;
		border-radius: 0 !important;
		display: flex !important;
		flex-direction: column !important;
	}

	.sfp-location-map-modal__title,
	#sfp-location-map-title {
		flex: 0 0 auto !important;
		margin: 24px 0 12px !important;
		padding: 0 56px 0 16px !important;
		font-size: 18px !important;
	}

	.sfp-map-plugin-container {
		flex: 1 1 auto !important;
		display: flex !important;
		flex-direction: column !important;
		min-height: 0 !important;
		padding: 0 12px 12px !important;
		overflow: hidden !important;
	}

	.sfp-punkty-pobran-wrapper {
		flex: 1 1 auto !important;
		height: auto !important;
		min-height: 0 !important;
		max-height: none !important;
		flex-direction: column !important;
	}

	.sfp-punkty-pobran-left-col {
		flex: 0 0 50% !important;
		height: 50% !important;
		max-height: 50% !important;
		min-height: 0 !important;
		overflow: hidden !important;
	}

	.sfp-punkty-pobran-left-col__bottom {
		flex: 1 1 auto !important;
		min-height: 0 !important;
		overflow-y: auto !important;
		-webkit-overflow-scrolling: touch;
	}

	.sfp-punkty-pobran-right-col {
		flex: 0 0 50% !important;
		height: 50% !important;
		max-height: 50% !important;
		min-height: 0 !important;
	}

	.sfp-location-map-canvas {
		min-height: 0 !important;
		height: 100% !important;
	}
}

/* Osadzona mapa (shortcode sfp_locations_map) — wspólne klasy jak modal, własna wysokość */
.sfp-locations-embed-map {
	width: 100% !important;
	margin: 20px 0 !important;
	--sfp-embed-map-height: 500px;
}

.sfp-locations-embed-map .sfp-locations-embed-map__title,
.sfp-locations-embed-map .sfp-location-map-modal__title {
	margin: 0 0 12px !important;
	padding: 0 !important;
	font-size: 20px !important;
	font-weight: 700 !important;
	color: var(--sfp-text-color) !important;
}

.sfp-locations-embed-map .sfp-map-plugin-container {
	padding: 0 !important;
	overflow: hidden !important;
}

.sfp-locations-embed-map .sfp-punkty-pobran-wrapper {
	height: min(var(--sfp-embed-map-height), 600px) !important;
	min-height: 280px !important;
}

.sfp-locations-embed-map .sfp-punkty-pobran-right-col--full {
	width: 100% !important;
	max-width: 100% !important;
	flex: 1 1 100% !important;
}

@media (max-width: 991px) {
	.sfp-locations-embed-map .sfp-punkty-pobran-wrapper {
		height: var(--sfp-embed-map-height) !important;
		min-height: 280px !important;
		max-height: none !important;
	}

	.sfp-locations-embed-map .sfp-punkty-pobran-left-col {
		width: 100% !important;
		max-width: 100% !important;
	}
}
