/* Fonts */
@font-face {
  font-family: "Roboto";
  src: url("fonts/RobotoCondensed-VariableFont_wght.ttf") format("truetype");
  font-weight: normal;
  font-style: normal;
}

@font-face {
  font-family: "Archivo";
  src: url("fonts/Archivo-Italic-VariableFont_wdth,wght.ttf") format("truetype");
}

body,
html {
  height: 100%;
  margin: 0;
  padding: 0;
}

#map {
  display: flex;
  justify-content: center;
  position: relative;
  height: 100vh;
  width: 100vw;
}

.title {
  position: absolute;
  top: 20px;
  left: 70px;
  background: rgba(255, 255, 255, 0.7);
  padding: 10px 20px;
  z-index: 1000;
  border-radius: 8px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
}

.title h1 {
  font-family: Roboto;
  margin: 0;
  font-size: 24px;
}

.description {
  position: absolute;
  top: 60px;
  right: 20px;
  width: 300px;
  max-height: calc(100vh - 60px);
  background: rgba(255, 255, 255, 0.7);
  padding: 10px;
  overflow-y: auto;
  z-index: 900;
  font-family: "Roboto";
  transition: all 0.5s ease;
  border-radius: 5px;
  box-shadow: 0px 2px 8px rgba(0, 0, 0, 0.2);
}

.description::after {
  display: none;
}

.description h2 {
  margin-top: 0;
  font-size: 18px;
}

.description ul {
  padding-left: 20px;
  margin: 10px 0;
}

.description li {
  margin-bottom: 10px;
}

.description p {
  margin-bottom: 0;
}

.legend {
  font-family: Roboto;
  background: rgba(255, 255, 255, 0.7);
  padding: 5px;
  font-size: 14px;
  color: #000000;
  border: 2px solid #dddddd;
  position: absolute;
  bottom: 20px;
  left: 5px;
  box-shadow: 0 3px 8px rgba(0, 0, 0, 0.2);
  max-height: 200px;
  overflow-y: auto;
  white-space: nowrap;
  z-index: 1000;
}

.legend-toggle-wrapper {
  text-align: right;
  margin-bottom: 5px;
}

.legend button {
  font-size: 12px;
  padding: 4px 8px;
  border: 1px solid #ccc;
  background-color: #fff;
  cursor: pointer;
  border-radius: 4px;
}

.legend.collapsed .calendar-day {
  display: none;
}

.calendar-day {
  display: inline-block;
  width: 40px;
  min-height: 50px;
  vertical-align: top;
  margin: 2px;
  text-align: center;
  position: relative;
  font-weight: bold;
  padding-top: 20px;
  border-right: 1px solid rgba(0, 0, 0, 0.2);
}

.calendar-day:last-child {
  border-right: none;
}

.event-dot {
  height: 10px;
  width: 10px;
  background-color: #f03;
  border-radius: 50%;
  display: block;
  margin: 2px auto;
  position: relative;
}

.event-dot:hover::after {
  content: attr(data-artist) ", " attr(data-venue);
  position: fixed;
  white-space: nowrap;
  background-color: black;
  color: white;
  padding: 5px 10px;
  border-radius: 5px;
  z-index: 10000;
  box-shadow: 0px 0px 5px rgba(0, 0, 0, 0.3);
  transform: none;
}

@media (max-width: 768px) {
  .description {
    width: 100%;
    height: 40px;
    top: auto;
    bottom: 0;
    right: 0;
    left: 0;
    max-height: none;
    overflow: hidden;
    cursor: pointer;
  }

  .description.open {
    height: auto;
    max-height: calc(100vh - 60px);
    overflow-y: auto;
  }

  .description::after {
    content: "Description ▼";
    display: block;
    text-align: center;
    font-weight: bold;
  }

  .description.open::after {
    content: "Description ▲";
  }

  .description:not(.open) p {
    display: none;
  }

  .legend {
      display: inline-block;
      white-space: nowrap;
      overflow-x: auto;
      max-width: 95vw;
    }

  .leaflet-popup-content {
    font-size: 1em;
  }
}

@media (min-width: 769px) {
  .legend {
    bottom: 30px;
    right: 10px;
    top: auto;
  }
}
