body
{
	color: white;
	background: #01080c;
	font-family: sans-serif;
}

*
{
	margin: 0;
	padding: 0;
}

a:link, a:visited, a:hover, a:active
{
	color: #1e6fc5;
}

input[type=button]
{
	cursor: pointer;
}

.centered_text
{
	text-align: center;
}

#about
{
	display: none;
	position: absolute;
	top: 0;
	bottom : 0;
	left: 0;
	right: 0;
	justify-content: center;
	align-items: center;
}

#about_container
{
	position: relative;
	z-index: 999999;
	max-width: 100%;
	max-height: 100%;

	border-radius: 2px;
	box-shadow: inset 0 0 0 1px #ffffff44;
}

#about_content
{
	position: absolute;
	top: 0;
	bottom : 0;
	left: 0;
	right: 0;
	scrollbar-color: #ffffff66 #00000000;
	scrollbar-width: thin;
	overflow-y: scroll;
	padding: 40px;
}

#about_shadow
{
	position: absolute;
	top: 0;
	bottom : 0;
	left: 0;
	right: 0;
	border-radius: 2px;
	box-shadow:
		inset 0 -50px 30px -30px #000000aa,
		inset 0  50px 30px -30px #000000aa;
	pointer-events: none;
}

#about input[type=button]
{
	position: absolute;
	top: 15px;
	right: 15px;
	text-align: center;
	color: white;
	border: none;
	width: 18px;
	min-height: 18px;
	flex-shrink: 0;
	filter: invert(0.5);
	background: url("delete.jxl");
	background-size: 18px 18px;
	background-repeat: no-repeat;
	background-position: center;
}

#about p, #about ul
{
	margin: 25px 0;
}

#about p:first-child
{
	margin-top: 0;
}

#about p:last-child
{
	margin-bottom: 0;
}

#about ul li
{
	margin-left: 20px;
	padding: 5px;
}

#about_link
{
	cursor:pointer;
}

#controls article
{
	padding: 20px;
}

#markers div, .map_elements
{
	display: flex;
	margin: 15px;
	text-align: left;
	width: calc(100% - 2*15px);
}

#markers label, .map_elements label
{
	padding-left: 10px;
	width: fit-content;
}

#markers span
{
	border-top: 1.6px dotted #ffffff38;
	flex-grow: 1;
	margin: 11.5px 11px 0px 8.5px;
}

#markers input[type=button]
{
	float: right;
	margin-top: 3px;
	text-align: center;
	color: white;
	border: none;
	width: 18px;
	min-height: 18px;
	flex-shrink: 0;
	background: url("delete.jxl");
	background-size: 18px 18px;
	background-repeat: no-repeat;
	background-position: center;
}

#results
{
	margin-top: calc(-0.8em / 2 - 10px) !important;
	padding-top: calc(0.8em / 2 + 17px) !important;
	padding-bottom: 7px !important;
	background: white !important;
	border-radius: 0px 0px 18px 18px;
	border: 3px solid black;
}

#results input[type=button]
{
	margin: 7px 14px;
	width: calc(100% - 2*14px);
	border-radius: 10px;
	border: none;
	padding: 7px;
	white-space: normal;
}

#controls article input[type=text]
{
	width: calc(100% - 10px - 30px - 2*3px);
	height: 0.8em;
	padding: 10px 30px 10px 10px;
	margin-top: 10px;
	border-radius: 15px;
	border: 3px solid;

	position: relative;
	z-index: 99999;
}

#save
{
	display: flex;
	justify-content: center;
	flex-wrap: wrap;
	gap: 10px;
}

#save input[type=button]
{
	background: none;
	border: 2px solid white;
	color: white;
	padding: 6px 10px;
	border-radius: 15px;
	flex-grow: 1;
	flex-basis: 0;
}

#gradient
{
	position: absolute;
	z-index: 999;

	border:2px solid #000000dd;
	font-size: 0.8em;

	display: flex;
	justify-content: space-between;

	bottom: 0;
	left: 0;

	width: 200px;
	height: 18px;
	padding: 0 4px;

	background: linear-gradient(90deg,
		#00000099 14%,
		#5f2381cc 28%,
		#c94245ee 43%,
		#fa730dee 57%,
		#ffae21ee 71%,
		#ffe17dee 86%,
		#ffffffee 100%);
}

#gradient div:first-child
{
	color: white;
}

#gradient div:last-child
{
	color: black;
}

/* wide screen */
@media screen and (width >= calc(100vh + 300px))
{
	#black
	{
		display: none;
	}

	#map
	{
		position: absolute;

		left: 0px;
		top: 0px;
		bottom: 0px;

		width: 80%;
		max-width: calc(100% - 260px - 2 * 20px);
	}

	#controls
	{
		position: absolute;

		right: 0px;
		top: 0px;
		bottom: 0px;

		width: calc(20% - 2 * 20px);
		min-width: 260px;

		padding: 20px;
		overflow-x: hidden;
		overflow-y: scroll;
	}

	#results
	{
		width: calc(100% - 2*40px - 2*3px);
	}

	#time
	{
		width: 100%;
	}

	.leaflet-left.leaflet-top
	{
		margin-left:10px !important;
		margin-top:10px !important;
	}

	#credits
	{
		position: absolute;
		bottom: 0;
		left: 0;
		width: 80%;
		max-width: calc(100% - 260px - 2 * 20px);
		text-align: right;
		z-index: 999;
		opacity: 0.7;
	}

	#about_container
	{
		width: 800px;
		height: 400px;
		background: #000000dd;
	}
}

/* narrow screen */
@media screen and (width < calc(100vh + 300px))
{
	#map
	{
		position: absolute;

		right: 0px;
		left: 0px;
		top: 0px;
		bottom: 90px;
	}

	#controls
	{
		position: absolute;
		z-index: 9999;

		right: 0px;
		left: 0px;
		top: calc(100% - 90px - 1.25em - 3*15px);
		bottom: 0px;

		overflow-x: hidden;
		overflow-y: hidden;

		transition: top 0.12s linear 0s, padding-top 0.12s linear 0s;
	}

	#controls article
	{
		width: 600px;
		max-width: calc(100% - 2*35px);
		margin: 0 auto;
		text-align: center;
	}

	#results
	{
		width: min(calc(100% - 2*35px - 2*3px), calc(600px - 2*3px));
	}

	#timevalue
	{
		padding: 15px 25px;
		background: #000000dd;
		border-radius: 25px;
		border: none;
		line-height: 1.25em;
	}

	#timeblock
	{
		padding: 15px 35px !important;
	}

	#time
	{
		width: 100%;
		height: 30px;
		margin: calc((90px - 30px)/2 + 2*15px) 0px calc((90px - 30px)/2) 0px;
	}

	/* burger menu containers, in order */
	nav
	{
		z-index:99999;
		position:fixed;
		/* hack */
		right:3%;
		margin-top:3%;
		/* hack */
		width:19%;
		padding-bottom:19%;
	}

	#nav_burger
	{
		position:absolute;
		right:0;

		width:100%;
		height:10px;
		max-width:60px;
	}

	#burger
	{
		display:block;
		position:absolute;
		pointer-events:auto;
		cursor:pointer;

		right:0;
		top:0;

		width:100%;
		padding-bottom:100%;
		background:#000000dd;

		border-radius:13px;
		border-style:solid;
		border-width:3px;
		border-color:black;
	}

	#burger_icon
	{
		position:absolute;
		width:100%;
		height:100%;
	}

	.burger_bar
	{
		margin:17% auto;

		width:60%;
		height:10.6%;

		background:white;
	}

	#nav
	{
		pointer-events: none;
	}

	#nav.menu_opened ~ #controls
	{
		padding-top: 15px;
		top: 0px;
		overflow-x: hidden;
		overflow-y: scroll;
	}

	#nav.menu_opened ~ #black
	{
		top: calc(1.25em + 4*15px);
	}

	#nav.menu_opened ~ #backdrop
	{
		opacity: 1;
	}

	.leaflet-left.leaflet-top
	{
		margin-left:3% !important;
		margin-top:3% !important;
	}

	#credits
	{
		position: absolute;
		top: 0;
		left: 0;
		right: 0;
		margin-top: 3%;
		text-align: center;
		z-index: 999;
		opacity: 0.7;
		font-size: 0.8em;
	}

	#credits > span
	{
		border-radius: 15px;
	}

	#gradient
	{
		transform: rotate(-90deg);
		transform-origin: 22px 0px;
		bottom: 90px;
		left:-22px;
	}

	#about_container
	{
		width: 100%;
		height: 100%;
		background: #000000;
	}
}

#timeblock
{
	text-align: center;
	padding: 20px;
}

#timevalue
{
	font-family: monospace;
	font-size: 1.25em;
}

#results
{
	display:none;
	background-color:#000000ee;
}

#search:focus ~ #results, #results:has(> input:focus), #results:has(> input:active), #results:focus, #results:active
{
	display:block;
	position:absolute;
}

#clear
{
	position:relative;
	float:right;
	top:-27px;
	right:10px;
	z-index: 99999;
	width: 18px;
	height: 18px;
	border: none;
	filter: invert(0.6);
	background: url("delete.jxl");
	background-size: 18px 18px;
	background-repeat: no-repeat;
	background-position: center;
}

.nobreak
{
	white-space: nowrap;
}

#black
{
	position: absolute;
	z-index: 9998;

	right: 0px;
	left: 0px;
	top: calc(100% - 90px);
	bottom: 0px;

	background: #01080c;
	transition: top 0.12s linear 0s;
}

#backdrop
{
	position: absolute;
	z-index: 9997;
	left: 0px;
	right: 0px;
	top: 0px;
	bottom: 0px;

	opacity: 0;
	background: #01080c;
	transition: opacity 0.12s linear 0s;
	pointer-events: none;
}

hr
{
	margin: 0 auto;
	width: 35%;
	background: #ffffff38;
	height: 3px;
	border: none;
	border-radius: 2px;
}

/* leaflet overrides */
.leaflet-bar
{
	border: none !important;
}

.leaflet-bar a
{
	background: none;
	color: white;
	border-bottom: none !important;
	background: #000000dd !important;

	&:first-child
	{
		border-top-left-radius: 10px !important;
		border-top-right-radius: 10px !important;
	}

	&:last-child
	{
		border-bottom-left-radius: 10px !important;
		border-bottom-right-radius: 10px !important;
	}

	&:hover, &:focus
	{
		background: #181818dd !important;
	}

	&.leaflet-disabled
	{
		background: #000000dd !important;
		color: grey !important;
	}
}

.leaflet-control-container
{
	height:100%;
	width:100%;
}

.leaflet-left .leaflet-control
{
	margin-left:0 !important;
}

.leaflet-top .leaflet-control
{
	margin-top:0 !important;
}

.leaflet-control-attribution
{
	display: none;
}

#credits > span
{
	background: #000000dd;
	padding: 0px 5px 0px 5px;
}

#credits a
{
	color: white;
	text-decoration: none;
}
