body {
    margin: 0;
    font-family: Arial, sans-serif;
	background-color: white;

    --md-sys-color-secondary-container: 179, 7, 7;
	--md-sys-color-secondary-complementary: 7, 179, 56;
	--md-sys-color-on-secondary-container: 246, 250, 235;
	--md-sys-color-surface: 255, 251, 254;
	--md-sys-color-on-surface: 28, 27, 31;
	--md-sys-color-outline: 121, 116, 126;
}

a:link {
	text-decoration: none;
 }
  
a:visited {
	text-decoration: none;
}

#map { 
    height: 100vh;
    z-index: 0;
	background-color: white;
}

.leaflet-container.crosshair-cursor-enabled {
    cursor: crosshair;
}

#popupBox {
	position: absolute;
	visibility: hidden;
	top: min(50px, 10%);
	left: 50%;
	margin-right: -50%;
	transform: translate(-50%, -50%);
    z-index: 10;

	border: rgba(255,255,255,0.7) solid 1.2px;

	display: flex;
	flex-direction: column;
	
	color: #f5eedc;
    background-color: #4B6B47;
    box-shadow: 0 4px 8px 0 rgba(0, 0, 0, 0.2), 0 6px 20px 0 rgba(0, 0, 0, 0.19);
	opacity: 0;
	transition: opacity 0.5s ease-out;
}

.popupText {
	padding: 10px 5px;
}

#popupProgress {
	width: 100%;
	background-color: #4B6B47;
}
  
 #popupBar {
	width: 100%;
	height: 3px;
	background-color: #9BAF88;
}

/* Map buttons */

.segmented-button {
	display: grid;
	width: fit-content;
	grid-auto-flow: column;
	grid-auto-columns: minmax(48px, 1fr);

    user-select: none;
}

.segmented-button > label > input {
	position: absolute;
	opacity: 0;
	width: 0;
	height: 0;
	margin: 0;
	padding: 0;
}

.segmented-button > label:first-child > .button-label {
	border-top-left-radius: 20px;
	border-bottom-left-radius: 20px;
}

.segmented-button > label:last-child > .button-label {
	border-top-right-radius: 20px;
	border-bottom-right-radius: 20px;
}

.segmented-button > label > .button-label {
	padding: 0 18px;
	text-align: center;
	color: #2B2B2B;
	/* border: 1px solid rgb(var(--md-sys-color-outline)); */
	border-right: 0;
	line-height: 40px;
	font-size: 18px;
    vertical-align: middle;
    font-family: "Material Symbols Rounded";
	letter-spacing: 0.1px;
	font-weight: 500;
	white-space: nowrap;
	overflow: hidden;
	transition: background-color 0.1s ease-in-out, color 0.1s ease-in-out;
}

.segmented-button > label > input:checked + .button-label, .segmented-button > label > input:active + .button-label {
	color: #f5eedc;
	background-color: #b24b4b;
	/* box-shadow: inset 0 0 4px rgba(0, 0, 0, 0.5); */
	/* padding: 0 12px; */
}

.segmented-button > label > input:not(:disabled):not(:checked) + .button-label:hover {
	background-color: #e6d8b7;
}

.segmented-button > label > input:not(:disabled) + .button-label:hover::after {
	background-color: rgba(0,0,0, 0.08);
}

.segmented-button > label > input:not(:disabled) + .button-label:active::after {
	background-color: rgba(0,0,0, 0.12);
}

.segmented-button > label > input:disabled + .button-label {
	background-color: rgba(0, 0, 0, 0.05);
	color: rgba(0, 0, 0, 0.38);
	cursor: not-allowed;
}

.tool-container {
	position: absolute;
	display: flex;
	flex-direction: column;
	bottom: min(50px, 10%);
	left: 50%;
	margin-right: -50%;
	transform: translate(-50%, -50%);
    z-index: 10;

    border-radius: 20px;

    background-color: #f5eedc;
    box-shadow: 0 4px 8px 0 rgba(0, 0, 0, 0.2), 0 6px 20px 0 rgba(0, 0, 0, 0.19);
}

#layerMenu, #wildMagicMenu {
	position: absolute;
	bottom: 45px;
	right: 0px;
    z-index: 8;
	background-color: #f5eedc;
    box-shadow: 0 4px 8px 0 rgba(0, 0, 0, 0.2), 0 6px 20px 0 rgba(0, 0, 0, 0.19);
	border-radius: 20px;
	padding: 20px;
	flex-direction: column;
	display: none;
}

#layerMenu label, #wildMagicMenu label {
	cursor: pointer;
	margin: 5px 0;
	vertical-align: middle;
	line-height: 1.2em;
}

#layerMenu input[type="checkbox"] {
	accent-color: #4b6b47;
}

.segmented-button input[value="layers"]:checked ~ #layerMenu, .segmented-button input[value="layers"]:checked + #layerMenu, 
.segmented-button input[value="wildMagic"]:checked ~ #wildMagicMenu, .segmented-button input[value="wildMagic"]:checked + #wildMagicMenu {
	display: flex;
}

/* Marker Tools */

.markerTools {
	display: flex;
	
	text-align: center;
	line-height: 40px;
	font-size: 21px;
    vertical-align: middle;
    font-family: "Material Symbols Rounded";
	letter-spacing: 0.1px;
	font-weight: 500;
	white-space: nowrap;

	border-bottom: black solid 1px;
	margin-bottom: 15px;
}

.markerTools > span:not(:last-child) {
	margin-right: 10px;
}

.markerTools > span:first-child {
	margin-right: 25px;
}

.markerTools > span {
	cursor: pointer;
	transition: color 0.1s ease-in-out;
}

.markerTools > span:hover {
	color: #b24b4b;
}

.disabledLink, disabledLink:hover {
	color: #d9d9d9 !important;
	cursor: default !important;
}

.markerName {
	font-weight: bold;
}

.markerBody {
	white-space: pre-line;
}

/* 
*  ====== Searchbar ====== 
*/

#overlay-search-container {
	position: fixed;
	visibility: hidden;
	width: 500px;
	margin: 5% auto; /* Only centers horizontally not vertically! */
	left: 0;
	right: 0;
	z-index: 20;
    background: #F5EEDC;
    border-radius: 20px;
    box-shadow: 0 4px 8px 0 rgba(0, 0, 0, 0.2), 0 6px 20px 0 rgba(0, 0, 0, 0.19);
    padding: 12px 20px;
    box-sizing: border-box;
}

#overlay-search-container input[type="search"] {
	width: 100%;
	border: none;
	color: #2B2B2B;
	outline: none;
	font-weight: 600;
	font-size: 1.2em;
	background: transparent;
	caret-color: #3C6E91;
}

/* Placeholder style */
#overlay-search-container input[type="search"]::placeholder {
	color: #E6D8B7;
}

#search-results {
	list-style: none;
	margin: 0;
	padding: 0;
	background: #9BAF88;
	border-radius: 8px;
	overflow: scroll;
	max-height: 200px;
}

#search-results:has(li) {
	margin-top: 8px;
}

#search-results li {
	padding: 8px 12px;
	cursor: pointer;
	color: #F5EEDC;
}

#search-results li:hover {
	background: #4B6B47;
}

.material-symbols {
	font-family: "Material Symbols Rounded";
	text-align: center;
	line-height: 21px;
	font-size: 21px;
    vertical-align: middle;
}

/* 
*  ====== Popups ====== 
*/

.leaflet-popup-content-wrapper, .leaflet-popup-tip {
	background-color: #f5eedc !important;
}

.distancePopup {
	margin-top: 12px;
	border-top: 1px solid #2B2B2B;
	padding-top: 12px;
}

/* 
*  ====== Slider ====== 
*/
.slider {
	-webkit-appearance: none;
	appearance: none;
	width: 100%;
	height: 6px;
	border-radius: 3px;  
	background: #E6D8B7;
	outline: none;
	opacity: 0.7;
	-webkit-transition: .2s;
	transition: opacity .2s;
  }
  
  .slider::-webkit-slider-thumb {
	-webkit-appearance: none;
	appearance: none;
	width: 13px;
	height: 13px;
	border-radius: 50%; 
	background: #b24b4b;
	cursor: pointer;
  }
  
  .slider::-moz-range-thumb {
	width: 13px;
	height: 13px;
	border-radius: 50%;
	background: #b24b4b;
	cursor: pointer;
  }

/* 
*  ====== Surge Popup ====== 
*/

#surge {
	display: flex;
	align-items: center;
	padding: 10px;
	border: 2px solid red;
	border-radius: 10px;
	margin-top: 15px;

}

#surgeEffect {
	flex-grow: 4;
	margin-left: 12px;
}
