.navbar-hide {
  #side-menu,
  .sln-core-page-logo {
    background: var(--WHITE);
  }
}

.sln-accordion {
  .mat-expansion-panel-header {
    border-radius: 12px;
    padding: 0 14px;
    background: var(--WHITE) !important;
    &:hover {
      background: var(--WHITE) !important;
    }
  }

  // Когда панель раскрыта
  .mat-expansion-panel.mat-expanded > .mat-expansion-panel-header,
  .mat-expansion-panel.mat-expanded .mat-expansion-panel-header {
    border-radius: 12px 12px 0 0 !important;
  }

  // Список внутри раскрытой панели
  .mat-expansion-panel.mat-expanded .nav-second-level {
    border-radius: 0 0 12px 12px;
  }
  .mat-expansion-panel-header-title {
    color: var(--BLACK) !important;
    font-size: 12px;
    gap: 4px;
  }
  // .mat-expansion-panel-content-wrapper{
  //   margin-top: -5px;
  // }
}
.sln-side-menu-body {
  gap: 5px;
}
#side-menu {
  max-width: 250px;
  li[data-level="0"],
  li[data-level="1"] {
    .mat-expansion-panel-header-title,
    .mat-expansion-panel-header .sln-item-text,
    .sln-menu-li-simple-icon .sln-item-text,
    .sln-menu-panel-block-title .sln-item-text-title,
    .sln-menu-numbers,
    .sln-menu-sub-item-block a {
      text-transform: uppercase;
      font-family: var(--font-bold);
      font-size: 12px;
      line-height: 14px;
      width: max-content;
      line-height: 1.2;
    }
  }

  li[data-level="2"],
  li[data-level="3"],
  li[data-level="4"],
  li[data-level="5"] {
    .mat-expansion-panel-header-title,
    .mat-expansion-panel-header .sln-item-text,
    .sln-menu-numbers,
    .sln-menu-sub-item-block a {
      text-transform: none;
      font-family: var(--font-medium);
      font-size: 14px;
      line-height: 18px;
      color: var(--MIDLE-GRAY);
    }
    .sln-menu-numbers-text {
      width: 100%;
      a{
        width: 100%;
      }
    }
    .sln-menu-numbers span {
      font-family: var(--font-medium);
    }
  }

  // level 1 и вложенные accordion-заголовки
  li[data-level="1"] > .sln-accordion > mat-accordion > mat-expansion-panel > .mat-expansion-panel-header {
    padding-left: 12px;
  }
  li[data-level="1"] .nav-second-level .mat-expansion-panel-header {
    padding-left: 33px;
  }

  li[data-level="1"] > .sln-accordion > .sln-left-li > .sln-menu-sub-item-block {
    padding-left: 12px;
  }

  li[data-level="1"]:not(:has(> .sln-accordion .nav-second-level))
    .sln-menu-sub-item-block.sln-selected-menu-item {
      padding-left: 6px !important;
  }

  li[data-level="2"] .sln-menu-sub-item-block {
    padding-left: 24px;
  }

  li[data-level="3"] .sln-menu-sub-item-block.sln-selected-menu-item {
    padding-left: 23px !important;
  }

  // level 3+ — иконка-заглушка (sln-menu-dot)
  // иконки первого уровня при открытии НЕ скрываем (жёлтые active остаются)
  li[data-level]:not([data-level="0"]):not([data-level="1"]):not(
      [data-level="2"]
    ) {
    .sln-first-position-icon,
    .nav-label.sln-first-position-icon {
      background-image: url("../../../../../assets/themes/sellan/images/menu/menu-dot.svg") !important;
      background-repeat: no-repeat;
      background-size: 7px;
      background-position: center;
      min-width: 25px;
      height: 25px;
    }
  }

  // level 2 с вложенностями — плюс левее шеврона accordion
  li[data-level="2"]:has(.nav-second-level) {
    .sln-menu-plus {
      right: 40px;
    }

    .mat-expansion-panel-header:hover .sln-menu-plus {
      right: 40px;
    }
  }

  // hover для всех уровней меню (цвет текста + плавный переход)
  .mat-expansion-panel-header,
  .sln-menu-panel-header,
  .sln-ul-hover,
  .sln-left-li,
  .sln-menu-sub-item-block,
  .sln-li-hover {
    .sln-item-text,
    .sln-item-text-title,
    .sln-menu-numbers,
    p.sln-item-text {
      transition: color 0.3s ease;
    }
  }

  .mat-expansion-panel-header:hover,
  .sln-menu-panel-header:hover {
    .sln-item-text,
    p.sln-item-text {
      color: var(--PRIMARY);
    }
  }

  .sln-ul-hover:hover {
    .sln-item-text,
    .sln-item-text-title,
    p.sln-item-text {
      color: var(--PRIMARY);
    }
  }

  .sln-left-li:hover,
  .sln-menu-sub-item-block:hover {
    .sln-menu-numbers,
    a.sln-menu-numbers {
      color: var(--PRIMARY);
    }
  }

  // .sln-left-li:hover > .sln-menu-sub-item-block,
  // .sln-left-li:hover > .sln-li-hover {
  //   background-color: #cedc285c;
  //   border-radius: 12px;
  // }

  .sln-li-hover:hover {
    .sln-item-text,
    .sln-item-text-title {
      color: var(--PRIMARY);
    }
  }

  a.sln-menu-li-simple-icon-link:hover {
    .sln-item-text {
      color: var(--PRIMARY);
    }
  }
}

.sln-menu-sub-item-block {
  padding-left: 0 10px;
}
.nav-second-level {
  border-radius: 0 0 12px 12px;
}

.nav-second-level .sln-left-li a {
  border: none !important;
  color: var(--BLACK);
  font-size: 13px;
}

.sln-left-li {
  background: var(--WHITE);
  border-radius: 12px;
  margin-top: 5px;
}
.sln-menu-panel-block-title {
  margin-top: 5px;
}
.sln-li-hover.sln-menu-li-simple-icon {
  border-radius: 12px;
  background: white;
}
.sln-li-hover {
  border-radius: 12px;
  background: white;
}
.sln-core-page-logo-hide {
  width: 100%;
  background: var(--WHITE);
  border-radius: 12px;
}
.sln-ul-hover:hover:before {
  content: none !important;
  border-left: none !important;
}
.sln-selected-menu-item {
  background-color: #cedc285c !important;
  border-radius: 12px;
  margin: 0 auto;
  margin: 0 6px;
  height: 80%;
  padding-left: 18px !important;
}
.sln-menu-panel-header:hover:before {
  content: none !important;
  border-left: none !important;
}

// sellan: жёлтый левый бордер у открытого списка (не убираем)
.nav-second-level-list li {
  border-left: 5px solid var(--SUCCESS);
  a {
    padding: 0 10px 0 5px !important;
  }
}

// с data-level="2" и глубже — без бордера
.nav-second-level-list li[data-level="2"],
.nav-second-level-list li[data-level="3"],
.nav-second-level-list li[data-level="4"],
.nav-second-level-list li[data-level="5"] {
  border-left: none;
}
