@import url("https://f.pmo.ee/fonts/GTEesti.css");

html {
	--webbg: #fff;
	--text: #262626;
	--bg: #eaedf1;
	--cubes: #d5d8dd;
	--whiteorblack: #eff3f5;
	--white: #eff3f5;
	--black: #262626;
	--sectioncolor: #000099;
	--sectioncolor2: #3399ff;
	--invert: none;
	--blue: #1a4dcc;
	--red: #ab404d;
	--green: #3d7a71;
	--bottomlegendBG: #efe6d9;
}

html.dark-theme {
	--webbg: #141414;
	--text: #eff3f5;
	--bg: #202124;
	--cubes: #717c8e;
	--whiteorblack: #262626;
	--invert: invert(0.9) hue-rotate(180deg);
	--bottomlegendBG: #dcc8ac;
}

body {
	background: var(--webbg);
	overflow: hidden;
}
.bg {
	background: var(--bg);
}
div {
	box-sizing: content-box;
}
b {
	font-weight: 600;
}
.invert {
	filter: var(--invert);
}
.l {
	text-align: left !important;
}
.c {
	text-align: center !important;
}
.r {
	text-align: right !important;
}

* {
	-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;
}

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

.legend {
	display: flex;
	flex-wrap: wrap;
	gap: 6px 20px;
	width: 100%;
	margin-bottom: 8px;
}

.legend .legend--item {
	display: flex;
	align-items: center;
	gap: 5px;
	font-size: 12px;
	line-height: 12px;
	font-weight: 600;
	text-align: left;
}

.legend .legend--item div {
	width: 10px;
	min-width: 10px;
	height: 10px;
	border-radius: 50%;
	background-color: var(--blue);
}

.legend .legend--item div.box2 {
	background-color: var(--red);
}

.legend .legend--item div.box3 {
	background-color: var(--green);
}

.legend.legend-row2 {
	margin-bottom: 0;
}
.legend.legend-row2 .legend--item div {
	border-radius: 0;
	background-position: center center;
	background-repeat: no-repeat;
	background-size: contain;
	background-color: transparent;
}

.legend.legend-row2 .legend--item div.box4 {
	width: 11px;
	height: 11px;
	background-image: url("jupid/legendicon-pop.svg");
}

.legend.legend-row2 .legend--item div.box5 {
	width: 15px;
	height: 12px;
	background-image: url("jupid/legendicon-jaam.svg");
}

.legend.legend-row2 .legend--item div.box6 {
	width: 10px;
	height: 14px;
	background-image: url("jupid/legendicon-elekter.svg");
}

.top-block {
	display: flex;
	justify-content: space-between;
	align-items: flex-end;
	gap: 10px;
}

.top-block .togglebutton {
	background: var(--bg);
	padding: 9px 15px;
	border-radius: 8px;
	font-size: 14px;
	line-height: 1.2;
	font-weight: 600;
	cursor: pointer;
	user-select: none;
	text-align: center;
	min-width: 160px;
}

.top-block .togglebutton:hover {
	filter: brightness(98%);
}

#map {
	width: 100%;
	height: auto;
	aspect-ratio: 1.35;
	margin-bottom: 10px;
	margin-top: 13px;
	border-radius: 5px;
	background: #000;
}

#map * {
	font-weight: inherit;
	color: #fff;
}

#map .leaflet-control-zoom {
	
}

h1 {
	font-family: "GT Eesti";
	font-weight: bold;
	font-size: 28px;
	line-height: 1.2;
	margin: 0;
	margin-bottom: 11px;
}

.leaflet-touch .leaflet-bar a {
	background: var(--black);
}

.leaflet-touch .leaflet-bar {
	border: 0;
}
.leaflet-touch .leaflet-bar a:first-child {
	border-top-left-radius: 8px;
	border-top-right-radius: 8px;
}
.leaflet-touch .leaflet-bar a:last-child {
	border-bottom-left-radius: 8px;
	border-bottom-right-radius: 8px;
}

.leaflet-touch .leaflet-bar a span {
	color: #fff !important;
	font-size: 19px;
	font-family: "GT Eesti";
	font-weight: 700 !important;
}

#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: 3px 5px;
	font-size: 13px;
	line-height: 1.35;
	color: var(--webbg);
	background: var(--blue);
	border: 0;
	box-shadow: 0px 1px 1px rgba(0, 0, 0, 0.5);
}

#map .leaflet-tooltip * {
	font-size: 11px;
	font-weight: 600;
}

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

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

#map .leaflet-tooltip.tooltip-type2 {
	background: var(--red);
}

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

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

#map .leaflet-tooltip.tooltip-type3 {
	background: var(--green);
}

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

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


#map .leaflet-tooltip .custom-tooltip--row {
	display: flex;
	align-items: center;
}

#map .leaflet-tooltip .custom-tooltip--row:nth-child(1) {
	justify-content: space-between;
	font-size: 12px;
	margin-bottom: -1px;
	gap: 5px;
}

#map .leaflet-tooltip .custom-tooltip--icons {
	display: flex;
	align-items: center;
	gap: 4px;
}

#map .leaflet-tooltip .custom-tooltip--icons div {
	background-position: center center;
	background-size: contain;
	background-repeat: no-repeat;
}

#map .leaflet-tooltip .custom-tooltip--icons .icon-polevkivi {
	background-image: url("jupid/icon-jaam.svg");
	width: 14px;
	height: 9px;
}

#map .leaflet-tooltip .custom-tooltip--icons .icon-elektrijaam {
	background-image: url("jupid/icon-elekter.svg");
	width: 7px;
	height: 11px;
}

#map .leaflet-tooltip .custom-tooltip--icons .icon-pop {
	background-image: url("jupid/icon-pop.svg");
	width: 10px;
	height: 10px;
	margin-right: 3px;
}

#map .leaflet-tooltip .custom-tooltip--icons .visibility0 {
	display: none;
}

.bottom-legend {
	width: 100%;
	height: 126px;
	background: var(--bottomlegendBG);
	box-sizing: border-box;
	border-radius: 6px;
	background-image: url("jupid/map-legend-788.svg");
	background-size: 788px;
	background-repeat: no-repeat;
	background-position: 14px center;
}

@media only screen and (max-width: 600px) {
	h1 {
		font-size: 25px;
	}

	.top-block {
		display: block;
		text-align: right;
	}
	.top-block .legend-wrapper {
		display: flex;
		gap: 10px;
	}
	.top-block .legend--item {
		align-items: flex-start;
	}
	.top-block .togglebutton {
		display: block;
		margin-top: 10px;
		padding: 7px 10px;
	}
}

@media only screen and (max-width: 500px) {
	#map {
		aspect-ratio: 0.92;
	}
}

@media only screen and (max-width: 400px) {
	h1 {
		font-size: 24px;
	}
	.top-block {
		display: block;
		text-align: right;
	}

	.top-block .legend-wrapper {
		display: flex;
		gap: 10px;
	}

	.top-block .legend--item {
		align-items: flex-start;
	}
	.top-block .togglebutton {
		display: block;
		padding: 7px 10px;
	}
	#map {
		aspect-ratio: 0.92;
	}
}

@media only screen and (max-width: 818px) {
	.bottom-legend {
		height: 134px;
		background-image: url("jupid/map-legend-600.svg");
		background-size: 600px;
	}
}

@media only screen and (max-width: 628px) {
	.bottom-legend {
		height: 134px;
		background-image: url("jupid/map-legend-563.svg");
		background-size: 563px;
	}
}

@media only screen and (max-width: 584px) {
	.bottom-legend {
		height: 196px;
		background-image: url("jupid/map-legend-394.svg");
		background-size: 394px;
	}
}

@media only screen and (max-width: 420px) {
	.bottom-legend {
		height: 196px;
		background-image: url("jupid/map-legend-378.svg");
		background-size: 378px;
	}
}

@media only screen and (max-width: 404px) {
	.bottom-legend {
		background-image: url("jupid/map-legend-378.svg");
		background-size: calc(100% - 20px);
		background-position: center center;
		height: auto;
		aspect-ratio: 2.03;
	}
}
