/* fluid-glass.css — applies the shared SVG displacement filter (#fg-shared,
   created by fluid-glass.js) to ALL glass panels via CSS. Because this is CSS
   (not inline JS), the filter is applied INSTANTLY when an element becomes
   visible — no flash on view switches. The frosting (inset rim highlights +
   shadow) is also CSS-only. */

/* All glass panels get the fluid-glass backdrop-filter + frosting via CSS.
   No JS per-element, no MutationObserver, no flash. */
.topbar-brand,
.topbar-user,
.toast {
  backdrop-filter: url(#fg-shared) saturate(1.3);
  -webkit-backdrop-filter: url(#fg-shared) saturate(1.3);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.07),
    inset 0 -1px 0 rgba(255, 255, 255, 0.03),
    inset 0 0 14px rgba(255, 255, 255, 0.025),
    0 8px 30px rgba(0, 0, 0, 0.32);
}

/* Kill the fadeIn animation on view switches — it fades opacity 0→1 over 0.32s
   which makes the glass panels look weak/absent during the transition ("сначала
   нету гласса потом есть"). With this, views appear instantly with full glass. */
.view.is-on {
  animation: none !important;
}

/* SVG filter support not available (Firefox/Safari) → plain glass fallback. */
@supports not (backdrop-filter: url(#x)) {
  .topbar-brand,
  .topbar-user,
  .toast {
    backdrop-filter: blur(16px) saturate(1.5);
    -webkit-backdrop-filter: blur(16px) saturate(1.5);
  }
}
