/* QC297 Pull-to-Refresh v1.0
   Tach rieng de de quan ly. app.css khong can chua animation/gesture moi. */


/* Visuals owned by this module (moved out of app.css during cleanup B). */
body.qc-ptr-enabled .chrome-pull-refresh-control {
  position:absolute;
  left:50%;
  transform:translateX(-50%);
  display:flex;
  flex-direction:column;
  align-items:center;
  justify-content:flex-start;
}

body.qc-ptr-enabled .chrome-pull-refresh-circle {
  border-radius:50%;
  display:grid;
  place-items:center;
  background:#e9eaed;
  box-shadow:0 1px 2px rgba(15,23,42,.10);
  transition:transform .12s ease, background-color .12s ease;
}

body.qc-ptr-enabled .chrome-pull-refresh-circle.ready { background:#dfe1e5; }
body.qc-ptr-enabled .chrome-pull-refresh-circle svg {
  width:22px;
  height:22px;
  fill:none;
  stroke:#202124;
  stroke-width:2.1;
  stroke-linecap:round;
  stroke-linejoin:round;
  will-change:transform;
}
body.qc-ptr-enabled .chrome-pull-refresh-circle.refreshing svg {
  animation:qcPtrSpin .8s linear infinite;
}
body.qc-ptr-enabled .chrome-pull-refresh-text {
  min-height:14px;
  color:#8a8d91;
  line-height:1.2;
  font-weight:500;
  text-align:center;
  white-space:nowrap;
}
@keyframes qcPtrSpin { to { transform:rotate(360deg); } }

html[data-theme="dark"] body.qc-ptr-enabled .chrome-pull-refresh-circle {
  background:#30343a;
  box-shadow:0 1px 2px rgba(0,0,0,.28);
}
html[data-theme="dark"] body.qc-ptr-enabled .chrome-pull-refresh-circle.ready { background:#3b4149; }
html[data-theme="dark"] body.qc-ptr-enabled .chrome-pull-refresh-circle svg { stroke:#e8eaed; }
html[data-theme="dark"] body.qc-ptr-enabled .chrome-pull-refresh-text { color:#9aa0a6; }

body.qc-ptr-enabled {
  --qc-ptr-y: 0px;
  overscroll-behavior-y: none !important;
}

body.qc-ptr-enabled .chrome-pull-refresh {
  display: block !important;
  position: fixed;
  inset: 0 0 auto 0;
  height: var(--qc-ptr-y) !important;
  overflow: hidden;
  pointer-events: none;
  z-index: 10080;
  opacity: 0;
  background: var(--bg, #f5f7fb);
  transition: opacity .10s ease;
  contain: layout paint;
}

body.qc-ptr-visible .chrome-pull-refresh,
body.qc-ptr-refreshing .chrome-pull-refresh {
  opacity: 1 !important;
}

body.qc-ptr-enabled .chrome-pull-refresh-control {
  top: max(8px, env(safe-area-inset-top));
  gap: 3px;
}

body.qc-ptr-enabled .chrome-pull-refresh-circle {
  width: 40px;
  height: 40px;
  transform: scale(.84);
}

body.qc-ptr-enabled .chrome-pull-refresh-circle.ready,
body.qc-ptr-enabled .chrome-pull-refresh-circle.refreshing {
  transform: scale(1);
}

body.qc-ptr-enabled .chrome-pull-refresh-text {
  max-width: 220px;
  overflow: hidden;
  text-overflow: ellipsis;
  font-size: 10px;
}

/* Chi keo dung TAB CHINH dang thao tac.
   Khong transform .wrap: .wrap chua cac module position:fixed tren mobile,
   transform toan wrap se doi he toa do va lam giao dien nhay loan. */
body.qc-ptr-enabled.qc-ptr-dragging .qc-ptr-surface-active,
body.qc-ptr-enabled.qc-ptr-refreshing .qc-ptr-surface-active,
body.qc-ptr-enabled.qc-ptr-settling .qc-ptr-surface-active {
  transform: translate3d(0, var(--qc-ptr-y), 0) !important;
  will-change: transform;
}

body.qc-ptr-enabled.qc-ptr-dragging .qc-ptr-surface-active {
  transition: none !important;
}

body.qc-ptr-enabled.qc-ptr-refreshing .qc-ptr-surface-active,
body.qc-ptr-enabled.qc-ptr-settling .qc-ptr-surface-active {
  transition: transform .26s cubic-bezier(.2,.8,.2,1) !important;
}

body.qc-ptr-enabled.qc-ptr-dragging,
body.qc-ptr-enabled.qc-ptr-refreshing {
  overscroll-behavior-y: contain !important;
}

@media (prefers-reduced-motion: reduce) {
  body.qc-ptr-enabled.qc-ptr-refreshing .qc-ptr-surface-active,
  body.qc-ptr-enabled.qc-ptr-settling .qc-ptr-surface-active {
    transition-duration: .08s !important;
  }
}
