.navbar .megamenu {
	padding: 1rem;
}
@media (min-width: 992px) {
	.navbar .has-megamenu {
		position: static !important;
	}
	.navbar .megamenu {
		left: 0;
		right: 0;
		width: 100%;
		margin-top: 0;
	}
}
@media (max-width: 991px) {
	.navbar.fixed-top .navbar-collapse,
	.navbar.sticky-top .navbar-collapse {
		overflow-y: auto;
		max-height: 90vh;
		margin-top: 1em;
	}
	.server-status {
		display: none;
		height: 0;
	}
}

.navbar-nav .nav-link {
	color: black;
	padding: 0.75rem 1rem !important;
	background-color: white;
}
.navbar-nav .nav-link:hover,
.navbar-nav .nav-link.show {
	color: var(--bs-light) !important;
	background-color: var(--bs-primary);
}
.breadcrumb-item a {
	color: white !important;
}

.treeview {
	list-style: none;
	padding-left: 0;
}

.treeview > li {
	margin-bottom: 0.5rem;
}

.treeview-label {
	cursor: pointer;
	font-weight: bold;
	display: flex;
	align-items: center;
}

.treeview-arrow {
	display: inline-block;
	width: 0;
	height: 0;
	margin-right: 0.5rem;
	border-left: 5px solid transparent;
	border-right: 5px solid transparent;
	border-top: 5px solid currentColor;
}

.treeview-toggle:checked + .treeview-label .treeview-arrow {
	transform: rotate(-90deg);
}
.treeview-toggle:checked + .treeview-label {
	color: var(--bs-primary);
	font-weight: bold;
}

.treeview-children {
	list-style: none;
	padding-left: 1.5rem;
	display: none;
}

.treeview-link {
	text-decoration: none;
	color: inherit;
	display: flex;
	align-items: center;
}

.treeview-link svg {
	margin-right: 0.5rem;
}

.treeview-toggle:checked + .treeview-label + .treeview-children {
	display: block;
}

.visually-hidden {
	position: absolute;
	width: 1px;
	height: 1px;
	padding: 0;
	margin: -1px;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	white-space: nowrap;
	border: 0;
}

.thumbnail-nav {
	max-height: 400px;
	overflow-y: auto;
}

.thumbnail-nav .nav-link {
	padding: 0.25rem;
	width: fit-content;
	display: flex;
}

.thumbnail-nav .nav-link.active {
	border: 2px solid var(--bs-primary);
	border-color: var(--bs-primary);
}

.thumbnail-nav img {
	width: 60px;
	height: 60px;
	object-fit: cover;
}

.carousel-item img {
	max-height: 400px;
	object-fit: contain;
	width: 100%;
}

.lightbox {
	display: none;
	position: fixed;
	z-index: 1050;
	left: 0;
	top: 0;
	width: 100%;
	height: 100%;
	background-color: rgba(0, 0, 0, 0.9);
}

.lightbox-content {
	margin: auto;
	display: block;
	width: 90%;
	max-width: 900px;
	max-height: 90%;
	object-fit: contain;
}

.lightbox-close {
	position: absolute;
	top: 15px;
	right: 35px;
	color: #f1f1f1;
	font-size: 40px;
	font-weight: bold;
	cursor: pointer;
}

.lightbox-close:hover {
	color: #bbb;
}
.carousel-control-next:hover,
.carousel-control-prev:hover {
	background-color: rgba(0, 0, 0, 0.3);
}

.avatar {
	object-fit: contain;
}

.nav-card {
	border: none;
	cursor: pointer;
	transition: all 0.3s ease;
	background-color: rgba(0, 0, 0, 0);
	padding: 8px;
}

.nav-card:hover {
	background-color: rgba(255, 255, 255, 0.2);
}

.nav-card.active {
	background-color: var(--bs-primary);
}

.carousel-inner {
	background: transparent;
}

.container-fluid {
	background: rgba(0, 0, 0, 0.3);
	backdrop-filter: blur(5px);
}

.nav-card .card-title {
	color: white;
	font-size: 0.9rem;
}

.nav-card .text-muted {
	color: rgba(255, 255, 255, 0.7) !important;
}
.object-fit-cover {
	object-fit: cover;
	height: 100%;
}
.side-card-img {
	display: block;
	position: absolute;
	top: 50%;
	left: 50%;
	transform: translate(-50%,-50%);
	min-width: 100%;
	min-height: 100%;
	height: auto;
	width: auto;
}
.side-card-img-container {
	position: relative;
  	overflow: hidden;
	min-height: 175px;
}

.docs-search-container {
	position: relative;
}

.filter-list {
	max-height: 200px;
	overflow-y: auto;
}

.search-clear-btn {
	right: 3.5rem;
}

.filter-clear-btn {
	right: 0.75rem;
}

.filter-section-title {
	font-size: 14px;
	display: block;
}

.filter-search-container {
	flex: 100%;
	display: flex;
	position: relative;
}

input.filter-checkbox-hidden,
.filter-ul input[type="checkbox"][data-slug] {
	display: none !important;
}

.filter-label {
	cursor: pointer;
}

.spoiler-content {
	display: none;
}

.spoiler-content.show {
	display: block;
}

.filter-selected {
	background-color: var(--bs-primary) !important;
	border-color: #3b6891 !important;
	color: white !important;
}

.filter-ul {
	min-height: 200px;
	max-height: 200px;
	overflow-y: auto;
	list-style-type: none;
	padding: 0;
	margin: 0;
}

.filter-ul li a {
	background-color: var(--bs-light);
	padding: 4px 12px;
	text-decoration: none;
	color: var(--bs-dark);
	display: block;
	cursor: pointer;
}

.filter-bar {
	display: flex;
	flex-wrap: wrap;
	width: 100%;
	padding: 6px 6px !important;
	gap: 4px;
	min-height: 40px;
	align-items: center;
}

.badge-nobg {
	background-color: inherit;
	color: #a1a3a9;
	font-weight: normal;
	padding: 0.25rem 0.5rem !important;
}

.filter-container {
	display: flex;
	overflow: visible;
	position: relative;
}

.filter-header-buttons {
	position: absolute;
	right: 1em;
	top: 0.8075em;
	float: right;
	margin-top: -2px;
}

.spoiler input[type="checkbox"] {
	display: none;
}

.spoiler .spoiler-toggle-label::before {
	width: 15px;
	font-family: 'icomoon' !important;
	font-style: normal;
	font-weight: bolder;
	font-variant: normal;
	text-transform: none;
	line-height: 0.5;
	box-sizing: content-box;
	text-align: center;
	text-indent: 0 !important;
	font-size: 24px;
	color: var(--bs-primary);
	border-radius: 2px;
	-webkit-font-smoothing: antialiased;
	-moz-osx-font-smoothing: grayscale;
	content: "\f105";
	margin-right: 5px;
	display: inline-block;
	top: 4px;
	position: relative;
	cursor: pointer;
}

.spoiler input:checked ~ .spoiler-toggle-label::before {
	content: "\f107";
}

.clear-btn {
	position: absolute;
	top: 50%;
	transform: translateY(-50%);
	background: none;
	border: none;
	color: var(--bs-secondary);
	font-size: 1rem;
	cursor: pointer;
	z-index: 2;
	padding: 0;
	line-height: 1;
	display: flex;
	align-items: center;
	justify-content: center;
}

.clear-btn:focus {
	outline: none;
}

.search-icon {
	display: inline-block;
	vertical-align: middle;
}

table.dataTable td.expand-button::before {
	display: inline-block;
	width: 18px;
	height: 36px;
	font-family: 'icomoon' !important;
	font-style: normal;
	font-weight: normal;
	font-variant: normal;
	text-transform: none;
	line-height: 1;
	box-sizing: content-box;
	text-align: center;
	text-indent: 0 !important;
	font-size: 33px;
	color: var(--bs-primary);
	border-radius: 2px;
	-webkit-font-smoothing: antialiased;
	-moz-osx-font-smoothing: grayscale;
	content: "\f105";
	cursor: pointer;
}

table.dataTable tr.dt-hasChild td.expand-button::before {
	content: "\f107";
}

/* Document details styling */
.doc-details.loading {
	padding: 1rem;
	text-align: center;
	color: var(--bs-secondary);
}

.doc-details-img {
	width: 175px;
	height: 245px;
}


.dataTables_wrapper.no-footer .dataTables_scrollBody {
	border-bottom: none;
}

.formatted-table ul {
	margin: 0;
	padding-left: 18px;
}

.formatted-table p {
	margin: 0;
}

.download-button {
	line-height: 1.3;
}

.text-center-td {
	text-align: center;
	white-space: nowrap;
}

.document_link {
	text-decoration: none;
	cursor: pointer;
}

.document_link:hover {
	text-decoration: underline;
	cursor: pointer;
}

.category-tag {
	text-decoration: underline;
	cursor: pointer;
}

td p {
	margin: 0;
}

table.dataTable tbody td {
  vertical-align: middle;
}

.date-range-container {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.spoiler .spoiler-content {
    padding-top: 1rem;
    display: none;
    overflow: visible; 
}

.spoiler input:checked ~ .spoiler-content {
    display: block;
}

.filter-header-buttons .btn {
    font-size: 0.875rem;
    padding: 0.25rem 0.5rem;
}

.filter-container .col-md-6,
.filter-container .col-lg-3 {
    overflow: visible;
    position: relative;
}

.filter-loading {
    opacity: 0.6;
    pointer-events: none;
}

.searchbar-container {
    position: relative;
    margin-bottom: 1rem;
}

.search-clear-btn:hover {
    color: var(--bs-body-color, #495057);
}

td ul:last-child {
	margin-bottom: 0;
}

td p:last-child {
	margin-bottom: 0;
}

.text-content p:last-child {
	margin-bottom: 0;
}

.text-content img {
	max-width: 100%;
	height: auto !important;
}


@media (max-width: 768px) {
    .filter-container .col-lg-3 {
        margin-bottom: 1rem;
    }
    
    .date-range-container {
        flex-direction: column;
    }
    
    #selected-filters-badges {
        margin-bottom: 1rem;
    }

	.filter-list {
		max-height: 150px;
	}
}
