/* General CSS */
@font-face {
  font-family: Lora;
  src: url(../fonts/Lora/Lora-VariableFont_wght.ttf);
}

@font-face {
  font-family: Lora-Italic;
  src: url(../fonts/Lora/Lora-Italic-VariableFont_wght.ttf);
}

/* variables */
:root {
  --darkblue: #6a92a0;
  --lightblue: #56b1d2;
  --transp-blue: #56b1d293;
  --lightbrown: #bd9a77;
  --bluegrey: #3c474b;
  --greybrown: #7a736a;
}

body {
  height: 100vh;
  width: 100vw;
  margin: 0;
  overflow: hidden;
}

/* text styling */
h1,
h2,
h3,
h4,
h5,
h6 {
  font-family: Lora, Verdana, Geneva, Tahoma, sans-serif;
  font-weight: 550;
}

p {
  font-family: Lora, "Gill Sans", "Gill Sans MT", Calibri, "Trebuchet MS",
    sans-serif;
  font-weight: 400;
  line-height: 1.5;
}

em {
  font-family: Lora-Italic, "Gill Sans", "Gill Sans MT", Calibri, "Trebuchet MS",
    sans-serif;
  font-weight: 100;
  font-style: italic;
}

a {
  color: var(--lightblue);
  text-decoration: none;
}

/* translate styling */
.translate-btn {
  color: black;
  display: inline;
  text-align: center;
}

.translate-btn::after {
  content: "\00A0";
}

.satz:has(.translate-btn:hover) span {
  background-color: var(--transp-blue);
}

.translate-btn:hover {
  cursor: pointer;
}

a[target="_blank"]:not(.wiki, .geonames)::after {
  content: "➚";
  font-size: smaller;
  vertical-align: text-top;
}

nav a[target="_blank"]::after {
  color: white;
}

a[data-popup]:any-link {
  text-decoration: none;
  color: black;
  border-bottom: 2px dotted var(--bluegrey);
}

a[data-popup]:hover,
a[data-popup].active {
  background-color: var(--bluegrey);
  color: white;
}

.leaflet-popup-content a[target="_blank"]::after {
  color: var(--lightblue);
}

.wiki::after {
  content: "" !important;
  background: url("../icons/wikipedia-logo-svgrepo-com.svg") no-repeat;
  background-size: 13px 13px;
  display: inline-block;
  width: 13px;
  height: 13px;
  margin-left: 2px;
  font-size: smaller;
  vertical-align: middle;
}

.geonames::after {
  content: "" !important;
  background: url("../icons/geonames-icon.svg") no-repeat;
  background-size: 13px 13px;
  display: inline-block;
  width: 13px;
  height: 13px;
  margin-left: 2px;
  font-size: smaller;
  vertical-align: middle;
}

.uncertain {
  display: inline-block;
  width: 18px;
  height: 18px;
  margin-left: 3px;
  vertical-align: baseline;
}

.modalRef {
  text-decoration: underline;
}

.modalRef:hover {
  cursor: pointer;
}

.initial::first-letter {
  font-family: Lora-Italic, "Gill Sans", "Gill Sans MT", Calibri, "Trebuchet MS",
    sans-serif;
  font-size: 2.5em;
  font-weight: 600;
  float: left;
  line-height: 1;
  margin-right: 8px;
}

.highlight {
  animation: highlightAnimation 3s;
}

@keyframes highlightAnimation {
  from {
    background-color: var(--transp-blue);
  }

  to {
    background-color: transparent;
  }
}

.noDisplay {
  display: none;
}

.center {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.satz {
  padding-right: 10px;
}

.satzÜbers {
  border-radius: 2px;
  padding-left: 2px;
}

/* Map Styling */
.leaflet-popup-content {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  flex-wrap: wrap;
  min-width: 320px !important;
}

.leaflet-popup-content * {
  font-family: Lora, Verdana, Geneva, Tahoma, sans-serif;
  font-size: small;
}

.leaflet-popup-content>* {
  margin: 0 !important;
  padding: 5px 0 !important;
}

.leaflet-popup-content h2 span.name {
  font-size: medium;
  font-weight: 400;
}

.leaflet-popup-content .flag {
  width: 20px;
  height: 16px;
  margin: 0;
  padding: 0;
}

.leaflet-popup-content ul {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.leaflet-popup-content p {
  margin: 0;
}

div.leaflet-marker-icon:has(.cluster) {
  background-color: #22222200 !important;
  border: none !important;
}

.cluster {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 25px;
  width: 25px;
  opacity: 100 !important;
  border-radius: 100vh;
  overflow: hidden;
  background-clip: content-box;
  border: solid 5px;
  background-color: rgba(94, 181, 235, 0.75);
  border-color: rgba(94, 181, 235, 0.3);
}

.cluster p {
  padding: 0;
  margin: 0;
  font-family: "Franklin Gothic", "Arial Narrow", Arial, sans-serif;
  font-size: medium;
}

/* map legend */
.legend {
  padding: 6px 8px;
  background: white;
  background: rgba(255, 255, 255, 0.8);
  color: #555;
  border: 2px solid rgba(0, 0, 0, 0.2);
  background-clip: padding-box;
  border-radius: 5px;
}

.legend span,
.legend p {
  display: inline-block;
  /*vertical-align: middle;*/
  font-size: 15px;
  font-family: "Gill Sans", "Gill Sans MT", Calibri, "Trebuchet MS", sans-serif;
  margin: 0;
  bottom: 3px;
  background-color: #ffffff00;
  position: relative;
}

.legend .color {
  content: "";
  display: inline-block;
  margin-right: 5px;
  background-size: 15px 15px;
  width: 15px;
  height: 15px;
  border-radius: 100%;
}

img.icon {
  display: inline-block;
  width: 25px;
  height: 25px;
  margin-right: 5px;
  vertical-align: middle;
}

/* Small and medium devices (phones, tablets 768px or less) */
/* @media only screen and (max-width: 768px) {
  .map-area {
    height: 100vh;
    width: 100vw;
    z-index: 0 !important;
  }

  .text-area {
    height: 100vh;
    width: 100vw;
    background-color: rgba(0, 0, 0, 0.772);
    position: absolute;
    z-index: 1;
    top: 0;
    text-align: center;
    overflow: visible;
  }

  .text-area::-webkit-scrollbar {
    display: none;
  }
} */

/* Large devices (laptops/desktops, 769px and up) */
/* @media only screen and (min-width: 769px) { */

/* Allgemein */
:root {
  --header-height: 50px;
}

.main-area {
  display: grid;
  gap: 0;
  grid-template-areas:
    "header header"
    "text-area map-area"
    "footer footer";
  grid-template-columns: 1fr 1fr;
  grid-template-rows: var(--header-height) calc(100vh - var(--header-height)) auto;
}

.map-area {
  grid-area: map-area;
  z-index: 0 !important;
}

/* Text area styling */
.text-area {
  grid-area: text-area;
  position: relative;
  --side-padding: clamp(30px, 4vw, 12.5%);
  padding: 5% var(--side-padding) 5% var(--side-padding);
  overflow: auto;
  text-align: justify;
  direction: rtl;
}

.text-area * {
  direction: ltr;
}

/* Info Text Syling */
body:has(.info-text) {
  background-image: url("../img/varia/screenshot_karte.png");
  background-size: cover;
}

.info-text {
  width: clamp(450px, 50vw, 75vw);
  height: calc(100% - var(--header-height));
  padding: 0 30px 0 30px;
  background-color: rgba(255, 255, 255, 0.9);
  margin: auto;
  overflow: auto;
}

.info-text ul {
  overflow: auto;
  list-style-type: none;
  padding: 0 0 20px 0;
}

.info-text li {
  margin-bottom: 10px;
  font-size: 115%;
}

.info-text ul .surname {
  font-variant: small-caps;
}

details {
  margin-bottom: 10px;
}

details h3 {
  display: inline;
}

details h4 {
  margin-bottom: -8px;
}

details .textblock {
  margin-top: 10px;
}

.info-text ul.bibl {
  columns: 3;
}

ul.bibl li::before {
  content: "📖";
  margin-right: 5px;
  margin-bottom: 2px;
  vertical-align: baseline;
}

ul.bibl li:hover {
  cursor: help;
}

/* Header & nav Styling */
.main-header,
.main-header * {
  box-sizing: border-box;
}

.main-header {
  grid-area: header;
  background-color: var(--bluegrey);
  color: white;
  overflow: hidden;
  display: flex;
  align-items: center;
  flex-direction: row;
  justify-content: space-between;
}

:not(.main-area) .main-header {
  height: var(--header-height);
}

.title {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  padding: 0px 20px;
  height: 100%;
  width: fit-content;
  border-right: white solid 1.5px;
}

.title * {
  padding: 0;
  margin: 0;
}

.main-header h1 {
  font-size: 1em;
  line-height: 1;
}

.main-header h2 {
  font-size: 0.7em;
  font-weight: 100;
  line-height: 1.1;
}

.mainnav {
  height: 100%;
  padding: 0px 20px;
  display: flex;
  flex: 1;
  flex-direction: row;
  justify-content: space-evenly;
  align-items: center;
}

.mainnav .nav-wrapper {
  display: flex;
  align-items: center;
  border-radius: 5px;
}

.mainnav .aktiv {
  background-color: rgba(255, 255, 255, 0.15);
}

.mainnav a {
  color: white;
  padding: 10px 15px;
  text-align: center;
}

/* Footer styling */
footer {
  grid-area: footer;
}

/* Language selection styling */

.lang-row button {
  height: auto;
  max-width: calc((var(--side-padding) - 10px));
  width: 30px;
  margin: 0;
  background-color: white;
}

.lang-row img {
  width: 100%;
  height: auto;
}

.lang-row {
  position: sticky;
  display: flex;
  flex-direction: column;
  text-align: right;
  z-index: 2;
  top: 0;
  right: 0;
  height: 0;
  margin-right: calc(-1 * var(--side-padding));
  padding-right: 10px;
  align-items: flex-end;
  border: none;
}

.lang-row button:first-child {
  margin-top: calc(-5% + 10px);
}

.lang-row button {
  margin: 0;
  padding: 0;
  margin-bottom: 5px;
  background-color: #ffffff00;
  border-style: hidden;
}

.lang-row button:hover {
  cursor: pointer;
}

/* Modal styling */
.modal {
  background-color: #f9f9f9;
  height: fit-content;
  max-height: 75vh;
  width: min(60vw, 800px);
  overflow-y: auto;
  box-sizing: border-box;
  border-radius: 8px;
}

.modal-background {
  display: none;
  z-index: 98;
  height: 100vh;
  width: 100vw;
  position: absolute;
  top: 0;
  right: 0;
  background-color: #334348ca;
  align-items: center;
  justify-content: center;
}

.modal-content {
  position: relative;
  color: #333333;
}

.modal h2 {
  margin-bottom: 10px;
  font-size: 1.8rem;
  color: #222;
}

.modal h2 span:last-child {
  margin-left: 60px;
}

.modal h3 {
  font-size: 1.25rem;
  color: #555;
}

.modal a[target="_blank"]::after {
  color: var(--lightblue);
}

.modal-header {
  justify-content: space-between;
  align-items: center;
  padding: 0 2.5% 0 2.5%;
}

.modal-header ul {
  list-style: none;
  display: flex;
  gap: 15px;
  padding: 0;
  text-align: left;
}

.otherLang {
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
}

.otherLang>span {
  display: inline-block;
}

.otherLang img.flag {
  width: 20px;
  height: 16px;
  margin-right: 2px;
}

.modal-main {
  background-color: white;
  display: inline-block;
  padding: 10px 2.5% 10px 2.5%;
  text-align: left;
}

.modal-content button {
  position: absolute;
  right: 15px;
  top: 10px;
  font-size: 1.5rem;
  background: none;
  border: none;
}

.modal-content button:hover {
  cursor: pointer;
}

.modal-main figure {
  float: right;
  width: 40%;
  margin: 0 0 0 10px;
}

.modal-main figure img {
  width: 100%;
  border-radius: 10px;
}

.modal-main figure figcaption {
  font-size: smaller;
  font-weight: 600;
}

.modal-sources {
  padding: 10px 2.5% 10px 2.5%;
  text-align: left;
}

.modal-sources ul {
  padding: 0;
  list-style: none;
}

.modal-sources a {
  color: #336699;
  text-decoration: none;
}

.modal-sources a:hover {
  text-decoration: underline;
}

.modal-main .initials {
  text-align: right;
}

.modal::-webkit-scrollbar {
  background-color: #5555553c;
  border-radius: 8px;
  width: 10px;
}

.modal::-webkit-scrollbar-thumb {
  background: #3c3c3c62;
  border-radius: 8px;
}

.cit>p {
  font-size: smaller;
  text-align: right;
  margin-top: -10px;
  margin-right: 40px;
}

.pb {
  display: none;
}

div[lang="is"] .pb {
  display: inline;
}

div[lang="de"] .satzÜbers {
  background-color: var(--transp-blue);
}

div[lang="is"] .deu {
  background-color: var(--transp-blue);
}

.pb:hover {
  cursor: pointer;
}

.modal-background:has(.facs) {
  background-color: #33434886;
}

.modal:has(.facs) {
  display: flex;
  width: 50vw;
  position: absolute;
  right: 0;
  max-height: 100vh;
  background-color: transparent;
}

.facs {
  position: relative;
  margin: 0;
  padding: 0;
  height: 99vh;
}

.modal .facs img {
  max-width: 50vw;
  max-height: 100vh;
  height: 100%;
  border-radius: 15px;
}

.modal .facs figcaption {
  --width: 400px;
  position: absolute;
  bottom: 0;
  left: calc(50% - 20px - var(--width) / 2);
  background-color: white;
  padding: 8px 12px 8px 20px;
  margin-bottom: 10px;
  border-radius: 8px;
  box-shadow: #222222ab 2px 2px 5px;
  height: fit-content;
  width: var(--width);
  text-align: center;
  margin-right: 10px;
}

.facs figcaption button {
  position: absolute;
  left: 0;
  top: 0;
  font-size: medium;
  background-color: transparent;
  border: none;
}

.facs figcaption button:hover {
  cursor: pointer;
}

.facs img:hover {
  cursor: zoom-in;
}

/* Popup styling */
.popup {
  position: relative;
  display: inline;
  cursor: pointer;
}

.popup .popuptext {
  background-color: #555;
  width: 160px;
  color: #fff;
  text-align: center;
  border-radius: 6px;
  padding: 8px 0;
  position: absolute;
  z-index: 1;
  bottom: 125%;
  left: 50%;
  margin-left: -80px;
}

.popuptext a {
  color: white;
}

.leaflet-popup-content h2 {
  display: flex;
  flex-wrap: wrap;
  flex-direction: row;
  justify-content: space-between;
}

span.geo {
  display: inline-block;
  margin-top: 3px;
  vertical-align: auto;

  &::before {
    content: "ᛙ";
    font-size: larger;
    margin-right: 4px;
  }
}

.modal .geo {
  font-size: medium;
}

.classSymbol {
  display: inline-block;
  width: 18px;
  height: 18px;
  margin-right: 5px;
  vertical-align: baseline;
}

.modal .classSymbol,
.modal .uncertain {
  width: 25px;
  height: 25px;
  margin-right: 10px;
}

.leaflet-popup .classSymbol {
  display: none;
}

.it {
  font-style: italic;
}

.info-text p {
  text-align: justify;
}

.info-text figure.right {
  float: right;
  margin: 0 0 6px 12px;
}

figure.r50 {
  width: 50%;
}

figure.r67 {
  width: 67%;
}

.info-text figure.right img {
  width: 100%;
  border-radius: 8px;
}

.info-text figure.right figcaption {
  font-size: smaller;
  font-weight: 600;
}

.info-text .date {
  font-size: smaller;
  text-align: right;
}

li *[title]:hover {
  cursor: help;
}

/* } */