/* 15.10: statistic sorting menus + match statistics table only.
   Monitoring player actions and admin profile dropdowns are intentionally excluded. */

/* The menu begins with a straight top edge; only bottom corners are rounded. */
html body .am-dark-select-menu:not(.am-player-action-menu) {
  border-radius: 0 0 8px 8px !important;
  border-top-left-radius: 0 !important;
  border-top-right-radius: 0 !important;
  padding-top: 0 !important;
  padding-bottom: 0 !important;
}

/* Fine, semi-transparent white separators between sorting options. */
html body .am-dark-select-menu:not(.am-player-action-menu) > .am-dark-select-option[role="option"]:not(:last-child) {
  border-bottom: 1px solid rgba(238, 247, 255, .17) !important;
}

/* Numeric match-stat columns. Keep Place and Player columns as they are. */
html body .automix table.am-stat-table tbody tr:not(.am-empty-row) > td:nth-child(n+3) {
  text-align: center !important;
}

/* The circular win-percentage icon follows the number to the centre. */
html body .automix table.am-stat-table tbody td:nth-child(6) .am-win-ring {
  justify-content: center !important;
}

/* Palette correction v2: the sorting component makes its popup a BODY child.
   Match its actual aria-label, not .am-users-group-menu (which is unrelated). */
html body .stats-sort-control.am-dark-select-host:has(> select[aria-label="Сортировка"]),
html body .stats-sort-control.am-dark-select-host:has(> select[aria-label="Сортировка статистики"]) {
  background: linear-gradient(100deg, #131b25 0%, #162633 100%) !important;
  border-color: #455968 !important;
}
html body .stats-sort-control.am-dark-select-host:has(> select[aria-label="Сортировка"]) > .am-dark-select-button,
html body .stats-sort-control.am-dark-select-host:has(> select[aria-label="Сортировка статистики"]) > .am-dark-select-button {
  background: transparent !important;
  background-image: none !important;
}
html body .am-dark-select-menu:is([aria-label="Сортировка"], [aria-label="Сортировка статистики"]):not(.am-player-action-menu):not(.am-users-group-menu) {
  background: linear-gradient(100deg, #131b25 0%, #162633 100%) !important;
  background-color: #131b25 !important;
  border-color: #455968 !important;
  border-radius: 0 0 8px 8px !important;
}
html body .am-dark-select-menu:is([aria-label="Сортировка"], [aria-label="Сортировка статистики"]):not(.am-player-action-menu):not(.am-users-group-menu) > .am-dark-select-option[role="option"] {
  background: transparent !important;
  background-image: none !important;
  color: #dce4ea !important;
  border-bottom: 1px solid rgba(238,247,255,.17) !important;
}
html body .am-dark-select-menu:is([aria-label="Сортировка"], [aria-label="Сортировка статистики"]):not(.am-player-action-menu):not(.am-users-group-menu) > .am-dark-select-option[role="option"]:last-child {
  border-bottom: 0 !important;
}
html body .am-dark-select-menu:is([aria-label="Сортировка"], [aria-label="Сортировка статистики"]):not(.am-player-action-menu):not(.am-users-group-menu) > .am-dark-select-option[role="option"][aria-selected="true"] {
  background: rgba(193, 211, 225, .10) !important;
  color: #f2f6fa !important;
}
html body .am-dark-select-menu:is([aria-label="Сортировка"], [aria-label="Сортировка статистики"]):not(.am-player-action-menu):not(.am-users-group-menu) > .am-dark-select-option[role="option"]:is(:hover, :focus-visible) {
  background: rgba(193, 211, 225, .15) !important;
  color: #ffffff !important;
}
