* {
	box-sizing: border-box;
}

#loading {
	position: absolute;
	left: 0;
	top: 0;
	width: 100%;
	height: 100%;
	z-index: 99999;
	margin: 0;
	padding: 0;

	display: flex;
	flex-flow: column nowrap;
	justify-content: center;
	align-items: center;
	align-content: center;
	gap: 10px;

	background-color: #FFF;
	color: #000;
}

#loading img {
	width: 250px;
	height: 250px;
}

#loading h1 {
	font-size: 48px;
	text-align: center;
}

#loading p {
	font-size: 20px;
	text-align: center;
}

#loading.done {
	animation-name: hideLoading;
	animation-fill-mode: both;
	animation-duration: 0.5s;
}

@keyframes hideLoading {
	from {
		opacity: 1;
		transform: scale(1.0);
	}
	to {
		opacity: 0;
		transform: scale(0.8);
	}
}

#loadingBarContainer {
	border-radius: 15px;
	width: 75vw;
	height: 30px;
	overflow: hidden;
	box-shadow: inset 0 0 7px #0007;

	animation-name: loadingBarAnim;
	animation-timing-function: ease-in-out;
	animation-fill-mode: both;
	animation-duration: 3.2s;
}

@keyframes loadingBarAnim {
	0% {
		opacity: 0.0;
	}
	10% {
		opacity: 0.0;
	}
	90% {
		opacity: 1.0;
	}
	100% {
		opacity: 1.0;
	}
}

#loadingBar {
	border-radius: 15px;
	position: relative;
	left: 0;
	top: 0;
	height: 30px;
	background-color: #1abc9c;

	animation-name: loadingAnim;
	animation-timing-function: ease-in-out;
	animation-fill-mode: both;
	animation-duration: 3.2s;
}

@keyframes loadingAnim {
	0% {
		filter: brightness(0.7);
		width: 0;
	}
	100% {
		filter: brightness(1.0);
		width: 75vw;
	}
}

.toggleContainer {
	width: 60px;
	height: 30px;
	border-radius: 15px;
	overflow: hidden;
	background-color: #BBB;
	cursor: pointer;

	transition: background-color 0.2s;
}

.toggleContainer.enabled {
	background-color: #1abc9c;
}

.toggle {
	background-color: #FFF;
	width: 24px;
	height: 24px;
	border-radius: 12px;
	position: relative;
	top: 3px;
	left: 3px;

	transition: left 0.2s, opacity 0.1s;
}

.toggleContainer.enabled .toggle {
	left: 33px;
}

.toggleLabel {
	font-size: 20px;
	line-height: 30px;
	margin-right: 20px;
	font-weight: bold;
}

.toggleContainer.blocked {
	cursor: default;
}

.toggleContainer.blocked .toggle {
	opacity: 0.4;
}

#locationToggleContainer {
	display: flex;
	flex-flow: row nowrap;
	justify-content: center;
	height: 30px;
}

#locationLoadingContainer {
	height: 30px;
}

.spinner {
	position: absolute;
	margin-left: 10px;
	width: 30px;
	height: 30px;

	border-radius: 15px;
	border: 6px solid #fff;

	animation-timing-function: linear;
	animation-fill-mode: both;
	animation-iteration-count: infinite;
}

.spinner.cw {
	animation-name: spinnerAnimCW;
	border-color: #1abc9c transparent #1abc9c transparent;
	animation-duration: 0.6s;
	z-index: 2;
}

.spinner.ccw {
	animation-name: spinnerAnimCCW;
	border-color: #136bef transparent #136bef transparent;
	animation-duration: 1.2s;
	z-index: 1;
}

@keyframes spinnerAnimCW {
	from {
		transform: rotate(0deg);
	}
	to {
		transform: rotate(360deg);
	}
}

@keyframes spinnerAnimCCW {
	from {
		transform: rotate(0deg);
	}
	to {
		transform: rotate(360deg);
	}
}

#all {
	display: flex;
	flex-flow: column nowrap;
	justify-content: center;
	align-items: center;
	align-content: flex-start;
	gap: 30px;

	margin-left: 5%;
	margin-right: 5%;
}

@media (max-width: 500px) {
	#all {
		margin-left: 5px;
		margin-right: 5px;
	}
}

.title {
	margin: 0;
}

#text-or {
	margin: 0;
}

#input-field-container {
	width: 100%;
	font-weight: bold;

	display: flex;
	flex-flow: column nowrap;
	justify-content: center;
	align-items: center;
	align-content: center;
	gap: 5px;
}

#result {
	width: 100%;
	margin-bottom: 40px;

	display: flex;
	flex-flow: column nowrap;
	justify-content: center;
	align-items: center;
	align-content: flex-start;
	gap: 10px;
}

.stop-name {
	font-weight: bold;
	line-height: 34px;
	margin-right: 10px;
}

.busLineIcon {
	margin: 2px 2px;
	padding: 0 8px;
	height: 30px;
	min-width: 30px;
	line-height: 30px;
	border-radius: 15px;
	text-align: center;
	font-size: 18px;
	display: inline-block;
}

.distance {
	margin: 2px 0;
	padding: 0 8px;
	height: 30px;
	line-height: 30px;
	border-radius: 5px;
	text-align: center;
	font-size: 18px;
	display: inline-block;
	background-color: #1abc9c;
	color: #FFF;
}

.collapsible-container {
	width: 100%;
	display: inline-block;
	opacity: 0.0;
	transform: translate(20px, 0);
	border: 2px solid #99A;
	border-radius: 5px;
	overflow: hidden;

	transition: opacity 0.2s, transform 0.4s;
}

.alert {
	width: 100%;
	margin-bottom: 0;
	padding: 5px;
}

.alert.animated {
	opacity: 0.0;
	transform: translate(0, 10px);

	transition: opacity 0.2s, transform 0.4s;
}

.alert p {
	width: 100%;
	text-align: center;
	font-size: 22px;
	font-weight: bold;
	color: #0009;
}

.collapsible-container.visible, .alert.animated.visible {
	opacity: 1.0;
	transform: translate(0, 0);
}

.collapsible-header {
	width: 100%;
	background-color: #FFF;
	color: #000;
	cursor: pointer;
	padding: 8px 15px;
	font-size: 18px;
	display: inline-block;
	margin-bottom: -10px; /* I don't know, but it removes the gap :) */
	box-shadow: 0 0 10px #0007;
}

.collapsible-content {
	width: 100%;
	max-height: 0;
	overflow: hidden;
	transition: max-height 0.2s ease-in-out;
	display: block;
}

.collapsible-content-elem {
	margin-top: 5px;
}

.collapsible-header-elem-l, .collapsible-header-elem-l * {
	float: left;
}

.collapsible-header-elem-r, .collapsible-header-elem-r * {
	float: right;
}

.departure-table {
	width: 100%;
	padding: 5px;
	table-layout: auto;
}

.departure-table-row {
	background-color: #FFF;
	overflow: hidden;
	text-overflow: ellipsis;
}

.departure-table-row:first-child td {
	font-weight: bold;
	border-bottom: 2px solid #99A;
}

.departure-table-row:nth-child(2n + 1):not(:first-child) {
	background-color: #DDD;
}

.departure-table-row td {
	padding: 4px 8px;
	white-space: nowrap;
}

.departure-table-row td:nth-child(1) {
	width: 1px;
	text-align: center;
}
.departure-table-row td:nth-child(2) {
	text-overflow: ellipsis;
	overflow: hidden;
}
.departure-table-row td:nth-child(3) {
	width: 1px;
	text-align: center;
}

@media (max-width: 659px) {
	.title {
		margin-top: 20px;
		font-size: 8vw;
	}
}

@media (min-width: 660px) {
	.title {
		font-size: 52px;
	}
}

#logo {
	float: left;
	margin-right: 10px;
	height: 100%;
}

#about {
	text-align: justify;
	font-size: 16px;
}

.contact-info {
	display: flex;
	flex-flow: row nowrap;
	align-items: center;
	justify-content: space-around;
	gap: 5px;
}

.contact {
	background-color: #16A085;
	color: #FFF;
	font-size: 30px;
	padding: 5px 20px;
	border-radius: 5px;
	text-align: center;
}

@media (max-width: 659px) {
	.contact-info {
		flex-flow: column nowrap;
	}

	.contact {
		width: 100%;
	}
}

.departure-view-iframe {
	width: 100%;
	margin: 10px 0 5px 0;
	padding: 0;
	border: none;
}

.stop-view-header {
	display: flex;
	flex-flow: row nowrap;
	align-items: center;
	justify-content: space-between;
	margin-top: 10px;
	margin-bottom: 20px;
}

#stop-header-name {
	font-size: 42px;
	font-weight: bold;
	line-height: 50px;
}

#stop-header-clock {
	font-size: 42px;
	font-weight: bold;
}

@media (max-width: 659px) {
	.navbar {
		margin-bottom: 10px;
	}

	.stop-view-header {
		margin-top: 0;
		margin-bottom: 0;
	}

	#stop-header-name {
		font-size: 32px;
		line-height: 40px;
		text-align: center;
		width: 100%;
	}

	#stop-header-clock {
		display: none;
	}
}

@media (max-width: 400px) {
	#stop-header-name {
		font-size: 24px;
		line-height: 34px;
	}
}

.stop-link * {
	width: 28px;
	height: 34px;
	color: #000;
	text-decoration: none;
}

#map {
	width: 100%;
	height: 300px;
	margin: 40px 0 20px 0;
	border: none;
	border-radius: 5px;
}
