/* 本番 layout/theme.liquid:533-614 の <style> をそのまま移植。 */
html {
  scroll-behavior: smooth;
}

.nicobay-scroll-to-top {
  position: fixed;
  z-index: 1000;
  right: 20px;
  bottom: 20px;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}

.nicobay-scroll-to-top.visible {
  opacity: 1;
  visibility: visible;
  animation: nicobay-scroll-to-top-in 0.3s ease-out;
}

.nicobay-scroll-to-top a {
  display: flex;
  width: 45px;
  height: 45px;
  border-radius: 50%;
  background-color: rgb(63, 134, 39);
  align-items: center;
  justify-content: center;
  text-decoration: none;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
  transition: background-color 0.3s ease, transform 0.3s ease;
}

.nicobay-scroll-to-top a:hover {
  background-color: rgb(50, 107, 31);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.nicobay-scroll-to-top .arrow {
  position: relative;
  display: block;
  width: 12px;
  height: 12px;
}

.nicobay-scroll-to-top .arrow::before {
  content: '';
  position: absolute;
  border-top: 2px solid #fff;
  border-left: 2px solid #fff;
  width: 10px;
  height: 10px;
  transform: rotate(45deg);
  top: 3px;
  left: 1px;
}

@media screen and (min-width: 750px) {
  .nicobay-scroll-to-top {
    right: 20px;
    bottom: 70px;
  }

  .nicobay-scroll-to-top a {
    width: 50px;
    height: 50px;
  }
}

@keyframes nicobay-scroll-to-top-in {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
