@import url('colour.css');

:root {
	/* font-family: sans-serif; */
	font-family: system-ui;
	font-size: 1.3em;
	line-height: 160%;
	--header-height: 75px;
	--menu-width: 130px;
	--menu-icon-width: 50px;
	--sidebar-transition: all 0.3s ease;
}

[x-cloak] {
	display: none !important;
}

html,
body {
	width: 100%;
	height: 100%;
	margin: 0;
	padding: 0;
	background-color: var(--bg-color);
	color: var(--light-text);
}

.main {
	flex: 1;
	position: relative;
	top: var(--header-height);
	margin-left: calc(var(--menu-width) + 0.6rem);
	padding-left: 5px;
	transition: var(--sidebar-transition);
}

.main.sidebar-hidden {
	margin-left: var(--menu-icon-width);
}

.header {
	position: fixed;
	top: 0;
	left: 0;
	width: 100%;
	height: var(--header-height);
	opacity: 0.7;
	text-align: center;
	z-index: 10;
	background-color: var(--bg-color);
}

.header-content {
	display: flex;
	align-items: center;
	height: 100%;
	padding: 0 0.4em;
}

.sidebar-toggle {
	background-color: transparent;
	border: none;
	font-size: 24px;
	cursor: pointer;
	padding: 5px 10px;
	margin-right: 15px;
	transition: transform 0.3s ease;
}

.sidebar-toggle.sidebar-open {
	transform: rotate(180deg);
	display: inline-block;
}

.sidebar-toggle:not(.sidebar-open) {
	transform: rotate(0deg);
}

.sidebar-toggle:hover {
	background-color: var(--hover-color);
}

/* Theme toggle styles */
.theme-toggle {
	margin-left: auto;
	background: none;
	border: none;
	color: inherit;
	font-size: 1.2rem;
	cursor: pointer;
	width: 40px;
	height: 40px;
	border-radius: 50%;
	display: flex;
	align-items: center;
	justify-content: center;
	transition: background-color 0.3s;
}

.theme-toggle:hover {
	background-color: var(--hover-color);
}

.sidebar {
	position: fixed;
	top: var(--header-height);
	left: 0;
	width: var(--menu-width);
	height: calc(100vh - var(--header-height));
	transition: var(--sidebar-transition);
	z-index: 5;
	overflow-x: hidden;
}

.sidebar.collapsed {
	width: var(--menu-icon-width);
}

.sidebar-header {
	padding: 15px;
	text-align: center;
	margin: 0;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.sidebar.collapsed.sidebar-header {
	font-size: 0;
	padding: 0;
	height: 0;
}

.sidebar-menu {
	list-style: none;
	padding: 0;
	margin: 0;
	height: calc(81vh - var(--header-height));
}

/* leave this until we have an 'about' or other section
/* to pin to the bottom of the sidebar
/* .sidebar-menu li:last-child { */
/* display: flex; */
/* align-items: flex-end; */
/* height: 100%; */
/* } */

.sidebar-item {
	margin: 0;
	padding: 10;
	width: 100%;
}

.sidebar-item a {
	display: flex;
	align-items: center;
	padding: 12px 15px;
	text-decoration: none;
	transition: background-color 0.3s ease;
	color: var(--light-text);
}

.sidebar-item a:hover {
	background-color: var(--hover-color);
}

.sidebar-item i {
	width: calc(var(--menu-icon-width) - 10px);
	font-size: 18px;
	transition: opacity 0.2s ease;
	color: var(--light-text);
}

.sidebar-text {
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
	transition: opacity 0.2s ease;
}

.sidebar.collapsed .sidebar-text {
	opacity: 0;
	width: 0;
}