.accordion {
  max-width: 100%;
  margin: 0 auto;
}

.legend {
  padding: 6px 8px;
  font:
    14px Arial,
    Helvetica,
    sans-serif;
  background: white;
  background: rgb(255 255 255 / 80%);
  box-shadow: 0 0 15px rgb(0 0 0 / 20%);
  line-height: 24px;
  color: #555;
}

.card {
  margin-bottom: 1rem;
  border-radius: 8px;
  border: 1px solid #ddd;
  box-shadow: 0 2px 4px rgb(0 0 0 / 10%);
  overflow: hidden;
}

.card-header {
  padding: 1rem;
  border-bottom: 1px solid #ddd;
  background-color: #f1f1f1; /* Change this to the color you want */
}

.card-header h5 {
  margin: 0;
  font-size: 1.25rem;
}

.card-body {
  padding: 1rem;
  word-wrap: break-word; /* Ensures long text wraps within the boundaries */
  overflow-wrap: break-word;
  background-color: #fff;
  line-height: 1.5;
}

.card-header button {
  font-size: 1rem;
  text-align: left;
  width: 100%;
  padding: 0.75rem;
  border: none;
  background: none;
  text-decoration: none;
}

.card-header button:focus {
  outline: none;
}

/* Collapse transition effect */
.collapse {
  transition: height 0.3s ease;
  text-align: start;
  overflow: auto;
  width: 99%;
  margin: 0 auto;
  overflow-y: scroll;
  max-height: 30vh;
}

.collapsing {
  transition: height 0.3s ease;
  text-align: start;
  overflow: auto;
  width: 99%;
  margin: 0 auto;
  overflow-y: scroll;
  max-height: 30vh;
}

@media (width <= 768px) {
  .card-header h5 {
    font-size: 1rem;
  }

  .card-body {
    padding: 0.75rem;
  }
}

/* loading spinner */

.spinner.fullscreen {
  margin-top: -21px;
  position: absolute;
  text-align: center;
  top: 43%;
  width: auto;
  visibility: hidden;
  z-index: 99999;
  left: 55%;
  background: #ffffff91;
  border-radius: 38px;
}

.spinner {
  margin-top: -21px;
  position: absolute;
  text-align: center;
  top: 43%;
  width: auto;
  visibility: hidden;
  z-index: 99999;
  left: 50%;
  background: #ffffff91;
  border-radius: 38px;
}

.spinner svg {
  animation: loading-rotate 2s linear infinite;
  height: 80px;
  width: 80px;
}

.spinner .path {
  stroke-dasharray: 90, 150;
  stroke-dashoffset: 0;
  stroke-width: 2;
  stroke: #409eff;
  stroke-linecap: round;
  animation: loading-dash 1.5s ease-in-out infinite;
}

@keyframes loading-rotate {
  to {
    transform: rotate(1turn);
  }
}

@keyframes loading-rotate {
  to {
    transform: rotate(1turn);
  }
}

@keyframes loading-rotate {
  to {
    transform: rotate(1turn);
  }
}

@keyframes loading-rotate {
  to {
    transform: rotate(1turn);
  }
}

@keyframes loading-dash {
  0% {
    stroke-dasharray: 1, 200;
    stroke-dashoffset: 0;
  }

  50% {
    stroke-dasharray: 90, 150;
    stroke-dashoffset: -40px;
  }

  100% {
    stroke-dasharray: 90, 150;
    stroke-dashoffset: -120px;
  }
}

@keyframes loading-dash {
  0% {
    stroke-dasharray: 1, 200;
    stroke-dashoffset: 0;
  }

  50% {
    stroke-dasharray: 90, 150;
    stroke-dashoffset: -40px;
  }

  100% {
    stroke-dasharray: 90, 150;
    stroke-dashoffset: -120px;
  }
}

@keyframes loading-dash {
  0% {
    stroke-dasharray: 1, 200;
    stroke-dashoffset: 0;
  }

  50% {
    stroke-dasharray: 90, 150;
    stroke-dashoffset: -40px;
  }

  100% {
    stroke-dasharray: 90, 150;
    stroke-dashoffset: -120px;
  }
}

@keyframes loading-dash {
  0% {
    stroke-dasharray: 1, 200;
    stroke-dashoffset: 0;
  }

  50% {
    stroke-dasharray: 90, 150;
    stroke-dashoffset: -40px;
  }

  100% {
    stroke-dasharray: 90, 150;
    stroke-dashoffset: -120px;
  }
}

body {
  margin: 0;
  font-family: Arial, sans-serif;
}

/* Map Styling */
#map {
  height: 90vh;
  width: 100%;
  z-index: 996;
  transition: all 0.2s ease-in-out; /* Smooth transition for all properties */
  transform: scale(0.99); /* Default is no scaling (normal size) */
}

#map.fullscreen {
  position: fixed !important;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;

  background-color: white; /* Optional: ensure background is consistent */
  box-shadow: 0 4px 15px rgb(0 0 0 / 30%); /* Optional: add a shadow effect */
  transform: scale(1); /* Slight zoom-in effect for fullscreen */
  opacity: 1; /* Fully visible in fullscreen */
}

#main.fullscreen {
  height: 100vh;
  margin: 0;
}

/* Sidebar Styling */
#sidebar {
  position: absolute;
  top: 0;
  left: -300px; /* Fully hidden initially */
  height: 100%;
  width: 300px;
  background-color: var(--potsdam-blue);
  overflow: auto;
  padding: 20px;
  z-index: 1001;
  transition:
    transform 0.3s ease,
    left 0.3s ease;
}

#sidebar.open {
  left: 0;
  width: 350px;
}

#sidebar h3 {
  margin: 0 0 20px;
  font-size: 1.5em;
  color: #f39c12;
}

#sidebar h4 {
  margin: 15px 0 5px;
  font-size: 1.2em;
}

#sidebar label {
  display: block;
  margin: 5px 0;
  font-size: 1em;
  cursor: pointer;
}

/* Sidebar Toggle Button */
#toggle-sidebar {
  position: absolute;
  top: 15px;
  left: 20px;
  z-index: 1002;
  background: var(--potsdam-blue);
  color: var(--white);
  border: none;
  padding: 10px 15px;
  font-size: 1em;
  cursor: pointer;
  border-radius: 5px;
  box-shadow: 0 2px 5px rgb(0 0 0 / 20%);
  transition: left 0.3s ease;
}

#toggle-sidebar-modal {
  z-index: 1002;
  background: var(--potsdam-blue);
  color: var(--white);
  border: none;
  padding: 10px 15px;
  font-size: 1em;
  cursor: pointer;
  border-radius: 5px;
  box-shadow: 0 2px 5px rgb(0 0 0 / 20%);
  transition: left 0.3s ease;
}

#toggle-sidebar.hidden {
  left: 328px; /* Move out of view when sidebar is open */
  background-color: #d32f2f;
  border-radius: 100%;
  color: white;
}

#toggle-sidebar:hover {
  background: var(--white);
  color: var(--potsdam-blue);
}

/* Style for collapsible container */
.accordion-collapse {
  background-color: #f8f9fa; /* Light background */
  border-radius: 8px; /* Rounded corners */
  box-shadow: 0 2px 4px rgb(0 0 0 / 10%); /* Subtle shadow for depth */
  margin-bottom: 1rem; /* Spacing between collapsible items */
  padding: 20px; /* Padding for inner content */
  transition: all 0.3s ease-in-out; /* Smooth transition for collapsible behavior */
}

/* Card body styling */
.accordion-collapse .card-body {
  padding: 20px;
  font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif; /* Modern font */
  color: #333; /* Dark text for readability */
  font-size: 1rem;
}

/* Style for the label and checkbox */
.checkbox-label {
  display: flex;
  align-items: center;
  font-size: 1.1rem;
  color: #495057; /* Darker color for label text */
  margin-top: 10px;
  cursor: pointer;
  transition: color 0.2s ease;
}

/* Modernizing the checkbox appearance */
.checkbox-label input[type="checkbox"] {
  width: 18px;
  height: 18px;
  margin-right: 10px;
  border-radius: 4px; /* Rounded checkbox */
  border: 1px solid #ccc; /* Subtle border */
  background-color: #fff; /* White background */
  transition:
    background-color 0.2s ease,
    border-color 0.2s ease;
}

/* Hover effect for checkbox */
.checkbox-label:hover {
  color: #007bff; /* Change text color on hover */
}

/* Focus state for checkbox */
.checkbox-label input[type="checkbox"]:focus {
  outline: none;
  border-color: #007bff; /* Blue border on focus */
}

/* Checked state for checkbox */
.checkbox-label input[type="checkbox"]:checked {
  background-color: #007bff; /* Blue background for checked state */
  border-color: #007bff; /* Blue border for checked state */
}

/* Style the reset button */

.reset-btn {
  padding: 0;
  display: none; /* Hidden by default */
  background-color: #ff000085;
  color: white;
  z-index: 9999;
  width: auto; /* Ensure consistent size */
  padding: 8px;
  height: 40px;
  border: 0px;
  cursor: pointer;
  align-items: center;
  justify-content: center;
  width: 100%;
  border-radius: 10px;
}

/* Ensure Reset View appears next to Toggle */
.show-reset {
  display: flex !important;
}

.reset-btn:hover {
  background-color: #0056b3;
}

.info {
  position: relative;
  display: none;
  justify-content: center;
  align-items: center;
  max-width: 38px;
  height: auto;
  padding: 1px 10px 0;
  border: 3px solid #f4fdff;
  border-radius: 500px;
  font-size: 14px;
  font-weight: 600;
  color: #fff;
  text-align: center;
  z-index: 3;
  transition:
    transform 0.15s,
    background-color 0.5s;
  top: 2vh;
  left: -1vh;
}

.red {
  background: #ff3c35;
}

.blue {
  background: #003958;
}

#clear-all {
  display: none;
}

.leaflet-tile {
  image-rendering: auto !important;
}

.leaflet-container {
  transform: none !important;
}

.accordion-button {
  color: #003958; /* Text color on the header */
  border-width: 0;
}

/* Change the background color of the accordion body */
.accordion-body {
  background-color: #f1f1f1; /* Change this to the color you want */
  color: #333; /* Text color on the body */
}

/* On hover, change the accordion button color */
.accordion-button:hover {
  background-color: #f2f2f3; /* Hover color */
}

/* Optionally, change the color when the accordion is active (expanded) */
.accordion-button:not(.collapsed) {
  background-color: #003958; /* Active state color */
  color: white;
  border-width: 0;
}

.btn-link {
  border-width: 0;
}

/* Close button for fullscreen */

.close {
  width: 50px;
  height: 50px;
  position: relative;
  border-radius: 50%;
  background-color: #d32f2f;
  opacity: 0.8;
  transition: 0.3s ease-out;
  z-index: 999;

  &:hover,
  &:focus {
    transform: scale(1.15);
    opacity: 1;
    background-color: #d32f2f;
  }
}

.close-fullscreen {
  display: flex;
  opacity: 0;
  justify-content: center;
  flex-direction: row;
  align-items: center;
  padding-top: 15px;
  width: 92%;
  position: relative;
  z-index: 1000;
  float: right;
}

.close-fullscreen:hover {
  opacity: 1;
}

#close-button,
.close-button {
  display: none;
}

#clear-all {
  margin: 0 auto;
  margin-bottom: 0px;
  margin-bottom: 20px;
  background-color: bisque;
  background-color: #515151;
  color: white;
}

.legend {
  background: white;
  padding: 10px;
  box-shadow: 0 0 10px rgba(0, 0, 0, 0.3);
  font-size: 14px;
  min-width: 120px;
  margin-bottom: 10px;
  max-height: 300px;
  overflow: auto;
}

.legend-item {
  display: flex;
  margin-bottom: 5px;
}

.legend-toggle {
  background: #007bff;
  color: white;
  border: none;
  padding: 5px;
  cursor: pointer;
  align-items: center; /* Center text/icon */
  justify-content: center;
  text-align: center;
  font-size: 16px;
  width: 40px;
  height: 40px;
  transition: background 0.3s ease;
  position: absolute;
  right: 0;
  z-index: 1000;
  display: none;
}

#legend-toggle {
  min-width: 300px;
}

.legend-content {
  margin-top: 5px;
}

.custom-checkbox {
  display: flex;
  align-items: center;
  padding: 10px 15px;
  border-radius: 8px;
  cursor: pointer;
  font-size: 16px;
  transition:
    background 0.3s,
    color 0.3s;
  user-select: none;
}

.custom-checkbox input {
  /* display: none; */
}

.custom-checkbox:hover {
  background: #cac8c8;
}

.custom-checkbox input:checked + span {
  background: #87c189;
}

.custom-checkbox span {
  display: none;
  align-items: center;
  width: 100%;
  padding: 10px 15px;
  border-radius: 8px;
  transition:
    background 0.3s,
    color 0.3s;
}

.custom-checkbox span > i {
  margin-right: 15px;
}

.custom-checkbox + hr {
  border: none;
  height: 2px;
  background: #939393;
  margin: 10px 0;
  opacity: 0.1;
}

.legend-span-line {
  width: 30px;
  height: 2px;
  display: block;
  opacity: 1;
  border: 7px solid;
}
.legend-span {
  width: 30px;
  height: auto;
  display: block;
  border: 1px solid #ffffff;
}

.legend-p {
  margin-bottom: 0px;
  margin-left: 15px;
  margin-right: 15px;
  width: 100%;
  font-size: 16px;
  font-family: "Arial", sans-serif;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 5px 10px;
  transition: all 0.3s ease;
  cursor: pointer;
  max-width: 500px;
}

.legend-hidden {
  color: red;

  text-decoration: line-through;
}

.legend-control {
  margin-bottom: 0px;
  font-size: 20px;
  font-family: "Arial", sans-serif;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 5px 10px;
  transition: all 0.3s ease;
  cursor: pointer;
  max-width: 500px;
}

.legend-control:hover {
  color: #2442e3;
  font-size: 22px;
  font-weight: bolder;
}

.legend-item-content {
  display: inline-flex;
  width: 100%;
}

#legend-controls {
  width: 100%;
  height: 40px;
  display: flex;
  position: relative;
  width: 100%;
  height: 40px;
  align-items: flex-end;
  justify-content: space-between;
  gap: 2px;
}

#legend {
  display: inline-block;
  position: absolute;
  bottom: 0;
  right: 10px;
}
@media (width <= 856px) {
  .leaflet-right .leaflet-control {
    margin: 0;
    width: 100%;
    display: block;
  }
  .leaflet-bottom {
    width: 100%;
  }
  .legend {
    margin-bottom: 0px;
  }
  #legend {
    position: fixed;
    bottom: max(0px, env(safe-area-inset-bottom, 5px));
    z-index: 1000;
    width: 100%;
    right: 0;
  }
  #legend-toggle {
    width: 100%;
  }
  #sidebar.open {
    width: 100%;
  }

  .close-fullscreen {
    display: none;
  }
}

/* Custom Layer Switcher */
.layer-switcher {
  position: absolute;
  top: 10px;
  right: 10px;
  z-index: 1000;
  display: flex;
  gap: 8px;
  background: rgba(255, 255, 255, 0.9);
  padding: 8px;
  border-radius: 10px;
  box-shadow: 0px 2px 10px rgba(0, 0, 0, 0.2);
  align-items: center;
  flex-direction: column;
}
.layer-btn {
  width: 30px;
  height: 30px;
  border: none;
  cursor: pointer;
  border-radius: 8px;
  overflow: hidden;
  padding: 0;
  background: none;
  transition: transform 0.2s ease-in-out;
  font-size: 10px;
}

.layer-btn.active {
  background-color: #007bff69;
  transform: scale(1.1);
  color: rgb(0, 0, 0);
  font-weight: bolder;
}

.layer-btn.active svg {
  fill: #007bff;
  opacity: 0.8;
  transform: scale(1.1);
  width: 20px;
}

/* Modern Checkbox for Grayscale */
.checkbox-container {
  position: relative;
  z-index: 1000;
  display: flex;
  align-items: center;
  gap: 10px;
  background: rgba(255, 255, 255, 0.7);
  padding: 5px;
  border-radius: 10px;
  box-shadow: 0px 2px 10px rgba(0, 0, 0, 0.2);
}

.checkbox-container input[type="checkbox"] {
  appearance: none;
  width: 20px;
  height: 20px;
  border-radius: 6px;
  background-color: #ddd;
  position: relative;
  cursor: pointer;
  transition: background-color 0.3s ease;
}

.checkbox-container input[type="checkbox"]:checked {
  background-color: #007bff;
}

.checkbox-container input[type="checkbox"]:checked::before {
  content: "";
  position: absolute;
  top: 5px;
  left: 5px;
  width: 10px;
  height: 10px;
  border-radius: 6px;
  background-color: white;
  transition: left 0.8s ease;
}

.checkbox-container label {
  font-size: 14px;
}

/* CSS Grayscale filter */
.grayscale {
  filter: grayscale(100%);
}

.layer-content {
  display: flex;
  justify-content: center; /* Keep items in a row */
  align-items: center;
  gap: 10px; /* Space between buttons and checkbox */
}

/* Intro tutorial */

#layers-dialog {
  position: absolute;
  display: block;
  top: 0;
  margin: 0;
}

@media (width > 856px) {
  #select-layers-dialog {
    position: absolute;
    min-width: 400px;
    display: block;
    top: 0;
    left: 50%;
    right: 50%;
    margin: 0;
  }
}

#fullscreenModalToggle .indicator {
  width: 50px;
  height: 50px;
  border: 5px solid rgba(0, 123, 255, 0.7);
  border-radius: 50%;
  animation: pulse 1.5s infinite ease-in-out;
  margin: 20px auto;
}

@keyframes pulse {
  0% {
    transform: scale(1);
    opacity: 0.7;
  }
  50% {
    transform: scale(1.2);
    opacity: 1;
  }
  100% {
    transform: scale(1);
    opacity: 0.7;
  }
}

.modal-content {
  border-radius: 12px;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}
.modal-header {
  background: var(--potsdam-blue);
  color: white;
  border-top-left-radius: 12px;
  border-top-right-radius: 12px;
}
.modal-title {
  font-size: 1.5rem;
  font-weight: bold;
}
.modal-body {
  font-size: 1.1rem;
  color: #333;
  padding: 20px;
  text-align: center;
}

.modal-footer {
  display: flex;
  justify-content: center;
  padding: 15px;
}

/* Search bar */

.search-hidden {
  display: none;
}

.search-container {
  width: 100%;
  height: 60px;
  position: relative;
}

.search-wrapper {
  position: absolute;
  top: 70%;
  left: 47%;
  transform: translate(-50%, -50%);
  display: flex;
  width: auto;
}

.search-input {
  width: 0;
  opacity: 0;
  padding: 8px 12px;
  border: 1px solid #ccc;
  border-radius: 8px 0 0 8px;
  outline: none;
}

.search-wrapper.open {
  left: 0;
  transform: translateY(-50%);
  width: 100%;
  justify-content: center;
}

.search-wrapper.open .search-input {
  width: 100%;
  opacity: 1;
}

.search-icon,
.close-btn {
  background: none;
  color: white;
  border: none;
  padding: 8px 12px;
  cursor: pointer;
  font-size: 18px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.close-btn {
  background: #007bff;
  display: none;
  border-radius: 0 8px 8px 0;
}

.search-wrapper.open .close-btn {
  display: inline-flex;
}

.search-wrapper.open .search-icon {
  display: none;
}

.controls hr {
  border: 2px solid;
  border-color: antiquewhite;
  border-radius: 100%;
  margin: 20px auto;
}

.controls .alert {
  width: 60%;
  margin: 0 auto;

  padding: 5px;
  margin-top: 15px;
  text-align: center;
}

/* Lora stuff */

.chartContainer {
  height: 30vh;
  width: 100%;
}
#panel {
  position: absolute;
  top: 0;
  right: -520px; /* hidden by default */
  width: 520px;
  height: 100%;
  background: #fff;
  box-shadow: -2px 0 5px rgba(0, 0, 0, 0.2);
  transition: right 0.3s;
  overflow: auto;
  z-index: 1000;
}
#panel.open {
  right: 0;
}
#panel-header {
  padding: 10px;
  background: #f5f5f5;
  border-bottom: 1px solid #ccc;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
#panel-content {
  padding: 10px;
}
#panel-close {
  cursor: pointer;
  font-size: 18px;
  font-weight: bold;
}
#resizer {
  width: 5px;
  cursor: ew-resize;
  height: 100%;
  background: transparent;
  position: absolute;
  left: 0;
  top: 0;
}

/* Search stuff	 */

#searchBox {
  position: relative;
  left: 10%;
  transform: translateX(-50%);
  z-index: 1000;
  display: flex;
  align-items: center;

  border-radius: 8px;

  overflow: hidden;
  transition:
    width 0.3s ease-in-out,
    box-shadow 0.3s ease-in-out;
  width: 35px;
}

#searchBox.active {
  width: 320px;
  left: 33%;
  box-shadow: 0 6px 14px rgba(0, 0, 0, 0.25);
}

#searchInputField {
  border: none;
  outline: none;
  font-size: 15px;
  padding: 6px;
  width: 0;
  opacity: 0;
  display: none;
  transition:
    width 0.3s ease-in-out,
    opacity 0.3s ease-in-out;
}

#searchBox.active #searchInputField {
  display: block;
  width: 100%;
  opacity: 1;
}

#searchBtn {
  background: #0078ff;
  border: none;
  outline: none;
  width: 35px;
  height: 35px;
  border-radius: 50%;
  cursor: pointer;
  color: #fff;
  font-size: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s ease-in-out;
  flex-shrink: 0;
}

#searchBtn:hover {
  background: #005fcc;
}

#suggestions {
  position: relative;
  width: 480px;
  max-height: 200px;
  overflow-y: auto;
  background: white;
  border-radius: 10px;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.15);
  display: none;
  z-index: 1001;
}

#suggestions div {
  padding: 8px 12px;
  cursor: pointer;
  border-bottom: 1px solid #eee;
}

#suggestions div:hover {
  background: #f0f0f0;
}

.remove-btn {
  background: #ff4b5c;
  color: white;
  border: none;
  border-radius: 20px;
  padding: 6px 12px;
  margin-top: 6px;
  cursor: pointer;
  font-size: 13px;
  transition: background 0.2s;
}

.remove-btn:hover {
  background: #d73848;
}
