/* ======================================================
   LK Header — IT nested menu (OwnWave)
   Uses Bootstrap dropdown markup, adds OwnWave look & feel.
   ====================================================== */

/*
  IMPORTANT:
  In LK admin pages there is an additional sticky admin topbar (.ow-admin-topbar)
  with z-index: 1020. The global header (.ow-header) in ow-marketing.css is
  z-index: 1000, which means any dropdown rendered inside the header can be
  visually covered by the admin topbar.

  This override keeps the header (and therefore IT dropdown) above the admin
  topbar without changing Bootstrap JS behavior.
*/
.ow-header {
  z-index: 1030 !important;
}

/* Base menu surface */
.ow-it-menu.dropdown-menu {
  min-width: 220px;
  padding: 10px;
  background: rgba(15,22,32,.98);
  border: 1px solid var(--ow-border);
  border-radius: 14px;
  box-shadow: 0 18px 50px rgba(0,0,0,.55);
  /* Bootstrap dropdown defaults to z-index: 1000.
     In LK admin pages the sticky admin topbar uses z-index: 1020,
     so the IT menu can be visually covered. */
  z-index: 1035;
}

.ow-it-menu .dropdown-item {
  color: var(--ow-text);
  border-radius: 10px;
  padding: 8px 10px;
  font-weight: 800;
}

.ow-it-menu .dropdown-item:hover,
.ow-it-menu .dropdown-item:focus {
  background: rgba(255,255,255,.06);
  color: var(--ow-text);
}

/* Make the "Пользователи" row look like a submenu trigger (right caret). */
.ow-it-submenu > .dropdown-toggle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

/* Bootstrap dropstart adds a left caret via ::before — hide it. */
.ow-it-submenu.dropstart > .dropdown-toggle::before {
  display: none;
}

/* Replace the default caret with a right arrow. */
.ow-it-submenu > .dropdown-toggle::after {
  border: 0;
  content: "›";
  font-size: 18px;
  line-height: 1;
  margin-left: 10px;
  transform: translateY(-1px);
}

/* Ensure nested menu overlays correctly above the header */
.ow-it-submenu .dropdown-menu {
  z-index: 1040;
}

/* ======================================================
   LK Header — Main dropdown menu sections (Realty / IT / Accounting)
   Each section is a toggle that expands a nested list.
   ====================================================== */

.ow-mainmenu-menu .ow-mainmenu-sectionToggle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  font-weight: 900;
}

.ow-mainmenu-menu .ow-mainmenu-sectionToggle::after {
  border: 0;
  content: "▸";
  font-size: 14px;
  line-height: 1;
  opacity: .75;
  margin-left: 10px;
  transform: translateY(-1px);
}

.ow-mainmenu-menu .ow-mainmenu-sectionToggle[aria-expanded="true"]::after {
  content: "▾";
}

.ow-mainmenu-menu .ow-mainmenu-sublist {
  margin: 4px 0 8px 0;
  padding: 0;
}

.ow-mainmenu-menu .ow-mainmenu-subitem {
  padding-left: 18px;
  font-weight: 800;
  opacity: .92;
}

/* On small screens, allow the submenu to open downwards to reduce horizontal overflow. */
@media (max-width: 640px) {
  .ow-it-submenu.dropstart > .dropdown-menu {
    right: auto;
    left: 0;
    top: 100%;
    margin-top: 6px;
  }
}
