/* Pull-to-refresh — neutral icon only (mobile / touch) */

.app-pull-refresh {
  --ptr-pull: 0px;
  --ptr-scale: 0.72;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 10060;
  display: flex;
  align-items: center;
  justify-content: center;
  height: 64px;
  padding-top: env(safe-area-inset-top, 0px);
  pointer-events: none;
  transform: translateY(calc(-100% + var(--ptr-pull)));
  opacity: 0;
  transition: opacity 0.15s ease;
}

.app-pull-refresh.is-pulling,
.app-pull-refresh.is-refreshing {
  opacity: 1;
}

.app-pull-refresh__bubble {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.96);
  box-shadow:
    0 2px 10px rgba(15, 23, 42, 0.12),
    0 0 0 1px rgba(15, 23, 42, 0.06);
  transform: scale(var(--ptr-scale));
  transition: transform 0.1s ease-out, box-shadow 0.15s ease;
}

.app-pull-refresh.is-ready .app-pull-refresh__bubble {
  box-shadow:
    0 4px 16px rgba(15, 23, 42, 0.16),
    0 0 0 1px rgba(15, 23, 42, 0.08);
}

.app-pull-refresh__icon {
  width: 26px;
  height: 26px;
  color: #475569;
  transform: rotate(var(--ptr-rotate, 0deg));
  transition: transform 0.1s ease-out;
  flex-shrink: 0;
}

.app-pull-refresh.is-refreshing .app-pull-refresh__icon {
  animation: ptr-spin 0.7s linear infinite;
}

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

html.ptr-active {
  overscroll-behavior-y: none;
}

@media (min-width: 769px) and (pointer: fine) {
  .app-pull-refresh {
    display: none !important;
  }
}

@media (prefers-reduced-motion: reduce) {
  .app-pull-refresh,
  .app-pull-refresh__bubble,
  .app-pull-refresh__icon {
    transition: none;
  }

  .app-pull-refresh.is-refreshing .app-pull-refresh__icon {
    animation: none;
  }
}
