/* Pull-to-refresh — 카탈로그·마이페이지(주문) */

/* iOS: 인디케이터만 움직이면 러버밴드 여백이 남을 수 있어 뷰 전체를 같이 당김 */
.m-view.is-ptr-pulling {
  transition: none !important;
}

.m-view.is-active.is-ptr-pulling {
  transform: translateX(0) translateY(var(--m-ptr-shift, 0px));
}

.m-ptr {
  position: fixed;
  left: 0;
  right: 0;
  top: calc(var(--m-safe-top) + 4px);
  z-index: 45;
  display: flex;
  justify-content: center;
  pointer-events: none;
  opacity: 0;
  transform: translateY(calc(var(--m-ptr-offset, 0px) - 28px));
  transition: opacity 160ms ease;
}

.m-ptr.is-visible {
  opacity: 1;
}

.m-ptr__inner {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  border-radius: 999px;
  background: rgba(255, 252, 250, 0.96);
  border: 1px solid var(--mall-line);
  box-shadow: var(--mall-shadow-sm);
  color: var(--mall-muted);
  font-size: 0.74rem;
  font-weight: 600;
  letter-spacing: -0.01em;
}

.m-ptr__spinner {
  width: 16px;
  height: 16px;
  border: 2px solid rgba(42, 47, 54, 0.12);
  border-top-color: var(--mall-ink);
  border-radius: 50%;
  flex-shrink: 0;
  transform: rotate(calc(var(--m-ptr-offset, 0px) * 2.4deg));
  transition: transform 80ms linear;
}

.m-ptr.is-refreshing .m-ptr__spinner {
  animation: m-ptr-spin 0.75s linear infinite;
  transform: none;
}

.m-ptr[data-state="release"] .m-ptr__label {
  color: var(--mall-ink);
}

.m-ptr[data-state="release"] .m-ptr__label::after {
  content: " · 놓으면 새로고침";
}

@keyframes m-ptr-spin {
  to {
    transform: rotate(360deg);
  }
}

@media (prefers-reduced-motion: reduce) {
  .m-ptr,
  .m-ptr__spinner {
    transition: none !important;
    animation: none !important;
  }

  .m-ptr.is-refreshing .m-ptr__spinner {
    opacity: 0.55;
  }
}
