@import 'part:@sanity/base/theme/variables-style';

.root {
  background: var(--component-bg);
  height: 100%;
  display: flex;
  flex-direction: column;
}

.headerContainer {
  z-index: var(--zindex-pane);
  position: relative;
  background: var(--component-bg);

  @nest .root:not(.isCollapsed) &::after {
    content: '';
    display: block;
    position: absolute;
    left: 0;
    right: 0;
    bottom: -1px;
    border-bottom: 1px solid var(--hairline-color);
    z-index: 1;
  }

  @media (--max-screen-medium) {
    position: sticky;
    top: 0;
  }
}

.documentViewerContainer {
  flex: 1;
  min-height: 0;
  position: relative;

  @nest .isCollapsed & {
    display: none;
  }
}

.documentScroller {
  @media (--screen-medium) {
    height: 100%;
    overflow: auto;
  }
}

.portal {
  pointer-events: none;
  z-index: calc(var(--zindex-pane) - 1);
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;

  @nest & > * {
    pointer-events: all;
  }
}

@import 'part:@sanity/base/theme/variables-style';

.root {
  background: var(--component-bg);
  height: 100%;
  display: flex;
  flex-direction: column;
}

.headerContainer {
  z-index: var(--zindex-pane);
  position: relative;
  background: var(--component-bg);

  @nest .root:not(.isCollapsed) &::after {
    content: '';
    display: block;
    position: absolute;
    left: 0;
    right: 0;
    bottom: -1px;
    border-bottom: 1px solid var(--hairline-color);
    z-index: 1;
  }

  @media (--max-screen-medium) {
    position: sticky;
    top: 0;
  }
}

.documentViewerContainer {
  flex: 1;
  min-height: 0;
  position: relative;

  @nest .isCollapsed & {
    display: none;
  }
}

.documentScroller {
  height: 100%;

  @media (--screen-medium) {
    height: 100%;
    overflow: auto;
  }
}

.portal {
  pointer-events: none;
  z-index: calc(var(--zindex-pane) - 1);
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;

  @nest & > * {
    pointer-events: all;
  }
}

Fix document pane scroller height on narrow devices
[desk-tool] Fix document pane scroller height on narrow devices
