/* Reset padding and margin */
* {
  margin: 0;
  padding: 0;
}

header,
footer {
  max-width: 90ex;
  margin: 0 auto;
  text-align: center;
}

header {
  padding-bottom: 12px;
  border-bottom: 2px solid #ccc;
}

footer {
  padding-top: 16px;
  text-align: right;
}

h2 {
  margin-top: 15px;
  color: #492a7c;
}

body {
  font: 18px/1.5 "Avenir", "Avenir Next", "Helvetica Neue", Arial, sans-serif;
  background-color: #000000;
  color: white;
}

/* #globeViz {
  width: 100vw;
  height: 100vh;
  position: absolute;
  top: 0;
  left: 0;
} */

.tooltip-container {
  position: absolute;
  display: inline-block;
  cursor: pointer;
}

.tooltip-container svg {
  width: 20px;
  height: auto;
  fill: red;
}

#navbar {
  padding: 10px 20px;
  display: flex;
  gap: 15px;
  justify-content: center;
}

#drop-menu {
  display: flex;
  justify-content: center;
}

#filter-button {
  padding-left: 10px;
  padding-right: 10px;
}

.drop-element {
  font-size: 20px;
  margin-right: 15px;
  margin-left: 15px;
  margin-top: 3px;
  margin-bottom: 3px;
  border-radius: 5px;
  text-align: center;
  background-color: aliceblue;
  border: none;
}
.drop-element:focus {
  outline: 1px solid lightblue;
}

.navbar-element {
  background-color: #492a7c;
  color: white;
  text-decoration: none;
  font-size: 18px;
  padding: 8px 12px;
  transition: background 0.3s, color 0.3s;
  margin-right: 3px;
  border-radius: 3px;
}

.navbar-element:hover {
  background-color: #575757;
}

.map-body {
  background-color: #492a7c;
  margin-left: 8%;
  margin-right: 8%;
}

#globeViz {
  width: 80%;
  margin-left: 10%;
  margin-right: 10%;
}

/* Tooltip for Bar Chart */
#popup-chart-tooltip {
  display: none;
  position: absolute;
  background: rgba(0, 0, 0, 0.75);
  color: white;
  padding: 5px;
  font-size: 12px;
  border-radius: 5px;
  pointer-events: none;
  z-index: 1000;
  margin-right: 20%;
}

.popup {
  display: none;
  position: absolute;
  background: white;
  color: black;
  padding: 15px;
  border-radius: 8px;
  box-shadow: 0px 4px 10px rgba(0, 0, 0, 0.3);
  z-index: 1000;
  width: 300px;
  max-height: 350px;
  overflow-y: auto;
}

.popup-content {
  max-height: 320px;
  text-align: center;
}

.song-label {
  writing-mode: vertical-rl;
  text-orientation: mixed;
  font-size: 10px;
  text-align: center;
  max-width: 50px;
}

#popup-chart {
  min-height: 170px;
  max-height: 200px;
}

.popup h3 {
  margin: 0 0 10px;
  font-size: 16px;
}

.popup ul {
  list-style: none;
  padding: 0;
}

.popup li {
  font-size: 14px;
  padding: 5px 0;
  border-bottom: 1px solid #ccc;
}

.popup li:last-child {
  border-bottom: none;
}

.close-popup {
  position: absolute;
  top: 5px;
  right: 10px;
  font-size: 16px;
  cursor: pointer;
  color: black;
}

#legend-container {
  width: 80%;
  max-width: 1200px;
  margin: 10px auto 0 auto;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  font-size: 14px;
  color: white;
  gap: 15px;
  text-align: center;
  padding: 10px;
  position: relative;
}

.legend-item {
  display: flex;
  align-items: center;
  gap: 5px;
  flex: 1 1 auto;
  min-width: 120px;
  justify-content: center;
}

.legend-color {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  display: inline-block;
}

@media (max-width: 768px) {
  #legend-container {
    width: 90%;
    gap: 10px;
  }

  .legend-item {
    min-width: 100px;
  }
}

#writeup-container {
  margin-left: 7%;
  margin-right: 7%;
  margin-top: 20px;
}

#writeup-element{
  font-size: 20px;
}