@import url("variables.css");

/* inspired by https://componentland.com/component/navbar-2 */
main {
	padding-top: var(--navbar-height);
}

header {
	position: fixed;
	top: 0;
	left: 0;
	width: 100%;

	z-index: 30;
	box-shadow: 0 1px 4px rgba(0, 0, 0, 0.1);
}

/* column view on slimmer screens */
.nav-container {
	margin: 0 auto;
	padding: 0 1rem;
	display: flex;
	flex-direction: column;
	position: relative;

	min-height: var(--navbar-height);
	background-color: var(--vivid-red);

	/*max-width: 1024px;*/
}

.brand {
	display: flex;
	align-items: center;
	justify-content: space-between;

	font-weight: bold;
	font-size: 1.2rem;

	height: var(--navbar-height);
}

.brand-inner {
	display: flex;
	align-items: center;
	text-decoration: none;
	color: var(--text-color);
}

.brand img {
	margin-right: 0.5rem;
	height: 2.5rem;
}

#navbar-open {
	display: none;
}

/* label for menu dropdown checkbox */
.menu-toggle {
	cursor: pointer;
	align-items: center;
	display: flex;
	justify-content: right;
}

/* collapsed dropdown */
nav {
	display: none;
}

/* opened dropdown */
#navbar-open:checked~nav {
	display: block;
}

nav ul {
	list-style: none;
	margin: 0;
	padding-bottom: 1rem;
	display: flex;
	flex-direction: column;
	gap: 1rem;
}

nav li {
	display: flex;
	justify-content: right;
	white-space: preserve;
}

nav a {
	text-decoration: none;
	color: var(--text-color);
	transition: color 0.2s;
}

nav a:hover {
	color: white;
}

.login-link {
	border: 2px solid white;
	border-radius: 0.75rem;
	padding: 0.25rem 1rem;
	font-weight: 500;
	color: white;
	transition: background-color 0.2s, color 0.2s;
}

.login-link:hover {
	background-color: white;
	color: var(--text-color);
}

/* row view on larger screens (that is one phat menu) */
@media (min-width: 960px) {
	.nav-container {
		flex-direction: row;
		align-items: center;
		justify-content: space-between;
	}

	.menu-toggle {
		display: none;
	}

	nav {
		display: block !important;
		padding: 0;
	}

	nav ul {
		flex-direction: row;
		align-items: center;
		padding: 0;
	}

	.login-link {
		margin-top: 0;
	}
}