/* =============================================================================
   IzeChat Motion System — Round A adapter: micro-interactions + ambient
   (Phases 2 and 5)
   -----------------------------------------------------------------------------
   Almost all of Phase 2 is REGISTRATION, not CSS: ize-motion-ui.js names the
   surfaces and the runtime arms them with the shared `.ize-mo-press` primitive
   on first touch. This file exists only for the three things registration
   cannot do:

     1. Make a surface able to CLIP a ripple (position + overflow), which has to
        be decided per component because clipping the wrong box hides content.
     2. Carry the few press exceptions where a plain scale would be wrong.
     3. Hold the ambient (idle) rules, all of which are gated by
        --ize-mo-ambient-play so they stop dead on a battery-saver device, in a
        background tab, or under Reduce Motion.

   Additive: every selector either adds motion properties to an element that had
   none, or is a new .ize-mo-* class. No layout, colour or spacing is changed.
   ========================================================================== */

/* ---------- Ripple hosts ---------------------------------------------------- */
/* Only surfaces verified to have nothing escaping their own box. A badge, a
   flyout or an absolutely positioned chevron that lives OUTSIDE the padding box
   would be cut off by `overflow: hidden`, so those get press feedback only. */
.ize-hc-nudge,
.ize-hc-nudge-cta,
.tag_feed_reel_follow,
.tag_feed_group_join,
.tag_lbox_save_btn,
.tag_lbox_mobi_cmt_btn,
.mp-pp-btn,
.mp-place-btn,
.mp-vopt,
.mp-sh-opt,
[data-ize-ripple] {
	position: relative;
	overflow: hidden;
	-webkit-tap-highlight-color: transparent;
}

/* ---------- Press exceptions ------------------------------------------------ */
/* The premium CTA is permanently `transform: skewX(-25deg)` (style.header.css:24).
   Any scale from the generic press primitive would replace that transform and
   the pill would visibly un-skew under the finger, so it dims instead — the
   same message in the vocabulary this element can speak. */
.tag_prem.ize-mo-pressed {
	transform: skewX(-25deg) scale(.97);
	opacity: .9;
}

/* Media cannot scale without revealing the layout edge behind it. */
.tag_lbox_img.ize-mo-pressed,
.post .post-thumb-image.ize-mo-pressed { transform: none; opacity: var(--ize-mo-dim); }

/* ---------- Acknowledgement targets ----------------------------------------- */
/* `pop` and `bump` are played by JS on the element itself. These rules only
   guarantee the element can host a transform without disturbing its layout —
   an inline element cannot be scaled at all. */
.stat-item .ize-mo-ack,
.new-update-alert,
.ize-nav-badge { display: inline-block; }

/* =============================================================================
   AMBIENT (Phase 5)
   The rule for everything below: if you can notice it while reading, it is
   wrong. All of it stops via --ize-mo-ambient-play.
   ========================================================================== */

/* ---------- AI assistant FAB ------------------------------------------------ */
/* The FAB is dragged by writing style.left/top (ize-ai-assistant.js:176-177), so
   transform is free for us and a breathing scale can never fight the drag.
   3.2s and 3% — at the edge of the screen this reads as "it is awake", and it
   is impossible to notice while reading the feed. */
#ize-ai-fab {
	animation: ize-mo-breathe var(--ize-mo-t-breathe) var(--ize-mo-e-standard) infinite;
	animation-play-state: var(--ize-mo-ambient-play);
}

/* A finger on it stops the idle motion outright — nothing should be breathing
   while it is being held or moved. */
#ize-ai-fab:active,
#ize-ai-fab.ize-mo-pressed { animation-play-state: paused; }

/* ---------- Greeting card --------------------------------------------------- */
/* Two iterations, not infinite. The greeting card sits at the top of the feed,
   directly in the reading path, and a permanently animating element there is
   precisely the "distracting" failure this phase is meant to avoid. Two breaths
   on arrival reads as the card waking up; after that it is still. */
.ize-hc-bar-ic {
	animation: ize-mo-breathe var(--ize-mo-t-breathe) var(--ize-mo-e-standard) 2;
	animation-play-state: var(--ize-mo-ambient-play);
}

/* ---------- Premium badge --------------------------------------------------- */
/* The gradient sweep already exists (style.header.css:24-26) and already looks
   right; it was simply never gated. One property brings it under the same
   policy as everything else — on a battery-saver device an infinite background
   animation in the header is exactly the wrong place to spend the budget. */
.tag_prem { animation-play-state: var(--ize-mo-ambient-play); }

/* ---------- Unread badges --------------------------------------------------- */
/* Event-driven, not idle: ize-motion-ui.js plays `bump` when a count actually
   changes. A badge that pulses forever teaches the user to ignore it, which is
   the opposite of what a badge is for. */
.new-update-alert { transform-origin: 50% 50%; }
