/*
 * Leaflet Map Styling with Brand Colors
 *
 */

/* Rotate hues to match our theme*/

@keyframes maps-fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

.leaflet-container {
  opacity: 0;
  animation: maps-fadeIn 0.3s ease-in-out 0.2s forwards;
}

.leaflet-marker-icon:hover {
  filter: brightness(1.1);
}

.leaflet-tile-pane {
  filter: sepia(0.07);
}

/* Style popup with brand colors */
.leaflet-popup-content-wrapper {
  border-radius: 12px;

  /* Glass */
  background-color: rgba(255, 255, 255, 0.7);
  backdrop-filter: blur(5px);
  box-shadow: 0 3px 14px rgba(0, 0, 0, 0.2);
}

.leaflet-popup-content {
  margin: 12px 16px;
  font-family: Arial, sans-serif;
  line-height: 1.6;
  min-width: 80px;
}

.leaflet-popup-content a {
  color: black;
  border-bottom: 2px solid #d5a422; /* Brand Bronze */
  text-decoration: none;
  font-weight: bold;
}

.leaflet-popup-tip {
  display: none;
}

/* Style zoom controls with brand colors */
.leaflet-control-zoom a {
  color: black !important; /* Brand Bronze */
  transition: all 0.2s ease;

  /* Glass */
  background-color: rgba(255, 255, 255, 0.7);
  backdrop-filter: blur(5px);
  box-shadow: 0 3px 14px rgba(0, 0, 0, 0.2);
}

.leaflet-control-zoom a:hover {
  background-color: black; /* Brand Bronze */
  color: white !important;
}

.leaflet-control-zoom {
  border: none;
}

.leaflet-control-zoom a:first-child {
  border-bottom: 1px solid black;
  border-radius: 12px 12px 0 0;
}

.leaflet-control-zoom a:last-child {
  border-radius: 0 0 12px 12px;
}

.leaflet-control-attribution a {
  color: black;
  border-bottom: 1px solid black;
}

@media (prefers-color-scheme: dark) {
  .leaflet-tile-pane {
    background-color: black;
    filter: invert(1) hue-rotate(-130deg) saturate(0.6) sepia(0.1)
      brightness(0.8);
  }

  .leaflet-popup-content-wrapper {
    border-radius: 12px;
    color: white;

    /* Dark Glass */
    background-color: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(5px);
    box-shadow: 0 3px 14px rgba(0, 0, 0, 0.2);
    border: 0.5px solid #494949;
  }

  .leaflet-popup-content a {
    color: #fde684ff; /* Brand Yellow */
    border-bottom: 2px solid #fde684ff;
  }

  .leaflet-control-zoom a {
    color: #fde684ff !important; /* Brand Yellow */

    /* Dark Glass */
    background-color: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(5px);
    box-shadow: 0 3px 14px rgba(0, 0, 0, 0.2);
    border: 0.5px solid #494949;
  }

  .leaflet-control-zoom a:first-child {
    border-bottom: 1px solid #fde684ff;
    border-radius: 12px 12px 0 0;
  }

  .leaflet-container {
    background-color: black;
  }

  .leaflet-container .leaflet-control-attribution {
    color: white;

    /* Dark Glass */
    background-color: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(5px);
    box-shadow: 0 3px 14px rgba(0, 0, 0, 0.2);
    border: 0.5px solid #494949;
  }

  .leaflet-container .leaflet-control-attribution a {
    color: white;
    border-bottom: 2px solid white;
  }
}
