/*
 * Comicbookraw sidebar menu.
 * Icons are embedded as CSS masks: no fonts, images or external requests.
 */

.sidenav-nav-container .widget_nav_menu #accordion-sidenav > li.cbr-sidebar-menu-item {
	position: relative;
	margin: 3px 0;
	padding: 0;
	border-radius: 8px;
	transition: background-color .18s ease, box-shadow .18s ease;
}

.sidenav-nav-container .widget_nav_menu #accordion-sidenav > li.cbr-sidebar-menu-item > a {
	display: flex;
	align-items: center;
	gap: 11px;
	width: 100%;
	min-height: 42px;
	padding: 9px 12px;
	border-radius: 8px;
	color: inherit;
	font-weight: 400;
	line-height: 1.3;
	text-decoration: none;
	transition: color .18s ease, background-color .18s ease, box-shadow .18s ease;
}

.sidenav-nav-container .widget_nav_menu #accordion-sidenav > li.cbr-sidebar-menu-item.menu-parent-item > a {
	padding-right: 42px;
}

.sidenav-nav-container .widget_nav_menu #accordion-sidenav > li.cbr-sidebar-menu-item > a::before {
	content: "";
	display: block;
	flex: 0 0 20px;
	width: 20px;
	height: 20px;
	background-color: currentColor;
	-webkit-mask-repeat: no-repeat;
	mask-repeat: no-repeat;
	-webkit-mask-position: center;
	mask-position: center;
	-webkit-mask-size: 20px 20px;
	mask-size: 20px 20px;
}

.sidenav-nav-container .widget_nav_menu #accordion-sidenav > li.cbr-sidebar-menu-item:not(.current-menu-item):not(.current_page_item):not(.current-menu-parent):not(.current-menu-ancestor):not(.current-post-ancestor):not(.current-category-ancestor) > a:hover,
.sidenav-nav-container .widget_nav_menu #accordion-sidenav > li.cbr-sidebar-menu-item:not(.current-menu-item):not(.current_page_item):not(.current-menu-parent):not(.current-menu-ancestor):not(.current-post-ancestor):not(.current-category-ancestor) > a:focus-visible {
	color: #5f42e7;
	background: rgba(95, 66, 231, .09);
}

.sidenav-nav-container .widget_nav_menu #accordion-sidenav > li.cbr-sidebar-menu-item.current-menu-item > a,
.sidenav-nav-container .widget_nav_menu #accordion-sidenav > li.cbr-sidebar-menu-item.current_page_item > a,
.sidenav-nav-container .widget_nav_menu #accordion-sidenav > li.cbr-sidebar-menu-item.current-menu-parent > a,
.sidenav-nav-container .widget_nav_menu #accordion-sidenav > li.cbr-sidebar-menu-item.current-menu-ancestor > a,
.sidenav-nav-container .widget_nav_menu #accordion-sidenav > li.cbr-sidebar-menu-item.current-post-ancestor > a,
.sidenav-nav-container .widget_nav_menu #accordion-sidenav > li.cbr-sidebar-menu-item.current-category-ancestor > a {
	color: #fff !important;
	background: #5f42e7;
	font-weight: 500;
	box-shadow: 0 6px 15px rgba(95, 66, 231, .25);
}

.sidenav-nav-container .widget_nav_menu #accordion-sidenav > li.cbr-sidebar-menu-item > .dropdown-sidenav-btn {
	position: absolute;
	z-index: 2;
	top: 21px;
	right: 11px;
	margin: 0;
	transform: translateY(-50%);
}

.sidenav-nav-container .widget_nav_menu #accordion-sidenav > li.cbr-sidebar-menu-item.current-menu-item > .dropdown-sidenav-btn,
.sidenav-nav-container .widget_nav_menu #accordion-sidenav > li.cbr-sidebar-menu-item.current_page_item > .dropdown-sidenav-btn,
.sidenav-nav-container .widget_nav_menu #accordion-sidenav > li.cbr-sidebar-menu-item.current-menu-parent > .dropdown-sidenav-btn,
.sidenav-nav-container .widget_nav_menu #accordion-sidenav > li.cbr-sidebar-menu-item.current-menu-ancestor > .dropdown-sidenav-btn,
.sidenav-nav-container .widget_nav_menu #accordion-sidenav > li.cbr-sidebar-menu-item.current-post-ancestor > .dropdown-sidenav-btn,
.sidenav-nav-container .widget_nav_menu #accordion-sidenav > li.cbr-sidebar-menu-item.current-category-ancestor > .dropdown-sidenav-btn {
	color: #fff !important;
}

body.dark-mode .sidenav-nav-container .widget_nav_menu #accordion-sidenav > li.cbr-sidebar-menu-item > a {
	color: #f2f2f2;
}

body.dark-mode .sidenav-nav-container .widget_nav_menu #accordion-sidenav > li.cbr-sidebar-menu-item:not(.current-menu-item):not(.current_page_item):not(.current-menu-parent):not(.current-menu-ancestor):not(.current-post-ancestor):not(.current-category-ancestor) > a:hover,
body.dark-mode .sidenav-nav-container .widget_nav_menu #accordion-sidenav > li.cbr-sidebar-menu-item:not(.current-menu-item):not(.current_page_item):not(.current-menu-parent):not(.current-menu-ancestor):not(.current-post-ancestor):not(.current-category-ancestor) > a:focus-visible {
	color: #fff;
	background: rgba(95, 66, 231, .24);
}

/* Visual groups: universes, knowledge bases, characters and content sections. */
.sidenav-nav-container .widget_nav_menu #accordion-sidenav > li.cbr-sidebar-icon-star-wars + li.cbr-sidebar-icon-knowledge,
.sidenav-nav-container .widget_nav_menu #accordion-sidenav > li.cbr-sidebar-icon-knowledge + li.cbr-sidebar-icon-characters,
.sidenav-nav-container .widget_nav_menu #accordion-sidenav > li.cbr-sidebar-icon-characters + li.cbr-sidebar-icon-movies {
	margin-top: 11px;
	padding-top: 11px;
	border-top: 1px solid rgba(0, 0, 0, .10);
}

/* Languages form their own group; social links remain untouched below them. */
.sidenav-nav-container .widget_nav_menu #accordion-sidenav > li.cbr-sidebar-icon-news + li {
	margin-top: 11px;
	border-top: 1px solid rgba(0, 0, 0, .10);
}

body.dark-mode .sidenav-nav-container .widget_nav_menu #accordion-sidenav > li.cbr-sidebar-icon-star-wars + li.cbr-sidebar-icon-knowledge,
body.dark-mode .sidenav-nav-container .widget_nav_menu #accordion-sidenav > li.cbr-sidebar-icon-knowledge + li.cbr-sidebar-icon-characters,
body.dark-mode .sidenav-nav-container .widget_nav_menu #accordion-sidenav > li.cbr-sidebar-icon-characters + li.cbr-sidebar-icon-movies,
body.dark-mode .sidenav-nav-container .widget_nav_menu #accordion-sidenav > li.cbr-sidebar-icon-news + li {
	border-top-color: rgba(255, 255, 255, .13);
}

/* Universe icons. */
.cbr-sidebar-icon-marvel > a::before {
	-webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.9' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='8.5'/%3E%3Cpath d='m6 6 12 12M18 6 6 18M3.7 12h16.6'/%3E%3Ccircle cx='12' cy='12' r='2.2' fill='black' stroke='none'/%3E%3C/svg%3E");
	mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.9' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='8.5'/%3E%3Cpath d='m6 6 12 12M18 6 6 18M3.7 12h16.6'/%3E%3Ccircle cx='12' cy='12' r='2.2' fill='black' stroke='none'/%3E%3C/svg%3E");
}

.cbr-sidebar-icon-dc > a::before {
	-webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round'%3E%3Cpath d='M18.8 6.1A8.5 8.5 0 1 0 19 17.7'/%3E%3Cpath d='M18.8 6.1a6.5 6.5 0 0 0-8.1 10.1c2.3 2 5.7 2.2 8.3 1.5'/%3E%3C/svg%3E");
	mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round'%3E%3Cpath d='M18.8 6.1A8.5 8.5 0 1 0 19 17.7'/%3E%3Cpath d='M18.8 6.1a6.5 6.5 0 0 0-8.1 10.1c2.3 2 5.7 2.2 8.3 1.5'/%3E%3C/svg%3E");
}

.cbr-sidebar-icon-star-wars > a::before {
	-webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.9' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 3 3.5 20h17L12 3Z'/%3E%3Cpath d='m12 8-4.4 8.8h8.8L12 8Z'/%3E%3Cpath d='M9.7 16.8 12 13l2.3 3.8'/%3E%3C/svg%3E");
	mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.9' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 3 3.5 20h17L12 3Z'/%3E%3Cpath d='m12 8-4.4 8.8h8.8L12 8Z'/%3E%3Cpath d='M9.7 16.8 12 13l2.3 3.8'/%3E%3C/svg%3E");
}

/* Section icons. */
.cbr-sidebar-icon-knowledge > a::before,
.cbr-sidebar-icon-comics > a::before {
	-webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.9' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M3.5 5.5A3.5 3.5 0 0 1 7 4h4v16H7a3.5 3.5 0 0 0-3.5 1V5.5ZM20.5 5.5A3.5 3.5 0 0 0 17 4h-4v16h4a3.5 3.5 0 0 1 3.5 1V5.5Z'/%3E%3C/svg%3E");
	mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.9' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M3.5 5.5A3.5 3.5 0 0 1 7 4h4v16H7a3.5 3.5 0 0 0-3.5 1V5.5ZM20.5 5.5A3.5 3.5 0 0 0 17 4h-4v16h4a3.5 3.5 0 0 1 3.5 1V5.5Z'/%3E%3C/svg%3E");
}

.cbr-sidebar-icon-characters > a::before {
	-webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.9' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2M9 11a4 4 0 1 0 0-8 4 4 0 0 0 0 8ZM22 21v-2a4 4 0 0 0-3-3.87M16 3.13a4 4 0 0 1 0 7.75'/%3E%3C/svg%3E");
	mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.9' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2M9 11a4 4 0 1 0 0-8 4 4 0 0 0 0 8ZM22 21v-2a4 4 0 0 0-3-3.87M16 3.13a4 4 0 0 1 0 7.75'/%3E%3C/svg%3E");
}

.cbr-sidebar-icon-movies > a::before {
	-webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.9' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 7h16a2 2 0 0 1 2 2v10a2 2 0 0 1-2 2H4a2 2 0 0 1-2-2V7Z'/%3E%3Cpath d='m7 3 2 4m4-4 2 4m4-4 2 4M2 11h20'/%3E%3C/svg%3E");
	mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.9' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 7h16a2 2 0 0 1 2 2v10a2 2 0 0 1-2 2H4a2 2 0 0 1-2-2V7Z'/%3E%3Cpath d='m7 3 2 4m4-4 2 4m4-4 2 4M2 11h20'/%3E%3C/svg%3E");
}

.cbr-sidebar-icon-series > a::before {
	-webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.9' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3' y='4' width='18' height='14' rx='2'/%3E%3Cpath d='M8 22h8M12 18v4'/%3E%3C/svg%3E");
	mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.9' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3' y='4' width='18' height='14' rx='2'/%3E%3Cpath d='M8 22h8M12 18v4'/%3E%3C/svg%3E");
}

.cbr-sidebar-icon-games > a::before {
	-webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.9' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M8 6h8a5 5 0 0 1 4.8 3.6l1.1 3.8a4 4 0 0 1-6.5 4.1L13.8 16h-3.6l-1.6 1.5a4 4 0 0 1-6.5-4.1l1.1-3.8A5 5 0 0 1 8 6Z'/%3E%3Cpath d='M7 10v4M5 12h4M16.5 11.5h.01M18.5 13.5h.01'/%3E%3C/svg%3E");
	mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.9' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M8 6h8a5 5 0 0 1 4.8 3.6l1.1 3.8a4 4 0 0 1-6.5 4.1L13.8 16h-3.6l-1.6 1.5a4 4 0 0 1-6.5-4.1l1.1-3.8A5 5 0 0 1 8 6Z'/%3E%3Cpath d='M7 10v4M5 12h4M16.5 11.5h.01M18.5 13.5h.01'/%3E%3C/svg%3E");
}

.cbr-sidebar-icon-news > a::before {
	-webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.9' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 4h15a2 2 0 0 1 2 2v14H6a2 2 0 0 1-2-2V4Z'/%3E%3Cpath d='M4 8H2v10a2 2 0 0 0 2 2M8 8h9M8 12h9M8 16h5'/%3E%3C/svg%3E");
	mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.9' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 4h15a2 2 0 0 1 2 2v14H6a2 2 0 0 1-2-2V4Z'/%3E%3Cpath d='M4 8H2v10a2 2 0 0 0 2 2M8 8h9M8 12h9M8 16h5'/%3E%3C/svg%3E");
}

@media (prefers-reduced-motion: reduce) {
	.sidenav-nav-container .widget_nav_menu #accordion-sidenav > li.cbr-sidebar-menu-item,
	.sidenav-nav-container .widget_nav_menu #accordion-sidenav > li.cbr-sidebar-menu-item > a {
		transition: none;
	}
}
