/*
 * Copyright © 2021 Mark Raynsford <code@io7m.com> https://www.io7m.com
 *
 * Permission to use, copy, modify, and/or distribute this software for any
 * purpose with or without fee is hereby granted, provided that the above
 * copyright notice and this permission notice appear in all copies.
 *
 * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
 * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
 * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY
 * SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
 * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
 * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR
 * IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
 */

/*
 * Structural CSS com.io7m.xstructural.xml/1.8.0
 */

:root {
  --stBackgroundColor:  #fff;
  --stColumnWidthLeft:  10%;
  --stColumnWidthMain:  90%;
  --stContentColor:     #202020;
  --stContentFont:      sans-serif;
  --stDivider:          1px solid #dddddd;
  --stHeaderColor:      #202020;
  --stHeaderFont:       sans-serif;
  --stMainWidth:        50em;
  --stMetaBorder:       1px solid #dddddd;
  --stMetaFont:         sans-serif;
  --stMetaFontSize:     90%;
  --stNavigationRowGap: 0.25em;
  --stVerbatimBorder:   1px solid #dddddd;
  --stVerbatimFontSize: 80%;

  --stH1Size: 1.1em;
  --stH2Size: 1.066em;
  --stH3Size: 1.049em;
  --stH4Size: 1.033em;
  --stH5Size: 1.016em;
  --stH6Size: 1.0em;
}

body
{
  background-color: var(--stBackgroundColor);

  line-height: 1.4em;
}

h1, h2, h3, h4, h5, h6
{
  font-family: var(--stHeaderFont);
  color:       var(--stHeaderColor);
  margin:      0;
  font-weight: bold;
}

h1
{
  font-size: var(--stH1Size);
}
h2
{
  font-size: var(--stH2Size);
}
h3
{
  font-size: var(--stH3Size);
}
h4
{
  font-size: var(--stH4Size);
}
h5
{
  font-size: var(--stH5Size);
}
h6
{
  font-size: var(--stH6Size);
}

/*
 * Standard regions.
 */

.stRegion
{
  width: var(--stMainWidth);

  margin-left: 1em;
}
.stRegionMargin
{
  width: var(--stColumnWidthLeft);
  float: left;
}
.stRegionContent
{
  width:         var(--stColumnWidthMain);
  margin-left:   var(--stColumnWidthLeft);
  margin-bottom: 1em;
}

/*
 * Navigation headers and footers.
 */

.stNavigationHeader
{
  width: var(--stMainWidth);
  font-family: var(--stHeaderFont);

  display: grid;
  grid-template-columns: 33.3% 33.3% 33.3%;
  grid-row-gap: var(--stNavigationRowGap);

  margin: 1em;
  border-bottom: var(--stDivider);
  padding-bottom: 1em;
}

.stNavigationFooter
{
  width: var(--stMainWidth);
  font-family: var(--stHeaderFont);

  display: grid;
  grid-template-columns: 33.3% 33.3% 33.3%;
  grid-row-gap: var(--stNavigationRowGap);

  margin: 1em;
  margin-top: 2em;
  border-top: var(--stDivider);
  padding-top: 1em;
}

.stNavigationHeaderPrevTitle
{
  grid-column-start: 1;
  grid-row-start: 1;
}
.stNavigationHeaderPrevLink
{
  grid-column-start: 1;
  grid-row-start: 2;
}
.stNavigationHeaderUpTitle
{
  grid-column-start: 2;
  grid-row-start: 1;
  text-align: center;
}
.stNavigationHeaderUpLink
{
  grid-column-start: 2;
  grid-row-start: 2;
  text-align: center;
}
.stNavigationHeaderNextTitle
{
  grid-column-start: 3;
  grid-row-start: 1;
  text-align: right;
}
.stNavigationHeaderNextLink
{
  grid-column-start: 3;
  grid-row-start: 2;
  text-align: right;
}

.stNavigationFooterPrevTitle
{
  grid-column-start: 1;
  grid-row-start: 2;
}
.stNavigationFooterPrevLink
{
  grid-column-start: 1;
  grid-row-start: 1;
}
.stNavigationFooterUpTitle
{
  grid-column-start: 2;
  grid-row-start: 2;
  text-align: center;
}
.stNavigationFooterUpLink
{
  grid-column-start: 2;
  grid-row-start: 1;
  text-align: center;
}
.stNavigationFooterNextTitle
{
  grid-column-start: 3;
  grid-row-start: 2;
  text-align: right;
}
.stNavigationFooterNextLink
{
  grid-column-start: 3;
  grid-row-start: 1;
  text-align: right;
}

.stMain
{
  margin-top: 2em;
}

/*
 * Table of contents.
 */

.stTableOfContents
{
  font-family: var(--stContentFont);
}
.stTableOfContents h1
{
  margin-bottom: 1em;
}
.stTableOfContents ul
{
  padding: 0;
  margin: 0;
}
.stTableOfContents li > ul
{
  padding-left: 1em;
}
.stTableOfContents li
{
  list-style: none;
}

/*
 * Document title.
 */

.stDocumentTitle h1
{
  font-size: 120%;
}

/*
 * Sections.
 */

.stSectionTitle
{

}

/*
 * Subsections.
 */

.stSubsectionTitle
{

}

/*
 * Paragraphs.
 */

.stParagraph
{

}
.stParagraphNumber
{
  font-family: var(--stHeaderFont);
}
.stParagraph .stRegionContent
{
  font-family: var(--stContentFont);
  color:       var(--stContentColor);
}

/*
 * Formal items.
 */

.stFormalItem
{
  margin-top: 1em;
}

/*
 * Footnotes.
 */

.stFootnotes
{
  margin-top:  1em;
  font-family: var(--stContentFont);
  color:       var(--stContentColor);
}
.stFootnotes table
{
  border:          var(--stMetaBorder);
  width:           100%;
  border-collapse: collapse;
}
.stFootnotes td
{
  vertical-align: top;
  border:         var(--stMetaBorder);
  padding:        0.5em;
}
.stFootnoteNumber
{

}
.stFootnoteReferences
{
  margin-top: 1em;
}

/*
 * Document metadata.
 */

.stMetadataTable table
{
  margin-top:      2em;
  margin-bottom:   2em;
  border:          var(--stMetaBorder);
  width:           100%;
  border-collapse: collapse;
  font-family:     var(--stMetaFont);
  font-size:       var(--stMetaFontSize);
}
.stMetadataTable td
{
  vertical-align: top;
  border:         var(--stMetaBorder);
  padding:        0.5em;
}
.stMetadataTable td:nth-child(1)
{
  width: 12em;
}

.stVerbatim
{
  border:    var(--stVerbatimBorder);
  font-size: var(--stVerbatimFontSize);
  padding:   1em;
  margin:    0em;
  overflow:  scroll;
}

/*
 * Lists.
 */

.stItem
{
  font-family:   var(--stContentFont);
  color:         var(--stContentColor);
  padding-right: 1em;
  margin-top:    1em;
}

/*
 * Tables.
 */

.stTable td
{
  vertical-align: top;
}
.stTable th
{
  text-align: left;
  padding-right: 1em;
}
