/* ========================================
   КНОПКА «НАВЕРХ» — scroll-to-top.css
   ======================================== */

.scroll-to-top {
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 900;

  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  padding: 0;

  background: rgba(5, 60, 60, 0.85);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(46, 219, 165, 0.4);
  border-radius: 50%;
  color: #ffffff;
  font-size: 18px;
  cursor: pointer;

  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.25);
  opacity: 0;
  visibility: hidden;
  transform: translateY(12px);
  transition: opacity 0.25s ease, transform 0.25s ease,
              visibility 0.25s ease, background 0.2s ease, border-color 0.2s ease;
}

.scroll-to-top.is-visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.scroll-to-top:hover {
  background: rgba(5, 60, 60, 0.95);
  border-color: #2edba5;
  color: #2edba5;
  transform: translateY(-2px);
}

.scroll-to-top:focus-visible {
  outline: 2px solid #2edba5;
  outline-offset: 3px;
}

.scroll-to-top i {
  pointer-events: none;
}

/* На мобильных — чуть меньше и ближе к краю */
@media (max-width: 600px) {
  .scroll-to-top {
    right: 16px;
    bottom: 16px;
    width: 42px;
    height: 42px;
    font-size: 16px;
  }
}

/* Если открыт cookie-баннер снизу — поднимаем кнопку выше */
body.cookie-banner-visible .scroll-to-top {
  bottom: 96px;
}

@media (max-width: 600px) {
  body.cookie-banner-visible .scroll-to-top {
    bottom: 140px;
  }
}