html {
	--webbg: #fff;
	--text: #262626;
	--bg: #eaedf1;
	--cubes: #d5d8dd;
	--whiteorblack: #eff3f5;
	--white: #eff3f5;
	--black: #262626;
	--yes: #4c988c;
	--yes: #009667;
	--no: #c6cbd2;
	--sectioncolor: #000099;
	--sectioncolor2: #3399ff;
	--invert: none;
	--displayDark: none;
	--displayLight: block;
	--tileFilter: hue-rotate(-40deg) brightness(1.05) contrast(1);
}

html.dark-theme {
	--webbg: #141414;
	--text: #eff3f5;
	--bg: #202124;
	--cubes: #717c8e;
	--whiteorblack: #262626;
	--no: #5a6372;
	--invert: invert(0.9) hue-rotate(180deg);
	--displayDark: block;
	--displayLight: none;
	--tileFilter: hue-rotate(-40deg) brightness(1.05) contrast(1) invert(0.9);
}

body {
	background: var(--webbg);
	margin: 0;
}
.bg {
	background: var(--bg);
}
div {
	box-sizing: content-box;
}
b {
	font-weight: 600;
}
.invert {
	filter: var(--invert);
}
.dark {
	display: var(--displayDark);
}
.light {
	display: var(--displayLight);
}
.l {
	text-align: left !important;
}
.c {
	text-align: center !important;
}
.r {
	text-align: right !important;
}

.cubes {
	width: 100%;
	height: 12px;
	color: var(--cubes);
	background-image: radial-gradient(
		circle at 1px 1px,
		currentColor 1px,
		transparent 0
	);
	background-size: 4px 4px;
	background-position: center left;
	max-width: 616px;
	margin: auto;
	margin-bottom: 16px;
}

* {
	-webkit-font-smoothing: grayscale;
	-moz-osx-font-smoothing: grayscale;
	font-family: "GT Eesti", "Arial", sans-serif;
	font-weight: 400;
	font-size: 17px;
	line-height: 1.4;
	color: var(--text);
	margin: 0;
}

.leaflet-container {
	background: var(--leafletBG);
}

.pk {
	font-weight: 700;
	font-size: 29px;
	line-height: 1.1;
	margin-bottom: 6px;
	text-align: center;
}

.ld {
	text-align: center;
	margin-bottom: 10px;
	max-width: 616px;
	margin: auto;
}

.allikas {
	font-size: 13px;
	line-height: 15px;
	opacity: 0.4;
	text-align: center;
	margin-top: 13px;
}

.allikas.allikas-top {
	display: none;
}

.buttons {
	display: flex;
	justify-content: center;
	gap: 2px;
	margin-top: 15px;
}

.buttons div {
	background: var(--bg);
	padding: 10px 17px;
	text-align: center;
	font-size: 15px;
	cursor: pointer;
	line-height: 1;
}

.buttons div:nth-of-type(1) {
	border-top-left-radius: 10px;
	border-bottom-left-radius: 10px;
}

.buttons div:nth-last-of-type(1) {
	border-top-right-radius: 10px;
	border-bottom-right-radius: 10px;
}

.buttons div span {
	font-size: 12px;
	white-space: nowrap;
}

.buttons div br {
	display: none;
}

.buttons div:hover {
	filter: brightness(97%);
}

.buttons div.active {
	background: var(--sectioncolor);
	color: var(--white);
	pointer-events: none;
}

.buttons div.active span {
	color: var(--white);
}

.legend {
	display: flex;
	flex-wrap: wrap;
	gap: 8px 20px;
	width: 100%;
	justify-content: center;
	margin-bottom: 15px;
	margin-top: 15px;
}

.legend .legend--item {
	display: flex;
	align-items: center;
	gap: 5px;
	font-size: 13px;
	line-height: 13px;
}

.legend .legend--item div {
	width: 14px;
	min-width: 14px;
	height: 14px;
	border: 1px solid var(--webbg);
	border-radius: 50%;
	background-position: center center;
	background-repeat: no-repeat;
	background-size: cover;
}

.legend .legend--item.legend-yes div,
#map .custom-marker.icon-yes .marker-inner {
	background-color: var(--yes);
}

.legend .legend--item.legend-no div,
#map .custom-marker.icon-no .marker-inner {
	background-color: var(--no);
	transform: scale(0.35);
	border-color: #565f6b;
}

#map {
	width: 100%;
	height: 650px;
	cursor: default;
	border-radius: 5px;
}

#map * {
	font-weight: inherit;
	font-size: inherit;
	line-height: inherit;
	color: inherit;
	margin: inherit;
}

#map .leaflet-control-zoom {
	filter: var(--invert);
}

#map .leaflet-control-zoom span {
	color: var(--black);
	font-size: 20px;
}

#map img {
	image-rendering: -webkit-optimize-contrast;
	filter: blur(0);
}

#map .leaflet-tile-pane {
	filter: var(--tileFilter);
}

#map .custom-marker .marker-inner {
	width: 100%;
	height: 100%;
	margin: 0;
	border-radius: 50%;
	border: 1px solid var(--webbg);
	box-shadow: 0px 1px 3px rgba(0, 0, 0, 0.2);
	cursor: default;
}

#map .leaflet-tooltip {
	padding: 2px 4px;
	font-size: 13px;
	line-height: 1.35;
	color: var(--webbg);
	background: var(--text);
	border: 0;
}

#map .custom-marker.icon-yes {
	z-index: 9999 !important;
}

#map .leaflet-tooltip-left::before {
	border-left-color: var(--text);
}

#map .leaflet-tooltip-right::before {
	border-right-color: var(--text);
}

#map .tooltip-content--apteek {
	font-weight: 400;
	line-height: 1.1;
}

#map .leaflet-left {
	left: 7px;
}
#map .leaflet-top {
	top: 7px;
}

#map .tooltip-content--apteek span {
	width: 9px;
	min-width: 9px;
	height: 9px;
	border-radius: 50%;
	margin-right: 3px;
	display: inline-block;
	background: var(--no);
}

#map .tooltip-content--apteek span.yes {
	background: var(--yes);
}

#map .leaflet-control-attribution {
	opacity: 0.4;
	background: var(--whiteorblack);
}

#map .leaflet-control-attribution a {
}

@media only screen and (min-width: 1100px) {
	.header {
		display: flex;
		margin-bottom: 13px;
		justify-content: space-between;
		align-items: flex-end;
	}

	.header .col-2 {
		display: flex;
		flex-direction: column;
		margin-bottom: 5px;
		justify-content: flex-end;
	}

	.pk,
	.ld {
		text-align: left;
	}

	.legend {
		justify-content: flex-end;
		margin-bottom: 0;
		margin-top: 19px;
	}

	.buttons {
		order: 1;
	}

	.allikas {
		text-align: right;
	}

	.allikas.allikas-top {
		display: block;
	}

	.allikas.allikas-bottom {
		display: none;
	}
}

@media only screen and (max-width: 580px) {
	.pk,
	.ld {
		text-align: left;
	}

	.pk {
		font-size: 26px;
	}

	.buttons {
		justify-content: flex-start;
		margin-top: 10px;
	}

	.buttons div {
		padding: 9px 0;
		flex-grow: 1;
		max-width: 133px;
		font-size: 14px;
	}

	.buttons div:nth-of-type(1) {
		border-top-left-radius: 7px;
		border-bottom-left-radius: 7px;
	}

	.buttons div:nth-last-of-type(1) {
		border-top-right-radius: 7px;
		border-bottom-right-radius: 7px;
	}

	.legend {
		justify-content: flex-start;
		margin-bottom: 10px;
		margin-top: 12px;
		gap: 5px 20px;
	}

	.allikas {
		text-align: left;
	}

	#map {
		height: 450px;
	}

	#map .leaflet-tooltip {
		max-width: 200px;
	}

	.legend .legend--item.legend-yes div,
	#map .custom-marker.icon-yes .marker-inner {
		transform: scale(0.7);
		border-width: 2px;
	}

	.legend .legend--item.legend-no div,
	#map .custom-marker.icon-no .marker-inner {
		transform: scale(0.3);
		border-color: #778190;
	}

	.dark-theme .legend .legend--item.legend-no div,
	.dark-theme #map .custom-marker.icon-no .marker-inner {
		border-color: #2d3239;
	}
}
