/* The shared motion layer's styles (js/motion-plus.js). Transform and opacity only; everything here stops under Reduce Motion. */

/* ---- the undo toast: bottom centre on a wide screen, above the tab bar on a phone (the bottom is the same on the right and the left in Arabic: it is centred) ---- */
.toast.undo{ display:flex; align-items:center; gap:14px; padding:12px 10px 14px 18px; overflow:hidden; max-width:min(520px, calc(100vw - 28px)) }
html[dir="rtl"] .toast.undo{ padding:12px 18px 14px 10px }
.toast.undo .tu-msg{ flex:1; min-width:0 }
.toast.undo .tu-btn{ flex:none; min-height:36px; padding:0 14px; border:0; border-radius:100px; background:color-mix(in srgb, currentColor 14%, transparent); color:inherit; font:inherit; font-weight:700; cursor:pointer; transition:background .15s, transform .12s }
.toast.undo .tu-btn:active{ transform:scale(.95) } .toast.undo .tu-btn:hover{ background:color-mix(in srgb, currentColor 24%, transparent) }
.toast.undo .tu-bar{ position:absolute; inset:auto 0 0 0; height:3px; background:var(--teal, #00D1C1); transform-origin:left center }
html[dir="rtl"] .toast.undo .tu-bar{ transform-origin:right center }

/* ---- the light and dark switch: a circle spreads from the control (View Transitions); the old picture stays still under it ---- */
::view-transition-old(root), ::view-transition-new(root){ animation:none; mix-blend-mode:normal }
::view-transition-old(root){ z-index:1 } ::view-transition-new(root){ z-index:2 }
html.theme-fade body{ animation:themeFade .36s ease }
@keyframes themeFade{ from{ opacity:.55 } to{ opacity:1 } }

/* ---- press feedback everywhere something can be pressed: a touch smaller and a touch deeper, 120 ms (the chips and cards already had theirs) ---- */
.btn, .qa, .morerow, .ditem, .dprop, .tab, .tabbar button, .appbar button, .hubrow, .dat, .dtile, .chip{ -webkit-tap-highlight-color:transparent }
.btn:active:not(:disabled), .qa:active, .ditem:active, .dprop:active, .tabbar button:active{ transform:scale(.97) }
.btn, .qa, .ditem, .dprop, .tabbar button{ transition:transform .12s var(--mo-ease, cubic-bezier(.2,.8,.2,1)), background-color .15s, box-shadow .2s }
@media(hover:hover) and (pointer:fine){ .btn:hover:not(:disabled):not(.primary){ box-shadow:0 6px 16px -10px rgba(10,37,64,.5) } .btn.primary:hover:not(:disabled){ transform:translateY(-1px); box-shadow:0 10px 22px -12px var(--dp, var(--nile)) } }

/* a chart bar that grows keeps its base: it grows up from the bottom edge */
.cfcard svg rect, .cfchart svg rect, .gbars rect{ transform-box:fill-box; transform-origin:50% 100% }

/* a progress bar that fills keeps its start: it opens from the leading edge (the right one in Arabic) */
.chero-bar i, .dstack i, .cfbar i, .pcard-coll u{ transform-origin:0 50% }
html[dir="rtl"] .chero-bar i, html[dir="rtl"] .dstack i, html[dir="rtl"] .cfbar i, html[dir="rtl"] .pcard-coll u{ transform-origin:100% 50% }

/* ---- the sliding pill of a segmented control (js/motion-plus.js pillRun): a stand-in pill under the labels while it travels; the real one is clear until it lands ---- */
.pill-run{ position:relative } .pill-run > button{ position:relative; z-index:1; transition:none !important }
.pill-ghost{ position:absolute; z-index:0; pointer-events:none; transform-origin:0 50% }
.pill-run > button.pill-go{ background:transparent !important; box-shadow:none !important }

/* ---- the tab bar's selected pill slides in instead of snapping ---- */
.tabbar button[aria-current="true"], .tabbar button.on{ transition:background-color .22s, color .22s }

@media(prefers-reduced-motion:reduce){
  .btn, .qa, .ditem, .dprop, .tabbar button, .toast.undo .tu-btn{ transition:none }
  .btn:active, .qa:active, .ditem:active, .dprop:active, .tabbar button:active, .toast.undo .tu-btn:active{ transform:none }
  .btn.primary:hover{ transform:none } html.theme-fade body{ animation:none }
}
