/* Верхнее меню 1280 (.header-top__links--mid) с выпадающим подменю.
   Данные и вид подменю идентичны меню 1900 (.header-main__nav). */

.header-top__links-item {
  position: relative;
  display: inline-flex;
  align-items: center;
}

/* Развернуть шеврон и подсветить пункт при наведении/активности */
.header-top__links--mid .header-top__links-item:hover .header-top__link,
.header-top__links--mid .header-top__links-item.cur .header-top__link {
  color: #d3011d;
}

.header-top__links--mid .header-top__links-item:hover .header-top__link::after,
.header-top__links--mid .header-top__links-item.cur .header-top__link::after {
  opacity: 1;
  transform: rotate(0deg);
  filter: brightness(0) saturate(100%) invert(12%) sepia(98%) saturate(6456%) hue-rotate(346deg) brightness(93%) contrast(101%);
}

/* Выпадающее подменю */
.header-top__links-submenu {
  display: block;
  position: absolute;
  top: calc(100% + 10px);
  left: 0;
  visibility: hidden;
  opacity: 0;
  margin: 0;
  padding: 8px 8px 8px 0;
  background: #fff;
  width: max-content;
  min-width: 200px;
  max-height: min(73vh, 520px);
  overflow: hidden;
  transition: opacity 0.25s, visibility 0.25s;
  box-shadow: 0 8px 24px rgba(17, 24, 39, 0.12);
  border-radius: 10px;
  border: 1px solid #E6E8EC;
  z-index: 60;
}

/* Прозрачный мостик, чтобы курсор не терял hover в зазоре над подменю */
.header-top__links-submenu::before {
  content: "";
  position: absolute;
  top: -12px;
  left: 0;
  right: 0;
  height: 12px;
}

.header-top__links-item:hover .header-top__links-submenu {
  opacity: 1;
  visibility: visible;
}

.header-top__links-submenu-list {
  margin: 0;
  padding: 0;
  list-style: none;
  max-height: calc(min(70vh, 520px) - 18px);
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
}

.header-top__links-submenu-item {
  margin: 0;
  padding: 0;
}

.header-top__links-submenu-link {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 8px;
  width: 100%;
  padding: 12px 16px;
  border-radius: 6px;
  color: #111827;
  text-transform: none;
  text-decoration: none;
  box-sizing: border-box;
  transition: background-color 0.2s, color 0.2s;
}

.header-top__links-submenu-link:hover,
.header-top__links-submenu-link.cur {
  background: #F5F6FB;
  color: #111827;
}

.header-top__links-submenu-name {
  display: block;
  font-size: 15px;
  font-weight: 400;
  line-height: 22px;
}

.header-top__links-submenu-badges {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.header-top__links-submenu .header-main__badge {
  display: inline-flex;
  align-items: center;
  padding: 1px 6px;
  border-radius: 5px;
  font-size: 12px;
  font-weight: 500;
  line-height: 18px;
  white-space: nowrap;
}

.header-top__links-submenu .header-main__badge--online {
  background: #E9FFF8;
  color: #10986B;
}

.header-top__links-submenu .header-main__badge--offline {
  background: #eef4ff;
  color: #01518E;
}
