/* Dashboard extras: small flourishes nobody needs, layered on motion.css (dash-play.js does the parts CSS can't).
   - Each view's blocks rise out of a blur when it opens; Grow's panels slide in when their tab is picked.
   - The nav label leans toward the pointer, the current icon pops; icons never tilt or spin on hover.
   - Tabs share one pill that springs to the picked tab; primary buttons send out a ring when pressed (flat: an
     outline, never a shadow); switches squash their knob; ticked steps pop; live dots ping a few times.
   - Only transforms, opacity, filter and outlines animate. Reduced motion: base.css cuts every animation and
     transition, and dash-play.js does nothing. */

@keyframes dp-rise { from { opacity: 0; translate: 0 14px; filter: blur(6px); } }
@keyframes dp-slide { from { opacity: 0; translate: 0 10px; } }
@keyframes dp-pop { from { scale: 0.6; } }
@keyframes dp-tab { from { scale: 0.9; } }
@keyframes dp-ring { from { outline: 2px solid color-mix(in srgb, var(--pen) 60%, transparent); outline-offset: 0; } to { outline: 2px solid transparent; outline-offset: 9px; } }

/* ---------------- views open in order ---------------- */
/* :where keeps these at zero specificity, so a block's own animation (the composer's aura, cards) still wins */
/* backwards, not both: held at its end the animation leaves filter: blur(0px) on every block, and any filter makes the
   block a backdrop root, so the frosted glass inside it (the composer, the shelf, the side cards) could only blur
   itself and never the background behind. Let go at the end, it leaves no filter. */
:where(.dash .view:not([hidden])) > * { animation: dp-rise 560ms var(--ease-reveal) backwards; animation-delay: calc(var(--dp-n, 0) * 70ms); }
:where(.dash .view) > :nth-child(2) { --dp-n: 1; }
:where(.dash .view) > :nth-child(3) { --dp-n: 2; }
:where(.dash .view) > :nth-child(4) { --dp-n: 3; }
:where(.dash .view) > :nth-child(n + 5) { --dp-n: 4; }
:where(.gr-panel:not([hidden]), .view-grow .view-ads:not([hidden])) { animation: dp-slide 420ms var(--ease-reveal) both; }

/* ---------------- the sidebar ---------------- */
.snav > a > span:first-of-type { transition: translate 420ms var(--spring); }
.snav > a:hover > span:first-of-type { translate: 2px 0; }
.snav > [aria-current="page"] .nav-ic { animation: dp-pop 560ms var(--spring) both; }

/* ---------------- tabs: one pill that springs to the picked tab ---------------- */
.lib-tabs.dp-pill { position: relative; isolation: isolate; }
.lib-tabs.dp-pill button { position: relative; z-index: 1; }
.lib-tabs.dp-pill button[aria-selected="true"] { background: transparent; }
.lib-tabs button[aria-selected="true"] { animation: dp-tab 460ms var(--spring) both; }
.dp-tabpill { position: absolute; z-index: 0; top: 0; left: 0; border-radius: var(--r-control); background: var(--btn1-face); -webkit-backdrop-filter: var(--btn-glass); backdrop-filter: var(--btn-glass); box-shadow: var(--btn1-ring); pointer-events: none;
  transition: translate 600ms var(--spring-soft), width 600ms var(--spring-soft), height 600ms var(--spring-soft); }
.dp-tabpill.is-instant { transition: none; }

/* ---------------- buttons, switches, ticks, dots ---------------- */
.btn-primary.dp-ringing { animation: dp-ring 560ms var(--ease-reveal); }
/* grow.css loads later, so these carry an extra html */
html .gr-switch input::after { transform-origin: 50% 50%; transition: translate 560ms var(--spring), scale 320ms var(--spring); }
.gr-switch input:not(:disabled):active::after { scale: 1.3 0.82; }
.gr-step-row > input:checked { animation: dp-pop 460ms var(--spring) both; }
.gr-status[data-kind="on"] i { color: var(--ok); }
.gr-status[data-kind="wait"] i { color: var(--warn); }

/* ---------------- the command menu springs open ---------------- */
.scrim.is-open .cmdk { transition: transform 620ms var(--spring-soft), opacity 180ms var(--ease); }
.scrim:not(.is-open) .cmdk { transform: scale(0.94) translateY(-8px); }
