/* Keep native dialogs in the top layer and the quote shortcut anchored to the viewport. */
@media screen {
  :root:not([data-theme="dark"]) body > header {
    position: relative;
    z-index: 20;
    background: #fafcfd;
  }

  @supports ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
    :root:not([data-theme="dark"]) body > header {
      background: rgb(255 255 255 / 92%);
      -webkit-backdrop-filter: blur(20px) saturate(115%);
      backdrop-filter: blur(20px) saturate(115%);
    }
    :root:not([data-theme="dark"]) dialog:is(.qc-dialog, #product-assistant, #company-info) {
      background: rgb(255 255 255 / 94%);
    }
    :root:not([data-theme="dark"]) dialog:is(.qc-dialog, #product-assistant, #company-info)::backdrop {
      background: rgb(20 42 57 / 35%);
      -webkit-backdrop-filter: blur(6px) saturate(110%);
      backdrop-filter: blur(6px) saturate(110%);
    }
    :root:not([data-theme="dark"]) #product-assistant .as-scroll {
      background: linear-gradient(180deg, transparent, rgb(230 239 244 / 38%));
    }
  }

  @media (prefers-reduced-motion: no-preference) {
    :root:not([data-theme="dark"]) dialog:is(#detail, #lightbox, #company-info, #branches-info, .company-film-dialog, .qc-dialog, #product-assistant),
    :root:not([data-theme="dark"]) dialog:is(#detail, #lightbox, #company-info, #branches-info, .company-film-dialog, .qc-dialog, #product-assistant)::backdrop {
      transition-duration: 480ms;
      transition-timing-function: cubic-bezier(.22, 1, .36, 1);
    }
  }

  @media (prefers-reduced-transparency: reduce) {
    :root:not([data-theme="dark"]) body > header,
    :root:not([data-theme="dark"]) dialog:is(.qc-dialog, #product-assistant, #company-info) {
      background: white;
      -webkit-backdrop-filter: none;
      backdrop-filter: none;
    }
    :root:not([data-theme="dark"]) dialog:is(.qc-dialog, #product-assistant, #company-info)::backdrop {
      -webkit-backdrop-filter: none;
      backdrop-filter: none;
    }
  }
}
