body {
	font-family: 'Poppins', 'Segoe UI', 'Helvetica Neue', Arial, sans-serif;
	font-size: 14px;
	line-height: 1.5;
}

.sidebar .nav-link {
	color: white;
	padding: 10px 15px;
	text-decoration: none;
	border-left: 3px solid transparent;
}

.sidebar .nav-link i {
	margin-right: 10px;
}

.sidebar .nav-link.active {
	color: var(--bs-primary);
	border-left: 3px solid var(--bs-primary);
	background-color: rgba(255, 255, 255, 0.1);
}

.sidebar .nav-link:not(.active):hover,
.sidebar .nav-link:not(.active):focus,
.sidebar .nav-link:not(.active):active {
	color: white;
	border-left: 3px solid var(--bs-primary);
	background-color: rgba(255, 255, 255, 0.1);
}

/* Remove borders from cards. */
.card {
	border: none;
}

.card .btn-toolbar {
	position: absolute;
	top: 16px;
	right: 16px;
}

/* Remove margin and padding from last <p> in popover */
.popover p:last-child {
	padding-bottom: 0;
	margin-bottom: 0;
}

.table {
	table-layout: fixed;
}

@media (max-width: 768px) {
	.table {
		table-layout: fixed;
		min-width: 100%;
	}
}

.card-body .table td:first-child i {
	color: var(--bs-primary) !important;
}

.card-body .table td:first-child i:not(:last-child) {
	margin-right: 0.25rem;
}

th:first-child, td:first-child {
	width: 50px;
}

@media (max-width: 768px) {
	/* Do not show the nav link text on mobile */
	.nav-link span {
		display: none !important;
	}

	/* Reset table layout on mobile */
	.table {
		table-layout: auto;
	}
}

@media (max-width: 1170px) {
	.card .btn-toolbar {
		position: static;
	}
}

@media (max-width: 540px) {
	.blazored-modal.size-medium {
		margin: 1.75rem !important;
	}
}

.blazored-modal .bm-content {
	position: relative;
}

.bm-container {
	z-index: 1055 !important;
}

.modal .bm-close {
	padding: 1rem 1rem 1rem 0.5rem;
	margin: -1rem -1rem -1rem auto;
	background-color: transparent;
	border: 0;
	-webkit-appearance: none;
	cursor: pointer;
	font-size: 1.25rem;
	font-weight: bold;
}

.modal .bm-close span {
	vertical-align: text-bottom;
}

.modal .bm-maximize {
	padding-right: 0.5rem;
	background-color: transparent;
	border: 0;
	-webkit-appearance: none;
	cursor: pointer;
	font-size: 1rem;
	font-weight: bold;
}

.modal .modal-body {
	height: calc(100dvh - 8rem);
	max-height: calc(100dvh - 8rem);
	overflow-y: scroll;
}

.modal .modal-content {
	background-color: #fafafa;
	overflow-y: auto;
}

.modal .modal-header,
.modal .modal-footer {
	background-color: white;
}

@media (min-width: 1800px) {
	.modal-xl {
		--bs-modal-width: 80dvw;
	}
}

/* Quill editor styles */
.ql-toolbar {
	border-top-left-radius: 0.25rem;
	border-top-right-radius: 0.25rem;
}

.ql-toolbar + .ql-container {
	border-top-left-radius: 0;
	border-top-right-radius: 0;
}

.ql-container {
	border-radius: 0.25rem;
	font-size: 1rem;
}

.ql-container.ql-disabled {
	border: none;
}

.ql-editor {
	height: 450px;
	resize: vertical;
}

.ql-editor * {
	background-color: transparent !important;
}

.ql-editor[contenteditable="false"] {
	background: #e9ecef;
	padding: 1rem !important;
	border: 1px solid #d2d2d2;
	border-radius: 4px;
}

.ql-container.ql-disabled .ql-editor {
	padding: 0;
}

.ql-container img {
	max-width: 100%;
}

.ql-container > :not(.ql-tooltip) {
	display: none;
}

.ql-container > div.ql-editor {
	display: block !important;
}

.ql-toolbar,
.ql-container {
	border: none !important;
}

.ql-editor ol li:not(.ql-direction-rtl),
.ql-editor ul li:not(.ql-direction-rtl) {
	padding-left: 0 !important;
}

#discussion .ql-editor {
	min-height: 100px;
}

.form-select:focus,
.form-control:focus {
	border-color: var(--bs-primary) !important;
	box-shadow: none !important;
}

.form-check-input:checked {
	background-color: var(--bs-primary);
	border-color: var(--bs-primary);
}

.select2-container--bootstrap-5 .select2-dropdown .select2-results__options .select2-results__option.select2-results__option--selected,
.select2-container--bootstrap-5 .select2-dropdown .select2-results__options .select2-results__option[aria-selected=true]:not(.select2-results__option--highlighted),
.select2-container--bootstrap-5.select2-container--focus .select2-selection, .select2-container--bootstrap-5.select2-container--open .select2-selection {
	border-color: var(--bs-primary);
	box-shadow: none;
}

.select2-results__option--selected,
.select2-container--bootstrap-5 .select2-dropdown .select2-results__options .select2-results__option.select2-results__option--selected,
.select2-container--bootstrap-5 .select2-dropdown .select2-results__options .select2-results__option.select2-results__option--selected,
.select2-container--bootstrap-5 .select2-dropdown .select2-results__options .select2-results__option[aria-selected=true]:not(.select2-results__option--highlighted) {
	background-color: var(--bs-primary);
}

.select2-container--bootstrap-5 .select2-dropdown {
	border-color: var(--bs-primary);
}

[data-bs-toggle="collapse"][aria-expanded="true"] > i.fa-chevron-down {
	transform: rotate(0deg);
	transition: transform 0.3s ease;
}

img {
	max-width: 100%;
	height: auto;
}

/* Generic scrollbar */
::-webkit-scrollbar {
	width: 8px;
}

::-webkit-scrollbar-thumb {
	background-color: #ccc;
	border-radius: 4px;
}

::-webkit-scrollbar-track {
	background-color: #f1f1f1;
}

::-webkit-scrollbar-thumb:hover {
	background-color: #aaa;
}

::selection,
::-moz-selection {
	color: white;
	background: var(--bs-primary);
}

.no-select {
	user-select: none !important;
	-webkit-user-select: none !important;
	-ms-user-select: none !important;
	-moz-user-select: none !important;
}

.blazored-toast-container {
	z-index: 9999 !important;
}

#img-lightbox-overlay {
	position: fixed;
	inset: 0;
	display: none;
	z-index: 10010; /* above Blazored.Modal overlay/content */
	background: rgba(0, 0, 0, .75);
	align-items: center;
	justify-content: center;
	padding: 2rem;
}

#img-lightbox-overlay.show {
	display: flex;
}

#img-lightbox-overlay img {
	max-width: 90vw;
	max-height: 90vh;
	border-radius: .5rem;
	box-shadow: 0 10px 40px rgba(0, 0, 0, .6);
}

#img-lightbox-overlay .close-btn {
	position: fixed;
	top: 1rem;
	right: 1rem;
	font-size: 2rem;
	border: 0;
	background: transparent;
	color: #fff;
	cursor: pointer;
}

body.img-lightbox-open {
	overflow: hidden;
}
