/* ===========================================
   Pull to refresh - המחוון של משיכה למטה
   =========================================== */

/* המחוון יושב ב-fixed ולא בתוך המיכל בכוונה: הוא לא נוגע ב-layout
   הקיים, לא דורש position:relative על אף הורה, ולא נחתך על ידי
   overflow:hidden של הפאנל. המיקום האופקי נקבע לפי המיכל בזמן המגע. */
.pull-refresh-indicator {
  position: fixed;
  z-index: 900; /* מתחת למודלים (1000+), מעל תוכן הדף */
  opacity: 0;
  transform: translate(-50%, 0);
  pointer-events: none;
  will-change: transform, opacity;
}

.pull-refresh-indicator.is-animating {
  transition: transform 0.24s cubic-bezier(0.2, 0.8, 0.3, 1), opacity 0.24s ease;
}

.pull-refresh-circle {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  margin-top: 8px;
  border-radius: 50%;
  background: var(--bg-card, #fff);
  border: 1px solid var(--brand-tint-border, #ebdeda);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.12);
  color: var(--text-muted, #6b7280);
}

.pull-refresh-circle svg {
  width: 17px;
  height: 17px;
}

/* עבר את הסף: צבע המותג מסמן שהשחרור יפעיל רענון */
.pull-refresh-indicator.is-armed .pull-refresh-circle {
  color: var(--brand-primary, #95514f);
  border-color: var(--brand-primary, #95514f);
}

/* הסיבוב רץ על ה-svg ולא על העיגול, כדי שהצל לא ירקוד איתו */
.pull-refresh-indicator.is-spinning .pull-refresh-circle {
  color: var(--brand-primary, #95514f);
  border-color: var(--brand-primary, #95514f);
}

.pull-refresh-indicator.is-spinning .pull-refresh-circle svg {
  animation: pull-refresh-spin 0.75s linear infinite;
}

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

@media (prefers-reduced-motion: reduce) {
  .pull-refresh-indicator.is-spinning .pull-refresh-circle svg {
    animation-duration: 1.8s;
  }
  .pull-refresh-indicator.is-animating {
    transition-duration: 0.01s;
  }
}

/* במחשב אין מגע, והמחוון לא אמור להופיע בכלל.
   הכפתור בכותרת הרשימה הוא הרענון שם. */
@media (hover: hover) and (pointer: fine) {
  .pull-refresh-indicator { display: none; }
}
