/* map btn */

.layer-control {
  position: fixed;
  display: block;
  bottom: 103px;
  top: unset;
  right: 11px;
  transition: all 0.5s;
  border-radius: 4px;
  /* background-color: rgba(255,255,255,0.4); */
}
.layer-controlup {
  bottom: calc(30% + 59px);
}

.layer-control button {
  background-color: #033e7c;
  cursor: pointer;
  font-weight: 300;
  padding: 0;
  height: 38px;
  width: 38px;
  color: white;
  font-size: 1.14em;
  border: none;
  line-height: 0.4em;
  background-image: url(../img/layers.svg);
  background-repeat: no-repeat;
  background-size: 24px;
  background-position: center;
  border-radius: 5px !important;
}

.layer-control button:hover {
  background-color: #336394;
}
.layer-control button:active {
  background-color: #336394 !important;
}
.layer-control button:focus {
  background-color: #336394;
  box-shadow: none;
}
.layer-control button:focus-visible {
  border: none;
}

/* modal */

.layer-control-modal {
  display: none;
}

div.active.layer-control-modal {
  display: block;
  position: fixed;
  background: #fff;
  bottom: 103px;
  right: 55px;
  z-index: 10000;
  box-shadow: 0px 0px 3px black;
  width: 380px;
  transition: all 0.5s;
  z-index: 10;
}
div.active.layer-control-modal.layer-control-modalup {
  bottom: calc(30% + 57px);
}

.layer-control-modal .layer-control-header {
  color: white;
  background-color: #033e7c;
  padding: 10px 15px;
  display: flex;
  align-items: center;
}

/* Style the tab */
.layer-control-tabs {
  overflow: hidden;
  width: 100%;
  display: flex;
  gap: 8px;
  padding-left: 8px;
  padding-right: 8px;
  padding-top: 8px;
}

.layer-control-footer {
  display: none;
}

.layer-control-actions {
  padding: 12px 0 0 0;
  display: flex;
  gap: 8px;
}

.layer-control-btn.secondary {
  padding: 6px 12px;
  font-size: 14px;
  border: 1px solid #6c757d;
  background: white;
  color: #6c757d;
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.15s ease-in-out;
}

.layer-control-btn.secondary:hover {
  background: #6c757d;
  color: white;
}

/* Reset the body spacing back to original */
.layer-control-body {
  max-height: 450px;
  overflow-y: auto;
  transition: all 0.5s;
}

.layer-control-body.layer-control-bodyup {
  max-height: 301px;
}

/* Style the buttons that are used to open the tab content */
.layer-control-tabs button.layer-control-tablink {
  float: left;
  border: none;
  outline: none;
  cursor: pointer;
  padding: 8px 12px;
  transition: 0.3s;
  width: 100%;
  background: #033e7c;
  color: white;
}

/* Change background color of buttons on hover */
.layer-control-tabs button.layer-control-tablink:hover {
  background-color: #336394;
  color: white;
  border-radius: 4px;
}

.tabcontent-podloge {
  display: none;
}
.tabcontent-podloge.active {
  display: block;
}

.tabcontent-obj-grupe {
  display: none;
}
.tabcontent-obj-grupe.active {
  display: block;
}

.layer-control-tabcontent {
  padding: 12px 12px;
}

/* 
########################
!  LAYER GROUP LIST - PODLOGE
########################
*/
.layer-group-list-podloge {
  list-style: none;
  padding-left: 8px;
  margin-bottom: 0px;
}
.layer-group-item {
  display: flex;
  flex-direction: column;
}
.group-item-container {
  display: flex;
  align-items: center;
  width: 100%;
  margin-bottom: 4px;
}
.layer-group-checkbox {
  margin-right: 8px;
  cursor: pointer;
}
.layer-group-collapsible {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  cursor: pointer;
}
.layer-group-title {
  color: #212529;
  margin-bottom: 0px;
  width: 100%;
  cursor: pointer;
  font-weight: 500;
}
.layer-group-expand-btn {
  background-image: url(../img/arrow_layers.svg);
  background-image: url(../img/arrow_layers.svg);
  height: 16px;
  width: 14px;
  background-color: inherit;
  border: none;
}

/* collapsible layers menu */
.collapsible-layers-menu {
  list-style: none;
  height: 0;
  overflow: hidden;
  padding-left: 22px;
}
.collapsible-layers-menu.active {
  margin-bottom: 10px;
  overflow-y: auto;
  height: auto;
}
.collapsible-layers-menu.active .layer-item {
  margin-bottom: 4px;
}
.layer-item {
  display: flex;
  align-items: center;
  margin-bottom: 4px;
}
.layer-item-checkbox {
  margin-right: 8px;
  cursor: pointer;
}
.custom-checkbox {
  border: 1px solid; /* Default border color will be set via JavaScript */
  display: inline-block;
  width: 13px;
  height: 13px;
  vertical-align: middle;
  margin-right: 8px;
  cursor: pointer;
  background-size: cover;
  border-radius: 2px;
}

.custom-checkbox.checked {
  background-image: url(../img/checkIconLayerControl.svg);
}
.layer-item-title {
  margin-bottom: 0px;
}
.sheets-division-layer {
  padding-left: 20px;
}

/* 
########################
!  LAYER LIST - OBJEKTNE GRUPE
########################
*/
.layer-list-obj-grupe {
  list-style: none;
  padding-left: 8px;
  margin-bottom: 0px;
}

.disabled-layer {
  opacity: 0.5;
  pointer-events: none;
}

.disabled-layer .custom-checkbox {
  border-color: #ccc !important;
  background-color: transparent !important;
}

.disabled-layer .layer-item-title {
  color: #666;
  cursor: not-allowed !important;
}

@media (max-width: 481px) {
  div.active.layer-control-modal {
    bottom: 0;
    left: 0;
    width: 100vw;
  }
  .layer-control {
    bottom: 176px;
  }
  .layer-control button {
    width: 50px;
    height: 50px;
  }
}
@media (max-width: 385px) {
  .layer-control {
    bottom: 146px;
  }
  .layer-control button {
    width: 40px;
    height: 40px;
  }
}
@media (max-width: 346px) {
  .layer-control {
    bottom: 140px;
  }
  .layer-control button {
    width: 35px;
    height: 35px;
  }
}
