/* ================================
   Page Top Button
   ページトップへ戻るボタン
================================ */

.page-top {
  /* Positioning */
  position: fixed;
  right: var(--space-md);
  bottom: var(--space-md);
  z-index: 9999;

  /* Display & Box Model */
  display: flex;
  align-items: center;
  justify-content: center;
  width: 56px;
  height: 56px;
  padding: 0;

  /* Border & Background */
  background: var(--color-primary);
  border: none;
  border-radius: 50%;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);

  /* Typography */
  color: var(--color-bg);

  /* Other */
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  transform: translateY(20px);
  transition: opacity 0.3s ease, visibility 0.3s ease, transform 0.3s ease, background-color 0.2s ease;
}

.page-top.is-visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.page-top:hover {
  opacity: 0.85;
}

.page-top:active {
  transform: scale(0.95);
}

.page-top svg {
  /* Display & Box Model */
  width: 24px;
  height: 24px;

  /* Other */
  pointer-events: none;
}

/* ================================
   Responsive Styles
================================ */

/* タブレット */
@media (max-width: 1024px) {
  .page-top {
    /* Display & Box Model */
    width: 48px;
    height: 48px;

    /* Positioning */
    right: var(--space-sm);
    bottom: var(--space-sm);
  }

  .page-top svg {
    width: 20px;
    height: 20px;
  }
}

/* スマートフォン */
@media (max-width: 768px) {
  .page-top {
    /* Display & Box Model */
    width: 44px;
    height: 44px;

    /* Positioning */
    right: var(--space-sm);
    bottom: var(--space-sm);
  }

  .page-top svg {
    width: 18px;
    height: 18px;
  }
}
