/* Polished Shuffle-inspired sidebar layer. Loaded after legacy responsive CSS. */
:root {
  --wanted-sidebar-width: 240px;
  --wanted-sidebar-collapsed-width: 76px;
  --wanted-sidebar-bg: #101319;
  --wanted-sidebar-bg-deep: #0a0c10;
  --wanted-sidebar-row: #191e27;
  --wanted-sidebar-row-hover: #202632;
  --wanted-sidebar-border: rgba(255, 255, 255, 0.1);
  --wanted-sidebar-text: #f7f8fc;
  --wanted-sidebar-muted: #b3bac9;
  --wanted-sidebar-dim: #737c8e;
  --wanted-sidebar-accent: #8b5cf6;
  --wanted-sidebar-accent-2: #c0a5ff;
  --wanted-sidebar-gold: #ffc928;
  --wanted-sidebar-green: #5bf39a;
}

#app {
  --wanted-sidebar-width: 240px;
  --wanted-sidebar-collapsed-width: 76px;
}

#app > .sidebar {
  position: relative;
  flex: 0 0 var(--wanted-sidebar-width) !important;
  width: var(--wanted-sidebar-width) !important;
  min-width: var(--wanted-sidebar-width);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.035), rgba(255, 255, 255, 0) 19%),
    var(--wanted-sidebar-bg);
  border-right: 1px solid var(--wanted-sidebar-border) !important;
  box-shadow: inset -1px 0 0 rgba(0, 0, 0, 0.62), 20px 0 42px rgba(0, 0, 0, 0.28);
  overflow: visible;
}

#app > .sidebar::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(circle at 18% 0%, rgba(139, 92, 246, 0.2), transparent 29%),
    linear-gradient(90deg, rgba(255, 255, 255, 0.028), transparent 52%);
  opacity: 1;
}

#app > .sidebar .logo {
  position: relative;
  justify-content: flex-start;
  min-height: 72px !important;
  padding: 14px 18px !important;
  background: rgba(8, 10, 14, 0.72) !important;
  border-bottom: 1px solid var(--wanted-sidebar-border) !important;
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.025);
}

#app .logo > .logoim {
  width: 160px !important;
  height: 40px !important;
  filter: drop-shadow(0 7px 20px rgba(139, 92, 246, 0.2));
}

#app > .sidebar .logo .leftBtn {
  right: -13px;
  width: 26px;
  height: 32px;
  color: #eef1f8;
  background: #191e27 !important;
  border: 1px solid rgba(255, 255, 255, 0.1) !important;
  border-radius: 9px !important;
  box-shadow: 0 7px 18px rgba(0, 0, 0, 0.35) !important;
  opacity: 0.82;
}

#app > .sidebar .logo .leftBtn .icon {
  width: 11px !important;
  height: 11px !important;
}

#app > .sidebar .logo .leftBtn:hover {
  background: #242b37 !important;
  border-color: rgba(139, 92, 246, 0.5) !important;
  color: #fff;
  opacity: 1;
}

/* Casino / sports switch lives between the brand and the scrolling menu. */
#app > .sidebar > .sb-tabs {
  display: flex;
  gap: 4px;
  margin: 10px 10px 4px;
  padding: 4px;
  background: #090b0f;
  border: 1px solid rgba(255, 255, 255, 0.11);
  border-radius: 11px;
  box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.5);
}

#app > .sidebar > .sb-tabs .sb-tab {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-height: 38px;
  padding: 0 8px;
  border: 1px solid transparent;
  border-radius: 8px;
  color: #a8b0c0;
  font-size: 13px;
  font-weight: 750;
  text-decoration: none;
  white-space: nowrap;
  transition: color 160ms ease, background-color 160ms ease, border-color 160ms ease, box-shadow 160ms ease;
}

#app > .sidebar > .sb-tabs .sb-tab svg {
  flex: 0 0 17px;
  width: 17px;
  height: 17px;
}

#app > .sidebar > .sb-tabs .sb-tab:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.045);
}

#app > .sidebar > .sb-tabs .sb-tab.active {
  color: #fff;
  background: linear-gradient(135deg, #9b6cff 0%, #7c3aed 100%);
  border-color: rgba(211, 190, 255, 0.32);
  box-shadow: 0 5px 14px rgba(124, 58, 237, 0.38), inset 0 1px 0 rgba(255, 255, 255, 0.16);
}

.left--closed #app > .sidebar > .sb-tabs {
  display: none;
}

#app > .sidebar > .tc-wrapper {
  position: relative;
  z-index: 1;
  background: transparent;
}

#app > .sidebar > .tc-wrapper > .inner {
  padding: 8px 10px 20px !important;
  scrollbar-color: rgba(148, 163, 184, 0.24) transparent;
  scrollbar-width: thin;
}

#app > .sidebar > .tc-wrapper > .inner::-webkit-scrollbar {
  width: 5px;
}

#app > .sidebar > .tc-wrapper > .inner::-webkit-scrollbar-button {
  display: none !important;
  width: 0 !important;
  height: 0 !important;
  background: transparent !important;
  border: 0 !important;
}

#app > .sidebar > .tc-wrapper > .inner::-webkit-scrollbar-button:vertical:start:decrement,
#app > .sidebar > .tc-wrapper > .inner::-webkit-scrollbar-button:vertical:end:increment {
  display: none !important;
  width: 0 !important;
  height: 0 !important;
}

#app > .sidebar > .tc-wrapper > .inner::-webkit-scrollbar-track {
  background: transparent;
}

#app > .sidebar > .tc-wrapper > .inner::-webkit-scrollbar-thumb {
  background: rgba(148, 163, 184, 0.24);
  border-radius: 999px;
}

#app > .sidebar > .tc-wrapper > .inner::-webkit-scrollbar-thumb:hover {
  background: rgba(148, 163, 184, 0.34);
}

/* ── Section labels (Housebets-style grouped headers) ─────────────────────── */
#app > .sidebar > .tc-wrapper > .inner > .sb-section-label {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 17px 12px 8px !important;
  font-size: 10px !important;
  font-weight: 800 !important;
  letter-spacing: 0.11em !important;
  text-transform: uppercase;
  color: var(--wanted-sidebar-dim) !important;
  user-select: none;
}

#app > .sidebar > .tc-wrapper > .inner > .sb-section-label::after {
  content: "";
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, rgba(255, 255, 255, 0.1), transparent);
}

#app > .sidebar > .tc-wrapper > .inner > .sb-section-label:first-child {
  padding-top: 4px !important;
}

.left--closed #app > .sidebar > .tc-wrapper > .inner > .sb-section-label {
  display: none !important;
}

/* Brand mark that replaces the icon on the "Оригиналы" (house games) row */
#app > .sidebar > .tc-wrapper > .inner > .item .icon.sb-brand-mark {
  display: flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 24px;
  width: 24px !important;
  height: 24px !important;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--wanted-sidebar-accent-2), var(--wanted-sidebar-accent)) !important;
  color: #fff !important;
  font-size: 11px !important;
  font-weight: 800;
  line-height: 1;
  box-shadow: 0 5px 14px rgba(139, 92, 246, 0.42), inset 0 1px 0 rgba(255, 255, 255, 0.22);
}

/* Wanted hat glyph masked inside the purple brand circle (replaces the "W" letter) */
#app > .sidebar > .tc-wrapper > .inner > .item .icon.sb-brand-mark--hat {
  font-size: 0 !important;
}

#app > .sidebar > .tc-wrapper > .inner > .item .icon.sb-brand-mark--hat::before {
  content: "";
  width: 16px;
  height: 16px;
  background-color: #fff;
  -webkit-mask: url("/images/wanted-hat-icon.svg") center / contain no-repeat;
  mask: url("/images/wanted-hat-icon.svg") center / contain no-repeat;
}

#app > .sidebar > .tc-wrapper > .inner > .item:hover .icon.sb-brand-mark,
#app > .sidebar > .tc-wrapper > .inner > .item.marked .icon.sb-brand-mark {
  color: #fff !important;
}

#app > .sidebar > .tc-wrapper > .inner > .item {
  isolation: isolate;
  min-height: 48px !important;
  margin: 2px 0 !important;
  padding: 0 11px 0 12px !important;
  gap: 11px;
  border: 1px solid transparent !important;
  border-radius: 10px !important;
  color: var(--wanted-sidebar-muted) !important;
  background: transparent !important;
  font-size: 13.5px !important;
  font-weight: 700 !important;
  letter-spacing: 0 !important;
  transform: none !important;
  transition: color 160ms ease, background-color 160ms ease, border-color 160ms ease, box-shadow 160ms ease !important;
}

#app > .sidebar > .tc-wrapper > .inner > .item::before {
  content: "";
  position: absolute;
  left: -11px;
  top: 8px;
  bottom: 8px;
  width: 4px;
  border-radius: 0 999px 999px 0;
  background: linear-gradient(180deg, var(--wanted-sidebar-accent-2), var(--wanted-sidebar-accent));
  box-shadow: 0 0 16px rgba(139, 92, 246, 0.78);
  opacity: 0;
  transform: scaleY(0.65);
}

#app > .sidebar > .tc-wrapper > .inner > .item::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  border-radius: inherit;
  background:
    linear-gradient(90deg, rgba(139, 92, 246, 0.27), rgba(139, 92, 246, 0.09) 64%, transparent),
    var(--wanted-sidebar-row);
  opacity: 0;
}

#app > .sidebar > .tc-wrapper > .inner > .item .icon {
  flex: 0 0 22px;
  width: 22px !important;
  height: 22px !important;
  color: #a9b2c3 !important;
  opacity: 1;
}

#app > .sidebar > .tc-wrapper > .inner > .item .icon svg {
  width: 20px !important;
  height: 20px !important;
}

#app > .sidebar > .tc-wrapper > .inner > .item .title {
  min-width: 0;
  margin-left: 0 !important;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: inherit;
  background: none !important;
  -webkit-text-fill-color: currentColor !important;
  line-height: 1.25;
}

#app > .sidebar > .tc-wrapper > .inner > .item .arrow {
  flex: 0 0 24px;
  width: 24px !important;
  height: 24px !important;
  margin-left: auto !important;
  border-radius: 7px;
  color: #9aa4b7 !important;
  background: rgba(255, 255, 255, 0.05);
}

#app > .sidebar > .tc-wrapper > .inner > .item:hover {
  color: var(--wanted-sidebar-text) !important;
  border-color: rgba(255, 255, 255, 0.105) !important;
  background: var(--wanted-sidebar-row-hover) !important;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.035), 0 7px 18px rgba(0, 0, 0, 0.16) !important;
}

#app > .sidebar > .tc-wrapper > .inner > .item:hover::before,
#app > .sidebar > .tc-wrapper > .inner > .item:hover::after,
#app > .sidebar > .tc-wrapper > .inner > .item.marked::before,
#app > .sidebar > .tc-wrapper > .inner > .item.marked::after {
  opacity: 1;
  transform: scaleY(1);
}

#app > .sidebar > .tc-wrapper > .inner > .item:hover .icon,
#app > .sidebar > .tc-wrapper > .inner > .item:hover .arrow,
#app > .sidebar > .tc-wrapper > .inner > .item.marked .icon,
#app > .sidebar > .tc-wrapper > .inner > .item.marked .arrow {
  color: var(--wanted-sidebar-accent-2) !important;
}

#app > .sidebar > .tc-wrapper > .inner > .item.marked {
  color: #fff !important;
  border-color: rgba(164, 123, 255, 0.55) !important;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.09), 0 9px 24px rgba(0, 0, 0, 0.22), 0 0 0 1px rgba(139, 92, 246, 0.05) !important;
}

#app > .sidebar > .tc-wrapper > .inner > .item.item-expandable.expanded:not(.marked) {
  color: #f4f1ff !important;
  border-color: rgba(139, 92, 246, 0.24) !important;
  background: rgba(139, 92, 246, 0.09) !important;
}

#app > .sidebar > .tc-wrapper > .inner > .item:focus-visible,
#app > .sidebar > .sb-tabs .sb-tab:focus-visible {
  outline: 2px solid var(--wanted-sidebar-accent-2);
  outline-offset: 2px;
}

/* VIP row keeps a little breathing room; section labels now handle the rest of
   the grouping, so the old nth-of-type(7) separator hack is retired. */
#app > .sidebar > .tc-wrapper > .inner > .item[href="/vip"] {
  margin-top: 12px !important;
}

#app > .sidebar > .tc-wrapper > .inner > .item .badge {
  min-width: 28px;
  padding: 3px 8px;
  border-radius: 7px;
  background: linear-gradient(135deg, #a77bff, #8159ff) !important;
  color: #fff;
  box-shadow: 0 6px 16px rgba(138, 99, 255, 0.28);
}

#app > .sidebar > .tc-wrapper > .inner > .item .badge-green {
  background: rgba(91, 243, 154, 0.14) !important;
  color: var(--wanted-sidebar-green) !important;
  box-shadow: none;
}

.submenu {
  margin: 4px 0 7px !important;
  border-radius: 10px !important;
  background: transparent !important;
  border: 0 !important;
}

.item-expandable.expanded + .submenu {
  max-height: 640px !important;
}

.submenu-item {
  position: relative;
  display: flex !important;
  align-items: center;
  min-height: 38px;
  margin: 1px 0 1px 38px;
  padding: 0 10px 0 15px !important;
  border: 1px solid transparent !important;
  border-left: 2px solid rgba(255, 255, 255, 0.08) !important;
  border-radius: 8px !important;
  background: transparent !important;
  color: #98a2b5 !important;
  font-size: 12.5px !important;
  font-weight: 650 !important;
  text-decoration: none !important;
}

.submenu-item .title {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.submenu-item:hover,
.submenu-item.marked {
  color: #fff !important;
  background: rgba(255, 255, 255, 0.055) !important;
  border-color: rgba(139, 92, 246, 0.28) !important;
  border-left-color: var(--wanted-sidebar-accent) !important;
}

#app > .sidebar > .tc-wrapper > .inner > .predictions-sidebar-item:hover,
#app > .sidebar > .tc-wrapper > .inner > .predictions-sidebar-item.marked,
#app > .sidebar > .tc-wrapper > .inner > .predictions-sidebar-item.expanded {
  background: rgba(72, 60, 130, 0.7) !important;
  color: #fff !important;
  border-color: rgba(179, 140, 255, 0.16) !important;
}

#app > .sidebar > .tc-wrapper > .inner > .predictions-sidebar-item .icon {
  color: var(--wanted-sidebar-accent-2) !important;
  filter: drop-shadow(0 0 8px rgba(179, 140, 255, 0.42));
}

#app > .sidebar > .tc-wrapper > .inner > .predictions-sidebar-item:hover .icon,
#app > .sidebar > .tc-wrapper > .inner > .predictions-sidebar-item:hover .arrow,
#app > .sidebar > .tc-wrapper > .inner > .predictions-sidebar-item.marked .icon,
#app > .sidebar > .tc-wrapper > .inner > .predictions-sidebar-item.marked .arrow,
#app > .sidebar > .tc-wrapper > .inner > .predictions-sidebar-item.expanded .icon,
#app > .sidebar > .tc-wrapper > .inner > .predictions-sidebar-item.expanded .arrow {
  color: #fff !important;
}

.predictions-sidebar-submenu {
  margin: 0 !important;
  padding: 0 !important;
  background: transparent !important;
  border-radius: 0 0 8px 8px !important;
}

.predictions-sidebar-item.marked + .predictions-sidebar-submenu,
.predictions-sidebar-item.expanded + .predictions-sidebar-submenu {
  margin: 3px 0 6px !important;
  max-height: 140px !important;
  padding: 3px 0 7px !important;
  background: rgba(48, 42, 100, 0.72) !important;
}

.predictions-sidebar-submenu .submenu-item {
  margin-left: 0 !important;
  padding-left: 18px !important;
  border-left: 0 !important;
  color: #c9c1ff !important;
  gap: 10px;
}

.predictions-sidebar-submenu .submenu-item .icon {
  flex: 0 0 18px;
  width: 18px;
  height: 18px;
  color: #9f93d9;
}

.predictions-sidebar-submenu .submenu-item:hover,
.predictions-sidebar-submenu .submenu-item.marked {
  background: rgba(255, 255, 255, 0.06) !important;
}

#app > .sidebar > .tc-wrapper > .footer {
  position: relative;
  z-index: 1;
  padding: 11px 12px 14px !important;
  border-top: 1px solid var(--wanted-sidebar-border);
  background: rgba(8, 10, 14, 0.72);
}

#app > .sidebar > .tc-wrapper > .footer .gx-btn {
  min-height: 42px !important;
  padding: 0 12px !important;
  border: 1px solid rgba(255, 255, 255, 0.1) !important;
  border-radius: 10px !important;
  background: #1a1f28 !important;
  color: #e8ecf5 !important;
  font-weight: 700;
}

#app > .sidebar > .tc-wrapper > .footer .gx-btn:hover {
  background: #252b37 !important;
  border-color: rgba(138, 99, 255, 0.34) !important;
  color: #fff !important;
}

.left--closed #app > .sidebar {
  flex-basis: var(--wanted-sidebar-collapsed-width) !important;
  width: var(--wanted-sidebar-collapsed-width) !important;
  min-width: var(--wanted-sidebar-collapsed-width);
}

.left--closed #app > .sidebar .logo {
  justify-content: center;
  padding-left: 10px !important;
  padding-right: 10px !important;
}

.left--closed #app > .sidebar .logo > .logoim {
  width: 36px !important;
  height: 36px !important;
  background: url(../images/sidebar-w-logo.svg) no-repeat center center / contain !important;
  filter: drop-shadow(0 7px 16px rgba(138, 99, 255, 0.22));
}

.left--closed #app > .sidebar .logo .leftBtn {
  right: -12px;
  width: 24px;
  height: 32px;
  background: #191e27 !important;
  border: 1px solid rgba(255, 255, 255, 0.1) !important;
  border-radius: 9px !important;
  box-shadow: 0 7px 18px rgba(0, 0, 0, 0.35) !important;
  opacity: 0.82;
}

.left--closed #app > .sidebar .logo .leftBtn .icon {
  width: 10px !important;
  height: 10px !important;
}

.left--closed #app > .sidebar > .tc-wrapper > .inner {
  padding-left: 10px !important;
  padding-right: 10px !important;
}

.left--closed #app > .sidebar > .tc-wrapper > .inner > .item {
  width: 56px !important;
  min-height: 48px !important;
  justify-content: center;
  padding: 0 !important;
}

.left--closed #app > .sidebar > .tc-wrapper > .inner > .item::before {
  left: -10px;
}

.left--closed #app > .sidebar > .tc-wrapper > .inner > .item .title,
.left--closed #app > .sidebar > .tc-wrapper > .inner > .item .badge {
  display: none !important;
}

.left--closed #app > .sidebar > .tc-wrapper > .inner > .item .tooltip {
  left: 62px !important;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: #1b2029 !important;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.36);
}

.left--closed .submenu {
  display: none !important;
}

.header .wrapper {
  justify-content: center !important;
  gap: clamp(18px, 2vw, 30px);
}

.header__links,
.header__right {
  flex: 0 0 auto !important;
}

.header__right {
  justify-content: flex-start !important;
  gap: 14px;
}

.header__right > .d-flex:first-child {
  display: none !important;
}

.header__user {
  gap: 14px;
}

@media (max-width: 1125px) {
  #app > .sidebar {
    flex-basis: 0 !important;
    width: 0 !important;
    min-width: 0;
  }

  .header .wrapper {
    justify-content: space-between !important;
  }

  .header__right {
    flex: 1 1 auto !important;
    justify-content: flex-end !important;
  }
}

@media (max-width: 768px) {
  .header__right > .d-flex:first-child {
    display: flex !important;
  }

  #app > .sidebar {
    display: block !important;
    position: relative;
    overflow: visible;
  }

  /* The mobile drawer only uses .tc-wrapper. Keep the desktop-only brand row
     and casino/sports switch from overflowing the sidebar's zero-width shell
     and covering the compact header. */
  #app > .sidebar > .logo,
  #app > .sidebar > .sb-tabs {
    display: none !important;
  }

  .sidebar .tc-wrapper {
    position: fixed !important;
    left: -100% !important;
    top: 0 !important;
    bottom: auto !important;
    height: 100dvh !important;
    width: min(292px, calc(100vw - 56px)) !important;
    z-index: 999 !important;
    overflow-y: auto !important;
    background:
      linear-gradient(180deg, rgba(255, 255, 255, 0.035), rgba(255, 255, 255, 0) 18%),
      var(--wanted-sidebar-bg) !important;
    border-right: 1px solid var(--wanted-sidebar-border);
    box-shadow: 24px 0 50px rgba(0, 0, 0, 0.5);
    scrollbar-color: rgba(148, 163, 184, 0.24) transparent;
    scrollbar-width: thin;
  }

  .sidebar .tc-wrapper::-webkit-scrollbar {
    width: 5px;
  }

  .sidebar .tc-wrapper::-webkit-scrollbar-button {
    display: none !important;
    width: 0 !important;
    height: 0 !important;
    background: transparent !important;
    border: 0 !important;
  }

  .sidebar .tc-wrapper::-webkit-scrollbar-button:vertical:start:decrement,
  .sidebar .tc-wrapper::-webkit-scrollbar-button:vertical:end:increment {
    display: none !important;
    width: 0 !important;
    height: 0 !important;
  }

  .sidebar .tc-wrapper::-webkit-scrollbar-track {
    background: transparent;
  }

  .sidebar .tc-wrapper::-webkit-scrollbar-thumb {
    background: rgba(148, 163, 184, 0.24);
    border-radius: 999px;
  }

  body.sidebar-mobile-opened #app > .sidebar > .tc-wrapper {
    left: 0 !important;
  }
}
