/* Existing UI recovery rules, externalized without selector changes. */
html, body {
    max-width: 100%;
    overflow-x: hidden !important;
}
html body #header-new,
html body main.scroller,
html body #footer-new {
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
}
html body .fixed-button,
html body .fixed-button.alp-messenger-ready {
    position: fixed !important;
    left: auto !important;
    right: 16px !important;
    bottom: calc(68px + env(safe-area-inset-bottom, 0px)) !important;
    width: 0 !important;
    height: 0 !important;
    min-width: 0 !important;
    max-width: none !important;
    margin: 0 !important;
    padding: 0 !important;
    overflow: visible !important;
    transform: none !important;
    box-sizing: border-box !important;
    z-index: 999990 !important;
}
html body .fixed-button .alp-messenger-toggle,
html body .fixed-button.alp-messenger-ready .alp-messenger-toggle {
    display: none !important;
}
html body .fixed-button .popup,
html body .fixed-button.alp-messenger-ready .popup,
html body .fixed-button.alp-messenger-ready.is-open .popup {
    position: absolute !important;
    right: 0 !important;
    bottom: 0 !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    gap: 6px !important;
    width: 42px !important;
    min-width: 42px !important;
    max-width: 42px !important;
    height: auto !important;
    margin: 0 !important;
    padding: 0 !important;
    border-radius: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
    opacity: 1 !important;
    visibility: visible !important;
    pointer-events: auto !important;
    overflow: visible !important;
    transform: none !important;
    transition: none !important;
    box-sizing: border-box !important;
}
html body .fixed-button .popup .popup-button,
html body .fixed-button.alp-messenger-ready .popup .popup-button {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 42px !important;
    height: 42px !important;
    min-width: 42px !important;
    max-width: 42px !important;
    flex: 0 0 42px !important;
    margin: 0 !important;
    padding: 0 !important;
    border-radius: 50% !important;
    background-color: #ffffff !important;
    box-shadow: 0 4px 10px rgba(0, 0, 0, .24) !important;
    animation: none !important;
    transform: none !important;
    box-sizing: border-box !important;
}
html body .fixed-button .popup-button img,
html body .fixed-button .popup-button svg,
html body .fixed-button.alp-messenger-ready .popup-button img,
html body .fixed-button.alp-messenger-ready .popup-button svg {
    width: 21px !important;
    height: 21px !important;
}
html body #scroll-to-top {
    position: fixed !important;
    right: 15px !important;
    bottom: calc(12px + env(safe-area-inset-bottom, 0px)) !important;
    width: 44px !important;
    height: 44px !important;
    margin: 0 !important;
    padding: 0 !important;
    cursor: pointer !important;
    touch-action: manipulation;
    box-sizing: border-box !important;
    z-index: 999991 !important;
}
html body #scroll-to-top-in {
    width: 44px !important;
    height: 44px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    border-radius: 50% !important;
    box-sizing: border-box !important;
}
html body #scroll-to-top-in svg {
    width: 22px !important;
    height: 30px !important;
}
@media only screen and (max-width: 1023px) {
    html body main.scroller > .scroller__content,
    html body main.scroller > .scroller__content > .content {
        width: 100% !important;
        max-width: 100% !important;
        min-width: 0 !important;
        box-sizing: border-box !important;
    }
    html body main.scroller > .scroller__content {
        padding-right: 0 !important;
    }
    html body main.scroller > .scroller__content > .content {
        margin-right: 0 !important;
    }
    html body #header-new .header-bot,
    html body #header-new .header-bot .menu-wrap,
    html body #header-new .header-bot .menu {
        width: 100% !important;
        max-width: 100% !important;
        box-sizing: border-box !important;
    }
    html body #header-new .header-bot .menu-wrap {
        margin-right: 0 !important;
        margin-left: 0 !important;
    }
    html body .layout,
    html body .layout .scroller__content,
    html body .layout .content {
        width: 100% !important;
        max-width: 100% !important;
        min-width: 0 !important;
        box-sizing: border-box !important;
    }
    html body .layout .scroller__content {
        padding-right: 0 !important;
    }
    html body .layout .content {
        margin-right: 0 !important;
    }
}
@media only screen and (max-width: 767px) {
    html body .fixed-button .popup-button .tooltiptext,
    html body .fixed-button.alp-messenger-ready .popup-button .tooltiptext {
        display: none !important;
    }
}

/* Existing form/mobile recovery rules. */
/* Полноэкранный оверлей; прокручивается только белая панель формы. */
.layout.layout--feedback.layout--enabled {
  position: fixed !important;
  top: 0 !important;
  right: 0 !important;
  bottom: 0 !important;
  left: 0 !important;
  width: auto !important;
  height: 100vh !important;
  height: 100dvh !important;
  min-height: 0 !important;
  overflow: hidden !important;
  z-index: 1000000 !important;
}
.layout.layout--feedback.layout--enabled > .layout__wrapper {
  top: 0 !important;
  right: 0 !important;
  bottom: 0 !important;
  height: 100% !important;
  min-height: 0 !important;
  max-height: 100% !important;
  overflow-x: hidden !important;
  overflow-y: auto !important;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  background: #fff !important;
  box-sizing: border-box !important;
}
.layout.layout--feedback.layout--enabled .scroller {
  height: auto !important;
  min-height: 100% !important;
  margin-top: 0 !important;
  overflow: visible !important;
}
.layout.layout--feedback.layout--enabled .scroller__content {
  height: auto !important;
  min-height: 0 !important;
  margin-bottom: 0 !important;
  padding-right: 0 !important;
  overflow: visible !important;
  box-sizing: border-box !important;
}
.layout.layout--feedback.layout--enabled .scroller__track {
  display: none !important;
}
.layout.layout--feedback.layout--enabled .content {
  height: auto !important;
  min-height: 0 !important;
  margin-right: 0 !important;
  padding-bottom: 32px !important;
  overflow: visible !important;
  box-sizing: border-box !important;
}
.layout.layout--feedback.layout--enabled .feedback,
.layout.layout--feedback.layout--enabled .feedback__jform,
.layout.layout--feedback.layout--enabled .feedback__jform form {
  height: auto !important;
  min-height: 0 !important;
  overflow: visible !important;
}
.layout.layout--feedback.layout--enabled .feedback__jform form {
  padding-bottom: 24px !important;
}
.layout.layout--feedback.layout--enabled button[type="submit"] {
  position: static !important;
  margin: 24px auto 0 !important;
}
body:has(.layout.layout--feedback.layout--enabled) {
  overflow: hidden !important;
}
body:has(.layout.layout--feedback.layout--enabled) .fixed-button,
body:has(.layout.layout--feedback.layout--enabled) #scroll-to-top {
  visibility: hidden !important;
  pointer-events: none !important;
}
@media only screen and (max-width: 767px) {
  .layout.layout--feedback.layout--enabled .content {
    padding-top: 72px !important;
    padding-right: 20px !important;
    padding-left: 20px !important;
    padding-bottom: 32px !important;
  }
}
