/* FONTS */
@font-face {
font-family: JetBrainsLight;
src: url('fonts/JetBrains/JetBrainsMono-Light.ttf')
format("truetype");
}
@font-face {
font-family: JetBrainsRegular;
src: url('fonts/JetBrains/JetBrainsMono-Regular.ttf')
format("truetype");
}
@font-face {
font-family: JetBrainsMedium;
src: url('fonts/JetBrains/JetBrainsMono-Medium.ttf')
format("truetype");
}
@font-face {
font-family: JetBrainsBold;
src: url('fonts/JetBrains/JetBrainsMono-Bold.ttf')
format("truetype");
}

@font-face {
font-family: ExposureBoldItalic;
src: url('fonts/exposure/ExposureItalicTrial[-40].otf')
format("opentype");
}
@font-face {
font-family: ExposureBold;
src: url('fonts/exposure/ExposureTrial[-40].otf')
format("opentype");
}
@font-face {
font-family: ExposureRegular;
src: url('fonts/exposure/ExposureTrial[0].otf')
format("opentype");
}
@font-face {
font-family: ExposureThin;
src: url('fonts/exposure/ExposureTrial[+20].otf')
format("opentype");
}

/* Root colors*/
:root {
  --bg-color: #eeeef4; /* (offwhite) #f4f4f4; (lilac) #f4e8ff; */
  --dark: #1c0038;

}

html, body{
  display: block;
  margin:0;
  padding:0;
  width: 100%;
  box-sizing: border-box !important;   
  font-family: JetBrainsRegular, sans-serif, helvetica;
  font-size: 100%;
  background-color: var(--bg-color);
}
*, *::before, *::after {
  box-sizing: border-box;
}

h1,h2,h3,h4,h5,h6,p,link,cite,a{
  margin-bottom: 0 ;
  color: var(--dark);
}
h2, h3 {
  font-family: JetBrainsBold;
  font-size: 1.5rem;
  /*letter-spacing: 0.1rem;*/
}
h4{
  font-size: 1rem;
}
b{
  font-family: JetBrainsLight;
}
p,a{
  font-size: 0.8rem;
}



/*Headline Container */

#headline{
  position:absolute;
  top: 0;
  left: 0;
  display: block;
  background-color: var(--bg-color);
  min-height: 100px;
  width: 400px;
  padding-left: 25px;
}
#headline h4{
  margin-top: 0.5em ;
}

/* 2. Container, in dem Canvas + Legende liegen, füllt ebenfalls alles */
#canvas-container{
  position:relative;
  width: 100%;             /* komplette Fensterbreite  */
  height:100vh;            /* komplette Fensterhöhe   */
  overflow:hidden;         /* nichts „quillt“ heraus  */
}

@media (max-width: 800px){
  #canvas-container {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;        /* 100% der Viewport-Breite */
  height: 100vh;       /* 100% der Viewport-Höhe */
  overflow: hidden;    /* Verhindert, dass der Inhalt über den Container hinausgeht */
}
}

/* Legenden-Button (deaktiviert). 
Aktuell ist die Legende immer eingeblendet.

#legend-toggle {
  position: absolute;
  top: 20px;
  right: 30px;
  width: 40px;
  height: 40px;
  background: #1c0038;
  color:  #f4f4f4;
  text-align: center;
  line-height: 40px;
  font-size: 24px;
  cursor: pointer;
  z-index: 10;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}
#legend-toggle:hover{
    background:#ff6a00;
}*/

#legend-toggle { display: none;}

/* Standard-Layout für die Legende */
#legend-panel {
  display: flex; /* Standardmäßig ausgeblendet */
  flex-direction: column;
  position: absolute;
  top: 0;
  right: 0;
  width: 250px;  /* Standardgröße der Legende */
  height: 100%;
  background: var(--bg-color);
  color: var(--dark);
  padding-left: 25px;
  padding-right: 25px;
  z-index: 10;
  overflow-y: auto; /* Ermöglicht das Scrollen */
}

/* Responsives Layout für die Legende bei max. 800px */
@media (max-width: 800px) {
  #legend-toggle { display: block;}
  /* Menü-Button */
 .menu-toggle {
  display: flex;
  position: absolute;
  width: 45px;
  height: 45px;
  top: 0.83em;
  right: 25px;
  font-size: 30px;
  border: 1px solid var(--dark);
  cursor: pointer;
  z-index: 10;
  background-color: var(--bg-color);
  text-align: center;
  align-items: center;
  justify-content: center;
  }

  #legend-panel {
    display: none;
    position: absolute;
    top: 100px;
    left:0;
    width: 100%; /* Die Legende nimmt die volle Breite ein */
    height: calc(100vh - 100px);  /* Die Legende nimmt die volle Höhe ein */
    overflow-y: scroll; /* Scrollbar für den Inhalt */
  }

  /* Hamburger-Menü-Symbol für den Button */
  .menu-toggle span {
    font-size: 30px;
    color: var(--dark);
    display: block;
    align-self: center;
    justify-self: center;
  }

  /* Für das sichtbare Menü (wenn geöffnet) */
  #legend-panel.visible {
    display: flex;
    flex-direction: column;
   }

   #headline{
    width: 100%;
    min-height: 100px;
   }
   #headline h2, #headline h4{
    max-width: 75%;
   }
   #headline h4{
    padding-bottom: 25px;
   }

  .legend-items:last-child{
    margin-bottom: 5rem;  
   }
}

@media (max-width: 450px){
/*#legend-panel {
    top: 125px;
    height: calc(100vh - 125px);  /* Die Legende nimmt die volle Höhe ein 
  }*/
#headline h4{
  display: none;
}
}


#loudness-legend img {
  /* aus Schwarz →  #1c0038 */
  filter: brightness(0) saturate(100%)
          invert(12%) sepia(26%) saturate(1400%)
          hue-rotate(209deg) brightness(95%) contrast(105%);
}


.legend-items{
  margin-bottom: 1em;
}

.legend-items::after, .impentry::before{
  content: "";
  display: block;
  margin-top: 2em;
  width: 100%; 
  height: 1px;
  background-color: var(--dark);
  z-index: 100;
}
.legend-items:last-child::after{
  content: none;
}
.impentry:first-of-type::before{
  content: none;
}

.legend-entry, .svg-entry, label{
  display: flex;
  flex-direction: row;
  align-items: center;
  margin-bottom: 0.5em;
  font-size: 0.8rem;
}
.legend-entry:first-child, .svg-entry:first-child{
  margin-top: 2em;
}

.legend-color {
  width: 15px;
  height: 15px;
  margin-right: 10px;
  border-radius: 50%;
  border: 1px solid transparent;
}

.svg-icon {
  width: 15px;
  height: 15px;
  margin-right: 10px;
}

/* Scrollbarer Bereich in der Legende 
.date-scroll{
  max-height:120px;          
  overflow-y:auto;           
  border:1px solid #ccc;
  padding:2px 0;
  margin:6px 0;
}*/

/* Ein einzelnes Datum 
.date-item{
  padding:4px 10px;
  cursor:pointer;
  font-size:.85rem;
  color:#1c0038;
  white-space:nowrap;
}*/

/* aktives Datum farblich hervorheben 
.date-item.selected{
  background:#ff6e00;
  color:#fff;
}*/


.switch{
  position:relative;
  width:64px;
  height:34px;
  display:inline-block;
  margin:12px 0 4px;
}
.switch span{
  position:absolute;
  inset:0;
  background:#5a5a79;
  border-radius:17px;
  cursor:pointer;
  transition:.4s;
}
.switch span::before{
  content:"";
  position:absolute;
  left:4px;
  bottom:4px;
  width:26px;height:26px;
  background: var(--bg-color);
  border-radius:50%;
  transition:.4s;
}

.switch input{display:none;}
.switch input:checked+span{background:#1c0038;}
.switch input:checked+span::before{transform:translateX(30px);}
.switch p{
  display:inline-block;
  margin-left:8px;
  font-size:0.9rem;
  color: var(--dark);  
  vertical-align:middle;
  user-select:none;
}

/* ------ filter-checkboxen -------- */
label{
  font-size: 0.8rem;
}
label:first-of-type{
  margin-top: 0.8em;
}

#comfort-filter, #loudness-filter{
  display: flex;
  flex-direction: column;
}

/* Standardzustand der Checkboxen */
input[type="checkbox"] {
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  width: 10px;
  height: 10px;
  margin-right: 10px;
  margin-left: 0;
  border: 1px solid var(--dark);
  background-color: var(--bg-color);
  position: relative;
  cursor: pointer;
  transition: background-color 0.3s ease, border-color 0.3s ease;
}

/* Zustand, wenn die Checkbox gecheckt ist */
input[type="checkbox"]:checked {
  background-color: var(--dark);
  border-color: var(--dark);
}

/* ---------- Zeit update ------------*/

#last-update{
 position: absolute;
 left: 25px;
 bottom: 5px;
 font-size: 0.8rem;
 width: fit-content;
}



/* --------- IMPRESSUM -------------- */
.impressum{
  position: relative;
  padding-left: 25px;
  padding-right: 25px;
}

@media (min-width:800px){
  .impressum{
    width: 70%;
    margin-right: auto;
  }
}

.back {
  position: relative;
  display: flex;
  align-items: center; 
  justify-content: center;
  width: 60px;
  height: 30px;
  border: 1.5px solid var(--dark);
  padding: 10px;
  margin-top: 3rem;
  margin-bottom: 5rem;
}

.back a {
  position: absolute;
  width: 50%;
  height: 1.5px;
  background-color: var(--dark);
  padding: 10px solid var(--bg-color); /*damit ein größerer Bereich klickbar ist aber nicht sichtbar: workaround */
  display: block;
}

.back a::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 3px;
  width: 15px;
  height: 15px;
  border-color: var(--dark);
  border-style: solid;
  border-width: 1.5px 0 0 1.5px;
  transform: translateY(-50%) rotate(-45deg); /* wichtig: vertikal zentriert */
}

/* hover effekt für button */
.back:hover{
  background-color: var(--dark);
}

.back:hover a{
  background-color: var(--bg-color);
  padding: 10px solid var(--dark); /*damit ein größerer Bereich klickbar ist aber nicht sichtbar: workaround */
}
.back:hover a::before{
  border-color: var(--bg-color);
}
.linkbutton{
  border: 1px solid var(--dark);
  width: fit-content;
  box-sizing: content-box;
}
.linkbutton a{
  padding: 10px;
  text-decoration: none;
}


/* ------ ZOOM kontrolle mobilansicht -------*/
#zoom-controls { display: none;}

@media (max-width: 800px){
#zoom-controls {
  display: flex;
  flex-direction: column;
  position: absolute;
  bottom: 25px;
  left: 25px;
  z-index: 5;
}

#zoom-controls button {
  display: flex;
  background-color: var(--bg-color);
  border: 1px solid var(--dark);
  color: var(--dark);
  font-size: 24px;
  width: 40px;
  height: 40px;
  cursor: pointer;
  margin-bottom: 5px;
  text-align: center;
  align-items: center;
  justify-content: center;
}

#zoom-controls button:hover {
  background-color: var(--dark);
  color: var(--bg-color);
}
}



/* --------------- Ladebildschirm ------------- 
#loading-screen {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(255, 255, 255, 0.9); 
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10000;
}

.spinner {
  border: 8px solid #f3f3f3;
  border-top: 8px solid #3498db;
  border-radius: 50%;
  width: 50px;
  height: 50px;
  animation: spin 2s linear infinite;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}*/
