/* Readium CSS
   Scroll module for vertical-writing

   A set of styles to scroll ePublications in “writing-mode: vertical-*”
   This module overrides pagination

   Repo: https://github.com/readium/css */

:root:--scroll-view,
:root:--no-vertical-pagination {
  /* Reset html size so that the user can scroll */
  min-width: 0 !important;
  width: auto !important;
  max-width: none !important;
  max-height: 100vh !important;

  /* Reset columns, auto + auto = columns can’t be created */
  /* There is a weird gap in Safari/Webkit, as if overflow paged-x… */
  -webkit-columns: auto auto !important;
  -moz-columns: auto auto !important;
  columns: auto auto !important;
}

/* Make sure line-length is limited in all configs */
:root:--scroll-view body,
:root:--no-vertical-pagination body {
  box-sizing: border-box !important;
  max-width: var(--RS__defaultLineLength) !important;
}

@supports (overflow: clip) {
  :root:--scroll-view:not(:--no-overflow) {
     overflow: auto;
  }

  :root:--scroll-view:not(:--no-overflow) body {
     overflow: clip;
  }
}