/* =============================================================================
   IzeChat Motion System — Round E adapter: gesture physics (Phase 7)
   -----------------------------------------------------------------------------
   Companion to ize-motion-gestures.js. Two things only: overscroll containment,
   and the small affordances the new gestures need.
   ========================================================================== */

/* ---------- Overscroll physics ---------------------------------------------- */
/* `contain`, NOT `none`. The difference matters here:
     contain — stops scroll CHAINING (an inner list that hits its end must not
               start scrolling the page behind it), keeps the platform's own
               overscroll affordance intact.
     none    — also kills the overscroll affordance, which on Android includes
               pull-to-refresh.
   The native shell owns pull-to-refresh, and this project has already paid for
   one bug where the two layers disagreed about it. `contain` fixes the chaining
   without reaching into a gesture the shell owns. */
html,
body {
	overscroll-behavior-y: contain;
}

/* Any overlay that scrolls must contain its own scroll, or reaching its end
   silently scrolls the feed underneath — and dismissing then lands the reader
   somewhere they never navigated to. The sheets already do this; these are the
   remaining full-height scrollers. */
.tag_scroll,
.tag_sidebar .sidebar_innr,
.tag_sett_sidebar,
.comments-list,
.chat-all-container,
.messages-recipients-list {
	overscroll-behavior: contain;
}

/* ---------- Image viewer ----------------------------------------------------- */
/* The swipe translates #draggableHelper. Its transition is set inline by the
   gesture engine (none while the finger is down, a spring on release), so all
   that is needed here is a promise not to fight it: no transition of our own,
   and a transform origin that keeps the image centred as it moves. */
.tag_lbox_img_innr #draggableHelper {
	transform-origin: 50% 50%;
	-webkit-tap-highlight-color: transparent;
}

/* While zoomed, jQuery UI draggable owns the gesture for panning
   (lightbox/content.phtml:301) and the swipe engine stands down — but the
   browser must stand down too, or its own pan would fight the plugin. */
.tag_lbox_img_innr .double_zoom {
	touch-action: none;
}

/* ---------- Story viewer ------------------------------------------------------ */
/* The tap zones are invisible half-screen targets. `pan-y` keeps a vertical
   flick (dismiss / scroll) with the browser while letting the horizontal swipe
   be claimed by the gesture engine. */
.tag_story_tap {
	touch-action: pan-y;
}
