* {
	box-sizing: border-box;
}

html, body {
	height: 100%;
	width: 100%;
	margin: 0;
	padding: 0;
	position: relative;
	font-size: 16px;
	overflow: hidden;
}
main {
	display: contents;
}
#map {
	height: 100%;
	width: 100%;
}

.maplibregl-ctrl-bottom-right {
	right: calc(36% + 5px);
}

.material-symbols-outlined{
    display: inline-flex;
    vertical-align: middle;
}

/* --- MENU ---- */
/* --- Traject-paneel --- */
#traject-panel {
	position: fixed;
	left: 70px;
	bottom: 36px;
	background: rgba(255, 255, 255, 0.95);
	backdrop-filter: blur(10px);
	border-radius: 10px;
	box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
	padding: 10px 12px 12px 14px;
	min-width: 200px;
	z-index: 6;
	max-height: 280px;
	overflow-y: auto;
	font-family: 'Roboto', sans-serif;
}
#traject-panel.verborgen { display: none; }

.tp-header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	margin-bottom: 8px;
}
#traject-panel-sluiten {
	background: none;
	border: none;
	cursor: pointer;
	font-size: 1.1em;
	color: #aaa;
	line-height: 1;
	padding: 0;
	flex-shrink: 0;
}
#traject-panel-sluiten:hover { color: #444; }

.tp-item {
	display: flex;
	align-items: center;
	gap: 8px;
	padding: 4px 0;
	position: relative;
}
.tp-item:not(:last-child)::after {
	content: '';
	position: absolute;
	left: 5px;
	top: 18px;
	bottom: -4px;
	width: 2px;
	background: #ddd;
	z-index: 0;
}
.tp-dot {
	width: 12px;
	height: 12px;
	border-radius: 50%;
	flex-shrink: 0;
	position: relative;
	z-index: 1;
	border: 2px solid rgba(255,255,255,0.6);
}
.tp-actief .tp-dot {
	width: 16px;
	height: 16px;
	margin-left: -2px;
	box-shadow: 0 0 0 3px rgba(0, 0, 0, 0.12);
}
.tp-info {
	display: flex;
	flex-direction: column;
	line-height: 1.2;
}
.tp-jaar {
	font-size: 0.9em;
	font-weight: 600;
	color: #999;
}
.tp-naam {
	font-size: 0.9em;
	color: #999;
}
.tp-actief .tp-jaar { color: #222; }
.tp-actief .tp-naam { color: #444; font-weight: 500; }
.tp-kopje { font-size: 1em; font-weight: 700; color: #333; }
.tp-laden  { font-size: 0.82em; color: #aaa; padding: 4px 0; }

#menu-backdrop {
	position: fixed;
	inset: 0;
	background: rgba(0, 0, 0, 0.4);
	z-index: 5;
	opacity: 0;
	pointer-events: none;
	transition: opacity 0.2s;
}
#menu-backdrop.zichtbaar {
	opacity: 1;
	pointer-events: auto;
}

#menu {
	height: 40px;
	width: 50px;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	background-color: #ffffff;
	font-size: 1.3em;
	color: #444444;
	position: absolute;
	left: -5px;
	top: 20px;
	border-radius: 10px;
	box-shadow: 0 4px 8px 0 rgba(0, 0, 0, 0.2);
	cursor: pointer;
	z-index: 7;
}

#menu-items {
	left: -5px;
	top: 80px;
	position: absolute;
	display: inline-block;
	z-index: 7;
}

.menu-item {
	background-color: #ffffff;
	font-family: 'Roboto', sans-serif;
	font-size: 1em;
	color: #666666;
	padding: 6px;
	padding-left: 16px;
	padding-right: 16px;
	border-radius: 10px;
	box-shadow: 0 4px 8px 0 rgba(0, 0, 0, 0.2);
	cursor: pointer;
	width: fit-content;
	display: none;
	margin-bottom: 8px;
}

.menu-item:hover {
	box-shadow: 0 4px 16px 0 rgba(0, 0, 0, 0.4);
}
/* --- LOSSE ELEMENTEN --- */
#jaarweergave {
	position: absolute;
	top: 12px;
	left: 80px;
	font-size: 3em;
	font-family: 'Roboto', serif;
	font-weight: bold;
	color: #333333;
	padding: 5px;
	text-shadow: -1px 1px 0 #fff, 1px 1px 0 #fff, 1px -1px 0 #fff, -1px -1px 0 #fff;
}
#mapoverlay {
	width: 65%;
	height: 1px;
	position: absolute;
	left: 0px;
	bottom: 0px;
}
#settingbuttons {
	visibility: hidden;
	display: none;

	position: absolute;
	margin: auto;
	bottom: 12px;
	left: 0px;
	right: 0px;
	text-align: center;
	color: #666666;
	width: fit-content;
	cursor: pointer;
	border-radius: 10px;
	box-shadow: 0 4px 8px 0 rgba(0, 0, 0, 0.2);
	background-color: #ffffff;
	padding: 10px;
	font-size: 1em;
	line-height: 1em;
	height: 40px;
	font-family: 'Roboto', sans-serif;
}
#ttsToggle {
	color: #da1f1a;
	font-size: 24px;
	vertical-align: middle;
	transition: color 0.2s;
}
#ttsToggle_wrapper {
    display: inline-block;
}

/* --- LEGENDA ---- */
#legenda {
	position: absolute;
	top: 60px;
	left: 80px;
	font-size: 0.8em;
	font-family: 'Roboto', sans-serif;
	color: #111111;
	padding: 5px;
	line-height: 30px;
	text-shadow: -1px 1px 0 #fff, 1px 1px 0 #fff, 1px -1px 0 #fff, -1px -1px 0 #fff;
	list-style-type: none;
	margin: 0px;
}

.legenda_item {
	display: none;
	height: 18px;
}
@keyframes legenda-in {
	from { opacity: 0; transform: translateX(-8px); }
	to   { opacity: 1; transform: translateX(0); }
}
@keyframes legenda-uit {
	from { opacity: 1; max-height: 18px; }
	to   { opacity: 0; max-height: 0; }
}
.legenda_nieuw {
	animation: legenda-in 0.4s ease-out;
}
.legenda_weg {
	animation: legenda-uit 0.3s ease-in forwards;
	overflow: hidden;
}

.legenda_naam {
	display: inline;
}

.legenda_afkorting {
	display: none;
}

/* ---------TIMELINE-------------*/

#timeline {
	width: 36%;
	height: 100%;
	padding: 5px;
	margin: 0px;
	overflow: auto;
	position: absolute;
	right: 0px;
	top: 0px;
	list-style-type: none;
}

#show_line {
	position: absolute;
	right: 36%;
	top: calc(30% + 30px);
	color: #FF0000;
}
@keyframes hint-in {
	from { opacity: 0; transform: translateX(12px); }
	to   { opacity: 1; transform: translateX(0); }
}
@keyframes hint-in-mobiel {
	from { opacity: 0; transform: translateX(-50%) translateY(12px); }
	to   { opacity: 1; transform: translateX(-50%) translateY(0); }
}
#timeline-hint {
	position: absolute;
	right: calc(36% + 20px);
	top: calc(30% + 22px);
	background-color: #333333;
	color: #ffffff;
	font-family: 'Roboto', sans-serif;
	font-size: 1em;
	font-weight: bold;
	padding: 10px 16px;
	border-radius: 10px;
	white-space: nowrap;
	box-shadow: 0 4px 16px rgba(0,0,0,0.4);
	animation: hint-in 0.5s ease-out 0.8s both;
	transition: opacity 0.5s;
	z-index: 1;
}
#timeline-hint.verborgen {
	opacity: 0;
}

#timeline li {
	font-family: 'Roboto', sans-serif;
	line-height: 1.5;
	font-size: 1em;
	padding: 10px;
	margin-top: 12px;
	border-radius: 10px;
	box-shadow: 0 4px 8px 0 rgba(0, 0, 0, 0.2);
	transition: 0.3s;
	position: relative;
	backdrop-filter: blur(15px) brightness(120%);
}

.timeline_era {
	color: #FFFFFF;
}
.timeline_era h2, #timeline_footer h2 {
	font-size: 1.3em;
	font-family: 'Roboto Slab', serif;
}
.timeline_era .backtotop {
	position: absolute;
	right: 10px;
	top: 10px;
	color: #FFFFFF;
	cursor: pointer;
}
.timeline_era p {
	font-style: italic;
}

#timeline .title {
	font-size: 2em;
	font-family: 'Roboto Slab', serif;
	font-weight: bold;
	margin-top: 10px;
	margin-bottom: 10px;
	cursor: pointer;
}
.timeline_item h3 {
	font-size: 1.1em;
	font-family: 'Roboto Slab', serif;
	font-weight: 900;
	margin-bottom: 5px;
}

#timeline_header, #timeline_footer {
	background-color: #333333;
	color: #ffffff;
}
#timeline_header a {
	color: #FFFFFF;
}
#timeline_header .eralink {
	display: inline-block;
	border-radius: 10px;
	color: #FFFFFF;
	padding: 4px;
	margin: 4px;
	box-shadow: 0 0px 2px 0 rgba(255, 255, 255, 0.4);
}
#timeline_header .eralink:hover {
	cursor: pointer;
}
#timeline_header #grootscherm {
	display: block;
	margin-top: 16px;
}
#timeline_header .kleinscherm {
	display: none;
}

.timeline_item {
	background-color: rgba(255, 255, 255, .4);
	cursor: pointer;
	text-rendering: optimizeLegibility;
	font-weight: 400;
	color: #333333;
}
.timeline_item[data-active="1"] {
	background-color: rgba(255, 255, 255, 1);
	box-shadow: 0 8px 16px 0 rgba(255, 0, 0, 0.1);
}

.timeline_item:hover {
	box-shadow: 0 8px 16px 0 rgba(0, 0, 0, 0.8);
}

.timeline_item img {
	display: none;
	max-width: 100%;
}

#timeline_footer #initall {
	background-color: #ffffff;
	color: #333333;
	padding: 5px;
	width: 200px;
	height: 30px;
	box-shadow: 0 8px 16px 0 rgba(0, 0, 0, 0.4);
	border-radius: 10px;
	margin-bottom: 10px;
	cursor: pointer;
	transition: 0.3s;
}
#timeline_footer #initall:hover {
	background-color: #0964f7;
	color: #FFFFFF;
}
#timeline_footer #disclaimer {
	font-size: 0.8em;
	line-height: 0.8em;
}
/* ------- JAARBALK ---------------*/

#jaarstats {
	position: absolute;
	left: 0%;
	top: 0px;
	font-family: 'Roboto', sans-serif;
	font-size: 0.8em;
	color: #333333;
	background-color: rgba(255, 255, 255, .3);
	box-shadow: 0 4px 8px 0 rgba(0, 0, 0, 0.2);
	height: 100%;
	width: 60px;
	padding: 0px;
	padding-top: 80px;
	text-align: center;
	list-style-type: none;
	margin: 0px;
	backdrop-filter: blur(20px);
	overflow: hidden;
}
#jaarstats .jaarbalkcontainer_leeg, #jaarstats .jaarbalkcontainer {
	width: 100%;
	margin: 0px;
	padding: 0px;
}
#jaarstats .jaarbalkcontainer {
	cursor: pointer;
	position: relative;
}
#jaarstats .jaarbalkcontainer[data-active="1"], #jaarstats .jaarbalkcontainer[data-hovered="1"] {
	background-color: rgba(255, 0, 0, 1);
}
#jaarstats .jaarbalk {
	position: relative;
	height: calc((100vh - 150px) / 210);
	width: calc(var(--n) * 50px);
	margin-left: 0;
	margin-right: auto;
	border-radius: 2px;
	pointer-events: none;
	background-color: #FFFFFF;
}
#jaarstats .jaarbalkcontainer[data-active="1"] .jaarbalk, #jaarstats .jaarbalkcontainer[data-hovered="1"] .jaarbalk {
	background-color: #0964f7;
}

@media only screen and (max-height: 500px) {
	#jaarstats {
		display: none;
	}
}

/* -----WINDOWS (VANUIT MENU)-------*/

.window {
	font-weight: 400;
	font-family: 'Roboto', sans-serif;
	line-height: 1.5;
	font-size: 1em;
	color: #333333;
	text-rendering: optimizeLegibility;
	background-color: rgba(255, 255, 255, .85);
	backdrop-filter: blur(15px) brightness(120%);
	border-radius: 10px;
	box-shadow: 0 4px 8px 0 rgba(0, 0, 0, 0.2);
	transition: 0.3s;
	width: 70%;
	height: 70%;
	position: absolute;
	top: 15%;
	left: 15%;
	border: none;
	margin: 0;
	padding: 0;
	z-index: 9;
}

.window::backdrop {
	background: rgba(0, 0, 0, 0.4);
}

.window .close-button {
	position: absolute;
	top: 10px;
	right: 25px;
	font-size: 1.5em;
	cursor: pointer;
	background: none;
	border: none;
	color: #666666;
	padding: 0;
	margin: 0;
	line-height: 1;
	display: flex;
	align-items: center;
	-webkit-appearance: none;
	appearance: none;
}

.window-content {
	position: absolute;
	height: 100%;
	overflow: auto;
	width: 100%;
	padding: 20px;
}

.window a {
	color: #0964f7;
	text-decoration: underline;
}

.window-content textarea, .window-content input {
	font-family: 'Roboto', sans-serif;
	font-size: 1em;
	color: #4C91E8;
	border-radius: 10px;
	border: 0px;
	background-color: #FFFFFF;
	padding: 5px;
}
.window-content textarea {
	height: 100px;
	width: 80%;
}
.window-content input {
	width: 40%;
}
.window-content input[type=submit] {
	font-weight: bold;
	background-color: #4C91E8;
	color: #ffffff;
}
.window-content input[type=submit]:disabled {
	background-color: #404040;
	color: #7a7a7a;
}

/* Button resets for elements that look like non-buttons */
#show_line, .backtotop {
	background: none;
	border: none;
	font: inherit;
	padding: 0;
	cursor: pointer;
	-webkit-appearance: none;
	appearance: none;
}
#menu, #initall {
	border: none;
	-webkit-appearance: none;
	appearance: none;
}

/* ------- EN NU VOOR MOBIEL ------- */
@media only screen and (max-width: 800px) {

	#traject-panel {
		left: 8px;
		right: 8px;
		bottom: auto;
		top: 60px;
		max-height: 200px;
	}

	#menu {
		height: 48px;
		line-height: 30px;
		min-width: 48px;
		padding-left: 18px;
	}
	.menu-item {
		height: 48px;
		line-height: 30px;
	}

	#mapoverlay {
		width: 100%;
		bottom: 30%;
		height: 50px;
	}
	#settingbuttons {
		padding: 5px;
		display: block;
		right: 5px;
		left: auto;
		bottom: auto;
	}
	.settingDesc {
		display: none;
	}

	.legenda_naam {
		display: none;
	}
	.legenda_afkorting {
		display: inline;
	}
	#legenda {
		top: 80px;
		left: 10px;
	}
	#jaarweergave {
		top: 10px;
		left: 50px;
	}

	#timeline {
		height: 30%;
		width: 100%;
		bottom: 0px;
		left: 0px;
		top: auto;
		right: auto;
		display: flex;
		flex-wrap: nowrap;
		overflow-x: auto;
		padding: 10px 0;
	}
	#show_line {
		display: none;
	}
	#timeline li {
		height: 100%;
		width: 80%;
		margin-right: 10px;
		margin-top: 0px;
		margin-bottom: 0px;
		overflow-y: auto;
		flex: 0 0 auto;
		min-height: 100%;
	}
	#timeline li .title {
		font-size: 1.2em;
	}
	#timeline_header #grootscherm {
		display: none;
	}
	#timeline_header .kleinscherm {
		display: inline;
	}
	.timeline_era .backtotop {
		transform: rotate(-90deg);
	}
	.timeline_era h2, #timeline_footer h2, .timeline_item h3, .title {
		font-size: 1em;
		margin: 0px;
		padding: 0px;
		padding-bottom: 10px;
		vertical-align: top;
		font-weight: bold;
		line-height: 0.9em;
	}
	.timeline_era h2, #timeline_footer h2 {
		margin-top: 4px;
	}
	.timeline_era p {
		overflow-y: auto;
		font-size: 0.8em;
		margin: 0;
	}
	#jaarstats {
		right: 0px;
		top: auto;
		bottom: 20%;
		height: 40px;
		text-align: left;
		width: 100%;
		padding-top: 0px;
		display: none;
	}
	#jaarstats #jaarkop-begin {
		position: absolute;
		left: 5px;
		top: 5px;
		pointer-events: none;
	}
	#jaarstats #jaarkop-eind {
		position: absolute;
		right: 5px;
		top: 5px;
		pointer-events: none;
	}
	#jaarstats .jaarkop-tussen {
		display: none;
	}
	#jaarstats .jaarbalkcontainer_leeg, #jaarstats .jaarbalkcontainer {
		height: 100%;
		width: max-content;
		display: table-cell;
		vertical-align: bottom;
	}
	#jaarstats .jaarbalk {
		margin-right: 0;
		margin-top: auto;
		margin-bottom: 0;
		width: calc(100vw / 200);
		height: calc(var(--n) * 35px);
		display: table-cell;
	}

	.window {
		width: 90%;
		height: 80%;
		top: 10%;
		left: 5%;
		overflow: auto;
	}


	#timeline-hint {
		right: auto;
		left: 50%;
		transform: translateX(-50%);
		top: auto;
		bottom: calc(30% + 12px);
		animation-name: hint-in-mobiel;
	}
}
