/* 17.10 — restore the quiet blue/graphite selection from 14.10.
   Original reference: mystyles.css (14.10), mobile menu and server picker.
   Applies only to header drop-down entries. Existing card titles, forum,
   custom selects and other controls are deliberately unaffected. */

/* Paint the full LI, not the inset anchor (the legacy anchor is 30px narrower).
   Position above adjacent link divider lines when the row is selected. */
html body .wapper .header #hidden-menu .collapsible-menu > li > ul > li:is(:hover, :focus-within, .active, .selected),
html body .wapper .header .collapsible-menu.user-menu > li > ul > li:is(:hover, :focus-within, .active, .selected),
html body .wapper .header #hidden-menu .collapsible-menu > li > ul > li:has(> a.active),
html body .wapper .header .collapsible-menu.user-menu > li > ul > li:has(> a.active) {
  position:relative !important;
  z-index:2 !important;
  background:linear-gradient(90deg,rgba(48,95,123,.31) 0%,rgba(46,76,103,.12) 100%) !important;
}
/* One-pixel bleed hides the preceding and following thin separators, without
   changing the dimensions, line height or clickable area of the menu item. */
html body .wapper .header #hidden-menu .collapsible-menu > li > ul > li:is(:hover, :focus-within, .active, .selected)::before,
html body .wapper .header .collapsible-menu.user-menu > li > ul > li:is(:hover, :focus-within, .active, .selected)::before,
html body .wapper .header #hidden-menu .collapsible-menu > li > ul > li:has(> a.active)::before,
html body .wapper .header .collapsible-menu.user-menu > li > ul > li:has(> a.active)::before {
  content:"" !important;
  position:absolute !important;
  inset:-1px 0 !important;
  background:linear-gradient(90deg,rgba(48,95,123,.31) 0%,rgba(46,76,103,.12) 100%) !important;
  pointer-events:none !important;
  z-index:0 !important;
}
/* Keep text above the fill; don't draw a second smaller selection rectangle
   or leave the old anchor border on top of the selected area. */
html body .wapper .header #hidden-menu .collapsible-menu > li > ul > li:is(:hover, :focus-within, .active, .selected) > a,
html body .wapper .header .collapsible-menu.user-menu > li > ul > li:is(:hover, :focus-within, .active, .selected) > a,
html body .wapper .header #hidden-menu .collapsible-menu > li > ul > li > a.active,
html body .wapper .header .collapsible-menu.user-menu > li > ul > li > a.active {
  position:relative !important;
  z-index:1 !important;
  background:transparent !important;
  border-bottom-color:transparent !important;
  box-shadow:none !important;
}
/* The old 1px divider belongs to the preceding item: hide it only when the
   next item is selected, rather than removing all separators from the menu. */
html body .wapper .header #hidden-menu .collapsible-menu > li > ul > li:has(+ li:is(:hover,:focus-within,.active,.selected)) > a,
html body .wapper .header .collapsible-menu.user-menu > li > ul > li:has(+ li:is(:hover,:focus-within,.active,.selected)) > a {
  border-bottom-color:transparent !important;
}

/* Server selection in bans: reuse the 14.10 gradient, respecting the explicit
   is-selected marker (the template can mark the first row active prematurely).
   Do not style all server entries and do not reintroduce zebra highlights. */
html body .wapper .content .banlist-server-picker .extra-nav ul > li.is-selected {
  background:linear-gradient(90deg,rgba(48,95,123,.31),rgba(46,76,103,.12)) !important;
  border-left-color:rgba(119,192,213,.77) !important;
}

/* 17.10 — unify sidebar selected/hover rows with the approved 14.10
   header dropdown gradient.  The fill belongs to the entire LI, not a
   smaller inset anchor; leave spacing, icons and heading gradients alone. */
html body .wapper .content :is(
  .automix-main-nav,
  .extra-stats,
  .automix-stat-nav,
  .automix-stat-types-mobile,
  .am-navigation-fold,
  .friends-mobile-lists,
  .block:has(.automix-menu-icon)
) .vertical-navigation ul > li:is(
  .active,
  .selected,
  :hover,
  :focus-within,
  :has(> a.active),
  :has(> a[aria-current="page"])
) {
  background:linear-gradient(90deg, rgba(48,95,123,.31) 0%, rgba(46,76,103,.12) 100%) !important;
  box-shadow:none !important;
}

/* Clear older solid/inset fills so the row has only one continuous gradient. */
html body .wapper .content :is(
  .automix-main-nav,
  .extra-stats,
  .automix-stat-nav,
  .automix-stat-types-mobile,
  .am-navigation-fold,
  .friends-mobile-lists,
  .block:has(.automix-menu-icon)
) .vertical-navigation ul > li:is(.active,.selected,:hover,:focus-within) > a,
html body .wapper .content :is(
  .automix-main-nav,
  .extra-stats,
  .automix-stat-nav,
  .automix-stat-types-mobile,
  .am-navigation-fold,
  .friends-mobile-lists,
  .block:has(.automix-menu-icon)
) .vertical-navigation ul > li > a:is(.active,[aria-current="page"]) {
  background:transparent !important;
  box-shadow:none !important;
}

/* Standalone native statistics links use the same selection fill. */
html body .wapper .content .automix-native-nav > li:is(.active,.selected,:hover,:focus-within),
html body .wapper .content .automix-native-nav > li:has(> a[aria-current="page"]) {
  background:linear-gradient(90deg, rgba(48,95,123,.31) 0%, rgba(46,76,103,.12) 100%) !important;
  box-shadow:none !important;
}
html body .wapper .content .automix-native-nav > li:is(.active,.selected,:hover,:focus-within) > a,
html body .wapper .content .automix-native-nav > li > a[aria-current="page"] {
  background:transparent !important;
  box-shadow:none !important;
}
