@font-face { font-family: 'Ezra SIL'; src: url('/_styles/fonts/SILEOT.woff'); }
@font-face { font-family: 'Ezra SIL SR'; src: url('/_styles/fonts/SILEOTSR.woff'); }

body {
    font-family: 'Times New Roman', Times, OpenSans;
    font-size: 12pt;
    direction: ltr;
    margin: 96px 96px 96px 96px;
    counter-reset: footnote chapt figs;
}

a {
  color: black;
  text-decoration: none;
}

sub, sup {
  /* Specified in % so that the sup/sup is the
     right size relative to the surrounding text */
  font-size: 75%;

  /* Zero out the line-height so that it doesn't
     interfere with the positioning that follows */
  line-height: 0;

  /* Where the magic happens: makes all browsers position
     the sup/sup properly, relative to the surrounding text */
  position: relative;

  /* Note that if you're using Eric Meyer's reset.css, this
     is already set and you can remove this rule */
  vertical-align: baseline;
}

sup {
  /* Move the superscripted text up */
  top: -0.5em;
}

sub {
  /* Move the subscripted text down, but only
     half as far down as the superscript moved up */
  bottom: -0.25em;
}

h1.chapter { counter-increment: chapt; }
h1 { string-set: chapter content(); }
h1.chapter:before { content: "Chapter " counter(chapt) ": "; }

figcaption { counter-increment: figs; }
figcaption:before { content: "Figure " counter(figs) ": "; }

figcaption { font-size: 10px; font-family:Arial,Helvetica,sans-serif; }
figcaption .hebrew { font-size: 11px; }

.no-opacity {
	opacity: 1;
}

.section-header {
    text-align: center;
    margin: 0 auto;
    font-weight: bold;
}

.section-title {
    font-weight: normal;
    color: #c0c0c0;
}

.section-subject {
    direction: rtl;
    text-align: center;
    margin: 0 auto;
    font-weight: bold;
    font-size: 14pt;
    font-family: 'Ezra SIL', 'Ezra SIL SR', 'New Peninim MT', 'Taamey David CLM', 'Arial', 'Arial Hebrew';
}

.section-content {
    margin: 0 auto;
    width: 95%;
}
.section-content:after {
    content: " ";
    display: table;
    clear: both;
    visibility: hidden;
    line-height: 0;
    height: 0;
}

.section-subsection {
    margin: 0;
    padding-bottom: 10px;
    padding-top: 10px;
    width: 50%;
    float:left;
}

.section-subsection > table {
	margin: 0 auto;
}

.section-support {
    width: 32% !important;
}

.section-analysis p, #abstract p, #introduction p, #conclusion p, #appseder p{
    line-height: 2;
}

#introduction > .section-note {
	/* width: 88%; */
	/* font-size: 0.8em; */
	/* border-bottom: 1px solid black; */
	/* margin: 0 auto; */
	padding-bottom: 10px;
}

#introduction > .section-note p {
	line-height: 1.5em;
}

/* Footnotes */
/* .pgfootnote {
	display:none!important;
}
.pgfootnote::footnote-call, .pgfootnote::footnote-marker {
	display:none!important;
}
*/

.pagedjs_footnote_area::before {
	content: '';
	display: block;
	position:absolute;
	top: 0;
	width: 25%;
	left: 0;
	border-top: 1px solid black;
	margin-bottom: 2px;
}
.pagedjs_footnote_content {
	padding-top: 5px;
}
.pgfootnote {
  float: footnote;
  padding-left: 0;
  font-size: 0.8em;
  line-height: 12px;
  text-indent: 0px!important
}

.pgfootnote::footnote-call, .pgfootnote::footnote-marker {
  vertical-align: inherit;
  font-family: 'Arial', sans-serif;
  font-weight: 600;
}

.pgfootnote::footnote-marker {
  display: inline-block;
  width: 0mm;
  position: relative;
  left: -6mm;
}

.pgfootnote::footnote-call {
  content: counter(footnote);
  position: relative;
  top: -3px;
  font-size: 0.7em;
}
/* Original Footnote Styles */
.footnote {
    font-size: 0.7em;
}

.footnote-note {
    font-size: 0.8em;
    /* text-indent: -11px; */
    /* margin-left: 11px; */
}

.footnote-note .hebrew {
    font-size: 11px;
}

hr.footnote-break {
	border-style: inset;
	border-width: 1px;
	overflow: hidden;
	background-color:#c0c0c0;
	border-radius: 1px;
	opacity: 0.8;
	width:15%;
	float:left;
	clear: both;
}

/* table of content */
.toc-part, .toc-chap, .toc-subchap, .toc-app {
  /* break-inside: avoid; */
}

#toc ul {
  margin-top: 50px;
  list-style: none;
  padding: 0;
}

#toc li {
  text-indent: 0!important;
  text-align: left!important;
}

.toc-part a[href]::before, .toc-part a[href]::after, .toc-part-app a[href]::before {
  display: block;
  text-align: center;
  text-transform: uppercase;
}

.toc-part {
  margin-bottom: 30px;
}

.toc-part:first-of-type{
  margin-bottom: 0px;
}

.toc-chap, .toc-app, .toc-front, .toc-end {
  margin-bottom: 15px;
  margin-top: 15px;
}

.toc-subchap+.toc-chap {
  margin-top: 30px;
}

.toc-chap a, .toc-app a, .toc-front a, .toc-end a {
  display: inline;
}

.toc-subchap {
  font-style: italic;
  margin-left: 6mm;
}

#toc{
  counter-reset: chaptoc apptoc;
}
.toc-part a[href]::before{
  content: target-text(attr(href), before);

}

.toc-part a[href]::after,
.toc-chap a[href]::before,
.toc-subchap a[href]::before,
.toc-front a[href]::before,
.toc-part-app a[href]::before,
.toc-app a[href]::before,
.toc-end a[href]::before {
  content: target-text(attr(href url), content);
}

.toc-element {
	display: flex;
}
.toc-element a::after {
	position: absolute;
	right: 0;
	background-color: white;
	padding-left: 4px;
}
.toc-element a{
	right: 0;
}

#toc-main {
    overflow-x: hidden;
}

#toc-main .toc-chap::after, #toc-main .toc-subchap::after,
#toc-main .toc-front::after, #toc-main .toc-end::after, #toc-main .toc-app::after {
	content: "...................." "........................."
    "..........." ".................................."
    ".............................................." "........";
  float: left;
  width: 0;
  padding-left: 5px;
  letter-spacing: 2px;
}

.toc-chap{
  counter-increment: chaptoc;
}
.toc-chap::before{
  content: "Chapter " counter(chaptoc);
  padding-right: 5px;
}

.toc-app {
  counter-increment: apptoc;
}

.toc-app::before{
  content: "Appendix " counter(apptoc);
  padding-right: 5px;
}

.toc-front a::after {
  content: target-counter(attr(href), page, lower-roman);
  float:right;
}

.toc-chap a::after,
.toc-end a::after,
.toc-app a::after {
  content: target-counter(attr(href), page);
  /* content: "tbd"; */
  float:right;
}

.toc-subchap a[href]::before {
  content: target-text(attr(href));
}

.toc-subchap a[href]::after {
    content: target-counter(attr(href), page);
    float:right;
}

/* Bibliography */
#bibliography p, .hanging-indent {
	padding-left: 56px;
	text-indent: -56px;
}

.rotate {
    /* FF3.5+ */
    -moz-transform: rotate(-90.0deg);
    /* Opera 10.5 */
    -o-transform: rotate(-90.0deg);
    /* Saf3.1+, Chrome */
    -webkit-transform: rotate(-90.0deg);
    /* IE6,IE7 */
    filter: progid: DXImageTransform.Microsoft.BasicImage(rotation=0.083);
    /* IE8 */
    -ms-filter: "progid:DXImageTransform.Microsoft.BasicImage(rotation=0.083)";
    /* Standard */
    transform: rotate(-90.0deg);
}

.sideways-qamats {
    float: left;
    margin-top: -11px;
    margin-right: -6px;
}

.section-subject > div> .sideways-qamats {
    float: left;
    margin-top: -10px;
    margin-bottom: -13px;
    margin-left: 6px;
}

/* Base container styles */
.seder-container {
    display: inline-block;
    position: relative;
    vertical-align: middle;
    margin: 0 0 0 0.1em;
    /* line-height: 2; */
    font-family: 'Ezra SIL','Ezra SIL SR','New Peninim MT','Taamey David CLM','Arial','Arial Hebrew';
    font-size: 1em;
    direction: rtl;
}

/* Table-specific container adjustments */
#appseder table td, #appseder table th {
    line-height: 1.2;
    /* padding: 0.2em 0.2em; */
    vertical-align: middle;
}
#appseder table, #appseder table tr td, #appseder table tr th {
	page-break-inside: auto!important;
}
table .seder-container {
    line-height: 1; /* Reduced line height for tables */
    margin: 0.15em 0 0 0.25em; /* Maintain horizontal spacing */
}

table .seder-qamatz {
	top: 0.1em;
}

table .seder-samech {
	font-size: 1.1em;
}

/* Samech wrapper to help with positioning */
.seder-samech-wrapper {
    position: relative;
    display: inline-block;
    text-align: center;
}

/* Samech character styling */
.seder-samech {
    font-size: 1.2em;
    line-height: 1;
}

/* Qamatz positioning relative to samech */
.seder-qamatz {
    position: absolute;
    top: 0.5em;
    left: -20%;
    transform: translateX(-50%) rotate(-90deg);
    font-size: 1em;
    line-height: 0;
}

/* Bottom count styling */
.seder-count {
    display: block;
    font-size: 0.5em;
    text-align: center;
    margin-top: -0.2em;
    line-height: 1;
}

/* Left count container modifications */
.seder-container:has(.seder-count-left) {
    display: inline-flex;
    align-items: center;
    direction: ltr;
}

/* Left-positioned count styling */
.seder-count-left {
    display: inline-block;
    font-size: 0.5em;
    line-height: 1.5;
    order: -1;
    position: relative;
    bottom: -0.25em;
    left: -0.1em;
}

/* Maintain RTL for Hebrew characters in left count layout */
.seder-container:has(.seder-count-left) .seder-samech-wrapper {
    direction: rtl;
}

td.ms-abbr {
    padding-right: 5px;
    padding-top: 5px;
    font-weight: 300;
    vertical-align: top;
}

.mp-note {
    font-family: 'Ezra SIL', 'Ezra SIL SR', 'New Peninim MT', 'Taamey David CLM', 'Arial', 'Arial Hebrew';
    font-size: 1.1em;
}

.hebrew {
    font-family: 'Ezra SIL', 'Ezra SIL SR', 'New Peninim MT', 'Taamey David CLM', 'Arial', 'Arial Hebrew';
    font-size: 1em;
    direction: rtl;
}

.ms-word-img {
    max-width: 100%;
    max-height: 65px;
}

.ms-mp-img {
    height: 45px;
}

ul.mm-list, ul.no-dot-list {
    list-style-type: none;
    margin: 0;
    padding: 0;
}

ul.mm-list li {
    display: inline;
}

ol.mm-list, ol.three-column-list {
    -moz-column-count: 3;
    -moz-column-gap: 20px;
    -webkit-column-count: 3;
    -webkit-column-gap: 20px;
    column-count: 3;
    column-gap: 20px;
}

.highlight {
    text-decoration: underline;
}

/* Appendix: Biblical Reference */
.biblical-references {
    width: 100%;
}

.biblical-references h1 {
    text-align: center;
    margin-bottom: 1rem;
}

.reference-container {
    width: 100%;
}

.reference-grid {
    column-count: 2;
    /* column-fill: auto; */
    column-gap: 2rem;
    /* height: calc(11in - 2in); */ /* Page height minus margins */
}

.book-section {
    margin-bottom: 1.5rem;
}

.book-section h3 {
    margin-bottom: 0.5rem;
    font-size: 1.2rem;
    border-bottom: 1px solid #000;
}

.reference-entry {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 0.25rem;
    break-inside: avoid;
}

.reference {
    flex-shrink: 0;
}

.notes {
    text-align: right;
}

.notes a {
    text-decoration: none;
}



@media print {
    @page {
	counter-increment: page;
        margin: 1in 1in 0.75in 1in;
    }
    @page:left {
  	@top-left{
	    content: counter(page);
	    font-weight: 400;
	    font-weight: normal;
	    line-height: 1;
	    vertical-align: middle;
	    margin-bottom: 14px;
	    font-variant-numeric: oldstyle-nums;
	 }

	@top-center{
	    content: "The Sub-Loco Notes of the Latter Prophets";
	    font-weight: 400;
	    font-weight: normal;
	    line-height: 1;
	    vertical-align: middle;
	    margin-bottom: 14px;
	    font-variant: small-caps;
	    width: 85mm;
	    text-align: center;
  	}
    }

    @page:right {
        @top-right{
            content: counter(page);
            font-weight: 400;
            font-weight: normal;
            line-height: 1;
            vertical-align: middle;
            margin-bottom: 14px;
            text-align: right;
            font-variant-numeric: oldstyle-nums;
        }

        @top-center{
            content: string(chapter);
            vertical-align: middle;
            text-align: center;
            margin-bottom: 14px;
            font-variant: small-caps;
            width: 85mm;
        }
    }
    #cover {
	page: cover;
    }
    @page cover {
	margin: 0;
	/* background: url("/_images/cover.jpeg"); */
	/* background-position: center; */
	/* background-size: 100%; */
	/* background-repeat: no-repeat; */

	@top-left{ content: none; }
	@top-center{ content: none; }
	@top-right{ content: none; }
	@bottom-left{ content: none; }
    }
    #abstract {
	counter-reset: page 1;
	page: abstract;
    }
    @page abstract {
	@top-center{ content: none; }
	@bottom-left{ content: none; }
	@top-right{ content: none; }
	@top-left{ content: none; }
	@bottom-center { content: counter(page, lower-roman); }
    }
    #abbreviations {
	page: abbreviations;
    }
    @page abbreviations {
	@top-center{ content: none; }
	@bottom-left{ content: none; }
	@top-right{ content: none; }
	@top-left{ content: none; }
	@bottom-center { content: counter(page, lower-roman); }
    }
    #introduction {
	page: introduction;
    }
    @page:left introduction {
	@top-center{ 
	    content: "The Sub-Loco Notes of the Latter Prophets";
	    font-weight: 400;
	    font-weight: normal;
	    line-height: 1;
	    vertical-align: middle;
	    margin-bottom: 14px;
	    font-variant: small-caps;
	    width: 85mm;
	    text-align: center;
       	} 
	@bottom-left{ content: none; }
	@top-right{ content: none; }
	@top-left{ content: none; }
	@bottom-center { content: counter(page, lower-roman); }
    }
    @page:right introduction {
	@top-center{
	    content: "Introduction";
	    font-weight: 400;
	    font-weight: normal;
	    line-height: 1;
	    vertical-align: middle;
	    margin-bottom: 14px;
	    font-variant: small-caps;
	    width: 85mm;
	    text-align: center;
       	} 
	@bottom-left{ content: none; }
	@top-right{ content: none; }
	@top-left{ content: none; }
	@bottom-center { content: counter(page, lower-roman); }
    }

    #toc {
        page: toc;
    }

    @page toc {
	@top-center{ content: none; }
	@bottom-left{ content: none; }
	@top-right{ content: none; }
	@top-left{ content: none; }
	@bottom-center { content: counter(page, lower-roman); }
    }
    @page:blank {
	  @top-left-corner{ content: none; }
	  @top-left{ content: none; }
	  @top-center{ content: none; }
	  @top-right{ content: none; }
	  @top-right-corner{ content: none; }
	  @right-top{ content: none; }
	  @right-middle{ content: none; }
	  @right-bottom{ content: none; }
	  @bottom-right-corner{ content: none; }
	  @bottom-right{ content: none; }
	  @bottom-center{ content: none; }
	  @bottom-left{ content: none; }
	  @bottom-left-corner{ content: none; }
	  @left-bottom{ content: none; }
	  @left-middle{ content: none; }
	  @left-top{ content: none; }
    }

    body { 
	margin: 0; 
	background-color: white;
        color: black;
    } /* Adjust margins for printing */
    
    section { 
    	break-after: always;
    } /* New Chapter sections should start on a new page */

    .reset-page-count {
	    counter-reset: page 1;
    }
    .page-break{
        page-break-after: always;
    }

    .section-note {
	    padding-top: 45px;
    }
    .section-footnotes { page-break-before: avoid; }
    .section-metadata, h1, h2, h3, h4 { page-break-after: avoid; }
    .section-metadata, .section-content, .section-footnotes, table, table tr td, table tr th {
        page-break-inside: avoid;
    }
    #bibliography p {
	    page-break-inside: avoid;
    }
    table, img {
	    max-width: 100% !important;
    }
}
