/* FONTS */

@font-face {
  font-family: "Garabosse-Parangon";
  src: url("../fonts/Garabosse/Garabosse-Parangon.woff2") format("woff2");
  font-weight: normal;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Garabosse-Perle";
  src: url("../fonts/Garabosse/Garabosse-Perle.woff2") format("woff2");
  font-weight: normal;
  font-style: normal;
  font-display: swap;
}

/* BASICS */

html,
body,
.index,
.info,
.individualPage,
p {
  margin: 0;
  padding: 0;
  font-family: "Garabosse-Parangon", serif;
  font-size: 1em;
  color: black;
  cursor: url("../cursor/cursor-default.svg") 16 16, auto;
}

button,
a {
  cursor: url("../cursor/cursor-pointer.svg") 0 0, pointer;
}

p {
  cursor: url("../cursor/cursor-text.svg") 16 16, text;
}

button {
  margin: 0;
  padding: 0;
}

/* INDIVIDUAL PAGE */

.individualPage {
  position: relative;
  width: 100vw;
  height: 100vh;
  z-index: 1;
  background-color: rgb(229, 229, 222);
}

.individualPage p,
.infoInner p {
  position: absolute;
  max-width: none;
  hyphens: auto;
  word-break: keep-all;
  overflow-wrap: break-word;
  word-break: normal;
  white-space: pre-wrap;
  transition: color 0.2s ease-in-out, filter 0.2s ease-in-out;
}

.infoInner p {
  white-space: normal;
}

.phrase-near {
  color: rgba(0, 0, 0, 0.5);
  filter: blur(1px);
}

.individualPage h2,
.infoInner h2 {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 1;
  pointer-events: none;
  font-family: "Garabosse-Perle", serif;
  font-size: 2em;
  color: black;
  text-align: center;
  max-width: 250px;
  overflow-wrap: break-word;
  hyphens: auto;
  word-break: normal;
  display: inline-block;
  letter-spacing: 0.3em;
}

.typeImage {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  height: 300px;
  pointer-events: none;
}

.btnLink {
  position: relative;
  width: fit-content;
  display: inline-flex;
}

.btnLink img {
  position: absolute;
  top: 50%;
  left: 50%;
  z-index: -1;
  transform: translate(-50%, -50%);
  opacity: 0.5;
  pointer-events: none;
  transition: transform 0.1s ease, opacity 0.1s ease;
  scale: 1;
  height: 4em;
}
.btnLink:hover img {
  opacity: 1;
  z-index: -1;
}

.phrase-link-button {
  padding: 0;
  margin: 0;
  z-index: 51;
  position: static;
  display: inline;
  letter-spacing: 0.3em;
  background-color: transparent;
  border: none;
  font-size: 1em;
  font-family: "Garabosse-Parangon", serif;
  line-height: inherit;
  white-space: normal;
  text-align: inherit;
  color: black;
}

.phrase-link-button:hover {
  font-family: "Garabosse-Perle", serif;
  font-size: 1em;
  color: black;
}

.phrase-link-no-info:hover {
  font-family: "Garabosse-Parangon", serif;
}

/* INFO BUTTON / OVERLAY */

.info {
  position: absolute;
  inset: 0;
  z-index: 15;
  background-color: #d0c7da;
  display: none;
  overflow: hidden;
}

.infoInner {
  position: relative;
  width: 100%;
  height: 100%;
}

.showInfo {
  display: block;
}

.infoOpen .spaced,
.infoOpen a {
  font-size: 1em;
  letter-spacing: 0.3em;
  color: black;
  text-decoration: none;
}

.infoOpen a:hover {
  font-family: "Garabosse-Perle", serif;
}

.infoOpen #map-button,
.infoOpen #print-button,
.infoOpen #info-button,
.infoOpen #random-button,
.infoOpen #index-button,
.infoOpen #back-button,
.infoOpen #back-random-button {
  display: none !important;
}

.infoOpen #info-close-button {
  display: block;
}

/* INDEX OVERLAY */

.index {
  position: absolute;
  inset: 0;
  z-index: 10;
  background-color: rgb(229, 229, 222);
  display: none;
  overflow: hidden;
  width: 100%;
  height: 100%;
}

body.indexOpen {
  overflow: hidden;
}

.showIndex {
  display: block;
}

.indexOpen p {
  max-width: 150px;
  white-space: normal;
  word-break: break-word;
}

.indexOpen #map-button {
  display: none;
}

.indexOpen #random-button {
  display: none;
}

.indexOpen #index-random-button {
  display: block;
}

.indexOpen #print-button {
  display: none;
}

.indexOpen #index-button {
  display: none;
}

.indexOpen #back-button {
  display: block;
}

.indexOpen #back-random-button {
  display: none !important;
}

/* FILTER BUTTONS -- VEILCHEN */
.filterIcon {
  position: absolute;
  z-index: 100;
  padding: 0;
  margin: 0;
  border: none;
  background: transparent;
  opacity: 0.5;
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.filterIcon.active {
  opacity: 1;
}

.filterIcon img {
  display: block;
  height: 200px;
  width: auto;
  pointer-events: none;
}

.indexLink {
  position: absolute;
}

.indexLink button,
.legende-btn,
.indexLink a {
  position: relative;
  font-size: 1em;
  text-decoration: none;
  z-index: 2;
  background-color: transparent;
  font-family: "Garabosse-Parangon", serif;
  letter-spacing: 0.3em;
  border: none;
  color: black;
}

.indexLink button:hover,
.legende-btn:hover,
.indexLink a:hover {
  font-family: "Garabosse-Perle", serif;
  text-decoration: none;
  font-size: 1em;
  z-index: 50;
}

.indexLink:hover {
  z-index: 40;
}

.indexLink img {
  height: 50px;
  display: inline;
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) scale(1);
  transform-origin: center center;
}

.index-img-normal {
  opacity: 0.5;
  z-index: 1;
  transform: translate(-50%, -50%) scale(1);
}

.index-img-hover {
  opacity: 0;
  z-index: 1;
}

.indexLink button:hover ~ .index-img-normal {
  opacity: 0;
  transform: translate(-50%, -50%) scale(1);
}

.indexLink button:hover ~ .index-img-hover {
  opacity: 1;
  transform: translate(-50%, -50%) scale(1.7);
}

.indexLink a:hover ~ .index-img-normal {
  opacity: 0;
  transform: translate(-50%, -50%) scale(1);
}

.indexLink a:hover ~ .index-img-hover {
  opacity: 1;
  transform: translate(-50%, -50%) scale(1.7);
}

/* SUCHE */

.indexSearch {
  position: fixed;
  top: 0;
  right: 120px;
  z-index: 200;
  margin-top: 10px;
  display: flex;
  gap: 0.5em;
  align-items: center;
  border: none;
}

.indexLink.search-match button {
  text-shadow: 0 0 4px #fcb444, 0 0 10px #fcb444, 0 0 18px #fcb444;
}

.indexLink.search-match .index-img-normal {
  opacity: 1;
}

.indexLink.search-match .index-img-hover {
  opacity: 0.7;
}

#search-input {
  font-family: "Garabosse-Parangon", serif;
  font-size: 1em;
  border: none;
  border-radius: 50px;
  padding: 0 0.5em 0 0.5em;
  background-color: transparent;
}

#search-input::placeholder {
  color: #b593dc;
}

#search-button {
  font-family: "Garabosse-Perle", serif;
  font-size: 1em;
  letter-spacing: 0.3em;
  border: none;
  background-color: transparent;
}

#search-button:hover {
  font-family: "Garabosse-Perle", serif;
  text-decoration: underline;
  text-decoration-style: double;
  text-underline-offset: 3px;
  text-decoration-thickness: 0.05em;
}

/* EASTER EGG SUPPORT INDEX */

#support-index-random-button {
  z-index: 999;
  position: fixed;
  top: 0;
  left: 0;
  margin: 10px;
  display: none;
}

#support-close-button {
  z-index: 999;
  position: fixed;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  margin: 10px;
  display: none;
}

.supportIndex {
  position: absolute;
  inset: 0;
  z-index: 12;
  background-color: #d0c7da;
  display: none;
  overflow: auto;
}

.supportIndexInner {
  position: relative;
  width: 100%;
  height: 100%;
}

.showSupportIndex {
  display: block;
}

.supportIndexOpen #support-close-button {
  display: block;
}

.supportIndexOpen #support-index-random-button {
  display: block;
}

.supportIndexOpen #map-button,
.supportIndexOpen #print-button,
.supportIndexOpen #map-button,
.supportIndexOpen #info-button,
.supportIndexOpen #random-button,
.supportIndexOpen #back-random-button,
.supportIndexOpen #index-button,
.supportIndexOpen #back-button {
  display: none !important;
}

.hover-reveal-wrapper {
  position: relative;
  display: inline-block;
  font-family: "Garabosse-Parangon", serif;
  letter-spacing: 0.3em;
}

/* INFO PAGE MEIN NAME */

.hover-reveal-wrapper:hover {
  font-family: "Garabosse-Perle", serif;
}

.hover-reveal-popup {
  position: absolute;
  left: -75%;
  right: -75%;
  bottom: 1.2em;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
  z-index: 50;
  text-align: center;
}

.hover-reveal-wrapper:hover .hover-reveal-popup {
  opacity: 1;
  font-family: "Garabosse-Perle", serif;
  letter-spacing: 0.3em;
  pointer-events: auto;
}

.hover-reveal-wrapper.revealed .hover-reveal-popup {
  opacity: 1;
  pointer-events: auto;
  font-family: "Garabosse-Perle", serif;
  letter-spacing: 0.3em;
}

/* BUTTONS */

.btnFunctions {
  font-size: 1em;
  font-family: "Garabosse-Perle", serif;
  letter-spacing: 0.3em;
  background-color: transparent;
  border: none;
  color: rgb(177, 177, 171);
  /* filter: blur(1px); */
}

.btnFunctions:hover {
  /* text-decoration: underline;
  text-decoration-style: double;
  text-underline-offset: 3px;
  text-decoration-thickness: 0.05em; */
  color: black;
  filter: none;
}

#random-button {
  z-index: 999;
  position: fixed;
  top: 0;
  left: 0;
  margin: 10px;
}

.has-back-random-btn #random-button {
  left: 20px;
}

#back-random-button {
  z-index: 999;
  position: fixed;
  top: 0;
  left: 0;
  margin: 7px 10px 10px 10px;
  font-family: "Garabosse-Perle" !important;
  font-weight: normal !important;
  font-style: normal !important;
  font-size: 1.2em;
  display: none;
}

#index-random-button {
  z-index: 999;
  position: fixed;
  top: 0;
  left: 0;
  margin: 10px;
  display: none;
}

#index-button {
  z-index: 999;
  position: fixed;
  top: 0;
  right: 0;
  margin: 10px;
}

#back-button {
  z-index: 999;
  position: fixed;
  top: 0;
  right: 0;
  margin: 10px;
  display: none;
}

#print-button {
  z-index: 999;
  position: fixed;
  bottom: 0;
  right: 0;
  margin: 10px;
}

#map-button {
  z-index: 999;
  position: fixed;
  bottom: 0;
  left: 0;
  margin: 10px;
}

#map-close-button {
  z-index: 999;
  position: fixed;
  bottom: 0;
  left: 0;
  margin: 10px;
  display: none;
}

#info-button {
  z-index: 999;
  position: fixed;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  margin: 10px;
}

#info-close-button {
  z-index: 999;
  position: fixed;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  margin: 10px;
  display: none;
}

/* MAP OVERLAY */

#map {
  position: fixed;
  inset: 0;
  height: 100vh;
  width: 100vw;
  z-index: 20;
  display: none;
  padding: 0;
  background-color: saddlebrown;
}

body.mapOpen #map {
  display: block;
}

body.mapOpen #map-button {
  display: none;
}
body.mapOpen #map-close-button {
  display: block;
}

/* PRINT OVERLAY */

.printOverlay {
  position: fixed;
  inset: 0;
  z-index: 20;
  background-color: rgb(229, 229, 222);
  display: none;
  overflow: auto;
}

.printOverlayInner {
  position: relative;
  max-width: calc(100vw - 120px);
  font-family: "Garabosse-Parangon", serif;
}

.printOverlay h2 {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 1;
  font-family: "Garabosse-Perle", serif;
  font-size: 2em;
  text-align: center;
  letter-spacing: 0.3em;
}

.calltoaction {
  z-index: 999;
  position: fixed;
  display: block;
  left: 50%;
  transform: translateX(-50%);
  text-align: center;
  margin: 10px;
  font-size: 1em;
}

.printSelection {
  margin-top: 10px;
  position: relative;
  width: 100%;
  height: calc(100vh - 200px);
}

.printSelectionItem {
  position: absolute;
  display: inline-flex;
  align-items: center;
  gap: 0.3em;
  font-size: 1em;
  cursor: pointer;
  transition: opacity 0.2s ease-in-out;
}

.printSelectionItem input[type="checkbox"] {
  position: absolute;
  opacity: 0;
  pointer-events: none;
  z-index: 3;
}

.printSelectionFlower {
  height: 50px;
  display: inline;
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) scale(1);
  transform-origin: center center;
  z-index: 2;
  pointer-events: none;
}

.printSelectionItem span {
  font-size: 1em;
  pointer-events: none;
  z-index: 3;
}

#print-cancel-button {
  z-index: 999;
  position: fixed;
  display: block;
  bottom: 0;
  right: 0;
  margin: 10px;
}

.printSelectionItem:not(.selected) {
  opacity: 0.5;
}

.printSelectionItem.selected {
  opacity: 1;
}

body.printOverlayOpen #random-button,
body.printOverlayOpen #back-random-button,
body.printOverlayOpen #index-random-button,
body.printOverlayOpen #support-index-random-button,
body.printOverlayOpen #support-close-button,
body.printOverlayOpen #index-button,
body.printOverlayOpen #back-button,
body.printOverlayOpen #map-button,
body.printOverlayOpen #info-button,
body.printOverlayOpen #info-close-button {
  display: none !important;
}

body.printOverlayOpen #print-button {
  display: none !important;
}

body.printOverlayOpen #print-overlay {
  display: block;
}

#print-collection {
  display: none;
}

/* PRINT LAYOUT */

@page {
  size: 148mm 148mm;
}

@media print {
  body > *:not(#print-collection) {
    display: none !important;
  }

  #print-collection {
    display: block;
  }

  .print-page {
    box-sizing: border-box;
    position: relative;
    width: 148mm;
    height: 148mm;
    padding: 5mm;
    break-after: page;
    font-family: "Garabosse-Parangon", serif;
    font-size: 8pt;
    line-height: 11pt;
    background-color: white;
  }

  .print-page:last-child {
    break-after: auto;
  }

  .print-corner {
    position: absolute;
    width: 32mm;
    height: 32mm;
    pointer-events: none;
  }

  .print-corner.top-left {
    top: 5mm;
    left: 5mm;
  }
  .print-corner.top-right {
    top: 5mm;
    right: 5mm;
  }
  .print-corner.bottom-left {
    bottom: 5mm;
    left: 5mm;
  }
  .print-corner.bottom-right {
    bottom: 5mm;
    right: 5mm;
  }

  .print-page h2 {
    font-family: "Garabosse-Perle", serif;
    font-size: 14pt;
    line-height: 14pt;
    position: absolute;
    text-align: center;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    transform-origin: 50% 50%;
    max-width: 60mm;
    overflow-wrap: break-word;
    hyphens: auto;
    word-break: normal;
    display: inline-block;
    letter-spacing: 0.3em;
  }

  .print-page p {
    position: absolute;
    margin: 0;
    max-width: 75mm;
    word-break: keep-all;
    overflow-wrap: break-word;
    word-break: normal;
    white-space: pre-wrap;
  }

  .print-page:not(.print-selected) {
    display: none !important;
    page-break-after: auto;
  }
}
