/* Единая нижняя навигация на всех активных страницах сайта. */
.case-return-top {
  display: flex;
  justify-content: center;
  margin: 0;
  padding: 0;
}

.case-return-top .case-return-top-link {
  display: inline-flex;
  min-height: 40px;
  align-items: center;
  justify-content: center;
  gap: 10px;
  box-sizing: border-box;
  padding: 8px 20px;
  border: 0;
  border-radius: 999px;
  background: #7333cc;
  color: #fff;
  font-family: Inter, Arial, sans-serif;
  font-size: 14px;
  font-weight: 700;
  line-height: 1.35;
  text-decoration: none;
  white-space: nowrap;
}

.case-return-top .case-return-top-link:hover {
  background: #6327b7;
  color: #fff;
}

.case-return-top .case-return-top-link span {
  font-size: 21px;
  line-height: 1;
}

.case-return-top .case-return-top-link:focus-visible,
body:has(.footer .case-return-top) > .footer a:focus-visible {
  outline: 3px solid #fff;
  outline-offset: 4px;
}

body:has(.footer .case-return-top) {
  --case-footer-reserve: calc(76px + env(safe-area-inset-bottom, 0px));
  padding-bottom: var(--case-footer-reserve);
}

body:has(.footer .case-return-top) > .footer {
  position: fixed;
  z-index: 1000;
  inset: auto 0 0;
  display: block;
  box-sizing: border-box;
  min-height: 60px;
  padding: 8px 24px calc(8px + env(safe-area-inset-bottom, 0px));
  border-top: 1px solid #38363c;
  background: #171619;
  color: #f4f3f5;
}

body.site-nav-enhanced:has(.footer .case-return-top) > .footer {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translateY(100%);
  transition: opacity 260ms ease, transform 340ms cubic-bezier(.2,.7,.25,1), visibility 0s linear 340ms;
}

body.site-nav-enhanced.site-nav-visible:has(.footer .case-return-top) > .footer {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translateY(0);
  transition-delay: 0s;
}

body:has(.footer .case-return-top) > .footer .footer-inner {
  display: grid;
  width: min(100%, 1180px);
  min-height: 44px;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  align-items: center;
  gap: 16px;
  margin-inline: auto;
  padding: 0;
  border: 0;
}

body:has(.footer .case-return-top) > .footer .footer-return-links {
  display: flex;
  min-width: 0;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 20px;
  margin: 0;
}

body:has(.footer .case-return-top) > .footer .footer-inner > a {
  justify-self: end;
  white-space: nowrap;
}

body:has(.footer .case-return-top) > .footer .footer-return-links a,
body:has(.footer .case-return-top) > .footer .footer-inner > a {
  color: #d6ef4d;
  font-size: 12px;
  line-height: 1.35;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

body:has(.footer .case-return-top) > .footer .footer-return-links a:hover,
body:has(.footer .case-return-top) > .footer .footer-inner > a:hover {
  color: #e4f88c;
}

body:has(.footer .case-return-top) > .footer .footer-copyright {
  color: #c8c4ce;
  font-size: 11px;
  line-height: 1.35;
}

body:has(.footer .case-return-top) > .footer .case-return-top {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
}

@media (max-width: 700px) {
  body:has(.footer .case-return-top) {
    --case-footer-reserve: calc(100px + env(safe-area-inset-bottom, 0px));
  }

  body:has(.footer .case-return-top) > .footer {
    transition-duration: 260ms, 340ms, 0s;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 3px 12px;
    padding: 8px 14px calc(8px + env(safe-area-inset-bottom, 0px));
  }

  body:has(.footer .case-return-top) > .footer .footer-inner {
    display: contents;
  }

  body:has(.footer .case-return-top) > .footer .footer-return-links {
    grid-column: 1;
    grid-row: 1;
    flex-direction: column;
    align-items: flex-start;
    gap: 3px;
  }

  body:has(.footer .case-return-top) > .footer .footer-inner > a {
    grid-column: 1;
    grid-row: 2;
    justify-self: start;
  }

  body:has(.footer .case-return-top) > .footer .footer-return-links a,
  body:has(.footer .case-return-top) > .footer .footer-inner > a {
    font-size: 11px;
  }

  body:has(.footer .case-return-top) > .footer .case-return-top {
    position: static;
    grid-column: 2;
    grid-row: 1 / span 2;
    align-self: center;
    justify-self: center;
    transform: none;
  }

  .case-return-top .case-return-top-link {
    min-height: 40px;
    padding: 8px 16px;
    font-size: 13px;
  }
}

@media (max-width: 360px) {
  body:has(.footer .case-return-top) > .footer {
    padding-inline: 10px;
  }

  body:has(.footer .case-return-top) > .footer .footer-inner {
    column-gap: 8px;
  }

  body:has(.footer .case-return-top) > .footer .footer-return-links a,
  body:has(.footer .case-return-top) > .footer .footer-inner > a,
  body:has(.footer .case-return-top) > .footer .footer-copyright {
    font-size: 10px;
  }

  .case-return-top .case-return-top-link {
    min-height: 38px;
    padding-inline: 12px;
    font-size: 12px;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto !important;
  }

  body.site-nav-enhanced:has(.footer .case-return-top) > .footer {
    transition: none;
  }
}
