.layer-switcher {
  position: absolute;
  top: 1em;
  right: 0.5em;
  text-align: left;
}

.layer-switcher .panel {
  margin: 0;
  border: 4px solid #eee;
  border-radius: 2px;background-color: white;
  display: none;
  max-height: inherit;
  box-sizing: border-box;
  overflow-y: auto;
}

.layer-switcher button {
  float: right;
  z-index: 1;
  width: 38px;
  height: 38px;
  background-repeat: no-repeat;
  background-position: center;
  background-size: 18px 18px;
  background-color: white;
  color: black;
  border: none;
}

.layer-switcher button:focus,
.layer-switcher button:hover {
  background-color: white;
}

.layer-switcher.shown {
  overflow-y: hidden;
  display: flex;
  flex-direction: column;
  max-height: calc(100% - 5.5em);
}

.layer-switcher.shown.ol-control {
  background-color: transparent;
}

.layer-switcher.shown.ol-control:hover {
  background-color: transparent;
}
.layer-switcher.shown .panel {
  display: block;
}

.layer-switcher.shown button {
  display: none;
}

.layer-switcher.shown.layer-switcher-activation-mode-click > button {
  display: block;
  background-image: unset;
  right: 2px;
  position: absolute;
  background-color: #eee;
  margin: 1px;
}

.layer-switcher.shown button:focus,
.layer-switcher.shown button:hover {
  background-color: #fafafa;
}

.layer-switcher ul {
  list-style: none;
  margin: 1.6em 0.4em;
  padding-left: 0;
}
.layer-switcher ul ul {
  padding-left: 1.2em;
  margin: 0.1em 0 0 0;
}
.layer-switcher li.group + li.group {
  margin-top: 0.4em;
}

.layer-switcher li.group > label {
  font-weight: bold;
}

.layer-switcher.layer-switcher-group-select-style-none li.group > label {
  padding-left: 1.2em;
}

.layer-switcher li {
  position: relative;
  margin-top: 0.3em;
}

.layer-switcher li input {
  position: absolute;
  left: 1.2em;
  height: 1em;
  width: 1em;
  font-size: 1em;
}
.layer-switcher li label {
  padding-left: 2.7em;
  padding-right: 1.2em;
  display: inline-block;
  margin-top: 1px;
}

.layer-switcher label.disabled {
  opacity: 0.4;
}

.layer-switcher input {
  margin: 0px;
}

.layer-switcher.touch ::-webkit-scrollbar {
  width: 4px;
}

.layer-switcher.touch ::-webkit-scrollbar-track {
  -webkit-box-shadow: inset 0 0 6px rgba(0, 0, 0, 0.3);
  border-radius: 2px;}

.layer-switcher.touch ::-webkit-scrollbar-thumb {
  border-radius: 2px;-webkit-box-shadow: inset 0 0 6px rgba(0, 0, 0, 0.5);
}

li.layer-switcher-base-group > label {
  padding-left: 1.2em;
}

.layer-switcher .group button {
  position: absolute;
  left: 0;
  display: inline-block;
  vertical-align: top;
  float: none;
  font-size: 1em;
  width: 1em;
  height: 1em;
  margin: 0;
  background-position: center 2px;
  background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAW0lEQVR4nGNgGAWMyBwXFxcGBgaGeii3EU0tXHzPnj1wQRYsihqQ+I0ExDEMQAYNONgoAN0AmMkNaDSyQSheY8JiaCMOGzE04zIAmyFYNTMw4A+DRhzsUUBtAADw4BCeIZkGdwAAAABJRU5ErkJggg==");
  -webkit-transition: -webkit-transform 0.2s ease-in-out;
  -ms-transition: -ms-transform 0.2s ease-in-out;
  transition: transform 0.2s ease-in-out;
}

.layer-switcher .group.layer-switcher-close button {
  transform: rotate(-90deg);
  -webkit-transform: rotate(-90deg);
}

.layer-switcher .group.layer-switcher-fold.layer-switcher-close > ul {
  overflow: hidden;
  height: 0;
}

/*layerswitcher on the right*/
.layer-switcher.shown.layer-switcher-activation-mode-click {
  padding-left: 34px;
}
.layer-switcher.shown.layer-switcher-activation-mode-click > button {
  left: 0;
  border-right: 0;
}

/*style for layer stwitch button */
.layer-switcher button {
  background-image: url("/static/img/map-icon.png");
  height: 32px;
  width: 32px;
}

#pms-monitoring-map-panel .layer-switcher {
  top: 0.5em;
  right: 0.5em;
}

#pms-monitoring-map-panel .layer-switcher > button,
#pms-monitoring-map-panel .layer-switcher.shown.layer-switcher-activation-mode-click > button {
  align-items: center;
  background-color: rgba(255, 255, 255, 0.98);
  background-image: url("/static/img/map-icon.png");
  background-position: center;
  background-repeat: no-repeat;
  background-size: 18px 18px;
  border: 1px solid #d7dde5;
  border-radius: 2px;
  box-shadow: 0 8px 18px rgba(15, 23, 42, 0.12);
  cursor: pointer;
  display: inline-flex;
  justify-content: center;
  margin: 0;
  min-height: 38px;
  min-width: 38px;
  padding: 0;
}

#pms-monitoring-map-panel .layer-switcher > button:hover,
#pms-monitoring-map-panel .layer-switcher > button:focus,
#pms-monitoring-map-panel .layer-switcher.shown.layer-switcher-activation-mode-click > button:hover,
#pms-monitoring-map-panel .layer-switcher.shown.layer-switcher-activation-mode-click > button:focus {
  background-color: #ffffff;
  border-color: #9db4d0;
  outline: none;
}

#pms-monitoring-map-panel .layer-switcher .panel {
  border: 1px solid #d7dde5;
  border-radius: 2px;
  box-shadow: 0 12px 24px rgba(15, 23, 42, 0.14);
  margin-top: 0.35rem;
  min-width: 220px;
}
.custom-layer-toggle {
  right: 10px; /* Adjust the horizontal position as needed */
}

.layer-toggle-panel {
  margin-top: 5px;
}

/* Base styles for the popup content */
#popup-content {
  max-height: 300px;
  overflow-y: auto;
  margin-bottom: 10px;
  text-align: left;
}

/* Media query for mobile devices */
@media screen and (max-width: 767px) {
  #popup-content {
    max-width: 150px; /* Set max-width to 200px for mobile view */
    width: 100%; /* Ensure the content takes the full width of the viewport */
    margin-left: auto; /* Center the popup horizontally */
    margin-right: auto;
    padding: 7px;
  }
}

.ol-popup {
  position: absolute;
  background-color: #fff;
  box-shadow: 0 2px 20px rgba(0, 0, 0, 0.2);
  padding: 7px;
  border-radius: 2px;border: 1px solid #ddd;
  bottom: 15px;
  left: -50px;
  min-width: 400px;
  font-family: "Arial", sans-serif;
  color: #333;
  line-height: 1.4;
  z-index: 1000;
  font-weight: bold;
}
/* Media query for mobile devices */
@media screen and (max-width: 767px) {
  .ol-popup {
    position: absolute;
    background-color: #fff;
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.2);
    padding: 2px;
    border-radius: 2px;border: 1px solid #ddd;
    bottom: 15px;
    left: -50px;
    min-width: -webkit-fill-available;
    font-family: "Arial", sans-serif;
    color: #333;
    line-height: 1.4;
    z-index: 1000;
    font-weight: bold;
  }
}
.ol-popup:after,
.ol-popup:before {
  top: 100%;
  border: solid transparent;
  content: " ";
  height: 0;
  width: 0;
  position: absolute;
  pointer-events: none;
}

.ol-popup:after {
  border-top-color: #fff;
  border-width: 10px;
  left: 48px;
  margin-left: -10px;
}

.ol-popup:before {
  border-top-color: #ddd;
  border-width: 11px;
  left: 48px;
  margin-left: -11px;
}

.ol-popup-closer {
  position: absolute;
  top: 0px;
  right: 30px;
  text-decoration: none;
  font-size: 22px;
  font-weight: bold;
  color: black;
  border: none;
  padding: 5px;
  cursor: pointer;
}

.ol-popup-closer:hover {
  color: red;
}

/*layerswitcher on the left*/
/*
.layer-switcher.shown.layer-switcher-activation-mode-click {
  padding-right: 34px;
}
.layer-switcher.shown.layer-switcher-activation-mode-click > button {
  right: 0;
  border-left: 0;
}
*/
