/* Pull-to-Refresh Styles */

.pull-to-refresh-indicator {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 80px;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  opacity: 0;
  transform: translateY(-100px);
  transition: transform 0.3s ease-out, opacity 0.3s ease-out;
  pointer-events: none;
}

.ptr-spinner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}

.ptr-spinner-icon {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.1s ease-out;
}

.ptr-spinner-svg {
  width: 100%;
  height: 100%;
  transform: rotate(-90deg);
}

.ptr-spinner-circle {
  stroke: var(--primary, #7e3af2);
  stroke-linecap: round;
  stroke-dasharray: 125.6;
  stroke-dashoffset: 125.6;
  transition: stroke-dashoffset 0.1s ease-out;
}

.ptr-refreshing .ptr-spinner-icon {
  animation: ptr-spin 1s linear infinite;
}

.ptr-refreshing .ptr-spinner-circle {
  animation: ptr-spinner-dash 1.5s ease-in-out infinite;
}

.ptr-text {
  font-size: 14px;
  font-weight: 500;
  color: #666;
  text-align: center;
}

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

@keyframes ptr-spinner-dash {
  0% {
    stroke-dashoffset: 125.6;
  }
  50% {
    stroke-dashoffset: 31.4;
    transform: rotate(135deg);
  }
  100% {
    stroke-dashoffset: 125.6;
    transform: rotate(450deg);
  }
}

/* Disable pull-to-refresh on inputs to prevent interference */
input,
textarea,
select {
  touch-action: pan-y;
}

/* Ensure smooth scrolling on main content */
#main-content {
  overscroll-behavior-y: contain;
  -webkit-overflow-scrolling: touch;
}
