/*
 * Мобильное меню (src/components/layout/MobileMenu.tsx) — макет docs/design/mobile-menu/maklean-mobile-menu.html,
 * 26.10.2026. Значения из CSS макета; классы mk-mm-, потому что у темы свои .drawer, .socials, .phone.
 * Нижняя панель — до 768px, как прежнее меню темы (ul.mobile_menu, z-index 12121); панель «Меню» — над всем,
 * кроме модальных окон темы (z-index 100000).
 */
.mk-mm-bar {
  display: none;
}
.mk-mm-overlay {
  position: fixed;
  inset: 0;
  z-index: 99999;
  visibility: hidden;
  transition: visibility 280ms;
}
.mk-mm-overlay.is-open {
  visibility: visible;
  transition: none;
}
.mk-mm-shade {
  position: absolute;
  inset: 0;
  background: #14263f80;
  opacity: 0;
  transition: opacity 280ms ease;
}
.mk-mm-overlay.is-open .mk-mm-shade {
  opacity: 1;
}
.mk-mm-drawer {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  display: flex;
  flex-direction: column;
  box-sizing: border-box;
  width: min(360px, calc(100% - 24px));
  padding: 22px 20px max(24px, env(safe-area-inset-bottom));
  overflow-y: auto;
  overscroll-behavior: contain;
  background: #fff;
  color: #131b23;
  font-family: Montserrat, Arial, sans-serif;
  box-shadow: -12px 0 48px #13263d14;
  transform: translateX(100%);
  transition: transform 280ms cubic-bezier(0.22, 0.8, 0.25, 1);
}
.mk-mm-overlay.is-open .mk-mm-drawer {
  transform: translateX(0);
}
.mk-mm-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 20px;
}
.mk-mm-title {
  margin: 0;
  color: #131b23;
  font-size: 25px;
  font-weight: 600;
  line-height: 1.2;
}
.mk-mm-close {
  display: grid;
  flex-shrink: 0;
  place-items: center;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: #edf5ff;
  color: #007bfb;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.mk-mm-close svg {
  width: 24px;
  height: 24px;
}
.mk-mm-close:active {
  background: #dcecff;
}
.mk-mm-nav {
  display: grid;
  gap: 4px;
}
.mk-mm-link {
  display: flex;
  align-items: center;
  gap: 14px;
  min-height: 51px;
  box-sizing: border-box;
  padding: 12px;
  border-radius: 10px;
  color: #131b23;
  font-size: 15px;
  font-weight: 500;
  text-decoration: none;
  -webkit-tap-highlight-color: transparent;
}
.mk-mm-link > svg:first-child {
  flex: none;
  width: 23px;
  height: 23px;
  color: #007bfb;
}
.mk-mm-link > .mk-mm-brand:first-child {
  width: 26px;
  height: 22px;
}
.mk-mm-link > .mk-mm-chevron {
  flex: none;
  width: 16px;
  height: 16px;
  margin-left: auto;
  color: #a2afbd;
}
.mk-mm-link:active {
  background: #eef6ff;
  color: #007bfb;
}
.mk-mm-contact {
  margin-top: auto;
  padding: 28px 12px 0;
}
.mk-mm-contact::before {
  content: '';
  display: block;
  height: 1px;
  margin-bottom: 24px;
  background: #e8edf4;
}
.mk-mm-phone {
  color: #131b23;
  font-size: 19px;
  font-weight: 600;
  text-decoration: none;
}
.mk-mm-hours {
  margin-top: 8px;
  color: #617181;
  font-size: 11px;
  line-height: 1.6;
}
.mk-mm-socials {
  display: flex;
  gap: 18px;
  margin-top: 18px;
}
.mk-mm-socials a {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
}
.mk-mm-socials img {
  width: 24px;
  height: 24px;
  object-fit: contain;
}
html.mk-mm-lock,
html.mk-mm-lock body {
  overflow: hidden;
}

@media (max-width: 768px) {
  .mk-mm-bar {
    --mk-mm-square: clamp(56px, calc((100vw - 56px) / 5), 64px);
    position: fixed;
    right: 0;
    bottom: 0;
    left: 0;
    z-index: 12121;
    display: flex;
    align-items: center;
    justify-content: space-between;
    box-sizing: border-box;
    height: calc(68px + env(safe-area-inset-bottom));
    padding: 0 clamp(16px, 6vw, 24px) env(safe-area-inset-bottom);
    background: linear-gradient(180deg, #1688ff 0%, #007bfb 55%, #006fe8 100%);
    box-shadow: 0 -1px 0 #ffffff14;
    color: #fff;
    font-family: Montserrat, Arial, sans-serif;
  }
  .mk-mm-item {
    display: flex;
    flex: 0 0 var(--mk-mm-square);
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 7px;
    width: var(--mk-mm-square);
    height: var(--mk-mm-square);
    min-width: 0;
    padding: 4px 0;
    border: 0;
    background: none;
    color: #fff;
    font: inherit;
    font-size: 10px;
    font-weight: 500;
    line-height: 1.1;
    text-align: center;
    text-decoration: none;
    white-space: nowrap;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
  }
  .mk-mm-item svg {
    width: 24px;
    height: 24px;
  }
  .mk-mm-item svg.mk-mm-brand {
    width: 26px;
    height: 24px;
  }
  .mk-mm-item > span {
    display: block;
    line-height: 14px;
  }
}

@media (max-width: 350px) {
  .mk-mm-drawer {
    padding-inline: 16px;
  }
  .mk-mm-link {
    min-height: 48px;
    font-size: 14px;
  }
  .mk-mm-item {
    font-size: 9px;
  }
  .mk-mm-phone {
    font-size: 18px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .mk-mm-overlay,
  .mk-mm-shade,
  .mk-mm-drawer {
    transition: none;
  }
}
