.dd-menu,
.dd-menu *,
.dd-menu *::before,
.dd-menu *::after {
  box-sizing: border-box;
}

.block-card--dd-menu {
  position: relative;
  overflow: visible;
  z-index: 30;
  width: min(1240px, 100%);
  margin-left: auto;
  margin-right: auto;
}

.dd-menu {
  position: relative;
  color: #000000;
  overflow: visible;
  z-index: 20;
  --dd-color-default: #edf1ff;
  --dd-color-hover: #d1dbff;
  --dd-color-active: #014ca1;
  --dd-sub-default: #f9faff;
  --dd-sub-active: #f0f2ff;
  --dd-sub-border: #c8d4ff;
  --dd-panel-fill: #d9e4fe;
  --dd-gap: 24px;
  --dd-bar-h: 52px;
  --dd-panel-h: 94px;
  --dd-notch-depth: 24px;
}

.dd-menu__bar {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  gap: 10px;
}

.dd-menu__scroll-area {
  position: relative;
  flex: 1 1 auto;
  min-width: 0;
}

.dd-menu__viewport {
  width: 100%;
  min-width: 0;
}

.dd-menu__fade {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 88px;
  z-index: 2;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.2s ease;
}

.dd-menu__fade--left {
  left: 0;
  background: linear-gradient(
    90deg,
    #ffffff 0%,
    rgba(255, 255, 255, 0.92) 22%,
    rgba(255, 255, 255, 0.6) 52%,
    rgba(255, 255, 255, 0) 100%
  );
}

.dd-menu__fade--right {
  right: 0;
  background: linear-gradient(
    270deg,
    #ffffff 0%,
    rgba(255, 255, 255, 0.92) 22%,
    rgba(255, 255, 255, 0.6) 52%,
    rgba(255, 255, 255, 0) 100%
  );
}

.dd-menu__bar.can-left .dd-menu__fade--left {
  opacity: 1;
}

.dd-menu__bar.can-right .dd-menu__fade--right {
  opacity: 1;
}

.dd-menu__scroll {
  flex: 0 0 auto;
  width: 40px;
  height: 40px;
  padding: 0;
  border-radius: 50%;
  border: 1px solid var(--dd-sub-border);
  background: #ffffff;
  box-shadow: 0 2px 8px rgba(1, 76, 161, 0.14);
  cursor: pointer;
  display: none;
  align-items: center;
  justify-content: center;
  transition: background-color 0.2s ease, opacity 0.2s ease;
}

.dd-menu__scroll:hover {
  background: var(--dd-sub-active);
}

.dd-menu__scroll::before {
  content: "";
  width: 24px;
  height: 24px;
  background-color: var(--dd-color-active);
  -webkit-mask: var(--dd-chevron-arrow) center / contain no-repeat;
  mask: var(--dd-chevron-arrow) center / contain no-repeat;
}

.dd-menu__scroll--left::before {
  transform: rotate(180deg);
}

.dd-menu__scroll.is-visible {
  display: inline-flex;
}

.dd-menu__scroll[disabled] {
  opacity: 0.35;
  cursor: default;
}

.dd-menu__list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  align-items: stretch;
  gap: var(--dd-gap);
  width: 100%;
}

.dd-menu__item {
  flex: 1 1 0;
  min-width: 0;
}

.dd-menu__item--home {
  flex: 0 0 auto;
}

.dd-menu__link {
  width: 100%;
  min-width: 0;
  height: var(--dd-bar-h);
  padding: 8px 16px;
  border-radius: 8px;
  border: 0;
  background: var(--dd-color-default);
  color: #000000;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-family: inherit;
  font-size: 16px;
  line-height: 20px;
  font-weight: 400;
  box-shadow: none;
  cursor: pointer;
  transition: background-color 0.24s ease, color 0.24s ease;
}

.dd-menu__item--home .dd-menu__link {
  padding: 8px 12px;
}

.dd-menu__link:not(.is-active):not(.is-open):hover {
  background: var(--dd-color-hover);
  color: #000000;
}

.dd-menu__link.is-active,
.dd-menu__link.is-open {
  background: var(--dd-color-active);
  color: #ffffff;
}

.dd-menu__icon {
  flex: 0 0 24px;
  width: 24px;
  height: 24px;
  background-color: currentColor;
  -webkit-mask: var(--dd-icon) center / contain no-repeat;
  mask: var(--dd-icon) center / contain no-repeat;
}

.dd-menu__label {
  display: block;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  text-align: center;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  line-clamp: 2;
}

.dd-menu__chevron {
  flex: 0 0 24px;
  width: 24px;
  height: 24px;
  background-color: currentColor;
  -webkit-mask: var(--dd-chevron) center / contain no-repeat;
  mask: var(--dd-chevron) center / contain no-repeat;
  transform: rotate(90deg);
  transform-origin: center;
  transition: transform 0.24s ease;
}

.dd-menu__link.is-open .dd-menu__chevron {
  transform: rotate(-90deg) scaleY(-1);
}

.dd-menu__panel {
  position: absolute;
  left: 0;
  right: 0;
  top: calc(var(--dd-bar-h) + 7px);
  height: calc(var(--dd-panel-h) - 24px);
  padding: 14px 12px 12px;
  overflow: visible;
  opacity: 1;
  z-index: 1;
  pointer-events: auto;
  transform: translateY(0);
  transform-origin: top center;
  transition: opacity 0.22s ease, transform 0.22s ease;
  background-color: #d9e4fe;
  border-radius: 12px;
}

.dd-menu__notch {
  position: absolute;
  bottom: 100%;
  height: 24px;
  background-color: #d9e4fe;
  border-radius: 12px 12px 0 0;
  display: none;
  pointer-events: none;
}

.dd-menu__notch::before,
.dd-menu__notch::after {
  content: "";
  position: absolute;
  bottom: 0;
  width: 12px;
  height: 12px;
}

.dd-menu__notch::before {
  left: -12px;
  background: radial-gradient(circle 12px at 0 0, transparent 11.5px, #d9e4fe 12px);
}

.dd-menu__notch::after {
  right: -12px;
  background: radial-gradient(circle 12px at 100% 0, transparent 11.5px, #d9e4fe 12px);
}

.dd-menu__panel.is-collapsed {
  opacity: 0;
  transform: translateY(-8px);
  pointer-events: none;
}

.dd-menu__panel-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
}

.dd-menu__panel-bg svg {
  display: block;
  width: 100%;
  height: 100%;
}

.dd-menu__panel-content {
  position: relative;
  z-index: 1;
  width: 100%;
}

.dd-menu__sub {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  align-items: stretch;
  gap: var(--dd-gap);
  width: 100%;
}

.dd-menu__sub-item {
  flex: 1 1 0;
  min-width: 0;
}

.dd-menu__sub-link {
  width: 100%;
  min-height: 44px;
  padding: 8px;
  border-radius: 8px;
  border: 1px solid var(--dd-sub-border);
  background: var(--dd-sub-default);
  color: #000000;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: inherit;
  font-size: 16px;
  line-height: 20px;
  font-weight: 400;
  text-align: center;
  cursor: pointer;
  transition: background-color 0.24s ease;
}

.dd-menu__sub-link:hover,
.dd-menu__sub-link.is-active {
  background: var(--dd-sub-active);
}

.dd-menu__sub-label {
  display: block;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

@media (max-width: 1024px) {
  .block-card--dd-menu {
    padding-left: 28px;
    padding-right: 28px;
  }

  .dd-menu {
    --dd-gap: 12px;
    --dd-bar-h: 48px;
  }

  .dd-menu__viewport {
    overflow-x: auto;
    overflow-y: hidden;
    scrollbar-width: none;
    -ms-overflow-style: none;
    -webkit-overflow-scrolling: touch;
    scroll-behavior: smooth;
    scroll-snap-type: x proximity;
  }

  .dd-menu__viewport::-webkit-scrollbar {
    display: none;
  }

  .dd-menu__list {
    width: max-content;
    min-width: 100%;
    gap: var(--dd-gap);
  }

  .dd-menu__item,
  .dd-menu__item--home {
    flex: 0 0 auto;
    scroll-snap-align: start;
  }

  .dd-menu__link {
    width: auto;
    white-space: nowrap;
  }

  .dd-menu__link,
  .dd-menu__item--home .dd-menu__link {
    padding: 8px 18px;
  }

  .dd-menu__label {
    display: block;
    white-space: nowrap;
    -webkit-line-clamp: 1;
    line-clamp: 1;
  }

  .dd-menu__panel {
    height: auto;
  }

  .dd-menu__sub {
    flex-wrap: wrap;
    gap: var(--dd-gap);
  }

  .dd-menu__sub-item {
    flex: 1 1 150px;
  }

  .dd-menu__sub-label {
    white-space: normal;
  }
}

@media (max-width: 600px) {
  .block-card--dd-menu {
    padding-left: 16px;
    padding-right: 16px;
  }

  .block-card--dd-menu.dd-menu--guest {
    margin-top: 24px;
  }

  .dd-menu {
    --dd-gap: 8px;
    --dd-bar-h: 40px;
  }

  .dd-menu__bar {
    gap: 6px;
  }

  .dd-menu__link,
  .dd-menu__item--home .dd-menu__link {
    padding: 6px 12px;
    gap: 6px;
  }

  .dd-menu__icon,
  .dd-menu__chevron {
    flex: 0 0 20px;
    width: 20px;
    height: 20px;
  }

  .dd-menu__scroll {
    width: 32px;
    height: 32px;
  }

  .dd-menu__scroll::before {
    width: 20px;
    height: 20px;
  }

  .dd-menu__fade {
    width: 64px;
  }

  .dd-menu__sub-item {
    flex: 1 1 calc(50% - var(--dd-gap));
    min-width: 0;
  }

  .dd-menu__sub-link {
    min-height: 40px;
  }
}
