/*
 * Keep every document and nested scroll area usable while hiding the visual
 * scrollbar. Loaded by static pages, server delivery and both app exports.
 */
:root,
html,
body,
body * {
  scrollbar-width: none !important;
  scrollbar-color: transparent transparent !important;
  scrollbar-gutter: auto !important;
  -ms-overflow-style: none !important;
}

html {
  overflow-y: auto;
}

:root::-webkit-scrollbar,
html::-webkit-scrollbar,
body::-webkit-scrollbar,
body *::-webkit-scrollbar {
  display: none !important;
  width: 0 !important;
  min-width: 0 !important;
  height: 0 !important;
  min-height: 0 !important;
  background: transparent !important;
  -webkit-appearance: none !important;
}

:root::-webkit-scrollbar-track,
:root::-webkit-scrollbar-thumb,
:root::-webkit-scrollbar-corner,
:root::-webkit-scrollbar-button,
:root::-webkit-resizer,
html::-webkit-scrollbar-track,
html::-webkit-scrollbar-thumb,
html::-webkit-scrollbar-corner,
html::-webkit-scrollbar-button,
html::-webkit-resizer,
body::-webkit-scrollbar-track,
body::-webkit-scrollbar-thumb,
body::-webkit-scrollbar-corner,
body::-webkit-scrollbar-button,
body::-webkit-resizer,
body *::-webkit-scrollbar-track,
body *::-webkit-scrollbar-thumb,
body *::-webkit-scrollbar-corner,
body *::-webkit-scrollbar-button,
body *::-webkit-resizer {
  display: none !important;
  width: 0 !important;
  height: 0 !important;
  border: 0 !important;
  background: transparent !important;
}

/* Root RTL places the document scroll edge on the left. Deliberately keep
 * explicit LTR editors, media timelines and app content layouts unchanged. */
html:lang(fa){direction:rtl}

/* Contain the dialog boundary, not every descendant. Clipped cards and icons
 * must pass wheel/touch gestures through to their nearest scrolling ancestor.
 * Nested scroll regions define their own containment in their layout styles. */
:is(dialog,[role="dialog"],[aria-modal="true"]){overscroll-behavior-y:contain}
