@font-face {
	font-family: 'JetBrains';
	src: url('/skolmaten/static/jetbrains.ttf');
}

:root {
	--text: #cdd6f4;
	--bg-darkest: #11111b;
	--bg-dark: #1e1e2e;
	--bg: #181825;
	--border: #585b70;
	--blue: #89b4fa;
	--teal: #94e2d5;
	--teal-40: #94e2d540;
	--hover-bg: var(--teal-40);
	--subtext: #6c6f85;

	/* Light theme counterparts */
	--text-light: #4c4f69;
	--bg-lightest: #eff1f5;
	--bg-light: #dce0e8;
	--bg-light-accent: #ccd0da;
	--border-light: #acb0be;
	--blue-light: #1e66f5;
	--teal-light: #179299;
	--teal-light-40: #17929940;
	--hover-bg-light: var(--teal-light-40);
}

body.light {
	--text: var(--text-light);
	--bg-darkest: var(--bg-lightest);
	--bg-dark: var(--bg-light);
	--bg: var(--bg-light-accent);
	--border: var(--border-light);
	--blue: var(--blue-light);
	--teal: var(--teal-light);
	--teal-40: var(--teal-light-40);
	--hover-bg: var(--hover-bg-light);
	--subtext: #a6adc8;
}



* {
	font-family: JetBrains;
	color: var(--text);
	transition: color .3s ease, background .3s ease;
}

body {
	margin: 0;
	margin-bottom: 40px;
	background: var(--bg-darkest);
}

.vl {
	color: var(--border);
}

.parent {
	display: flex;
	gap: 1em;
	flex-wrap: wrap;
	justify-content: center;
	align-items: flex-start;
	margin: 10px;
}

.contbox {
	flex: 1 1 300px;
	min-width: 300px;
	margin: 1em;
	text-align: left;
	padding: 2em;
	border: 2px solid var(--border);
	color: var(--text);
	background: var(--bg-dark);
	box-sizing: border-box;
	border-radius: 8px;
	max-height: 500px;
	overflow-y: auto;
	padding-top: 0;
}

.comment-link {
    position: relative;
    display: inline-block;
}

.comment-count {
    position: absolute;
    top: 3px; /* Adjust as needed to control vertical position */
    right: 4px; /* Adjust as needed to control horizontal position */
    font-size: 10px; /* Adjust size as needed */
    color: #21786a; /* Choose the color you prefer */
}
body.light .comment-count {
    color: #afe9df; /* Choose the color you prefer */
}

h1,h2,h3,h4 {
	margin: 0;
}

a {
	color: var(--blue);
	transition: color .3s ease, background .3s ease;
	border-radius: 5px;
	padding: 3px 7px 3px 3px;
	text-decoration: none;
}
a:hover {
	color: var(--teal);
	background: var(--hover-bg);
}

.weekplancontrol a, .weeknavb {
	text-decoration: none;
	margin: 0 2px;
	border: 1px solid var(--border);
	display: inline-block;
	width: 16px;
	height: 18px;
	color: var(--teal);
	padding: 1px 1px 1px 3px;
	border-radius: 4px;
	transition: border-color .3s ease, background .3s ease;
	background: var(--teal-40);
}
.weekplancontrol a:hover, .weeknavb:hover {
	border-color: var(--teal);
	background: var(--hover-bg);
}

nav {
	background-color: var(--bg-dark);
	padding: 10px;
	z-index: 100000;
	position: relative;
	border-bottom: 2px solid var(--border);
}

nav > * > a {
	text-decoration: none;
	color: var(--text);
}

.modal.hidden {
	display: none;
}

.modal {
	position: fixed;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	background: var(--bg-darkest);
	display: flex;
	justify-content: center;
	align-items: center;
}

.modal-content {
	background: var(--bg-dark);
	color: var(--text);
	padding: 1em 2em;
	border-radius: 8px;
	position: relative;
	border: 2px solid var(--border);
}
.modal-content input, .modal-content select {
	background: var(--bg);
	border: 0;
	padding: 5px;
	border-radius: 8px;
	margin: 10px;
	color: var(--text);
}
.modal-content h2 {
	margin: 1rem 0;
}

.close-button {
	position: absolute;
	right: 1em;
	top: 0.5em;
	cursor: pointer;
}

.userpassword {
	outline: none;
	background: transparent;
	color: var(--text);
	border: 0;
	transition: all .3s ease;
}

.hidepass {
	color: transparent;
	background: black;
	user-select: none;
}

footer {
	position: fixed;
	bottom: 0;
	width: 100%;
	background: var(--bg-dark);
	color: var(--text);
	text-align: center;
	padding: 0.5rem;
	font-size: 0.9rem !important;
	border-top: 2px solid var(--border);
}

.truncatecont {
	display: flex;
	justify-content: flex-start;
	width: 100%;
	white-space: nowrap;
}
.truncatecont > .weekplancontrol {
	margin-left: auto;
}

.truncate {
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
	flex-shrink: 1;
	max-width: 100%;
	display: inline-block;
	padding-left: 5px;
}
.truncatecont > * {
	white-space: nowrap;
}

hr {
	color: var(--text);
	opacity: 0.25;
}

#installButton {
	display: none;
}


@media (max-width: 1050px) {
	.contbox {
		flex: 1 1 100%;
		width: 100%;
		padding: 1em;
		padding-top: 0;
		margin: 0.5em 0;
		max-height: 800px;
	}

	.parent {
		flex-direction: column;
		gap: 0.5em;
		margin: 10px;
	}

	h2,h1 {
		font-size: 48px;
	}
	h3 {
		font-size: 37.44px;
	}
	p, a, input, details {
		font-size: 32px;
	}
	footer {
		font-size: 2.5rem !important;
	}
	body {
		margin-bottom: 71px;
	}
	.weekplancontrol a, .weeknavb {
		width: 32px;
		height: 36px;
	}
	.comment-count {
	    position: absolute;
	    top: 6px; /* Adjust as needed to control vertical position */
	    right: 8px; /* Adjust as needed to control horizontal position */
	    font-size: 20px; /* Adjust size as needed */
	    color: #21786a; /* Choose the color you prefer */
	}
	body.light .comment-count {
	    color: #afe9df; /* Choose the color you prefer */
	}
	#installButton {
		display: inline;
	}
}

summary {
	list-style: none;
	cursor: pointer;
	position: relative;
	padding-left: 20px;
}

summary::before {
	content: "";
	cursor: pointer;
	position:absolute;
	left:5px;
	transition: transform .3s ease;
}

details[open] summary::before {
	transform: rotate(90deg);
}