/**
 * Layout: Locaties kaart
 * Slug: location_map
 */

.location_map-layout {
    padding-block: var(--pk-hero-top-spacing);
	background-color: #ffffff;
	border-radius: 1.5rem;
}
.location_map-layout .pk-grid-container {
	row-gap: 1.5rem;
}

.location_map-layout .filtering-wrapper {
	padding: max(1rem, calc(1 * var(--su)));
	border-radius: 1.5rem;
	border: 1px solid rgba(10, 55, 124, 0.10);
}

.location_map-layout .filters-container {
	position: relative;
	display: flex;
	flex-direction: column;
	gap: 0.5rem;
	padding: max(1.5rem, calc(2 * var(--su)));
	padding-bottom: 0;
	border-radius: 1.5rem;
	border: 1px solid rgba(10, 55, 124, 0.10);
}
.location_map-layout .filters-container::before {
	content: '';
	position: absolute;
	bottom: 0;
	left: 2rem;
	right: 2rem;
	z-index: 2;
	pointer-events: none;
	/* width: 100%; */
	height: 100px;
	background-image: linear-gradient(rgba(255,255,255,0), rgba(255,255,255,1));
}
.location_map-layout .filters-container .gfield input,
.location_map-layout .filters-container .filter-select {
	width: 100%;
}
body #locaties.location_map-layout .filters-container .gfield input.postal-input,
body #locaties.location_map-layout .filters-container .filter-select {
	transition: border-color 0.25s ease-in-out;
}
body #locaties.location_map-layout .filters-container .gfield input.postal-input:not(:placeholder-shown),
body #locaties.location_map-layout .filters-container .filter-select:not(:has(option[value=""]:checked)) {
	border-color: var(--dia-blue);
}
body #locaties.location_map-layout .gform_wrapper.gravity-theme .gform_fields {
	grid-row-gap: 10px;
}

body #locaties.location_map-layout .gfield.radius-field.regular-label {
	display: flex;
	flex-direction: column;
	gap: max(0.325rem, calc(0.425 * var(--su)));
	margin-block: 0;
	padding:0 5px;
}
body #locaties.location_map-layout .radius-field.is-disabled {
	color: #6b7280;
}
body #locaties.location_map-layout .radius-field.is-disabled .gfield_label,
body #locaties.location_map-layout .radius-field.is-disabled .radius-input {
	opacity: 0.35;
}
body #locaties.location_map-layout .filters-container .gfield input.radius-input:disabled {
	cursor: not-allowed;
}
body #locaties.location_map-layout .gfield.radius-field.regular-label .gfield_label {
	display: flex;
	align-items: baseline;
	justify-content: flex-start;
	gap: 0.375em;
	margin-bottom: 0 !important;
	color: var(--pk-text-color);
	font-size: max(0.875rem, calc(0.875 * var(--su)));
	font-weight: 300;
}
body #locaties.location_map-layout .radius-field .radius-value {
	font-weight: 500;
	white-space: nowrap;
}
body #locaties.location_map-layout .filters-container .gfield input.radius-input {
	appearance: none;
	-webkit-appearance: none;
	width: 100%;
	height: 1.125rem;
	padding: 0;
	border: 0;
	background: transparent;
	cursor: pointer;
}
body #locaties.location_map-layout .radius-input::-webkit-slider-runnable-track {
	height: 0.375rem;
	border-radius: 100px;
	background-color: rgba(10, 55, 124, 0.10);
}
body #locaties.location_map-layout .radius-input::-moz-range-track {
	height: 0.375rem;
	border-radius: 100px;
	background-color: rgba(10, 55, 124, 0.10);
}
body #locaties.location_map-layout .radius-input::-webkit-slider-thumb {
	appearance: none;
	-webkit-appearance: none;
	width: 1.125rem;
	height: 1.125rem;
	margin-top: -0.375rem;
	border: 2px solid #ffffff;
	border-radius: 100%;
	background-color: var(--dia-green);
	box-shadow: 0 1px 4px rgba(4, 36, 84, 0.25);
}
body #locaties.location_map-layout .radius-input::-moz-range-thumb {
	width: 1.125rem;
	height: 1.125rem;
	border: 2px solid #ffffff;
	border-radius: 100%;
	background-color: var(--dia-green);
	box-shadow: 0 1px 4px rgba(4, 36, 84, 0.25);
}
body #locaties.location_map-layout .radius-input:focus-visible::-webkit-slider-thumb {
	outline: 2px solid var(--dia-blue);
	outline-offset: 2px;
}

.location_map-layout .filter-tags {
	margin-block-start: 1rem;
}
.location_map-layout .filter-tags:has(button) {
	display: flex;
	gap: 0.5rem; 
	flex-wrap: wrap;
}
.location_map-layout .filter-tags button {
	display: flex;
	align-items: center;
	gap: 0.25rem;
	appearance: none;
	border-radius: 0.5rem;
	border: 1px solid rgba(10, 55, 124, 0.10);
	background: #FFF;
	padding: max(0.75rem, calc(0.75 * var(--su)));
	font-size: max(0.75rem, calc(0.875 * var(--su)));
	color: var(--pk-text-color);
	cursor: pointer;
	transition: all 0.2s ease;
}
.location_map-layout .filter-tags button > span {
	font-size: 1.25em;
	flex-shrink: 0;
}
.location_map-layout .filter-tags button:not(.active) > span {
	display: none;
}
.location_map-layout .filter-tags button:hover {
	border-color: var(--dia-green);
}
.location_map-layout .filter-tags button.active {
	border-color: var(--dia-green);
	background-color: var(--dia-green-light);
}


.location_map-layout .map {
	position: relative;
	aspect-ratio: 1;
	border-radius: 2rem;
	width: 100%;
	height: 100%;
}

.location_map-layout .map.is-loading > div {
	filter: grayscale(1);
	opacity: 0.6;
	pointer-events: none;
	transition: filter 0.15s ease, opacity 0.15s ease;
}

.location_map-layout .map.is-loading::after {
	content: '';
	position: absolute;
	inset: 0;
	z-index: 1;
	border-radius: 2rem;
	background: rgba(255, 255, 255, 0.15);
	pointer-events: none;
}

.location_map-layout .map.is-loading::before {
	content: '';
	position: absolute;
	top: 50%;
	left: 50%;
	z-index: 2;
	width: 2.5rem;
	height: 2.5rem;
	margin: -1.25rem 0 0 -1.25rem;
	border-radius: 50%;
	border: 3px solid rgba(1, 38, 30, 0.2);
	border-top-color: #01261E;
	animation: location-map-spin 0.8s linear infinite;
}

.location_map-layout .results-posts-container {
	position: relative;
	margin-top: auto;
	margin-right: -1.5rem;
	padding-right: 1.5rem;
	overflow: auto;
}
.location_map-layout .results-posts-container .map-results {
	display: flex;
	flex-direction: column;
	gap: 0.5rem;
	padding-bottom: 50px;
}

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

@media screen and (min-width: 993px) {
	.location_map-layout .results-posts-container {
		max-height: 32vw;
	}
}

@media screen and (max-width: 992px) {
	.location_map-layout .results-posts-container {
		max-height: 400px;
	}
}

@media screen and (max-width: 767px) {
	.location_map-layout .filters-container {
		padding: 0;
		border: none;
	}
	.location_map-layout .map {
		aspect-ratio: none;
		height: 90dvh;
		width: 100%;
	}
}
