/* ПрайдзіСвет - mobile menu. Loaded after css/style.css. */
.m-menu, .m-menu-overlay { display: none; }

@media only screen and (max-width: 1011px) {
  body { min-width: 0; }                       /* was 480px: forced sideways scrolling on small phones */

  /* real <button>, full header height so the tap target is >= 40x40 */
  #header .menu-toggler {
    display: block; position: absolute; left: 0; top: 0; margin: 0; padding: 0;
    width: 40px; height: 40px; border: 0; cursor: pointer;
    background: url(/assets/images/other/img/icons/icon-menu.png) 4px center / 26px 26px no-repeat transparent;
    -webkit-tap-highlight-color: transparent;
  }
  #header .menu-toggler:focus-visible { outline: 2px solid #e00; outline-offset: -2px; }

  .m-menu-overlay {
    display: block; position: fixed; inset: 0; z-index: 999998;
    background: rgba(0,0,0,.55); opacity: 0; visibility: hidden; transition: opacity .2s, visibility .2s;
  }
  .m-menu {
    display: block; position: fixed; top: 0; bottom: 0; left: 0; z-index: 999999;
    width: min(320px, 86vw); background: #2b2b2b; color: #fff;
    overflow-y: auto; overscroll-behavior: contain; -webkit-overflow-scrolling: touch;
    transform: translateX(-100%); visibility: hidden; transition: transform .25s ease, visibility .25s;
    padding-bottom: env(safe-area-inset-bottom);
  }
  body.m-open { overflow: hidden; }
  body.m-open .m-menu { transform: none; visibility: visible; }
  body.m-open .m-menu-overlay { opacity: 1; visibility: visible; }

  .m-menu ul { list-style: none; margin: 0; padding: 0; }
  .m-menu-head { display: flex; align-items: center; justify-content: space-between; padding: 0 6px 0 18px; height: 52px; border-bottom: 1px solid #444; }
  .m-menu-title { font-size: 1.1em; letter-spacing: .02em; }
  .m-menu-close { width: 48px; height: 48px; font-size: 32px; line-height: 1; color: #fff; background: none; border: 0; cursor: pointer; }

  .m-menu a, .m-menu button.m-parent, .m-menu button.m-zmest {
    display: block; box-sizing: border-box; width: 100%; min-height: 48px; padding: 13px 18px;
    text-align: left; font: inherit; font-size: 16px; color: #fff; text-decoration: none;
    background: none; border: 0; border-bottom: 1px solid #3c3c3c; cursor: pointer; border-radius: 0;
  }
  .m-menu a:active, .m-menu button:active { background: #3a3a3a; }
  .m-menu a:focus-visible, .m-menu button:focus-visible { outline: 2px solid #ff6a5a; outline-offset: -2px; }
  .m-menu button.m-zmest { color: #ff6a5a; }

  .m-menu button.m-parent { position: relative; padding-right: 48px; }
  .m-menu button.m-parent::after {
    content: ""; position: absolute; right: 20px; top: 50%; width: 8px; height: 8px; margin-top: -6px;
    border-right: 2px solid #aaa; border-bottom: 2px solid #aaa; transform: rotate(45deg); transition: transform .2s;
  }
  .m-menu button.m-parent[aria-expanded="true"]::after { transform: rotate(-135deg); margin-top: -2px; }
  .m-menu .m-sub { display: none; background: #202020; }
  .m-menu button.m-parent[aria-expanded="true"] + .m-sub { display: block; }
  .m-menu .m-sub a { padding-left: 34px; font-size: 15px; }
  .m-menu .m-extra a { color: #bbb; font-size: 14px; }

  @media (prefers-reduced-motion: reduce) { .m-menu, .m-menu-overlay, .m-menu button.m-parent::after { transition: none; } }
}
