/* For Webkit browsers */
::-webkit-scrollbar {
  -webkit-appearance: none;
  width: 10px;
  height: 10px;
}

::-webkit-scrollbar-track {
  background-color: #f1f1f1;
}

::-webkit-scrollbar-thumb {
  background-color: #8a2be2;
  border-radius: 10px;
  border: 2px solid #fff;
}

::-webkit-scrollbar-thumb:hover {
  background-color: #7a1fa2;
}

/* For Firefox */
html {
  scrollbar-color: #8a2be2 #f1f1f1; /* thumb and track colors */
  scrollbar-width: thin; /* Optional: sets the width of the scrollbar */
}

@font-face {
  font-family: "font";
  src: url(/user/themes/quarkcopy/fonts/Lineal-Light.woff);
}

@font-face {
  font-family: "font2";
  src: url(/user/themes/quarkcopy/fonts/Lineal-Regular.woff);
}

body,
a {
  color: blueviolet;
  font-family: "font";
  font-weight: 300;
}

p {
  line-height: 130%;
}

li {
  list-style: none;
}

/* For the <span> tag inside <a> */
span:not(
    #hover-text,
    #markercounter,
    #filter-display span,
    #filter-container span,
    .leaflet-popup-content p span,
    #popupmapswitch,
    #popupmapswitch span,
    #close-link,
    #filter-close-link
  ) {
  display: inline; /* Ensures proper behavior within the <a> */
  height: 0% !important; /* Prevents the span from having extra line-height */
  vertical-align: middle; /* Align it vertically with the text */
  margin: 0;
  padding: 0;
}

/* Prevent color change when the span is focused */
span:focus {
  color: inherit; /* Ensures color stays the same as the parent element */
  outline: none; /* Optionally remove the focus outline if desired */
}

#markercounter-container {
  overflow: hidden;
}

#markercounter {
  background-color: pink;
  font-size: 2rem;
  z-index: 9999;
  font-family: "font";
  cursor: pointer;
  display: none;
  transition: all 0s ease-in-out;
  user-select: none;
}

#hover-text {
  display: none;
  overflow: hidden; /* Ensures the clipping effect is visible */
  position: relative;
  height: 2.2rem;
  padding: 0;
  align-items: center;
}

#markercounter-container span:hover {
  background-color: rgb(245, 255, 58);
}

#markercounter-container:hover #hover-text {
  display: inline-block;
  animation: moveText 1s infinite; /* Apply the text movement animation */
}

@keyframes moveText {
  0% {
    transform: translateY(100%);
  }

  25% {
    transform: rotate(5deg);
  }

  75% {
    transform: rotate(-5deg);
  }

  100% {
    transform: translateY(-100%) rotate(-10deg); /* Moves the text upwards */
  }
}

#markercounter-container:hover #markercounter {
  display: none !important;
}

#intro {
  position: relative;
  column-count: 2;
  width: 98%;
  padding-top: 5rem !important;
  padding-bottom: 10rem;
  max-width: 108rem;
  gap: 4rem;
  z-index: 5;
  margin: auto;
}

#intro p {
}

#intro strong,
#about strong {
  background-color: yellow;
  font-family: "font";
  font-size: 1.55rem;
  font-weight: 300;
}

ul {
  padding: 0;
}

#intro li {
  max-width: 90%;
  line-height: 135%;
  margin-bottom: 0.7rem;
}

#intro li span {
  background-color: pink;
}

#intro h2 {
  text-align: right;
  width: 100%;
  display: block;
  font-family: "font";
}

#intro h2 span {
  background-color: pink;
}

#about {
  opacity: 0;
  margin: auto;
  margin-top: 200vh;
  padding-bottom: 0rem;
  position: sticky;
  bottom: 0;
  width: 98%;
  overflow-x: hidden;
  height: 100%;
  z-index: 5;
}

.block-content {
  column-count: 2;
  max-width: 105rem;
  column-gap: 4rem;
  margin: auto;
}

#citations {
  width: 60%;
  padding-top: 4rem;
  max-width: 50rem;
}

.block-content p,
figure,
#intro p {
  break-inside: avoid;
}
/* Remove top margin for the first paragraph in each .block-content */
.block-content p:first-child {
  margin-top: 0;
}

#about-start {
  margin-bottom: 3rem;
}

h2 {
  margin-right: 52%;
  max-width: 48vw;
  text-align: right;
  font-size: 2.3rem;
  font-weight: 400;
  line-height: 115%;
  font-family: "font";
}

p,
li {
  font-size: 1.4rem;
  hyphens: auto;
  text-align: left;
  font-weight: 300;
  overflow-wrap: break-word;
  word-wrap: break-word;
  font-family: "Lexend";
  color: blueviolet;
}

.footnotes span {
  background-color: orange;
  font-family: "font";
}

sup {
  background-color: orange;
  padding: 0.1rem;
  line-height: 0%;
  font-size: 1.2rem;
  font-family: "font";
}

#references {
  margin-top: 5rem;
  margin-bottom: 5rem;
  margin-left: 0%;
}
#references h2 {
  margin-left: 0%;
  text-align: right;
  width: 100%;
  margin-right: 0;
  max-width: 100%;
}

.reference-links {
  margin: auto;
  text-align: right;
  line-height: 120%;
  font-size: 2.1rem;
}

.reference-links span {
  background-color: orange;
}

.reference-links a {
  text-decoration: none;
}

.text-image-container {
  position: relative;
  display: block;
}

.text-image-container figure {
  padding: 0;
  overflow-x: hidden;
  opacity: 0;
  margin-top: 0;
  margin-left: 2rem;
  width: 96% !important;
  height: auto;
  transition: 1s ease-in-out;
  display: block;
}

.text-image-container img {
  width: 100%;
  height: auto;
}

.text-image-container figure.visible {
  opacity: 1;
  margin-left: 0%;
  transition: 0.4s ease-in-out;
}

.text-image-container figcaption {
  text-align: left;
  font-family: "Lexend";
  margin-top: 0.3rem;
  font-size: 1.4rem;
  color: blueviolet;
  display: block;
  line-height: 135% !important;
}

aside span {
  background-color: rgb(170, 255, 0);
}

#animated-title {
  position: fixed;
  top: 33%;
  right: 0.8vw;
  z-index: 100;
  display: flex;
  font-size: 6.475vw;
  overflow: hidden;
  font-weight: 500;
  cursor: pointer;
  transition: 0.7s ease;
  font-family: "font2";
}

#animated-title span {
  display: inline-block;
  background-color: rgb(245, 265, 58);
  transform: translateY(var(--random-offset));
  animation-play-state: paused;
  opacity: 1; /* Ensure initial opacity is set to 1 */
  animation: flicker var(--random-duration) ease-in-out infinite;
}

/* Flicker animation */
@keyframes flicker {
  0%,
  100% {
    transform: translateY(
      var(--random-offset)
    ); /* Maintain random Y translation */
    opacity: 1;
  }
  50% {
    transform: translateY(
      calc(var(--random-offset) + 0.2rem)
    ); /* Slightly offset the Y translation at 50% */
    opacity: 0.1;
  }
}

span,
strong {
  background-color: rgb(170, 255, 0); /* Greenish background for span */
}

#filter-display {
  display: none;
  position: fixed;
  bottom: 1.5rem;
  width: 100vw;
  transition: transform 0.2s ease-in-out;
  left: 0;
  right: 0;
  padding: 1rem;
  z-index: 1;
  overflow-x: auto; /* Enable horizontal scrolling */
  scrollbar-width: none !important; /* Hide scrollbar in Firefox */
  scrollbar-color: transparent !important;
  -ms-overflow-style: none !important; /* Hide scrollbar in IE/Edge */
}
#filter-container {
  scrollbar-width: none; /* Hide scrollbar in Firefox */
  -ms-overflow-style: none; /* Hide scrollbar in IE/Edge */
}

/* Hide scrollbar in Webkit browsers (Chrome, Safari) */
#filter-display::-webkit-scrollbar,
#filter-container::-webkit-scrollbar {
  display: none;
  width: 0 !important; /* Hide scrollbar thumb */
}

#filter-display-content {
  display: flex;
  overflow-x: visible;
}

#filter-display p {
  margin: 0;
  font-size: 1.4rem;
}

.filter-item,
.reset-filter {
  background-color: pink;
}

/* Container for selected filters */
#selected-filters-list {
  margin-top: 1rem;
  font-size: 1.4rem;
  font-family: "lexend";
  display: flex; /* Make the container a flex container */
  white-space: nowrap;
  -webkit-overflow-scrolling: touch;
  gap: 0.5rem; /* Space between selected filters */
  width: auto;
  scrollbar-width: none !important; /* Hide scrollbar in Firefox */
  scrollbar-color: transparent !important;
  -ms-overflow-style: none !important; /* Hide scrollbar in IE/Edge */
  overflow-x: visible;
  justify-content: flex-end;
  flex-direction: row-reverse;
}

/* Hide scrollbar in Webkit browsers (Chrome, Safari) */
#selected-filters-list::-webkit-scrollbar {
  display: none !important;
}

/* Each selected filter */
.selected-filter {
  background-color: #f5f5f5;
  padding: 0.5rem 1rem;
  border-radius: 3px;
  display: inline-flex; /* Ensure it’s an inline flex item */
  align-items: center;
  font-size: 1.2rem;
}

/* Style for reset button in each selected filter */
.selected-filter .reset {
  margin-left: 0.5rem;
  cursor: pointer;
}

@keyframes flicker {
  0%,
  100% {
    margin-top: -0.2rem;
    opacity: 1;
  }
  50% {
    margin-top: 0.2rem;
    opacity: 0.1;
  }
}

#closeentry {
  display: none;
  font-weight: 200;
  padding-right: 0.2rem;
  font-size: 1.5rem;
  cursor: pointer;
}

#popupmapswitch {
  position: fixed;
  display: none;
  left: 0.5rem;
  bottom: 2.5rem;
  z-index: 3000;
  font-size: 1.4rem;
  cursor: pointer;
  background-color: rgb(211, 211, 211);
}

#popupmapswitch span {
  background-color: rgb(211, 211, 211);
}

#popupsignal {
  margin-right: 0.2rem;
}

#mapsignal.active,
#popupsignal.active {
  background-color: pink;
}

/* Map container styling */
#map {
  position: absolute;
  top: 0;
  right: 0;
  z-index: 1;
  height: 100vh;
  box-shadow: 0px -4px 100px lightgrey;
  width: 100vw; /* Full width */
}
#map img:not(.leaflet-marker-icon):not(.leaflet-marker-shadow) {
  filter: contrast(1.2) hue-rotate(90deg);
}

span {
  background-color: rgb(245, 255, 58);
}

.leaflet-popup-tip-container {
  width: 80px;
  height: 20px;
  position: absolute;
  left: 50%;
  margin-left: -40px;
  overflow: hidden;
  pointer-events: none;
  transform: scaleY(2);
  margin-top: 2%;
}

.leaflet-popup-content {
  width: 28rem !important;
  margin: 0;
}

.leaflet-popup-tip-container {
  width: 80px;
  height: 20px;
  position: absolute;
  left: 50%;
  margin-left: -40px;
  overflow: hidden;
  pointer-events: none;
  transform: scaleY(3.5) scaleX(2);
  margin-top: 5.2%;
}

.leaflet-popup-tip {
  background: white;
  color: #333;
  box-shadow: 1px 0px 100px lightgrey;
}

.leaflet-popup-content-wrapper {
  padding: 0.5rem;
  border-radius: 0rem;
  box-shadow: 1px 0px 100px lightgrey;
}
/* Style the tooltip */
.leaflet-tooltip {
  font-size: 1.5rem; /* Same as the h3 tag */ /* Optional: To add some space inside the tooltip */
  border-radius: 0; /* Rounded corners */
  color: blueviolet;
  padding: 0;
  font-family: "font";
  box-shadow: none;
  background-color: pink;
  border: none;
  height: 0rem;
  top: -2.5rem;
  transition: opacity 0s ease-in-out;
}

.leaflet-tooltip-tip-container {
  background-color: pink !important;
  transform: scale(3);
  display: none !important;
}

/* Ensure the h3 inside the tooltip has the same size and style */
.leaflet-tooltip h3 {
  padding: 0rem;
  margin: 0;
  font-size: inherit; /* Inherit the font size from the tooltip */
  margin: 0; /* Remove any default margins from h3 */
}
.leaflet-tooltip span {
  background-color: pink; /* Dark background */
}

.leaflet-tooltip-top::before {
  display: none;
}

.leaflet-popup-content {
  font-weight: 300;
  font-family: "lexend", sans-serif !important;
  color: blueviolet;
  text-align: center;
}

.leaflet-container a.leaflet-popup-close-button {
  font: 18px/16px "font";
  font-weight: normal;
  font-size: 18px;
  margin: 0.5rem;
  font-weight: 200;
  transform: scale(1.1);
  padding-right: 0rem;
  font-size: 1.4rem;
  cursor: pointer;
  color: blueviolet;
  background-color: pink;
  padding: 0.3rem;
  padding-left: 0.1rem;
  padding-right: 0.1rem;
}

.leaflet-container a.leaflet-popup-close-button:hover {
  color: blueviolet;
}

.leaflet-popup-content h3 {
  text-align: center;
  font-size: 2rem;
  font-family: "font", sans-serif !important;
  font-weight: 200;
  width: 92%;
  margin-left: 4%;
  line-height: 115%;
  margin-bottom: 1rem;
  margin-top: 1.6rem;
}

.leaflet-popup-content p {
  margin: 0.5rem 0rem 0.5rem 0rem;
  text-align: center;
  font-size: 1.4rem;
}

.adress {
  margin-bottom: 1.3rem !important;
  hyphens: none;
}

.leaflet-popup-content li {
  text-align: center;
  list-style: none;
}

.leaflet-popup-content span:not(.leaflet-popup-content h3 span) {
  display: inline-block;
  text-wrap: nowrap;
  margin-top: 0.4rem !important;
}

.legal {
  margin-right: 0rem;
  background-color: #a9eaff;
}

.duration {
  display: none;
}

.year span {
  background-color: #e2daff;
}

.end {
  margin-bottom: 1.6rem !important;
}

.end span {
  background-color: #d6e5d8;
  white-space: nowrap;
  display: inline-block;
}

.type span,
.tags .type {
  background-color: rgb(222, 255, 63);
}

.leaflet-popup-content ul {
  padding-left: 0;
}

/* Styles when a popup or filter is open */
#map.popup-open {
  padding-right: 53% !important;
  right: -22.5% !important;
  width: 50% !important;
  transition: 0.2s ease-in-out;
}

#map.open {
  padding-right: 35%;
  right: -22.5%;
  width: 70%;
  transition: 0.3s ease-in-out;
}

.popup {
  position: absolute;
  top: 0;
  left: 0;
  background-color: white;
  box-shadow: 1px 0px 100px lightgrey;
  width: 43vw;
  height: 100%;
  overflow: hidden;
  z-index: 4;
  -ms-overflow-style: none;
  transform: translateX(-150%);
  transition: 0.3s ease;
}

.popup strong {
  background-color: pink;
  font-weight: 300;
  line-height: 140%;
}

.popup sup {
  display: block;
  font-size: 1.1rem;
  line-height: 130%;
  transform: translateY(-0%);
  background: pink;
  width: auto;
  margin-top: -1rem;
}

.text-image-container sup {
  display: block;
  font-size: 1.1rem;
  line-height: 130%;
  transform: translateY(-0%);
  background: rgb(170, 255, 0);
  width: auto;
  margin-top: -1rem;
}

.popup #references {
  margin-top: 4rem;
}

.popup.open {
  transform: translateX(0%);
}

#filter-container {
  position: absolute;
  top: 0;
  left: 0;
  background-color: white;
  box-shadow: 1px 0px 100px lightgrey;
  width: 33vw;
  min-width: 33rem;
  height: 100%;
  overflow: auto;
  transform: translateX(-140%);
  z-index: 1000;
  -ms-overflow-style: none;
  transition: transform 0.3s ease;
}

#filter-container.open {
  transform: translateX(0%);
}

.popup img {
  width: 100%;
}

.popup h2 {
  margin-top: 3.5rem;
  width: 100%;
}

.leaflet-control-attribution {
  opacity: 0;
  transition: 0.5s ease;
  position: fixed;
  z-index: 10;
  bottom: 0;
  right: 0;
  padding-right: 0.7rem;
  font-size: 1rem !important;
  background-color: pink !important;
  color: blueviolet !important;
}

.leaflet-container {
  font: 1rem "font", Arial, Helvetica, sans-serif !important;
}
.leaflet-control-attribution a {
  color: blueviolet !important;
}

.popup-scroll {
  -ms-overflow-style: none; /* Disables scrollbar in IE and Edge */
  overflow: hidden; /* Hides scrollbar while still allowing scrolling */
  padding-right: 1rem;
  padding-top: 1rem;
  margin-bottom: 1rem !important;
  padding-left: 1rem;
  height: 100%;
  -webkit-mask-image: linear-gradient(
    transparent 0%,
    black 3%,
    black 97%,
    transparent 100%
  );
  mask-image: linear-gradient(
    transparent 0%,
    black 3%,
    black 97%,
    transparent 100%
  );
  overflow-y: scroll; /* Make sure the content is scrollable vertically */
  /* For Firefox */
  scrollbar-width: none; /* Hides scrollbar in Firefox */
}

/* Hide scrollbar for Chrome, Safari, and Opera */
.popup-scroll::-webkit-scrollbar {
  display: none; /* Hides the scrollbar */
}

.popup-scroll::-webkit-scrollbar {
  width: 0; /* Hide scrollbar thumb */
}

/* Optionally style the zoom control container */
.leaflet-control-zoom {
  display: none;
  background-color: #4caf50; /* Green background */
  border: 2px solid #fff; /* White border */
  color: #fff; /* White text */
}

#map-container {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 1;
  width: 100vw;
  height: 100vh;
  margin: auto;
  transition: opacity 0.4s ease-in-out, filter 0.4s ease-in-out;
  padding: 0;
  overflow: hidden;
  cursor: default;
  scroll-snap-align: start;
}

#archive {
  height: 100vh;
  width: 100%;
}

#map-container h2 span,
#map-container h3 span {
  background-color: pink;
}

.struktur {
  background-color: beige;
}

.leaflet-marker-icon {
  animation: markerplop var(--animation-duration) ease-in-out infinite;
  transform-origin: center; /* Prevent jumping */
  transition: opacity 0.1s ease-in-out;
}

@keyframes markerplop {
  0% {
    opacity: 0.2;
  }
  50% {
    opacity: 1;
  }
  100% {
    opacity: 0.2;
  }
}

.inverted {
  filter: invert(1) saturate(0.2);
  animation-duration: 0s !important;
}

.leaflet-tooltip-top.inverted {
  visibility: hidden;
  display: block;
  opacity: 0;
}

.hidden {
  animation: hidemarker 0.5s ease-in-out forwards;
}

@keyframes hidemarker {
  0% {
    opacity: 1;
    margin-left: -20px;
    margin-top: -20px;
    width: 40px;
    height: 40px;
  }
  100% {
    opacity: 0;
    margin-left: -0px;
    margin-top: -0px;
    width: 0px;
    height: 0px;
  }
}

hr {
  border-top: 0.07rem solid blueviolet;
  border-bottom: 0px;
}

.index {
  padding: 0;
}

.index li {
  font-size: 1.7rem;
}
.index span {
  background-color: pink;
}

#imprint-container {
  position: fixed;
  right: 0vw;
  top: 0vh;
  background-color: white;
  max-width: 40rem;
  height: 99vh;
  overflow: hidden;
  z-index: 1000;
  transform: translateY(200%);
  padding: 0rem 1rem 1rem 1rem;
  box-shadow: 0px -4px 100px lightgrey;
}

#close-imprint {
  position: absolute;
  right: 0.5rem;
  top: 0.7rem;
  z-index: 100;
  font-size: 2rem;
  cursor: pointer;
  font-family: "font";
}

.imprint-scroll {
  height: 100%;
  width: auto;
  padding-top: 2rem;
  padding-right: 1rem;
  overflow-x: hidden;
  overflow-y: scroll;

  /* Hide scrollbar for Webkit browsers (Chrome, Safari, Edge) */
  -ms-overflow-style: none; /* For Internet Explorer 10+ */
  scrollbar-width: none; /* For Firefox */

  /* Hide scrollbar completely */
  -webkit-scrollbar {
    display: none;
  }

  /* Optional: mask the content */
  -webkit-mask-image: linear-gradient(
    transparent 0%,
    black 5%,
    black 95%,
    transparent 98%
  );
  mask-image: linear-gradient(
    transparent 0%,
    black 5%,
    black 95%,
    transparent 98%
  );
}

#imprint-container p {
  padding-right: 1.5rem;
}

#imprint-container h2 {
  max-width: auto;
  width: 100%;
}

#imprint-container span {
  background-color: beige;
}

#imprint-scroll {
}

@media (max-width: 1080px) {
  #popupmapswitch.visible {
    display: flex;
  }

  .text-image-container {
    display: block;
    margin-top: 0;
    margin-bottom: 2rem !important;
  }

  #citations {
    width: 98%;
    padding-top: 1rem;
    max-width: auto;
  }

  #intro {
    padding-top: 0rem !important;
  }

  h2 {
    width: 100%;
    margin-right: 0;
    margin-left: 0;
    max-width: 100%;
  }

  #filter-display {
    bottom: 2.5rem;
  }

  #closeentry {
    display: inline;
  }

  .popup.open {
    position: fixed;
    z-index: 9999;
    width: 100%;
  }

  .popup {
    transition: 0.3s;
  }

  #filter-container {
    width: 100% !important;
    min-width: 100% !important;
  }

  .leaflet-popup-content-wrapper,
  .leaflet-popup-content {
    max-width: 85vw;
  }

  .block-content,
  #intro {
    column-count: 1;
  }

  aside {
    width: calc(100% - 1rem);
    margin-left: 0.5rem;
  }

  #animated-title {
    right: 0.7vw !important;
    position: fixed !important;
    margin-top: 0% !important;
    text-align: left !important;
    left: 0.5vw !important;
    display: flex; /* Flex layout to allow wrapping */
    flex-wrap: wrap; /* Allow spans to wrap to the next line */
    justify-content: center; /* Center align on smaller screens */
  }

  #animated-title span {
    display: inline-block;
    position: sticky;
    transition: visibility 1s transform 0.5s;
    margin-bottom: 1rem;
    margin-right: 0vw; /* Reduce spacing for tighter layout */
    font-size: 12.5vw; /* Optional: Adjust font size for smaller screens */
  }

  .text-image-container figure {
    width: 100% !important;
  }
}

@media (max-width: 768px) {
  p,
  li,
  .leaflet-popup-content p,
  figcaption,
  .text-image-container figcaption,
  .leaflet-tooltip {
    font-size: 1.1rem !important;
  }

  strong {
    font-size: 1.3rem !important;
  }

  .tag,
  #sliderValue-container,
  #yearSliderValue-container,
  #selected-filters-list {
    font-size: 1.3rem !important;
  }

  .reset-filter {
    font-size: 1rem !important;
  }

  .slider {
    height: 1.6rem !important;
  }

  .reference-links {
    font-size: 1.5rem;
  }

  sup {
    font-size: 1rem !important;
  }

  .leaflet-container a.leaflet-popup-close-button {
    transform: scale(1);
  }

  .leaflet-popup-content h3,
  h2,
  h3,
  #markercounter {
    font-size: 1.6rem !important;
    line-height: 124%;
  }

  #menu a {
    font-size: 1.6rem !important;
    line-height: 130%;
  }

  #hover-text {
    height: 1.7rem;
  }

  .archive-tags {
    margin-top: 4rem !important;
  }

  #markercounter {
    padding-top: 0rem;
  }

  .popup h2 {
    margin-top: 4rem !important;
  }
}
