/* Cove v2 animations (cove-4-ui final/v2-anim.css, approved 2026-12-01). The parts v2.js needs; timings in
   UI-HANDOFF.md, "Animations". Tooltip, toast and badge timings live in style.css's motion section (retimed there),
   and the phone's pushed page and hold sheet are the app's own (.v2pg/.v2hold are the mockup's stand-ins). */

/* channel selection gliding between rows: while it moves, the new row's fill is its ::before, which v2.js slides
   up or down from the old row (the design's .v2glide element, drawn without adding a node to the list) */
.side .ch.v2g{position:relative;isolation:isolate;background:transparent!important}
.side .ch.v2g::before{content:"";position:absolute;inset:0;z-index:-1;border-radius:inherit;background:var(--in);pointer-events:none}

/* mute and deafen (design v2-anim.css, motion.html `mute`): the icon turns red and the button gets a 14% red tint in 110ms
   (the buttons' own colour transition, v2.css); the slash is the icon's own stroke, drawn by v2.js in 160ms (stroke from 0 to the full
   length, enter curve) and wiped away in 120ms (leave curve) */
:is(.dk,.ib,.me-v button,.me-r button)[title=Unmute],:is(.dk,.ib,.me-v button,.me-r button)[title=Undeafen]{color:var(--s-dnd)!important;background:color-mix(in srgb,var(--s-dnd) 14%,transparent)!important}
svg.ic.sl .slp{stroke-dasharray:1;stroke-dashoffset:1}
svg.ic.sl[data-off] .slp{stroke-dashoffset:0}

/* counts roll (motion.html `roll`): reaction number, unread badge number, "2 inside"; v2.js plays the roll, 160ms */
.roll{display:inline-block;position:relative;clip-path:inset(0 -4px);height:16px;line-height:16px}
.roll>span{display:inline-block}
.roll>.rollg{position:absolute;left:0;top:0}
small>.roll{vertical-align:top}
/* inside a reaction chip the number's boxes are not chips themselves (`.rx span` is the chip's own look) */
html .rx button .roll,html .rx button .roll>span{height:auto;padding:0;gap:0;border-radius:0;background:none;box-shadow:none;font:inherit;color:inherit;display:inline-block}
html .rx button .roll{height:16px}
html .rx button .roll>.rollg{position:absolute}
.rx button>b.rxt{font:inherit;white-space:pre}

/* typing: a light sweeps across the words (2400ms loop: 1700 sweep, 700 rest); three dots, 1200ms loop, 150ms apart,
   each rises 4px and turns the accent colour (cove-4-ui final/v2-anim.css, 2026-12-04) */
.v2tyt{background:linear-gradient(90deg,var(--faint) 0 40%,var(--ink) 50%,var(--faint) 60% 100%) 100% 0/250% 100%;-webkit-background-clip:text;background-clip:text;color:transparent;animation:v2tysweep 2.4s linear infinite}
@keyframes v2tysweep{0%{background-position:100% 0}70%,100%{background-position:0 0}}
.v2dots{display:inline-flex;gap:3px;margin-left:6px;vertical-align:middle}
.v2dots>i{width:5px;height:5px;border-radius:50%;background:currentColor;opacity:.4;animation:v2dot 1.2s var(--e) infinite}
.v2dots>i:nth-child(2){animation-delay:150ms}.v2dots>i:nth-child(3){animation-delay:300ms}
/* out of sight but still inline: a positioned (block) box would put line breaks around it in the copied text */
.vh{display:inline-block;width:1px;height:1px;margin-right:-1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap;vertical-align:top}
@keyframes v2dot{0%,60%,100%{transform:none;opacity:.4;background:currentColor}25%{transform:translateY(-4px);opacity:1;background:var(--accent)}}

/* loading: a sheen sweeps across the placeholders every 1100ms (linear) */
html .skb{background:linear-gradient(90deg,var(--soft2) 0 35%,color-mix(in srgb,var(--soft2) 55%,var(--pnl)) 50%,var(--soft2) 65% 100%) 0 0/300% 100%;animation:v2sheen 1.1s linear infinite}
@keyframes v2sheen{from{background-position:100% 0}to{background-position:0 0}}
@media (prefers-reduced-motion:reduce){html .skb,.v2dots>i,.v2tyt{animation:none}}

/* windows and menus that are animating closed can't be clicked */
.v2-out{pointer-events:none}

/* Jesse's touch-ups from Workbench's UI editor (cove-4-ui final/v2-anim.css, the block between
   "workbench-ui-edits:start" and ":end", 31 rules since 2026-12-04; made on the window design, final/cove.html). The
   design's rules name its page's elements by position (nth-of-type), so each one is tied here to the same element by
   what it is.
   Already so in the app, and so without a rule: the icons of the top bar's pin, side-panel and Call buttons (the
   design's `button.ib.v:nth-of-type(2)`, new 2026-12-04) sit in the middle of their circles, the "is typing" line sits just above the message box, blocked people's rows are fully
   opaque (their border colour draws nothing: the rows have no border). Jesse, 2026-12-03, asked about the three
   things first left open: "Yes to all": Snow is dashed like the other tiles, "Profile colours" has 14px corners too,
   and the 2px nudge of the fourth channel row is in. */
@media (min-width:601px){
  /* window buttons: icons 14px wide, Minimise 15px high */
  .wbar button[title=Minimise] .ic{height:15px}
  /* Profile look: the rows stand apart, as in the design (its join() only joins a page's own rows), 14px corners,
     "Profile colours" too (Jesse) */
  #ov-settings .dlg .plc>.sr{margin-top:0;border-radius:14px}
  /* Card effect: every tile has a dashed outline (the design lists the first, third and fourth; Snow too, Jesse) */
  .plc [data-look=fx]>.ob.w{border:1px dashed}
  /* the channel list: an unread row that is its group's fourth button (the third channel) sits 2px lower, the
     design's `button.ch.unread:nth-of-type(4)` */
  .grp>button.ch.unread:nth-of-type(4){translate:0 2px}
  /* Banner: "Choose a picture", and Overlay: the shortcut */
  .plc .sws[data-look=banner]>.pic,#ov-settings [data-set=overlay_key]>.pill{border:1px dashed}
  /* a person's menu: the icon of its first row, "Profile", is 18px wide (2026-12-04) */
  #pop-user>button.ch:nth-of-type(1)>svg.ic{box-sizing:border-box;width:18px}
}
