/* Pull-to-refresh on the phone app (v2). Only ever mounted by pull-refresh-v3.js inside the
   native shell, so the open web, the desktop shell and every other page stay untouched.
 *
 * Two changes over v1, both about what the finger sees. The dial rested forty-six points above the
 * screen, so a pull had to travel eighty-four points before the circle was whole and a hundred and
 * thirty-one before it fired; it now rests thirty-four up, is whole fifty-five points in and fires
 * at a hundred, and gains a ring the moment letting go will actually refresh. And the root's
 * rubber-band is switched off while the dial is mounted, because a WebView that bounces takes the
 * drag away from the page that is trying to measure it, and the bounce was a second answer to the
 * same pull. Fresh filename because hCDN caches css/* for a week and ignores query strings. */

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

.mtv-pull {
  position: fixed;
  top: 0;
  left: 50%;
  width: 38px;
  height: 38px;
  margin-left: -19px;
  z-index: 1700;
  pointer-events: none;
  transform: translateY(-34px);
  transition: transform .18s var(--mtv-ease, ease);
  will-change: transform;
}

.mtv-pull.is-dragging { transition: none; }

.mtv-pull__mark {
  display: block;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: #fff url('/brand/mtv-mark-intro.jpg') center / 26px no-repeat;
  box-shadow: 0 3px 12px rgba(9, 34, 56, .16);
  opacity: 0;
  transition: opacity .16s ease, box-shadow .16s ease;
}

.mtv-pull.is-open .mtv-pull__mark { opacity: 1; }

/* The ring is the only cue that does not fight the inline rotate the drag itself paints. */
.mtv-pull.is-ready .mtv-pull__mark {
  box-shadow: 0 0 0 3px rgba(216, 30, 91, .30), 0 3px 12px rgba(9, 34, 56, .16);
}

.mtv-pull.is-refreshing .mtv-pull__mark { animation: mtv-pull-spin .85s linear infinite; }

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