@import url('https://fonts.googleapis.com/css2?family=Fira+Sans:wght@700&display=swap');

:root {
	--mvg-blue: #036cb3;
	--mvg-yellow: #f8c100;
	--text-light: #ffffff;
	--text-dark: #000000;
}

body,
html {
	margin: 0;
	padding: 0;
	height: 100%;
	font-family: 'Fira Sans', sans-serif;
	background-color: var(--mvg-blue);
	color: var(--text-light);
	font-weight: 700;
	overflow: hidden;
	/* Prevent scrollbars */
}

.container {
	display: flex;
	flex-direction: column;
	height: 100vh;
	padding: 1rem 2rem 2rem 2rem;
	/* Reduced top padding */
	box-sizing: border-box;
}

.main-content {
	display: flex;
	flex-direction: row;
	flex-grow: 1;
	gap: 2rem;
	min-height: 0;
}

.direction-column {
	flex: 1;
	display: flex;
	flex-direction: column;
	background-color: var(--mvg-blue);
	border-radius: 12px;
	padding-right: 3rem;
	padding-left: 3rem;
	overflow: hidden;
}

.loading-text,
.error-text {
	font-size: 1.8rem;
	text-align: center;
	margin-top: 2rem;
}

.departures-list {
	list-style: none;
	padding: 0;
	margin: 0;
	flex-grow: 1;
	overflow-y: auto;
}

.departure-item {
	display: grid;
	grid-template-columns: 80px 1fr auto;
	/* Changed last column to auto for dynamic width */
	gap: 1rem;
	align-items: center;
	font-size: 2.8rem;
	padding: 1rem 0;
	/* border-bottom: 1px solid #004a80; */
}

.departure-item:last-child {
	border-bottom: none;
}

.line {
	background-color: var(--text-light);
	color: var(--mvg-blue);
	padding: 0.5rem;
	border-radius: 8px;
	text-align: center;
	font-size: 2.2rem;
}

.destination {
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

.minutes {
	text-align: right;
	font-size: 3rem;
}

.departure-messages {
	grid-column: 1 / span 3;
	font-size: 1.5rem;
	font-weight: bold;
	color: var(--mvg-yellow);
	margin-top: 0.5rem;
	padding-left: 1rem;
	display: none;
}

/* Title specific styling for compactness */
.title {
	display: flex;
	flex-direction: column;
	justify-content: center;
	align-items: center;
	height: 15vh;
	/* Reduced height for more compact top */
	text-align: center;
	line-height: 1.1;
	margin-bottom: 3rem;
	/* Added some margin below the title for spacing */
}

.title-text {
	font-size: 4rem;
	margin-bottom: 0rem;
	/* Reduced space below the main title text */
	padding: 0 20px;
}

#datetime {
	font-size: 2rem;
	display: block;
	margin-top: 0;
	line-height: 1;
}

/* Responsive adjustments for smaller screens */
@media (max-width: 900px) {
	.main-content {
		flex-direction: column;
	}

	.title {
		margin-bottom: 0rem;
	}

	.direction-column {
		padding: 1.5rem;
	}

	.departure-item {
		font-size: 2rem;
		grid-template-columns: 60px 1fr auto;
	}

	.line {
		font-size: 1.8rem;
	}

	.minutes {
		font-size: 2.2rem;
	}

	.container {
		padding: 1rem;
	}

	.title-text {
		font-size: 3rem;
	}

	#datetime {
		font-size: 1.5rem;
	}
}

@media (max-width: 480px) {
	.departure-item {
		font-size: 1.4rem;
		grid-template-columns: 50px 1fr auto;
	}

	.line {
		font-size: 1.2rem;
		padding: 0.3rem;
	}

	.minutes {
		font-size: 1.6rem;
	}

	.title-text {
		font-size: 2rem;
	}

	#datetime {
		font-size: 1rem;
	}
}

#last-updated {
	position: fixed;
	bottom: 10px;
	right: 10px;
	font-size: 0.8em;
	color: lightgray;
	font-weight: normal;
}

.footer {
	text-align: center;
	padding: 10px;
	font-size: 0.9em;
	color: lightgray;
}
