/* MISC
============================================================================= */

.quire-contributors-list.bio #timothy-potts {
  display: none;
}

.quire-contributor a {
  color: #333;
}
.quire-contributor a:hover {
  color: #7a3227;
}
@media print {
  .quire-contributor a {
    color: #000;
  }
}

.quire-splash .quire-page__header .hero-body .quire-page__header__title {
  color: #b44a3a;
}

.quire-page h2 {
  text-transform: none;
}
@@media print {
  .quire-page h2 {
    print: #363636;
  }
}

.quire-page__content .content .footnote-ref a {
  font-weight: normal;
  margin-right: .2em;
}

.content figure .quire-figure__caption {
  min-height: 1rem;
}

.quire-splash p:first-child:first-letter {
  margin-right: .5rem;
}

@media print {
  .title-page .title-tp {
    max-width: 3.75in;
    float: right;
  }
  .title-page .sub-title {
    clear: both;
  }
}


/* COVER
============================================================================= */

/* Custom cover slideshow animation */
.quire-cover__overlay {
  height: calc((95vh - 3rem) * .5);
  min-height: calc((95vh - 3rem) * .5);
  width: 50vw;
}
.quire-cover__overlay img {
  max-height: 100%;
  width: 100%;
  object-fit: cover;
  position:absolute;
  left:0;
  transition: opacity 1s ease-in-out;
  animation-name: FadeInOut;
  animation-timing-function: ease-in-out;
  animation-iteration-count: infinite;
  animation-duration: 16s;
}
.quire-cover__overlay img {
  object-fit: none;
}
.quire-cover__overlay.upper-left img {
  object-position: bottom right;
}
.quire-cover__overlay.upper-right {
  left: 50vw;
}
.quire-cover__overlay.upper-right img {
  object-position: bottom left;
}
.quire-cover__overlay.lower-left {
  top: 50%;
}
.quire-cover__overlay.lower-left img {
  object-position: top right;
}
.quire-cover__overlay.lower-right {
  left: 50vw;
  top: 50%;
}
.quire-cover__overlay.lower-right img {
  object-position: top left;
}
@keyframes FadeInOut {
  0% {
    opacity:1;
  }
  17% {
    opacity:1;
  }
  25% {
    opacity:0;
  }
  92% {
    opacity:0;
  }
  100% {
    opacity:1;
  }
}
.quire-cover__overlay.upper-left img:nth-of-type(1) {
  animation-name: none;
}
.quire-cover__overlay.upper-left img:nth-of-type(2) {
  animation-delay: 8s;
}
.quire-cover__overlay.upper-left img:nth-of-type(3) {
  animation-delay: 6s;
}
.quire-cover__overlay.upper-left img:nth-of-type(4) {
  animation-delay: 4s;
}
.quire-cover__overlay.upper-left img:nth-of-type(5) {
  animation-delay: 2s;
}
.quire-cover__overlay.upper-left img:nth-of-type(6) {
  animation-delay: 0;
}

.quire-cover__overlay.upper-right img:nth-of-type(1) {
  animation-name: none;
}
.quire-cover__overlay.upper-right img:nth-of-type(2) {
  animation-delay: 10s;
}
.quire-cover__overlay.upper-right img:nth-of-type(3) {
  animation-delay: 8s;
}
.quire-cover__overlay.upper-right img:nth-of-type(4) {
  animation-delay: 6s;
}
.quire-cover__overlay.upper-right img:nth-of-type(5) {
  animation-delay: 4s;
}
.quire-cover__overlay.upper-right img:nth-of-type(6) {
  animation-delay: 2s;
}

.quire-cover__overlay.lower-right img:nth-of-type(1) {
  animation-name: none;
}
.quire-cover__overlay.lower-right img:nth-of-type(2) {
  animation-delay: 12s;
}
.quire-cover__overlay.lower-right img:nth-of-type(3) {
  animation-delay: 10s;
}
.quire-cover__overlay.lower-right img:nth-of-type(4) {
  animation-delay: 8s;
}
.quire-cover__overlay.lower-right img:nth-of-type(5) {
  animation-delay: 6s;
}
.quire-cover__overlay.lower-right img:nth-of-type(6) {
  animation-delay: 4s;
}

.quire-cover__overlay.lower-left img:nth-of-type(1) {
  animation-name: none;
}
.quire-cover__overlay.lower-left img:nth-of-type(2) {
  animation-delay: 14s;
}
.quire-cover__overlay.lower-left img:nth-of-type(3) {
  animation-delay: 12s;
}
.quire-cover__overlay.lower-left img:nth-of-type(4) {
  animation-delay: 10s;
}
.quire-cover__overlay.lower-left img:nth-of-type(5) {
  animation-delay: 8s;
}
.quire-cover__overlay.lower-left img:nth-of-type(6) {
  animation-delay: 6s;
}
.hero-body .container.is-fluid {
  background-color: #b44a3a;
}
.quire-cover__hero .title,
.quire-cover__hero .contributor {
  font-family: "Noto Sans", sans-serif;
  font-weight: normal;
  letter-spacing: 0;
}
.quire-cover__hero .contributor {
  margin-top: 1.5rem;
}

/* add contributors to cover content area for mobile devices only */
.mobile-contributor {
  display: none;
  text-align: center;
  margin-bottom: 1rem;
  font-weight: bold;
}

/* Soften black on down arrow circle */
.quire-cover__more .hero-more {
  background: #333;
}

@media screen and (max-width: 689px){
  .quire-cover__hero {
    overflow: hidden;
  }
  .quire-cover__overlay {
    width: 100%;
    /* make the top images 40% height */
    height: calc((95vh - 3rem) * .4);
    min-height: calc((95vh - 3rem) * .4);
  }
  .quire-cover__overlay img {
    /* show more of the image */
    object-fit: cover;
  }
  .quire-cover__overlay.upper-left,
  .quire-cover__overlay.lower-left {
    left: -50vw;
  }
  .quire-cover__overlay.upper-right,
  .quire-cover__overlay.lower-right {
    margin-right: -50vw;
  }
  .quire-cover__overlay.lower-left,
  .quire-cover__overlay.lower-right {
    top: 40%;
    /* make the bottom images 60% height */
    height: calc((95vh - 3rem) * .6);
    min-height: calc((95vh - 3rem) * .6);
  }
  /* aadjust spacing and display on title/subtitle block */
  .hero-body .container.is-fluid {
    bottom: 0%;
    margin: 0;
    padding-bottom: 40px;
    text-align: center;
  }
  .quire-cover__hero .title {
    margin: 0;
  }
  .quire-cover__hero .subtitle {
    line-height: 1.35;
  }
  /* hide contributor in title block */
  .quire-cover__hero .contributor {
    display: none;
  }
  /* display contributor in content area */
  .mobile-contributor {
    display: block;
  }
}

/* COPYRIGHT PAGE
============================================================================= */

@media print {
  #copyright .quire-page.quire-page--frontmatter {
    page: no-footer;
  }
  #copyright .quire-page__header {
    display: none;
  }
  #copyright .quire-page__content {
    column-count: 2;
    column-gap: .1875in;
    column-fill: auto;
    max-width: 100%;
    height: 100%;
    margin: 0;
    text-align: left;
  }
  #copyright img {
    height: .25in;
  }
}

/* Styling for Ancient Worlds Now logo and tagline */
.awn-logo {
  max-width: 300px;
  margin-top: 6rem;
}
@media print {
  #copyright img[alt="awn-logo"] {
    height: 1.325in;
    position: fixed;
    bottom: 0;
    left: 0;
  }
}

/* GLOSSARY
============================================================================= */
.content ul.quire-glossary__key {
  margin-left: 0;
  text-align: center;
  display: table;
  margin-bottom: 2rem;
}
.quire-page__content .container .content ul.quire-glossary__key li::before {
  content: "";
}
.quire-page__content .container .content ul.quire-glossary__key li {
  margin: .5rem .75rem;
  display: inline-block;
}
.quire-page__content .content dl.quire-glossary {
  margin: 2rem 0;
}
.quire-page__content .content dl.quire-glossary dt {
  display: inline;
  margin-right: .3rem
}
.quire-page__content .content dl.quire-glossary dd {
  display: inline;
}
.quire-page__content .content dl.quire-glossary dd::after {
  content: " ";
  display: block;
  margin-bottom: 1rem;
}


/* PDF OUTPUT
============================================================================= */
@media print {

  .quire-page__content .container .content .footnotes sup {
    line-height: 0;
  }

  /* Accounts for pdf output of cover and first blank page. Numbering
    should alwys start at 1 on the half title page. This negative number
    hack on the cover seems to do the trick */
  .quire-page--frontmatter.quire-cover {
    counter-reset: page -1;
  }

  /* For `type: splash` pages that are only a heading and shouldn't
    have page numbers at the bottom. I added `class: no-footer` to them. */
  @page splash-blank {
    background-color: #f4f4e8;
    @bottom-right {
      content: none;
    }
    @bottom-left {
      content: none;
    }
  }
  .quire-page--no-footer.quire-splash {
    page: splash-blank;
  }

  /* To make backmatter (Bibliography, Glossary and Contributors) two-column */
  .quire-page--backmatter .quire-page__content {
    -moz-column-count: 2;
    column-count: 2;
    -moz-column-fill: balance;
    column-fill: balance;
    -moz-column-gap: .1875in;
    column-gap: .1875in;
    max-width: 100%;
    margin: 0;
  }

  /* Utility classes */
  .remove-from-pdf {
    display: none !important;
  }
  .quire-figure.pdf-two-column {
    column-span: all;
  }
  .quire-figure.pdf-page-break-after {
    page-break-after: always;
  }
  .quire-figure.pdf-page-break-before {
    page-break-before: always;
  }
  .quire-figure.pdf-column-break-after {
    column-break-after: always;
  }
  .quire-figure.pdf-90-percent-width {
    max-width: 90%;
    margin-left: auto;
    margin-right: auto;
  }
  .quire-figure.pdf-80-percent-width {
    max-width: 80%;
    margin-left: auto;
    margin-right: auto;
  }
  .quire-figure.pdf-70-percent-width {
    max-width: 70%;
    margin-left: auto;
    margin-right: auto;
  }
}

/* Special for fig 3.13 */
@media print {
  .content figure.pdf-side-by-side-caption .quire-figure__image {
    width: 70%;
    margin: 0;
    float: left;
    margin-right: 1rem;
  }
  /* .content figure.pdf-side-by-side-caption .quire-figure__modal {
    margin-top: 1rem;
  } */
  .content figure.pdf-side-by-side-caption .quire-figure__modal .quire-figure__label {
    display: block;
    line-height: 1;
    margin-top: .25rem;
  }
  .quire-page__content .container .content figure.pdf-side-by-side-caption ul li:before {
    font-size: .5rem;
    margin-top: .25rem;
  }
}
.content figure.pdf-side-by-side-caption .quire-figure__modal {
  top: .35em;
}

/*
  In instances in the PDF where there is only a little bit of text on the last
  page of chapter, the desired output is to have that text fill just one of the
  two columns and not break across it. This can be acheived by adding

    class: pdf-single-column-last-page

  to the page YAML of the specific pages where this is an issue
*/
@media print {
  .quire-essay.quire-page--pdf-single-column-last-page .quire-page__content,
  .quire-entry.quire-page--pdf-single-column-last-page .quire-page__content {
    column-fill: auto;
  }
}

/* to avoid a bad last page breaks */
@media print {
  #intro .quire-page__content {
    padding-bottom: 1rem;
  }
  #part-two-17 .quire-page__content .content h2#tempera {
    margin-top: 0;
  }
  #part-two-17 .quire-page__content .content h2#encaustic {
    page-break-before: always;
  }
}

/* Fix UL custom bullets */
@media print {
  .quire-page__content .container .content ul li:before {
    font-size: 5pt;
    /* margin-top: 1.4rem; */
    padding-top: .15em;
    margin-left: -1rem;
  }
}
.quire-page__content .container .content ul li:before {
  margin-top: .3rem;
}


/* FIGURES
============================================================================= */


/* Override defualt behaviour of images in grids growing to fit available space
  on the bottom row of the grid, and makes for better spacing around images */
.quire-figure--group__row.columns {
  margin-left: -.5rem;
  margin-right: -.5rem;
}
.quire-figure--group__item {
  padding: .75rem .5rem;
}
.quire-figure--group {
  max-width: 100%;
}
.quire-figure--group .quire-grid--2 {
  max-width: 50%;
}
.quire-figure--group .quire-grid--3 {
  max-width: 33.33%;
}
.quire-figure--group .quire-grid--4 {
  max-width: 25%;
}
.quire-figure--group .quire-grid--5 {
  max-width: 20%;
}
.quire-figure--group .quire-grid--6 {
  max-width: 16.66%;
}


/* TABLES
============================================================================= */

/* general improvments to styling, including to styles for leaflet modal view */
.quire-page__content .container .content table tbody th,
.quire-page__content .container .content table tbody td {
  border-left-width: 0;
  border-right-width: 0;
}
.quire-deepzoom .leaflet-table table th,
.quire-figure.table th {
  background-color: #b44a3a;
  color: white !important;
}
.quire-figure__table {
  padding-bottom: .25rem;
}
.quire-deepzoom .leaflet-table table caption,
.quire-deepzoom .leaflet-table table caption strong,
.quire-figure__table table caption {
  margin-top: 0;
  color: #b44a3a;
}
.quire-page__content table {
  font-size: 1em;
}
.quire-page__content .quire-figure__table .table-key {
  color: #333;
  text-align: left;
  display: block;
  margin: .5em 0;
}
@media print {
  .quire-page__content .quire-figure__table .table-key {
    color: #000;
  }
}
.quire-deepzoom .leaflet-table {
  padding: 0 1.5rem 1.5rem;
}
.quire-deepzoom .leaflet-table table,
.quire-deepzoom .leaflet-table table + .table-key {
  width: 100%;
  margin-bottom: 1rem;
  display: block;
}
.quire-deepzoom .leaflet-table table caption {
  margin: 1.5rem 0;
}

/* Custom styling for Tables 6.1 and 6.2 which include images */
.image-cell img:nth-of-type(1) {
  width: 58%;
  float: right;
}
.image-cell img:nth-of-type(2) {
  width: 38%;
}
.image-cell img:nth-of-type(3) {
  width: 38%;
}
.quire-figure .q-figure__wrapper > a:hover .image-cell img {
  box-shadow: none;
}

/* Formatting key in table 17.1*/
.quire-deepzoom .leaflet-table dl,
.quire-page__content .content .quire-figure__table dl {
  text-align: left;
  margin-top: 1em;
}
.quire-deepzoom .leaflet-table dl dt,
.quire-page__content .container .content .quire-figure__table dl dt {
  float: left;
  margin-right: .5em;
}
.quire-deepzoom .leaflet-table dl dd,
.quire-page__content .container .content .quire-figure__table dl dd {
  margin-bottom: .5em;
}
#table_17_1 tr td sup {
  margin-left: 2px;
  font-size: .875em;
}
#table_17_1 tr.table-penultimate-row td {
  border-bottom: 1px solid #333;
}
#table_17_1 tr.table-ultimate-row td {
  font-weight: bold;
  padding-top: 1.5em;
  padding-bottom: 1.5em;
}
#table_17_1 .two-column-key {
  display: flex;
}

/* For shaded cells */
.tableshading {
  background-color: #e6e6e6;
}
.quire-deepzoom .leaflet-table table tbody tr:hover .tableshading,
.quire-page__content .content tbody tr:hover .tableshading {
  background-color: #dede85;
}
.content table td.vertical-align-middle {
  vertical-align: middle;
}

/* Adjust appearance of footnote numbers for table 4.9 */
.quire-page__content .content table .footnote-ref a {
  font-size: 1em;
  font-weight: normal;
}

.quire-page__content .container .content table tbody th,
.quire-page__content .container .content table tbody td {
  border-left-width: 0;
  border-right-width: 0;
}

/* Hide "Expand" labels used in tables */
@media print {
  .quire-figure.table .quire-figure__modal {
    display: none;
  }
  .content figure .quire-figure__caption {
    min-height: 0;
  }
}


/* URL and EMDASH LINE BREAKS
============================================================================= */

/* Adjust URL breaks in PDF */
@media print {
  /* PrinceXML doesn’t seem to support <wbr> embedded in the URLs as a
  method for suggesting places to break words, instead we're using here
  the prince-text-replace specialty attribute to insert zero-width-spaces */
  a:not([href^="#"]):not([href^="/"]) {
    prince-text-replace: "/" "\200B/"
                          "~" "\200B~"
                          "." "\200B."
                          "," "\200B,"
                          "-" "\200B-"
                          "_" "\200B_"
                          "?" "\200B?"
                          "#" "\200B#"
                          "%" "\200B%"
                          "=" "\200B="
                          "&" "\200B&"
                          "+" "\200B+"
                          "\200B/\200B/" "//\200B" !important;
  }
}

/* Following the same pattern as above, this improves breaking after
em dashes */
@media print {
  body * {
    prince-text-replace: "—" "—\200B";
  }
}

/* Style participants list */

.quire-page__content .container .content .participants-list ul,
.quire-page__content .container .content .participants-list ul li {
  margin-left: 0;
  text-align: center;
}
.quire-page__content .container .content .participants-list ul li::before {
  content: "";
  width: 0;
  margin-left: 0;
}

/* Style copyright notices included at the bottom of each essay */
.quire-page__content .container .content .backmatter.page-copyright-notice {
  margin-top: 3rem;
  padding-top: 1rem;
  border-top: 1px solid #333;
}

/* LOC Cataloguing in Publication format */
.quire-page__content .container .content .cip-data p {
  display: none;
}
.quire-page__content .container .content .cip-data ul {
  margin-left: 0;
  margin-top: 0;
  margin-bottom: 1rem;
}
.quire-page__content .container .content .cip-data ul li {
  line-height: 1.6;
  margin: 0;
  padding-left: 1.5em;
  text-indent: -1.5em;
}
.quire-page__content .container .content .cip-data ul li::before {
  display: none;
}
@media print {
  .quire-page__content .container .content .cip-data {
    column-break-before: always;
  }
}
