/* @import "bootstrap.css"; */

@import "tufte.css"; /* see https://edwardtufte.github.io/tufte-css/ */

/* Use the same fonts as aarkiv.se */
@font-face {
  font-family: Arvo;
  src: url(../fonts/Arvo/Arvo-Regular.ttf) format(truetype);
}
@font-face {
  font-family: Arvo;
  src: url(../fonts/Arvo/Arvo-Bold.ttf) format(truetype);
  font-weight: bold;
}
@font-face {
  font-family: Arvo;
  src: url(../fonts/Arvo/Arvo-Italic.ttf) format(truetype);
  font-style: italic;
}
@font-face {
  font-family: Josefin Sans;
  src: url(../fonts/Josefin_Sans/JosefinSans-VariableFont_wght.ttf) format(truetype);
}
@font-face {
  font-family: Josefin Sans;
  src: url(../fonts/Josefin_Sans/JosefinSans-Italic-VariableFont_wght.ttf) format(truetype);
  font-style: italic;
}

/*  Make certain elements non-selectable to make it easy to copy the text */
.linenumber, .pagenumber, .sidenote, img {
    user-select: none;
    -webkit-user-select: none;
    -ms-user-select: none;
}

body {
    color: #111;
    width: 100%;
    max-width: none;
    font-family: 'Arvo', 'Palatino','Palatino Linotype','Palatino LT STD','Book Antiqua','Georgia,serif';
    padding: 0;
    margin: 0;
}

header {
    padding: 2rem 1rem 1rem 1rem;
    position: fixed;
    top: 0;
    z-index: 100;
    background-color: #111;
    color: #fffff8;
    width: 100%;
    border-bottom: 3px solid red;
}
#header {
    max-width: 1180px;
    margin: auto;
}
header img {
  width: min(5rem,10vw);
  float: left;
  margin-top: 0;
  margin-left: auto;
  position: relative;
}
header img.elma {
    float: right;
}

#sitenav {
    text-align: center;
    margin: 0 auto;
    padding-top: 2rem;
    max-width: 1180px;
    font-size: min(1.1rem,3vw);
    line-height: 1.5rem;
}
#sitenav a {
    padding: 2rem;
    text-decoration: none;
}
#sitenav a:visited {
    color: #fffff8;
}
#sitenav a:hover {
    color: grey;
}
#sitenav a.active {
    color: grey;
}

main {
    position: relative;
    top: 12rem;
    font-size: 1.1rem;
    line-height: 1.5rem;
}

.container {
    max-width: 1180px;
}

footer {
    width: 100%;
    position: relative;
    border-top: 3px solid red;
    padding: 1rem;
    margin-top: 12rem;
    background-color: #111;
    color: #fffff8;
}
footer a {
    margin-left: 2rem;
}

h1 {
    margin: 0;
    text-decoration: underline 3px red;
    text-underline-offset: .4em;
    font-family: 'Josefin Sans', 'Palatino','Palatino Linotype','Palatino LT STD','Book Antiqua','Georgia,serif';
    font-size: min(3rem,4vw);
}

* h1, h2, h3, nav, footer {
    text-align: center;
}

p {
    font-size: 1.0rem;
    line-height: 1.5rem;
    margin-top: 0.4rem;
    margin-bottom: 1.4rem;
    padding-right: 0;
    vertical-align: baseline;
}
p:has(.verse), p:has(.list) {
    margin-top: -1.5rem; /* to counteract the <br> before the first line in lists */
}

/* style sidenotes and marginnotes for the different views */
.sidenote, .marginnote {
    margin-right: -45%;
    width: 40%;
    font-size: .8rem;
    text-indent: initial;
}
.sidenote-number::after, .sidenote::before {
    font-family: inherit;
    font-size: .8rem;
}
.sidenote a {
    text-decoration: underline;
}
.diplomatic .sidenote {
    margin-right: 0;
    width: 30%
}
/*  fix the layout for the sidenotes */
label {
    text-indent: initial;
    margin: 0;
}

/*  styles for the diplomatic view */
.diplomatic .delPencil {
    color: gray;
}
.diplomatic .delInk {
    color: red;
}

/*  styles for the introduction and the full text view */
.fulltext, .intro {
    width: 55%;
    margin-left: 15%;
    padding-bottom: 2rem;
}

/*  styles for the introduction */
.intro img {
    margin-bottom: 1rem;
}

/*  styles for the full text view */
.fulltext .marginnote {
    float: left;
    clear: left;
    margin-left: -30%;
    font-size: .8rem;
}
.fulltext .thumbnail {
    width: 100px;
}
.fulltext .notes p {
    padding-bottom: 1.2rem;
}
.fulltext .delInk {
    display: none; /* don't display deleted sections in full text view */
}

/*  styles for double and triple underlines */
u.double {
    text-decoration-style: double;
}
u.triple {
	border-bottom: 3px double;
	line-height: 1.7em;
}

.indent {
    margin-left: 2em;
}

/* fix indentation in already indented sections */
.indent .indent {
    margin-left: 4em;
}

/*  fix weird strike-through behaviour on Firefox and add colour */
del {
  text-decoration: underline .1em;
  text-underline-offset: -.3em;
  text-decoration-skip-ink: none;
  text-decoration-color: red;
}

/* style the tei <unclear> element */
.unclear::before {
    content: "{";
}
.unclear::after {
    content: "?}";
}

/*  make line numbers and page numbers gray and smaller */
.linenumber {
    margin-right: 2rem;
    color: gray;
    font-size: .8rem;
    }
.pagenumber {
    color: gray;
    font-size: .8rem;
    text-align: center;
    margin: 0;
}

/*  for handShift */
.pencil {
    color: gray;
}
.ink {
    color: initial;
}

/* make sure that <emph> inside a <choice> gets italicized when needed */
em, em .choice {
    font-style: italic;
}

.copyright_logos, .copyright_text {
    display: inline;
}

.copyright_logo {
    width: 2rem;
}

/* styles pertaining to images */
.thumbnail {
    margin: 5px;
    width: 250px;
    opacity: .5;
}
.thumbnail:hover {
    opacity: 1;
}

.img-full {
    position: relative;
}
.img-full:hover {
    position: relative;
    transform: scale(1.5);
    z-index: 1000;
    transition-delay: .5s;
    cursor: alias;
}

* {
    transition: .5s ease-in-out; /* create smooth transitions */
}

/* create tooltips from choice elements – from https://codepen.io/deineko/pen/YZeQJP */
.choice {
  display: inline-block;
  position: relative;
  cursor: pointer;
/*  color: #3bb4e5; */
  border-bottom: 0.05em dotted #111111; /* #3bb4e5; */
  box-sizing: border-box;
  font-style: normal;
  transition:all .5s ease-in-out
}
.choice:hover {
    color:#069;border-bottom:0.05em dotted #069;
}

/* the tip */
.choice:before {
  content: attr(data-title);
  font-size: 14px;
  position: absolute;
  background: rgba(10, 20, 30, 0.85);
  color: #fff;
  line-height: 1.2em;
  padding: 0.5em;
  font-style: normal;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
  min-width: 120px;
  text-align: center;
  opacity: 0;
  visibility: hidden;
  transition: all .3s ease-in-out;
  text-shadow: 1px 1px 1px rgba(0, 0, 0, 0.5);
  font-family: sans-serif;
  letter-spacing: 0;
  font-weight: 600
}
.choice:after {
  width: 0;
  height: 0;
  border-style: solid;
  content: '';
  position: absolute;
  opacity: 0;
  visibility: hidden;
  transition: all .3s ease-in-out
}
.choice:hover:before,
.choice:hover:after {
  visibility: visible;
  opacity: 1
}
/*top*/
.choice:before {
  top: 0;
  left: 50%;
  transform: translate(-50%, calc(-100% - 8px));
  box-sizing: border-box;
  border-radius: 3px;
}
.choice:after {
  border-width: 8px 8px 0 8px;
  border-color: rgba(10, 20, 30, 0.85) transparent transparent transparent;
  top: -8px;
  left: 50%;
  transform: translate(-50%, 0);
}
/*bottom*/
.tooltip.bottom:before {
  bottom: 0;
  left: 50%;
  transform: translate(-50%, calc(100% + 8px));
  box-sizing: border-box;
  border-radius: 3px;
}
.tooltip.bottom:after {
  border-width: 0 8px 8px 8px;
  border-color: transparent transparent rgba(10, 20, 30, 0.85) transparent;
  bottom: -8px;
  left: 50%;
  transform: translate(-50%, 0);
}
/*left*/
.tooltip.left:before {
  left: 0;
  top: 50%;
  transform: translate(calc(-100% - 8px), -50%);
  box-sizing: border-box;
  border-radius: 3px;
}
.tooltip.left:after {
  border-width: 8px 0 8px 8px;
  border-color: transparent transparent transparent rgba(10, 20, 30, 0.85);
  left: -8px;
  top: 50%;
  transform: translate(0, -50%);
}
/*right*/
.tooltip.right:before {
  right: 0;
  top: 50%;
  transform: translate(calc(100% + 8px), -50%);
  box-sizing: border-box;
  border-radius: 3px;
}
.tooltip.right:after {
  border-width: 8px 8px 8px 0;
  border-color: transparent rgba(10, 20, 30, 0.85) transparent transparent;
  right: -8px;
  top: 50%;
  transform: translate(0, -50%);
}

/* Adds dark mode */
@media (prefers-color-scheme: dark) {
    body {
        background-color: #151515;
        color: #ddd;
    }
}