// Credits: @OWA/bennyyip on the Obisidian Members' Group Discord for the tategaki snippet

.app-container .view-content:has(.tategaki) .markdown-preview-section {
  writing-mode: vertical-rl;
  overflow: scroll;
  max-width: 95%;
  padding-bottom: 0px !important;
  padding-top: 7.5vh;
  line-height: 1.667;
  margin: auto;
  min-height: 0 !important;
  max-height: 85vh;
  text-indent: 1rem;

  div > :is(h1, h2, h3, h4, h5, h6) {
    margin-top: 0;
    line-height: 1.667;
  }

  .footnotes p {
    text-indent: 0;
  }

  .mod-header {
    display: none;
  }
}

.app-container .view-content:has(.vertical-ltr) .markdown-preview-section {
  writing-mode: vertical-lr;
  overflow: scroll;
  max-width: 95%;
  padding-bottom: 0px !important;
  padding-top: 7.5vh;
  line-height: 1.667;
  margin: auto;
  min-height: 0 !important;
  max-height: 85vh;
  text-indent: 1rem;

  div > :is(h1, h2, h3, h4, h5, h6) {
    margin-top: 0;
    line-height: 1.667;
  }

  .footnotes p {
    text-indent: 0;
  }

  .mod-header {
    display: none;
  }
}

.file-w-full {
  --file-line-width: 100vw;
}

@mixin file-w-cls($percent) {
  .file-w-#{$percent}vw {
    --file-line-width: #{$percent}vw;
  }
}

@include file-w-cls(50);
@include file-w-cls(55);
@include file-w-cls(60);
@include file-w-cls(65);
@include file-w-cls(70);
@include file-w-cls(75);
@include file-w-cls(80);
@include file-w-cls(85);
@include file-w-cls(90);
@include file-w-cls(95);
