.msm {
  --msm-blue: #005bff;
  --msm-blue-dark: #004ee0;
  --msm-ink: #101828;
  --msm-muted: #667085;
  --msm-line: #e5eaf2;
  --msm-soft: #f5f7fb;
  font-family: inherit;
  min-width: 0;
  max-width: 100%;
}

.msm__trigger {
  display: inline-flex;
  align-items: center;
  gap: .7rem;
  min-height: 44px;
  border: 0;
  border-radius: 14px;
  padding: .68rem 1.12rem;
  background: var(--msm-blue);
  color: #fff;
  font: inherit;
  font-weight: 900;
  line-height: 1;
}

.msm__trigger-icon {
  width: 1.15rem;
  height: 1.15rem;
  flex: 0 0 1.15rem;
  background:
    radial-gradient(circle, #fff 58%, transparent 61%) 0 0 / 50% 50%,
    radial-gradient(circle, #fff 58%, transparent 61%) 100% 0 / 50% 50%,
    radial-gradient(circle, #fff 58%, transparent 61%) 0 100% / 50% 50%,
    radial-gradient(circle, #fff 58%, transparent 61%) 100% 100% / 50% 50%;
  background-repeat: no-repeat;
}

.msm__trigger[aria-expanded="true"] .msm__trigger-icon {
  background:
    linear-gradient(45deg, transparent 43%, #fff 44%, #fff 56%, transparent 57%),
    linear-gradient(-45deg, transparent 43%, #fff 44%, #fff 56%, transparent 57%);
}

.msm__overlay {
  position: fixed;
  inset: 0;
  z-index: 1080;
  background: rgba(15, 23, 42, .42);
}

.msm__overlay[hidden] {
  display: none;
}

.msm--inline .msm__overlay {
  position: static;
  inset: auto;
  z-index: auto;
  height: 100%;
  min-height: 0;
  background: transparent;
}

.msm--inline {
  height: 100%;
  min-height: 0;
}

.msm__panel {
  min-height: 100%;
  display: grid;
  grid-template-rows: auto auto auto 1fr auto;
  background: #fff;
  color: var(--msm-ink);
}

.msm--inline .msm__panel {
  min-height: 0;
  height: 100%;
  max-height: none;
  grid-template-rows: auto auto minmax(0, 1fr) auto;
  min-width: 0;
  max-width: 100%;
  overflow: hidden;
  border-radius: 0;
}

.msm--inline .msm__search {
  grid-row: 1;
}

.msm--inline .msm__popular {
  grid-row: 2;
}

.msm--inline .msm__body {
  grid-row: 3;
}

.msm--inline .msm__footer {
  grid-row: 4;
  align-self: end;
}

.msm--inline .msm__top {
  grid-template-columns: 40px minmax(0, 1fr) 40px;
  min-height: 0;
  padding: .35rem .9rem .15rem;
  border-bottom: 0;
}

.msm--inline .msm__heading {
  text-align: left;
}

.msm--inline .msm__heading strong {
  white-space: nowrap;
  overflow-wrap: normal;
}

.msm__top {
  display: grid;
  grid-template-columns: 40px minmax(0, 1fr) 40px;
  gap: .45rem;
  align-items: center;
  padding: .45rem .9rem .25rem;
  border-bottom: 0;
}

.msm__heading {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
}

.msm__heading strong {
  display: block;
  color: var(--msm-ink);
  font-size: 1.05rem;
  font-weight: 900;
  line-height: 1.15;
  white-space: normal;
  overflow-wrap: anywhere;
}

.msm__heading span {
  display: none;
  margin-top: .15rem;
  color: var(--msm-muted);
  font-size: .76rem;
  line-height: 1.2;
}

.msm__back,
.msm__close {
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 13px;
  background: var(--msm-soft);
  color: var(--msm-ink);
}

.msm__back[hidden] {
  visibility: hidden;
  display: grid;
}

.msm__back::before {
  content: "";
  width: .72rem;
  height: .72rem;
  border-left: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: rotate(45deg);
}

.msm__close::before,
.msm__close::after {
  content: "";
  position: absolute;
  width: 1.05rem;
  height: 2px;
  border-radius: 999px;
  background: currentColor;
}

.msm__close {
  position: relative;
}

.msm__close-placeholder {
  width: 40px;
  height: 40px;
}

.msm__close::before {
  transform: rotate(45deg);
}

.msm__close::after {
  transform: rotate(-45deg);
}

.msm__search {
  display: grid;
  grid-template-columns: 22px 1fr;
  gap: .55rem;
  align-items: center;
  min-width: 0;
  margin: .5rem .62rem .32rem;
  padding: .58rem .72rem;
  border: 1.5px solid var(--msm-blue);
  border-radius: 13px;
  background: #fff;
}

.msm__search span {
  width: 1rem;
  height: 1rem;
  border: 2px solid #98a2b3;
  border-radius: 50%;
  position: relative;
}

.msm__search span::after {
  content: "";
  position: absolute;
  right: -.4rem;
  bottom: -.28rem;
  width: .48rem;
  height: 2px;
  border-radius: 999px;
  background: #98a2b3;
  transform: rotate(45deg);
}

.msm__search input {
  min-width: 0;
  width: 100%;
  border: 0;
  outline: 0;
  color: var(--msm-ink);
  font: inherit;
  font-size: .92rem;
  background: transparent;
}

.msm__popular {
  min-width: 0;
  padding: .25rem .62rem .12rem;
}

.msm__popular p {
  margin: 0 0 .5rem;
  color: var(--msm-muted);
  font-size: .78rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .04em;
}

.msm__popular div {
  display: flex;
  gap: .4rem;
  min-width: 0;
  overflow-x: auto;
  padding-bottom: .25rem;
  scrollbar-width: none;
}

.msm__popular div::-webkit-scrollbar {
  display: none;
}

.msm__chip {
    flex: 0 0 auto;
    border: 1px solid var(--msm-line);
    border-radius: 999px;
    padding: .26rem .48rem;
    background: var(--msm-soft);
    color: var(--msm-ink);
    font-size: .78rem;
    font-weight: 500;
    text-decoration: none;
}

.msm__body {
  min-height: 0;
  min-width: 0;
  overflow-x: hidden;
  overflow-y: auto;
  padding: .38rem .62rem .65rem;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
}

.msm__level-nav {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: .65rem;
  align-items: center;
  margin: 0 0 .52rem;
  padding: .24rem .3rem .24rem .24rem;
  border: 1px solid var(--msm-line);
  border-radius: 13px;
  background: var(--msm-soft);
}

.msm__level-nav[hidden] {
  display: none;
}

.msm__level-nav strong {
  min-width: 0;
  overflow: hidden;
  color: var(--msm-ink);
  font-size: .88rem;
  font-weight: 750;
  line-height: 1.2;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.msm__level-back {
  min-height: 34px;
  display: inline-flex;
  align-items: center;
  gap: .38rem;
  padding: 0 .62rem;
  border: 0;
  border-radius: 10px;
  background: #fff;
  color: var(--msm-blue);
  font: inherit;
  font-size: .76rem;
  font-weight: 750;
}

.msm__level-back-icon {
  width: .56rem;
  height: .56rem;
  border-left: 1.8px solid currentColor;
  border-bottom: 1.8px solid currentColor;
  transform: rotate(45deg);
}

.msm__level-back:focus-visible {
  outline: 2px solid rgba(0, 91, 255, .35);
  outline-offset: 2px;
}

.msm__list {
  display: grid;
  gap: .42rem;
  min-width: 0;
}

.msm__item {
  box-sizing: border-box;
  width: 100%;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: .8rem;
  align-items: center;
  min-height: 50px;
  border: 1px solid var(--msm-line);
  border-radius: 14px;
  padding: .66rem .72rem;
  background: #fff;
  color: var(--msm-ink);
  text-align: left;
  text-decoration: none;
  font: inherit;
}

.msm__item--branch {
  gap: 0;
  padding: 0;
  overflow: hidden;
}

.msm__item-link {
  min-width: 0;
  display: flex;
  align-items: center;
  min-height: 50px;
  padding: .66rem .72rem;
  color: inherit;
  text-decoration: none;
}

button.msm__item-link {
  width: 100%;
  border: 0;
  background: transparent;
  font: inherit;
  text-align: left;
}

.msm__item-link:focus-visible,
.msm__item-arrow:focus-visible {
  outline: 2px solid rgba(0, 91, 255, .35);
  outline-offset: 2px;
}

.msm__item-main {
  min-width: 0;
}

.msm__item-title {
      display: block;
    color: var(--msm-ink);
    font-size: 1.08rem;
    font-weight: 700;
    line-height: 1;
	letter-spacing: -0.5px;
}

.msm__item-path {
  display: block;
  margin-top: .22rem;
  overflow: hidden;
  color: var(--msm-muted);
  font-size: .78rem;
  line-height: 1.2;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.msm__item-arrow {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
}

.msm__item-arrow {
  width: 2rem;
  height: 2rem;
  background: var(--msm-soft);
}

.msm__item-preview {
  display: block;
  margin-top: .34rem;
  overflow: hidden;
  color: var(--msm-muted);
  font-size: .78rem;
  font-weight: 650;
  line-height: 1.25;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.msm__item-action {
  display: inline-flex;
  align-items: center;
  margin-top: .42rem;
  color: var(--msm-blue);
  font-size: .74rem;
  font-weight: 800;
  line-height: 1.1;
}

.msm__item-action::after {
  content: "";
  width: .38rem;
  height: .38rem;
  margin-left: .32rem;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: rotate(-45deg);
}

.msm__item--branch .msm__item-arrow {
  align-self: stretch;
  width: 3rem;
  height: auto;
  border: 0;
  border-left: 1px solid var(--msm-line);
  border-radius: 0;
  background: var(--msm-soft);
  cursor: pointer;
}

.msm__item--branch .msm__item-link:hover,
.msm__item--branch .msm__item-arrow:hover {
  background: #eef4ff;
}

.msm__item--branch .msm__item-arrow::after {
  content: "\0420\0430\0437\0434\0435\043b\044b";
  position: absolute;
  left: 50%;
  bottom: .42rem;
  transform: translateX(-50%);
  color: var(--msm-muted);
  font-size: .56rem;
  font-weight: 800;
  line-height: 1;
  text-transform: uppercase;
}

.msm__item-arrow::before {
  content: "";
  width: .55rem;
  height: .55rem;
  border-right: 2px solid #475467;
  border-bottom: 2px solid #475467;
  transform: rotate(-45deg);
}

.msm__empty {
  padding: 3rem 1rem;
  text-align: center;
}

.msm__empty strong {
  display: block;
  margin-bottom: .4rem;
  font-size: 1.1rem;
  font-weight: 900;
}

.msm__empty p {
  margin: 0;
  color: var(--msm-muted);
  font-size: .94rem;
  line-height: 1.45;
}

.msm__footer {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: .38rem;
  align-items: center;
  padding: .44rem .62rem calc(.44rem + env(safe-area-inset-bottom));
  border-top: 1px solid var(--msm-line);
  background: #fff;
}

.msm__messenger,
.msm__phone {
  min-width: 0;
  min-height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .36rem;
  padding: 0 .42rem;
  border-radius: 12px;
  text-decoration: none;
  font-weight: 750;
}

.msm__messenger {
  color: #fff;
}

.msm__messenger--telegram {
  background: var(--msm-blue);
}

.msm__messenger--max {
  background: #111827;
}

.msm__messenger--max .msm__action-icon {
  padding: .09rem;
  border-radius: .34rem;
  background: #fff;
}

.msm__action-icon {
  width: 1rem;
  height: 1rem;
  flex: 0 0 1rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.msm__action-icon svg {
  width: 100%;
  height: 100%;
  display: block;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.9;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.msm__action-icon img {
  width: 100%;
  height: 100%;
  display: block;
}

.msm__messenger b,
.msm__phone b {
  min-width: 0;
  overflow: hidden;
  font-size: .76rem;
  font-weight: 750;
  line-height: 1;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.msm__phone {
  border: 1px solid var(--msm-line);
  color: var(--msm-ink);
  background: var(--msm-soft);
}

body.msm-lock {
  overflow: hidden;
}

@media (min-width: 992px) {
  .msm {
    display: none;
  }
}

@media (max-width: 370px) {
  .msm__footer {
    gap: .3rem;
    padding-inline: .45rem;
  }

  .msm__messenger b,
  .msm__phone b {
    font-size: .7rem;
  }
}
