#map-container {
    position: relative;
    width: 100%;
    height: calc(100vh - 200px);
    min-height: 400px;
    transition: width 0.3s ease-in-out;
}

#map-container.panel-open {
  width: 60%;
}

#map {
    width: 100%;
    height: 100%;
}

#map-info {
    width: auto;
    height: 90px;
}

#stats-panel {
  position: fixed;
  top: 0;
  right: 0;
  height: 100vh;
  width: 40%;
  background: white;
  box-shadow: -0.125rem 0.625rem rgba(0,0,0,2);
  transform: translateX(100%);
  transition: transform 0.3s ease-in-out;
  z-index: 1050;
  display: flex;
  flex-direction: column;
}

#stats-panel.open {
  transform: translateX(0);
}

.toggle-stats-btn {
  position: absolute;
  top: 50%;
  right: 1.25rem;
  transform: translateY(-50%);
  z-index: 1000;
  transition: opacity 0.3s ease-in-out;
}

.toggle-stats-btn.hidden {
  opacity: 0;
  pointer-events: none;
}

.layer-control {
  position: absolute;
  top: 10rem;
  left: 1rem;
  z-index: 1000;
  background: white;
  padding: 1rem;
  border-radius: 0.5rem;
  box-shadow: 0 0.125rem 0.5rem rgba(0,0,0,0.15);
  max-width: 250px;
}

.layer-control h6 {
  font-size: 1.2rem;
  margin-top: 0.5rem;
}

.legend-control {
  position: absolute;
  bottom: 2rem;
  left: 1rem;
  z-index: 1000;
  background: white;
  padding: 1rem;
  border-radius: 0.5rem;
  box-shadow: 0 0.125rem 0.5rem rgba(0,0,0,0.15);
  max-width: 250px;
}

.form-check-label {
  font-size: 1.1rem;
}

.form-label {
  font-size: 1.1rem;
}

.form-select {
  font-size: 1.1rem;
}

.legend-control h6 {
  font-size: 1.2rem;
  margin-bottom: 0.75rem;
}

.legend-image {
  max-width: 100%;
  height: auto;
  display: block;
}

.legend-loading {
  text-align: center;
  padding: 0.625rem;
  color: #6c757d;
  font-size: 0.75rem;
}

.stats-header {
  background: #008CD2;
  color: white;
  padding: 1rem 1.25rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-shrink: 0;
}

.stats-header h5 {
  margin: 0;
  font-size: 1.5rem;
}

.stats-content {
  flex: 1;
  overflow-y: auto;
  padding: 1.25rem;
}

.chart-container {
  height: 300px;
  margin-bottom: 20px;
  background-color: #f8f9fa;
  border-radius: 0.5rem;
  padding: 0.5rem;
}

.carousel-controls {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 1rem;
  margin-top: 1.25rem;
  margin-bottom: 0.5rem;
  color: #008CD2;
}

.carousel-dots {
  display: flex;
  gap: 0.5rem;
}

.carousel-dot {
  width: 0.5rem;
  height: 0.5rem;
  border-radius: 50%;
  background: #dee2e6;
  border: none;
  padding: 0;
  cursor: pointer;
  transition: all 0.3s ease;
}

.carousel-dot.hover {
  background: #adb5bd;
}

.carousel-dot.active {
  width: 2rem;
  border-radius: 0.25rem;
  background: #2d5016;
}

#prev-chart {
  background: #008CD2;
}

#next-chart {
  background: #008CD2;
}

#toggle-stats {
  background: #008CD2;
}

#resizer {
  width: 5px;
  cursor: col-resize;
  background-color: #ccc;
  height: 100%;
}

#loader {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(255, 255, 255, 0.7);
  z-index: 1100;
  display: flex;
  align-items: center;
  justify-content: center;
}

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

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

#slider-container {
  position: relative;
/*  bottom: 10px;
  left: 50%;*/
/*  transform: translateX(-50%);*/
  background: rgba(255,255,255,0.9);
  padding: 10px 20px;
  border-radius: 8px;
  box-shadow: 0 0 10px rgba(0,0,0,0.3);
  z-index: 1000;
  font-family: sans-serif;
  align-items: center;
  display: block;
  gap: 10px;
  min-width: 150px;
}


/*Ab hier test für carousel */
/*.carousel {
  position: relative;
}

.carousel-inner {
  position: relative;
  width: 100%;
  overflow: hidden;
}

.carousel-inner>.carousel-item {
  position: relative;
  display: none;
  animation: 0.6s ease-in-out;
  width: 100%;
}

.carousel-item>.carousel-img {
  width: 100%;
  height: auto;
}
.carousel-inner>.active,
.carousel-inner>.next {
  display: block;
}

.carousel-inner>.next {
  position: absolute;
  top: 0;
  width: 100%;
}

.carousel-inner>.to-left {
  animation-name: left;
}

.carousel-inner>.from-right {
  animation-name: right;
}

.carousel-inner>.to-right {
  animation-name: right;
  animation-direction: reverse;
}

.carousel-inner>.from-left {
  animation-name: left;
  animation-direction: reverse;
}

.carousel-control {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;
  width: 15%;
  cursor: pointer;
  color: #008CD2;
}

.carousel-control-prev,
.carousel-control-next {
  position: absolute;
  top: 0;
  bottom: 0;
  z-index: 1;
  display: -ms-flexbox;
  display: flex;
  -ms-flex-align: center;
  align-items: center;
  -ms-flex-pack: center;
  justify-content: center;
  width: 5%;
  color: #000000;
  text-align: center;
  opacity: 0.5;
  transition: opacity 0.15s ease;
}

@media (prefers-reduced-motion: reduce) {
  .carousel-control-prev,
  .carousel-control-next {
    transition: none;
  }
}

.carousel-control-prev:hover,
.carousel-control-prev:focus,
.carousel-control-next:hover,
.carousel-control-next:focus {
  color: #000000;
  text-decoration: none;
  outline: 0;
  opacity: 0.9;
}

.carousel-control-prev {
  left: 0;
}

.carousel-control-next {
  right: 0;
}

.carousel-control-prev-icon,
.carousel-control-next-icon {
  display: inline-block;
  width: 20px;
  height: 20px;
  background: no-repeat 50% / 100% 100%;
}

.carousel-control-prev-icon {
  color:#000000;
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='currentColor' width='8' height='8' viewBox='0 0 8 8'%3e%3cpath d='M5.25 0l-4 4 4 4 1.5-1.5L4.25 4l2.5-2.5L5.25 0z'/%3e%3c/svg%3e");
}

.carousel-control-next-icon {
  color:#000000;
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='currentColor' width='8' height='8' viewBox='0 0 8 8'%3e%3cpath d='M2.75 0l-1.5 1.5L3.75 4l-2.5 2.5L2.75 8l4-4-4-4z'/%3e%3c/svg%3e");
}
*/

/* Mobile Styles */
@media (max-width: 768px) {
    #stats-panel {
        width: 90%;
        right: -90%;
        top: 5%;
        height: 90%;
        border-radius: 12px;
    }
    
    #map-container.panel-open {
        width: 100%;
    }
    
    #stats-panel::before {
        content: '';
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background: rgba(0,0,0,0.5);
        z-index: -1;
        opacity: 1;
        transition: opacity 0.3s;
    }
    
    #stats-panel.open::before {
        opacity: 1;
    }
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.sr-only-focusable:active,
.sr-only-focusable:focus {
  position: static;
  width: auto;
  height: auto;
  overflow: visible;
  clip: auto;
  white-space: normal;
}

@keyframes left {
  from {
    left: 0;
  }
  to {
    left: -100%;
  }
}

@keyframes right {
  from {
    left: 100%;
  }
  to {
    left: 0;
  }
}

.js-plotly-plot .plotly .modebar {
    left: 50%;
    transform: translateX(-50%);
}

.js-plotly-plot,
.plot-container {
    height: 51vh;
    width: 100%;
}

.button-container {
  text-align: center;
  margin: 20px;
}

.control-button {
  margin: 10px;
  padding: 10px 20px;
  border: none;
  border-radius: 5px;
  background-color: #0a7077;
  color: #fff;
  cursor: pointer;
}

.control-button:hover {
  background-color: #4afaf1;
}

.control-button:disabled {
  background-color: #ccc;
  color: #666;
  cursor: not-allowed;
}

#carousel-indicators {
  margin-top: 8px;      /* Abstand nach oben */
/*   margin-bottom: 0;     /* optional */
  display: flex;        /* horizontale Anordnung der Buttons */
  justify-content: center; /* zentrieren */
  gap: 1px;             /* Abstand zwischen den Buttons */
}

/* Grundstil der Buttons */
#carousel-indicators button {
  width: 16px;
  height: 2px;
  border-radius: 15%;
  border: 2px solid #000000; /* Rahmenfarbe */
  background-color: transparent;
  margin: 0 6px;
  cursor: pointer;
  transition: all 0.3s ease; /* sanfte Animation */
}

/* Hover-Effekt */
#carousel-indicators button:hover {
  background-color: #007bff;
  transform: scale(1.2);
}

/* Aktiver Slide */
#carousel-indicators button.active {
  background-color: #007bff;
  transform: scale(1.4);
  border-color: #0056b3;
}

/* Optional: Schatten hinzufügen */
#carousel-indicators button {
  box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}