@charset "utf-8";

/* ボタンの基本スタイル */
.back-to-top {
  position: fixed;
  bottom: 20px;
  right: 20px;
  width: 60px;
  height: 60px;
  border-radius: 10px;
  background-color: rgba(23, 42, 136, 0.6);
  color: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.5);
  font-size: 20px;
  font-weight: bold;
  cursor: pointer;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.15);
  z-index: 1000;
  
  /* 表示・非表示の切り替え（非表示時は透明かつクリック不可） */
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease, transform 0.2s ease;
  
  /* 中央揃え */
  display: flex;
  align-items: center;
  justify-content: center;
}

/* 表示時のクラス */
.back-to-top.is-show {
  opacity: 1;
  visibility: visible;
}

/* PC向けホバー判定（スマホでの表示不具合防止） */
@media (hover: hover) {
  .back-to-top:hover {
    background-color: #555555;
    transform: translateY(-3px);
  }
}

/* スマホ向けの最適化 */
@media (max-width: 768px) {
  .back-to-top {
    bottom: 16px;
    right: 16px;
    width: 44px;
    height: 44px;
    font-size: 18px;
  }
}
