.scroll-top-control {
  position: fixed;
  right: max(20px, env(safe-area-inset-right));
  bottom: max(24px, env(safe-area-inset-bottom));
  z-index: 950;
  display: inline-flex;
  width: 48px;
  height: 48px;
  align-items: center;
  justify-content: center;
  padding: 0;
  border: 1px solid rgba(216, 180, 58, 0.72);
  border-radius: 6px;
  background: rgba(10, 10, 20, 0.94);
  color: #f4d86f;
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.3);
  font: 700 25px/1 Arial, sans-serif;
  cursor: pointer;
  opacity: 0;
  pointer-events: none;
  transform: translateY(10px);
  transition: opacity 180ms ease, transform 180ms ease, background-color 180ms ease, color 180ms ease;
}

.scroll-top-control.is-visible {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

.cookie-consent:not([hidden]) ~ .scroll-top-control {
  opacity: 0;
  pointer-events: none;
  transform: translateY(10px);
}

.scroll-top-control:hover {
  background: #d8b43a;
  color: #0a0a14;
}

.scroll-top-control:focus-visible {
  outline: 2px solid #ffffff;
  outline-offset: 3px;
}

.scroll-top-control span {
  display: block;
  transform: translateY(-1px);
}

.hotels-page .nav-buttons-fixed + .footer {
  padding-bottom: calc(136px + env(safe-area-inset-bottom));
}

.hotels-page .nav-buttons-fixed ~ .scroll-top-control {
  bottom: calc(108px + env(safe-area-inset-bottom));
}

@media (max-width: 768px) {
  .footer {
    padding-bottom: max(136px, calc(env(safe-area-inset-bottom) + 136px));
  }

  .scroll-top-control {
    right: env(safe-area-inset-right);
    bottom: max(20px, env(safe-area-inset-bottom));
    width: 48px;
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
    justify-content: flex-end;
  }

  .scroll-top-control:hover {
    background: transparent;
  }

  .scroll-top-control span {
    display: inline-flex;
    width: 32px;
    height: 48px;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(216, 180, 58, 0.72);
    border-right: 0;
    border-radius: 6px 0 0 6px;
    background: rgba(10, 10, 20, 0.94);
    box-shadow: 0 10px 28px rgba(0, 0, 0, 0.3);
    transform: none;
  }

  .scroll-top-control:hover span {
    background: #d8b43a;
  }

  .hotels-page .nav-buttons-fixed + .footer {
    padding-bottom: calc(168px + env(safe-area-inset-bottom));
  }

  .hotels-page .nav-buttons-fixed ~ .scroll-top-control {
    bottom: calc(142px + env(safe-area-inset-bottom));
  }
}

@media (prefers-reduced-motion: reduce) {
  .scroll-top-control {
    transition: none;
  }
}
