/* ==========================================================
   ページトップ / スクロール誘導ボタン
   初期状態: 下スクロールを促す（scroll-down）
   スクロール後: 上スクロール(トップへ)を促す（scroll-up）
   ========================================================== */

.page-top-btn {
  position: fixed;
  right: 24px;
  bottom: 24px;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background-color: #333;
  color: #fff;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 9999;
  opacity: 0.85;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.25);
  transition: opacity 0.3s ease, background-color 0.3s ease, transform 0.3s ease;
  -webkit-tap-highlight-color: transparent;
  user-select: none;
}

.page-top-btn:hover,
.page-top-btn:active {
  opacity: 1;
}

.page-top-btn .arrow-icon {
  width: 0;
  height: 0;
  border-left: 6px solid transparent;
  border-right: 6px solid transparent;
  transition: transform 0.3s ease;
}

.page-top-btn .btn-text {
  font-size: 10px;
  line-height: 1;
  margin-top: 4px;
  letter-spacing: 0.05em;
}

/* 初期状態：下向き矢印（下スクロールを促す） */
.page-top-btn.scroll-down .arrow-icon {
  border-top: 8px solid #fff;
}

/* スクロール後：上向き矢印（ページトップへ戻る） */
.page-top-btn.scroll-up .arrow-icon {
  border-bottom: 8px solid #fff;
}

.page-top-btn.scroll-up {
  background-color: #0073aa; /* WordPress標準カラー例。任意に変更可 */
}

/* タッチ/クリック時の軽いフィードバック */
.page-top-btn:active {
  transform: scale(0.92);
}

@media (max-width: 600px) {
  .page-top-btn {
    right: 16px;
    bottom: 16px;
    width: 48px;
    height: 48px;
  }
}
