/* Default Dark Theme */
body {
	font-family: Arial, sans-serif;
	margin: 20px;
	padding: 0;
	background-color: #121212;
	color: #e0e0e0;
}

h2 {
	margin: 0;
}

span:empty {
	display: none;
}

header {
	display: flex;
	align-items: center;
	justify-content: space-between;
}

header div {
	display: flex;
	align-items: center;
	gap: 10px;
}

header a {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 10px;
	border: 1px solid #444;
	padding: 10px;
}

header a:hover {
	color: #90ee90;
	border-color: #90ee90;
}

header a:hover svg {
	fill: #90ee90;
}

header a:focus {
	border-color: #90ee90;
	box-shadow: 0 0 5px #90ee90;
}

header a svg {
	width: 15px;
	fill: #8b8b8b;
}

header a:not(:first-of-type) svg {
	width: 18px;
	height: 18px;
}

@media (max-width: 430px) {
	header a span.text {
		display: none;
	}
}

.dropdown-container {
	display: flex;
	justify-content: center;
	align-items: center;
}

.styled-select {
	padding: 10px 30px 10px 15px;
	font-size: 16px;
	border: 1px solid #444;
	color: white;
	outline: none;
	appearance: none;
	cursor: pointer;
	background-image: url("data:image/svg+xml;charset=UTF-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Cpath fill='%238b8b8b' d='M5 7l5 5 5-5H5z'/%3E%3C/svg%3E");
	background-repeat: no-repeat;
	background-position: right 12px center;
	background-size: 14px;
	background-color: #121212;
}

.styled-select:hover {
	border-color: #90ee90;
	background-image: url("data:image/svg+xml;charset=UTF-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Cpath fill='%2390ee90' d='M5 7l5 5 5-5H5z'/%3E%3C/svg%3E");
}

.styled-select:focus {
	border-color: #90ee90;
	box-shadow: 0 0 5px #90ee90;
}

table {
	width: 100%;
	border-collapse: collapse;
	margin-top: 20px;
	background-color: #1e1e1e;
}

th,
td {
	border: 1px solid #444;
	padding: 10px;
	color: #e0e0e0;
}

td {
	text-align: left;
}

th {
	text-align: center;
}

td.pdf-link,
td.published-date,
td.semester-num {
	text-align: center;
}

td.pdf-link {
	padding: 0;
}

td.published-date::after {
	content: attr(data-published-year);
}

@media (min-width: 550px) and (max-width: 778px) {
	td.published-date::after {
		content: "";
	}
}

@media (max-width: 576px) {
	td.published-date {
		writing-mode: vertical-lr;
		transform: rotate(180deg);
	}
}

th.date::before {
	content: "D"
}

@media (min-width: 576px) {
	th.date::before {
		content: "Date";
	}
}


td.description {
	word-break: break-word;
}

#semester-heading::before {
	content: "S";
}

@media (min-width: 576px) {
	#semester-heading::before {
		content: "Sem";
	}
}

@media (min-width: 576px) {
	#pdf-heading::after {
		content: "DF";
	}
}

.pdf-link a {
	display: inline-block;
	padding: 5px 8px;
	text-align: center;
}

.pdf-link a svg {
	fill: #8b8b8b;
}

.pdf-link a:hover svg {
	fill: #90ee90;
}

.pdf-link svg {
	width: 20px;
	height: 20px;
}

th {
	background-color: #222;
}

a {
	color: #e0e0e0;
	text-decoration: none;
}

td.no-data {
	padding: 15px;
	text-align: center;
}

/* Light Theme (Only When User Prefers It) */
@media (prefers-color-scheme: light) {
	body {
		background-color: #ffffff;
		color: #333;
	}

	header a,
	.styled-select {
		border: 1px solid #ddd;
		background-color: #fff;
		color: #333;
	}

	header a:hover {
		color: #4aa94a;
		border-color: #4aa94a;
	}

	header a:hover svg {
		fill: #4aa94a;
	}

	.styled-select:hover {
		border-color: #4aa94a;
		background-image: url("data:image/svg+xml;charset=UTF-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Cpath fill='%234aa94a' d='M5 7l5 5 5-5H5z'/%3E%3C/svg%3E");
	}

	table {
		background-color: #fff;
	}

	th,
	td {
		border: 1px solid #ddd;
		color: #333;
	}

	.pdf-link a:hover svg {
		fill: #4aa94a;
	}

	th {
		background-color: #f4f4f4;
	}

	a {
		color: #333;
	}
}
