/* Sidebar reference match (carded sections, green/pink icons, home glow) */
#app > .sidebar.sidebar--ref {
  --sb-bg: #0e0e10;
  --sb-card: #1a1a1d;
  --sb-card-hover: rgba(255, 255, 255, 0.05);
  --sb-green: #39e75f;
  --sb-pink: #ff2d8a;
  --sb-pink-glow: rgba(255, 45, 138, 0.55);
  --sb-label: rgba(255, 255, 255, 0.38);
  --sb-text: rgba(255, 255, 255, 0.92);
  background: var(--sb-bg);
  border-inline-end: 1px solid rgba(255, 255, 255, 0.04);
}

#app > .sidebar.sidebar--ref .logo {
  border-block-end: none;
  padding: 10px 18px 6px 10px;
  position: relative;
  overflow: visible;
}

#app > .sidebar.sidebar--ref .logo > .leftBtn {
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  position: absolute;
  z-index: 5;
  width: 28px !important;
  height: 28px !important;
  min-width: 28px !important;
  min-height: 28px !important;
  padding: 0 !important;
  margin: 0 !important;
  gap: 0 !important;
  border-radius: 50% !important;
  box-sizing: border-box;
  line-height: 0;
  overflow: hidden;
  /* open sidebar: sit on the right edge of logo */
  top: 50%;
  bottom: auto;
  right: -14px;
  left: auto;
  transform: translateY(-50%);
}

#app > .sidebar.sidebar--ref .logo > .leftBtn .icon,
#app > .sidebar.sidebar--ref .logo > .leftBtn .sw1,
#app > .sidebar.sidebar--ref .logo > .leftBtn .sw2 {
  align-items: center;
  justify-content: center;
  width: 14px !important;
  height: 14px !important;
  margin: 0 !important;
  padding: 0 !important;
  font-size: 12px !important;
  line-height: 1 !important;
  background: none !important;
  flex-shrink: 0;
  position: absolute;
  inset: 0;
  margin: auto !important;
}

/* Only one chevron at a time (body.left--closed is source of truth) */
body:not(.left--closed) #app > .sidebar.sidebar--ref .logo > .leftBtn .sw1 {
  display: none !important;
}
body:not(.left--closed) #app > .sidebar.sidebar--ref .logo > .leftBtn .sw2 {
  display: inline-flex !important;
}
body.left--closed #app > .sidebar.sidebar--ref .logo > .leftBtn .sw1 {
  display: inline-flex !important;
}
body.left--closed #app > .sidebar.sidebar--ref .logo > .leftBtn .sw2 {
  display: none !important;
}

#app > .sidebar.sidebar--ref .logo > .leftBtn .icon::before {
  display: block;
  line-height: 1;
  width: 1em;
  text-align: center;
}

.left--closed #app > .sidebar.sidebar--ref .logo {
  padding: 8px 6px 36px;
}

.left--closed #app > .sidebar.sidebar--ref .logo > .leftBtn {
  /* collapsed rail: center under profile mark, not hanging off the edge */
  left: 50%;
  right: auto;
  top: auto;
  bottom: 4px;
  transform: translateX(-50%);
}

/* Profile card */
#app > .sidebar.sidebar--ref .top-site-bar {
  width: 100%;
}

#app > .sidebar.sidebar--ref .sidebar-profile-card {
  display: block;
  width: 100%;
  box-sizing: border-box;
  background: var(--sb-card);
  border-radius: 14px;
  padding: 10px 10px;
  text-decoration: none;
  color: inherit;
}

#app > .sidebar.sidebar--ref .sidebar-profile-card__row {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

#app > .sidebar.sidebar--ref .sidebar-profile-card__mark {
  flex: 0 0 auto;
  width: 40px;
  height: 40px;
  border-radius: 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 20px;
  line-height: 1;
  color: #0a1a0c;
  background: linear-gradient(145deg, #5dff7a 0%, #19c84a 100%);
  box-shadow: 0 0 0 1px rgba(57, 231, 95, 0.25);
}

#app > .sidebar.sidebar--ref .sidebar-profile-card__login {
  font-size: 14px;
  font-weight: 700;
  color: #fff;
}

#app > .sidebar.sidebar--ref .sidebar-profile-card .infononguest {
  flex: 1 1 auto;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 1px;
  font-size: 12px;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.55);
  line-height: 1.2;
}

#app > .sidebar.sidebar--ref .sidebar-profile-card .infononguest span {
  font-size: 14px;
  font-weight: 700;
  color: #fff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

#app > .sidebar.sidebar--ref .sidebar-profile-card__btn {
  flex: 0 0 auto;
  margin-left: auto;
  padding: 7px 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
  font-size: 12px;
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
  line-height: 1.2;
  border: none;
  cursor: pointer;
}

#app > .sidebar.sidebar--ref .sidebar-profile-card__btn:hover {
  background: rgba(255, 255, 255, 0.14);
}

#app > .sidebar.sidebar--ref .sidebar-profile-popover-wrap {
  position: relative;
}

/* Scroll area */
#app > .sidebar.sidebar--ref > .tc-wrapper > .inner.sidebar-scroll {
  padding: 6px 10px 12px;
  gap: 0;
  display: flex;
  flex-direction: column;
}

#app > .sidebar.sidebar--ref .sidebar-nav-divider {
  display: none !important;
}

/* Sections */
#app > .sidebar.sidebar--ref .sidebar-section {
  margin: 0 0 10px;
}

#app > .sidebar.sidebar--ref .sidebar-section--home {
  margin-bottom: 8px;
}

#app > .sidebar.sidebar--ref .sidebar-section__label {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--sb-label);
  padding: 2px 4px 8px;
  line-height: 1;
}

#app > .sidebar.sidebar--ref .sidebar-section__card {
  background: var(--sb-card);
  border-radius: 14px;
  padding: 4px;
  overflow: hidden;
}

#app > .sidebar.sidebar--ref .sidebar-section__card.game-entettis,
#app > .sidebar.sidebar--ref .sidebar-section__card.game-entettis.endborder {
  border: none !important;
  border-bottom: none !important;
  margin: 0;
  padding: 4px;
}

/* Nav rows */
#app > .sidebar.sidebar--ref .allgames-sitebar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  min-height: 42px;
  padding: 8px 10px;
  margin: 0;
  border-radius: 10px;
  background: transparent;
  box-sizing: border-box;
}

#app > .sidebar.sidebar--ref .allgames-sitebar:hover {
  background: var(--sb-card-hover);
}

#app > .sidebar.sidebar--ref .sidebar-section__card > a {
  display: block;
  text-decoration: none;
  color: inherit;
}

#app > .sidebar.sidebar--ref .sidebar-section__card > a.allgames-sitebar {
  display: flex;
  align-items: center;
  width: 100%;
}

#app > .sidebar.sidebar--ref .sidebar-section__card > a .allgames-sitebar {
  width: 100%;
}

#app > .sidebar.sidebar--ref .fiv-3 {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

#app > .sidebar.sidebar--ref .titlenav {
  display: flex;
  align-items: center;
  min-height: 18px;
  line-height: 1;
}

#app > .sidebar.sidebar--ref .titlenav span {
  font-size: 14px;
  font-weight: 600;
  color: var(--sb-text);
  line-height: 1;
}

#app > .sidebar.sidebar--ref .sidebar-ico.fas::before {
  line-height: 1;
  display: block;
}

#app > .sidebar.sidebar--ref .logos1 {
  color: rgba(255, 255, 255, 0.55);
}

/* Icons */
#app > .sidebar.sidebar--ref .sidebar-ico {
  width: 18px !important;
  min-width: 18px;
  max-width: 18px;
  height: 18px !important;
  font-size: 15px !important;
  line-height: 1 !important;
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  fill: currentColor !important;
  stroke: none;
  vertical-align: middle;
}

#app > .sidebar.sidebar--ref .sidebar-ico.icon {
  width: 18px !important;
  height: 18px !important;
}

#app > .sidebar.sidebar--ref .sidebar-nav-home .sidebar-ico {
  transform: none;
}

#app > .sidebar.sidebar--ref .sidebar-nav-home .fiv-3 {
  align-items: center;
}

#app > .sidebar.sidebar--ref .sidebar-profile-card.fdsdsfgda,
#app > .sidebar.sidebar--ref a.sidebar-profile-card {
  background: var(--sb-card) !important;
  color: #fff !important;
}

#app > .sidebar.sidebar--ref .sidebar-ico--green.icon,
#app > .sidebar.sidebar--ref .sidebar-ico--green {
  color: var(--sb-green) !important;
}

#app > .sidebar.sidebar--ref .sidebar-ico--pink.icon,
#app > .sidebar.sidebar--ref .sidebar-ico--pink {
  color: var(--sb-pink) !important;
}

/* hide old green badge dots on bonuses */
#app > .sidebar.sidebar--ref .top-metod-star5,
#app > .sidebar.sidebar--ref .top-metod-star6 {
  display: none !important;
}

/* Home active — pink left glow */
#app > .sidebar.sidebar--ref .sidebar-nav-home {
  position: relative;
  overflow: hidden;
}

#app > .sidebar.sidebar--ref .sidebar-nav-home.is-active {
  background: linear-gradient(90deg, rgba(255, 45, 138, 0.18) 0%, rgba(255, 45, 138, 0.05) 55%, transparent 100%);
}

#app > .sidebar.sidebar--ref .sidebar-nav-home.is-active::before {
  content: '';
  position: absolute;
  left: 0;
  top: 6px;
  bottom: 6px;
  width: 3px;
  border-radius: 0 4px 4px 0;
  background: var(--sb-pink);
  box-shadow: 0 0 10px 2px var(--sb-pink-glow);
}

#app > .sidebar.sidebar--ref .sidebar-nav-home.is-active .titlenav span {
  color: #fff;
}

/* Nested menus inside cards */
#app > .sidebar.sidebar--ref .inner .borderMenu:not(.sidebar-flyout-visible) {
  padding: 2px 4px 6px 28px !important;
  margin: 0 !important;
}

#app > .sidebar.sidebar--ref .inner .borderMenu:not(.sidebar-flyout-visible) a {
  color: rgba(255, 255, 255, 0.78);
}

#app > .sidebar.sidebar--ref .inner .borderMenu:not(.sidebar-flyout-visible) a:hover {
  background: var(--sb-card-hover);
  color: #fff;
}

/* Footer socials sit on sidebar bg like reference */
#app > .sidebar.sidebar--ref > .tc-wrapper > .top-footer {
  padding: 4px 6px 0;
  border-block-start: none;
  background: transparent;
}

body:not(.left--closed) #app > .sidebar.sidebar--ref .block-social-networks__grid {
  padding: 8px 6px 10px;
}

body:not(.left--closed) #app > .sidebar.sidebar--ref .social-grid__cell {
  width: 36px;
  height: 36px;
  min-width: 36px;
  min-height: 36px;
  border-radius: 11px;
  background: var(--sb-card);
}

#app > .sidebar.sidebar--ref .footer,
#app > .sidebar.sidebar--ref > .tc-wrapper > .footer {
  display: none !important;
}

/* Collapsed rail — только иконки, без обрезанных подписей */
.left--closed #app > .sidebar.sidebar--ref .sidebar-section__label {
  display: none !important;
}

.left--closed #app > .sidebar.sidebar--ref .sidebar-section {
  margin: 0 0 4px;
}

.left--closed #app > .sidebar.sidebar--ref .sidebar-section__card {
  background: transparent !important;
  padding: 0 !important;
  border-radius: 0;
  overflow: visible;
}

.left--closed #app > .sidebar.sidebar--ref .sidebar-section__card.game-entettis {
  padding: 0 !important;
}

.left--closed #app > .sidebar.sidebar--ref .allgames-sitebar,
.left--closed #app > .sidebar.sidebar--ref .sidebar-nav-home {
  justify-content: center !important;
  padding: 10px 4px !important;
  margin: 0 !important;
  min-height: 44px;
  gap: 0 !important;
}

.left--closed #app > .sidebar.sidebar--ref .fiv-3 {
  justify-content: center !important;
  align-items: center !important;
  gap: 0 !important;
  width: 100%;
}

.left--closed #app > .sidebar.sidebar--ref .titlenav,
.left--closed #app > .sidebar.sidebar--ref .titlenav span,
.left--closed #app > .sidebar.sidebar--ref .logos1,
.left--closed #app > .sidebar.sidebar--ref .top-metod-star5,
.left--closed #app > .sidebar.sidebar--ref .top-metod-star6,
.left--closed #app > .sidebar.sidebar--ref .borderMenu:not(.sidebar-flyout-visible) {
  display: none !important;
}

.left--closed #app > .sidebar.sidebar--ref .sidebar-ico,
.left--closed #app > .sidebar.sidebar--ref .fiv-3 > .icon,
.left--closed #app > .sidebar.sidebar--ref .fiv-3 > i {
  margin: 0 auto;
}

.left--closed #app > .sidebar.sidebar--ref .sidebar-nav-home.is-active {
  background: rgba(255, 45, 138, 0.16);
}

.left--closed #app > .sidebar.sidebar--ref .sidebar-nav-home.is-active::before {
  display: none;
}

.left--closed #app > .sidebar.sidebar--ref .sidebar-profile-card {
  padding: 6px;
  display: flex;
  justify-content: center;
}

.left--closed #app > .sidebar.sidebar--ref .sidebar-profile-card__row {
  justify-content: center;
}

.left--closed #app > .sidebar.sidebar--ref .sidebar-profile-card .infononguest,
.left--closed #app > .sidebar.sidebar--ref .sidebar-profile-card__btn,
.left--closed #app > .sidebar.sidebar--ref .sidebar-profile-card__login {
  display: none !important;
}

.left--closed #app > .sidebar.sidebar--ref .kreo-lang-dropdown--sidebar,
.left--closed #app > .sidebar.sidebar--ref .kreo-lang-dropdown__current,
.left--closed #app > .sidebar.sidebar--ref .kreo-lang-dropdown__chev {
  display: none !important;
}

.left--closed #app > .sidebar.sidebar--ref .block-social-networks__grid {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 8px 4px !important;
}

.left--closed #app > .sidebar.sidebar--ref .social-grid__cell {
  width: 36px !important;
  height: 36px !important;
  min-width: 36px !important;
  min-height: 36px !important;
}
