/**
 * RSM suite sidebar section headings — loaded on all wp-admin screens.
 */

/* Legacy non-accordion labels (mobile / before JS init). */
#adminmenu .wp-submenu a[href*="page=rsmspark-suite-"] {
	pointer-events: none !important;
	cursor: default !important;
	display: block;
	margin: 8px 0 4px !important;
	padding: 7px 12px !important;
	font-size: 11px !important;
	font-weight: 700 !important;
	line-height: 1.3 !important;
	letter-spacing: 0.04em;
	text-transform: uppercase;
	text-align: left;
	color: #fff !important;
	background: #ff6b35 !important;
	box-shadow: none !important;
}

#adminmenu .wp-submenu a[href*="page=rsmspark-suite-"]:hover,
#adminmenu .wp-submenu a[href*="page=rsmspark-suite-"]:focus,
#adminmenu .wp-submenu .current a[href*="page=rsmspark-suite-"] {
	color: #fff !important;
	background: #ff6b35 !important;
	box-shadow: none !important;
}

#adminmenu .wp-submenu li:has(> a[href*="page=rsmspark-suite-"]) {
	margin: 0;
	padding: 0;
}

/**
 * Accordion section toggles (desktop / tablet sidebar).
 */
#adminmenu #toplevel_page_rsmspark-suite.rsmspark-suite-menu-accordion .wp-submenu li.rsmspark-suite-menu-heading > a.rsmspark-suite-menu-heading__link {
	pointer-events: auto !important;
	cursor: pointer !important;
	display: flex !important;
	align-items: center;
	justify-content: space-between;
	gap: 8px;
	margin: 8px 0 4px !important;
	padding: 7px 12px !important;
	font-size: 11px !important;
	font-weight: 700 !important;
	line-height: 1.3 !important;
	letter-spacing: 0.04em;
	text-transform: uppercase;
	text-align: left;
	text-decoration: none;
	color: #fff !important;
	background: #ff6b35 !important;
	border: none;
	border-radius: 3px;
	box-shadow: none !important;
	transition: background-color 0.15s ease, color 0.15s ease, box-shadow 0.15s ease;
}

#adminmenu #toplevel_page_rsmspark-suite.rsmspark-suite-menu-accordion .wp-submenu li.rsmspark-suite-menu-heading > a.rsmspark-suite-menu-heading__link:hover {
	color: #fff !important;
	background: #e85f2e !important;
	box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.22) !important;
}

#adminmenu #toplevel_page_rsmspark-suite.rsmspark-suite-menu-accordion .wp-submenu li.rsmspark-suite-menu-heading > a.rsmspark-suite-menu-heading__link:focus {
	outline: none;
	color: #fff !important;
	background: #e85f2e !important;
	box-shadow: inset 0 0 0 2px rgba(255, 255, 255, 0.75) !important;
}

#adminmenu #toplevel_page_rsmspark-suite.rsmspark-suite-menu-accordion .wp-submenu li.rsmspark-suite-menu-heading > a.rsmspark-suite-menu-heading__link:focus-visible {
	outline: 2px solid #fff;
	outline-offset: 1px;
}

#adminmenu #toplevel_page_rsmspark-suite.rsmspark-suite-menu-accordion .wp-submenu li.rsmspark-suite-menu-heading--open > a.rsmspark-suite-menu-heading__link {
	background: #e55a28 !important;
	box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.08) !important;
}

#adminmenu #toplevel_page_rsmspark-suite.rsmspark-suite-menu-accordion .wp-submenu li.rsmspark-suite-menu-heading--open > a.rsmspark-suite-menu-heading__link:hover {
	background: #d14e22 !important;
	box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.18) !important;
}

#adminmenu #toplevel_page_rsmspark-suite.rsmspark-suite-menu-accordion .wp-submenu li.rsmspark-suite-menu-heading > a.rsmspark-suite-menu-heading__link::after {
	content: "\25B8";
	flex: 0 0 auto;
	font-size: 12px;
	line-height: 1;
	opacity: 0.92;
}

#adminmenu #toplevel_page_rsmspark-suite.rsmspark-suite-menu-accordion .wp-submenu li.rsmspark-suite-menu-heading--open > a.rsmspark-suite-menu-heading__link::after {
	content: "\25BE";
}

#adminmenu #toplevel_page_rsmspark-suite.rsmspark-suite-menu-accordion .wp-submenu li.rsmspark-suite-menu-group-item--hidden {
	display: none !important;
}

/**
 * Long RSM submenu: allow scrolling when taller than the viewport (folded flyout
 * and expanded sidebar). Core sets overflow:visible on flyouts which clips tall menus.
 */
#adminmenu #toplevel_page_rsmspark-suite .wp-submenu {
	max-height: calc(100vh - 46px);
	overflow-x: hidden;
	overflow-y: auto;
	overscroll-behavior: contain;
	-webkit-overflow-scrolling: touch;
}

.folded #adminmenu #toplevel_page_rsmspark-suite .wp-submenu,
.auto-fold #adminmenu #toplevel_page_rsmspark-suite .wp-submenu {
	max-height: calc(100vh - 46px);
	overflow-y: auto;
}

/**
 * Collapsed via second click on the RSM parent (expanded sidebar only).
 */
#adminmenu #toplevel_page_rsmspark-suite.rsmspark-suite-submenu-collapsed .wp-submenu {
	display: none;
}
