/* The desktop's seat for the shared app switcher (os/switcher/card-switcher.css
   draws the cards themselves). This sheet only places the layer over the desktop
   and takes the live window layer out of the way while it is up. */

.desktop-switcher-layer {
  position: absolute;
  inset: 0;
  /* Above .desktop-window-layer (z-index 1) and everything it stacks inside it. */
  z-index: 2147483100;
  animation: desktop-switcher-in .2s ease both;
}
.desktop-switcher-layer[hidden] { display: none; animation: none; }
@keyframes desktop-switcher-in { from { opacity: 0; } to { opacity: 1; } }

/* NO backdrop-filter here, deliberately. A full-screen backdrop-filter has to
   be re-sampled every frame the cards move over it, and it measured as the
   single most expensive thing in the switcher — 200ms/frame with it, 83ms
   without. The same look comes from blurring the WALLPAPER instead: a static
   filter on an element that does not move, so it is rasterised once and the
   compositor reuses it for the whole gesture. */
.desktop-shell[data-switcher="true"] .desktop-wallpaper {
  filter: blur(14px) saturate(.9);
  transform: scale(1.04);
}
.desktop-shell .desktop-wallpaper { transition: filter .2s ease, transform .2s ease; }

/* The cards are cached snapshots, so the real windows have nothing to do while
   the switcher is open: they fade back and stop taking input. Opacity only. */
.desktop-shell .desktop-window-layer { transition: opacity .18s ease; }
.desktop-shell[data-switcher="true"] .desktop-window-layer {
  opacity: 0;
  pointer-events: none;
}

/* The per-window loading placeholder is never painted in the window itself. */
.window-frame-loading { display: none; }

@media (prefers-reduced-motion: reduce) {
  .desktop-switcher-layer { animation: none; }
  .desktop-shell .desktop-window-layer,
  .desktop-shell .desktop-wallpaper { transition: none; }
}
