.navigation-panel {
	position: fixed;
	left: 0;
	top: 0;
	bottom: 0;
	display: flex;
	flex-flow: column;
	width: var(--menu-width);
	border-inline-end: 1px solid var(--panel-border);
	background: var(--panel-bg);
	z-index: 20;
}

.navigation-panel .header {
	position: static;
	padding: 0.3rem 12px 0;
	color: var(--logo-text);
	font-size: 1.1rem;
	min-height: 2rem;
	overflow: hidden;
}

.navigation-panel .header > a {
	color: var(--logo-text) !important;
	padding: 0;
	vertical-align: top;
	text-decoration: none !important;
}

.navigation-panel p {
	margin: 0;
	padding: 10px 10px 0;
}

.navigation-panel .message {
	padding-bottom: 10px;
}

.navigation-panel .links {
	padding-bottom: 7px;
	border-bottom: 1px solid var(--panel-border);
}

.rtl .navigation-panel {
	left: auto;
	right: 0;
}

.navigation-button {
	display: none;
	position: fixed;
	left: 0;
	top: 0;
	width: 2rem;
	height: 2rem;
	padding: 0 !important;
	z-index: 50;
}

.navigation-button .icon {
	width: 1.2rem;
	height: 1.2rem;
	margin: 0 !important;
}

.navigation-button .ic-close {
	display: none;
}

.navigation-button.opened .ic-menu {
	display: none;
}

.navigation-button.opened .ic-close {
	display: inline;
}

.logo {
	height: 1.4rem;
	width: auto;
	vertical-align: top;
}

.version {
	position: relative;
	top: 0.1rem;
	color: var(--logo-text);
	font-size: 0.6rem;
	vertical-align: top;
}

.version-badge {
	margin-left: -3px;
	padding: 5px;
	color: var(--version-text) !important;

	.icon {
		width: 1em;
		height: 1em;
	}
}

.db-selector {
	padding: 10px 10px 0;
}

.db-selector form {
	display: flex;
	flex-flow: column;
	gap: 5px;
}

.db-selector div {
	display: flex;
	gap: 5px;
}

.tables-filter {
	padding: 10px 10px 0;
}

.db-selector select, .db-selector .input, .tables-filter .input {
	width: 100%;
}

#tables {
	overflow-y: auto;
	margin-top: 10px;
}

#logins {
	margin-top: 10px;
}

menu {
	padding: 0 0 20px 0;
	margin: 0;
}

menu li {
	list-style: none;
	position: relative;
}

menu .primary {
	display: block;
	padding: 4px 10px 2px;
	background: var(--panel-bg);
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
	color: var(--body-text) !important;
}

menu .primary:focus-visible {
	outline-offset: -2px;
	border-radius: 0;
}

menu .primary.active {
	background: var(--list-active);
	color: var(--link-text) !important;
}

menu li:hover .primary, menu li:active .primary {
	text-decoration: none;
	background: var(--list-hover);
}

menu li:hover .primary.active, menu li:active .primary.active {
	background: var(--list-active-hover);
}

menu .secondary {
	position: absolute;
	padding: 4px 5px 2px;
	padding-inline-end: 10px;
	top: 0;
	color: var(--body-icon);
}

menu .secondary .icon {
	opacity: 0.85;
}

menu .secondary:hover .icon {
	opacity: 1;
}

menu.reversed .primary {
	/* icon width + icon margin */
	padding-inline-start: calc(1.25em + 15px);
}

menu.reversed .secondary {
	padding-inline-end: 0;
	padding-inline-start: 10px;
}

.rtl menu.reversed .secondary {
	left: auto;
	right: 0;
}

menu.dual .primary {
	/* icon width + icon padding */
	padding-inline-end: calc(1.25em + 15px) !important;
}

menu.dual .secondary {
	left: auto;
	right: 0;
}

.rtl menu .secondary {
	left: 0;
	right: auto;
}

.footer {
	background: var(--panel-bg);
	border-bottom: 1px solid var(--panel-border);
	position: fixed;
	top: 0;
	right: 0;
	height: 2rem;
	line-height: 2.05rem; /* +0.05rem for better alignment on Firefox. */
	padding: 0 20px;
	display: flex;
	gap: 10px 20px;
	align-items: baseline;
	z-index: 10;
}

.logout form {
	display: flex;
	flex-wrap: wrap;
	align-items: baseline;
	gap: 5px;
}

.rtl .footer {
	right: auto;
	left: 0;
}

@media screen and (max-width: 1023px) {
	.navigation-panel {
		display: none;
		overflow-y: auto;
		max-width: 100%;
		box-shadow: 2px 0 10px rgba(0, 0, 0, 5%);
		padding-top: 2rem;
		min-width: 13rem;
	}

	.navigation-panel.opened {
		display: block;
	}

	.navigation-panel .header {
		position: fixed;
		width: var(--menu-width);
		border-inline-end: 1px solid var(--panel-border);
		padding-inline-start: 2rem;
		min-width: 13rem;
	}

	.navigation-button {
		display: block;
	}

	.rtl .navigation-button {
		left: auto;
		right: 0;
	}

	#tables {
		overflow-y: visible;
	}

	menu {
		padding-bottom: 10px;
	}

	.footer {
		position: static;
		margin-top: auto;
		padding: 10px 10px 20px;
		border-bottom: none;
		flex-flow: column;
		align-items: flex-start;
		height: auto;
		border-top: 1px solid var(--panel-border);
	}

	.toolbox, .logout {
		overflow: hidden;
		line-height: normal;
		max-width: 100%;
	}
}
