:root {

	/* AA: Transition speeds */
	--crawl: .8s;
  --walk: .4s;
  --run: .2s;
  --sprint: .1s;

	/* AA: Colours */
	--black: #000;
	--white: #FFF;
	--light-grey: #999;
	--dark-grey: #404040;
	
	--sidepanel-width: clamp(280px,16vw,600px);
	--map-width: calc(100vw - var(--sidepanel-width) * 2);
	--map-height: 100vh;

	--font-size: clamp(14px,.8vw,16px);

	--popup-max-width: clamp(360px,80vw,1200px); /* AA: max is 1025 + 2x border width */
	--popup-max-height: 90dvh;
}

@media screen {
  * {
    scrollbar-width: none;
    &::-webkit-scrollbar {
      display: none;
		}
	}
}

body {
	padding: 0;
	margin: 0;
	overflow: hidden;
}

.leaflet-touch .leaflet-bar a:first-child,
.leaflet-touch .leaflet-bar a:last-child,
.button.smooth {
	background-color: var(--white);
	position: relative;
	background-color: white;
	padding: .3em .6em .2em;
	border: solid 2px var(--dark-grey);
	color: var(--dark-grey);
	border-radius: 99999999px;
	transition: padding var(--walk), transform var(--walk), background-color var(--walk), color var(--walk);
	cursor: pointer;
}

.button.round {
	display: flex;
	align-items: center;
	justify-content: center;
}

#popup { 
	background-color: var(--white);
  display: none; 
	box-sizing: content-box;
  border: 1px black solid;
  max-width: var(--popup-max-width);
	max-height: var(--popup-max-height); 
  top: 50%;
  left: 50%;
  transform: translate(-50%,-50%);
  padding: 1em 0 0;
  position: fixed;
	font-size: var(--font-size);
  z-index: 12;
}

#page { 
	background: rgba(0, 0, 0, 0.7);
  width: 100%;
	height: 100%; 
  top:0px;
	left:0px;
  z-index: 10;
  padding: 2em;
  position: absolute;
	opacity: 0;
	pointer-events: none;
	transition: opacity var(--run);
}

body.darken #page {
	opacity: 1;
	pointer-events: initial;
}

#reset-button {
	line-height: 1em;
	position: absolute;
	z-index: 410;
	right: 1rem;
	top: 1rem;
	width: 2.6em;
	height: 2.6em;
	color: black;
	background-color: white;
	font-size: 1.4em;
}

#reset-button span {
	top: -1px;
}

#imprint-button {
	background-color: var(--white);
	position: absolute;
	right: 1rem;
	bottom: 2rem;
	width: 2.6em;
	height: 2.6em;
	z-index: 410;
	font-family: 'Times New Roman', Times, serif;
	font-size: 1.4em;
	font-style: italic;
	color: var(--black);
}

#imprint-button span {
	font-size: 1.2em;
	font-weight: 700;
}

#quarries-activity {
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	justify-content: flex-end;
	position: absolute;
	z-index: 410;
	top: 0;
	left: 0;
	width: 100%;
	height: 100dvh;
	padding: 0 .8em .6em;
	color: black;
	font-size: 0.8vw;
	border-radius: 3px;
	pointer-events: none;
}

#quarries-activity label {
	pointer-events: initial;
}

#quarries-activity label input {
	/* background-color: red; */
	position: absolute;
	top: 0;
	left: 0;
	right: 0;
	bottom: 0;
	opacity: 0;
	cursor: pointer;
}

#quarries-activity label:before {
	display: none;
	position: absolute;
	content: '';
	left: .8em;
	top: 45%;
	width: .5em;
	height: .8em;
	border: 0px solid currentColor;
	border-width: 0 2px 2px 0;
	transform: translateY(-50%) rotate(45deg);
}

#quarries-activity label iconify-icon {
	vertical-align: middle;
	margin: 0 0 .3em .1em;
}

#quarries-activity label:has(input:checked) {
	background-color: var(--dark-grey);
	color: var(--white);
	padding-left: 2em;
}

#quarries-activity label:has(input:checked):before {
	display: block;
}

#popup-iframe {
	background-color: white;
	display: none;
	width: var(--popup-max-width);
	height: var(--popup-max-height);
	padding: 0;
}

#popup-imprint {
	display: none;
	width: 100%;
	height: 100%;
	padding: .6em 4em 1em 2em;
	overflow-y: auto;
}

#popup-imprint h1,
#popup-imprint p {
	margin-bottom: 1em;
}

#popup-imprint p {
	max-width: 920px;
}

#popup-close {
	position: absolute;
	padding-right: .6em;
	padding-top: .3em;
	right: 0;
	top: 0;
}

#popup-close-button {
	background-color: transparent;
	font-size: 4em;
	color: var(--black);
	border: none;
	cursor: pointer;
}

#iframe {
	border: 0;
	width: 100%;
	height: 100%;
	margin: 0;
}

#close-btn {
	font-size: xx-large;
	color: gray;
	margin-right: 0.05em;
}

html {
	font-size: 62.5%;
}

html, body, #page {
	height: 100%;
}

main {
	display: flex;
	flex-direction: row;
	justify-content: center;
}

main nav {
	position: absolute;
	top: 0;
	right: 0;
	width: 100%;
	z-index: 11;
	transition: transform var(--walk);
	pointer-events: none;
}

main nav .burger {
	display: none;
}

main nav div.stone-lists {
	display: flex;
	flex-direction: row;
	justify-content: space-between;
	width: 100%;
}

div.stone-list {
	background-color: var(--dark-grey);
	width: var(--sidepanel-width);
	height: 100vh;
	overflow-y: auto;
	padding: .6em 1.2em 1em;
	font-size: clamp(14px,.8vw,16px);
	pointer-events: initial;
}

div.stone-list a.group {
	/* font-size: clamp(18px,1.2vw,24px); */
	display: block;
	font-weight: bold;
	border-bottom: 1px solid currentColor;
}

div.stone-list a.group.current {
	color: var(--white) !important;
}

div.stone-list ul {
	list-style-position: outside;
	padding-left: 0;
	margin-bottom: 1em;
	list-style-position: inside;
}

div.stone-list .group,
div.stone-list ul li {
	position: relative;
	transition: opacity var(--walk);
}

div.stone-list .faded {
	opacity: .42;
}

div.stone-list ul li.current {
	color: var(--white) !important;
	list-style-type: "\2192";
}

div.stone-list ul li a {
	position: relative;
	text-decoration: none;
	left: 0;
	margin-left: -.4em;
	color: currentColor;
	transition: left var(--walk);
}

div.stone-list ul li.current a {
	margin-left: 0;
	left: .4em;
}

div.stone-list iconify-icon {
	vertical-align: middle;
	margin: 0 0 .2em .3em;
}

div.stone-list a:hover {
	text-decoration: none;
	color: white !important;
}

div#stone-list-1 {
	
}

div#stone-list-2 {
	
}

div#map {
	position: relative;
	width: var(--map-width);
	height: var(--map-height);
	overflow: hidden;
	z-index: 8;
}

.custom-tooltip {
    padding: 0 0.5em 0 0.5em;
}

.custom-cluster {
    position: absolute;
    border: 0px solid red;
    background-color: white;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    
}

.custom-cluster p {
    margin: 0;
    position: absolute;
    top: 50%;
    left: 50%;
    color: white;
    transform: translate(-50%, -50%);
    line-height: 40px;
    text-align: center;
    text-shadow: 0px 0px 3px black;
    font-size: normal;
    font-weight: normal;
    z-index: 9;
}

.svg {
    position: absolute;
    left: 0;
    top: 0;
    z-index: -1;
}

.leaflet-container {
	font-size: 1.3em;
}

.maki-marker {
	display: none;
}

.leaflet-marker-icon.custom-cluster {
	box-shadow: 0 0 4px 0px rgba(0,0,0,.8);
}

.leaflet-marker-icon.custom-cluster p {
	color: black;
	text-shadow: 0 0 3px white;
}

.leaflet-tooltip {
	background-color: transparent;
	padding: 0;
	border: none;
}

.leaflet-tooltip-top {
	margin-top: -.3em;
}

.leaflet-tooltip:before {
	content: none;
}

.leaflet-touch .leaflet-bar {
	border: none;
}

.leaflet-touch .leaflet-bar a,
.leaflet-touch .leaflet-bar a {
	margin-bottom: .3em;
	padding: 0 !important;
	font-family: var(--font-family-monospace);
	line-height: 1.15em;
	text-align: center;
	vertical-align: middle;
}

.leaflet-control-zoom-in,
.leaflet-control-zoom-out {
	font-weight: normal;
}

.eth-tooltip {
	position: relative;
	border: 1px solid currentColor;
	border-radius: .3em;
	padding: .1em .4em;
}

.eth-tooltip:before {
	content: '';
	position: absolute;
	background-color: inherit;
	bottom: 0;
	left: 50%;
	width: 1em;
	height: 1em;
	border: inherit;
	/* transform: rotate(45deg) translate(-.3em,1.3em); */
	box-shadow: 0 1px 3px rgba(0,0,0,0.4);
	transform-origin: 0% 100%;
	transform: rotate(45deg) translate(-52%,48%);
	clip-path: polygon(-10% 110%, 110% -10%, 110% 110%, 0% 110%);
}

/* Huge */
@media only screen and (min-width: 1600px) {
	body {
	
	}
}



/* Large */
@media only screen and (min-width: 1500px) {
	body {
	
	}
}


/* Small */
@media only screen and (min-width: 1024px) and (max-width: 1200px) {
	body {
	
	}
}


/* iPad */
@media only screen and (min-width: 768px) and (max-width: 1024px) {
	body {
	
	}
}
	


/* iPhone + */
@media only screen and (min-width: 320px) and (max-width: 1024px) {

	:root {
		--map-width: 100vw;
		--map-height: 100dvh;
		--popup-max-width: 92vw;
		--popup-max-height: 92dvh;
	}

	#popup {
		width: var(--popup-max-width);
		height: var(--popup-max-height); 
	}

	#popup.material {
		background-color: black;
		padding: 0;
	}

	#popup.material #popup-close-button {
		color: var(--white);
	}

	#popup-close-button {
		font-size: 2.4em;
	}
	
	#popup-iframe {
		background-color: black;
		padding-top: .2em;
	}

	#popup-imprint {
		background-color: white;
		padding: 1.6em 2em 1em 2em;
	}

	#imprint-button {
		left: 1rem;
		right: unset;
		bottom: 4rem;
	}

	#quarries-activity {
		align-items: flex-end;
		padding-bottom: 2.6em;
	}

	main nav {
		width: var(--sidepanel-width);
		height: 100vh;
		transform: translateX(100%);
	}

	main nav .burger {
		display: flex;
		flex-direction: column;
		align-items: center;
		position: absolute !important;
		top: 50%;
		left: 0;
		width: 2em;
		padding: .6em !important;
		font-size: 1.6rem;
		border-radius: 50%;
		text-align: center;
		transform: translate(calc((100% + .6em) * -1),-50%);
		z-index: -1;
		pointer-events: initial;
		cursor: pointer;
	}

	main nav .burger span {
		writing-mode: vertical-rl;
		text-orientation: upright;
		text-transform: uppercase;
	}

	body.nav main nav {
		transform: translateX(0);
	}

	body.nav main nav .burger {
		background-color: var(--dark-grey);
		color: var(--white);
		/* transform: translate(0,-50%); */
	}

	main nav div.stone-lists {
		flex-direction: column;
		height: 100%;
		overflow-y: auto;
		padding-bottom: 6em;
		pointer-events: initial;
	}

	div.stone-list {
		height: auto;
		overflow-y: unset;
	}

	div.stone-list:first-child {
		padding-bottom: 0;
	}

	div.stone-list:last-child {
		padding-top: 0;
	}

	#quarries-activity {
		font-size: inherit;
	}
}



/* iPhone+ Landscape */
@media only screen and (min-width: 320px) and (max-width: 768px) and (max-height: 415px) {
	body {
	
	}
}
