html,
body {
  margin: 0;
  padding: 0;
  height: 100%;
  overflow: hidden;
}

body {
  font-family: "Roboto", sans-serif;
  font-size: 16px;
  line-height: 24px;
  font-weight: 400;
  font-style: normal;
  color: rgba(27, 31, 44, 0.87);
}

.wrapper {
  position: relative;
  height: 100dvh;
  width: 100%;
  overflow: hidden;
}

button {
  font-size: inherit;
  line-height: inherit;
  font-weight: inherit;
  color: inherit;
  font-style: inherit;
}

.logo {
  position: absolute;
  z-index: 5;
  top: 10px;
  left: 10px;
}

#map {
  width: 100%;
  height: 100dvh;
  position: absolute;
  top: 0;
  left: 0;
}

#filter-panel {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 250px;
  background: white;
  padding: 10px;
  border-radius: 5px;
  box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
  z-index: 1002;
}

.ol-attribution {
  display: none;
}

.ol-control button {
  background-color: #1a4414;
  cursor: pointer;
}

.ol-zoom button {
  height: 34px;
  width: 34px;
  font-size: 26px;
  font-weight: 100;
  margin: 0 !important;
}

.ol-zoomslider {
  width: 30px;
  left: 8.5px;
  top: 81px;
  top: calc(50% + 50px);
  transform: translate(0, -50%);
}

.ol-touch .ol-zoomslider {
  top: calc(50% + 50px);
}

.ol-zoomslider-thumb {
  width: 28px !important;
}

.ol-control button:hover {
  background-color: #012b00;
}

.ol-control button:focus {
  background-color: #012b00;
}

.ol-control {
  background-color: rgb(210 210 210 / 40%);
  box-shadow: 0 0 10px rgba(0, 0, 0, 0.2);
}

.ol-control:hover {
  background-color: rgb(210 210 210 / 40%);
}

.ol-zoom {
  top: calc(50% - 95px);
  transform: translate(0, -50%);
  background: transparent;
  padding: 0;
  left: 9px;
  box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
  border-radius: 11px;
}

.ol-scale-line-inner {
  color: #eee;
  font-size: 14px;
}

.ol-zoom .ol-zoom-out {
  border-radius: 0 0 11px 11px;
}

.ol-zoom .ol-zoom-in {
  border-radius: 11px 11px 0 0;
}

.ol-scale-line {
  background: rgba(1, 43, 0, 0.3);
}

#filter-panel select,
#filter-panel input,
#filter-panel button {
  width: 100%;
  margin-bottom: 10px;
  padding: 5px;
  box-sizing: border-box;
}

#legend-panel {
  position: absolute;
  bottom: 10px;
  right: 10px;
  background: white;
  padding: 10px;
  border-radius: 5px;
  box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
  z-index: 1002;
}

#legend-image {
  max-width: 100%;
  height: auto;
}

.ol-popup {
  position: absolute;
  background-color: white;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.2);
  padding: 15px;
  border-radius: 10px;
  border: 1px solid #cccccc;
  min-width: 280px;
  z-index: 1001;
  left: 10px;
  top: 10px;
}

.ol-popup-closer {
  text-decoration: none;
  position: absolute;
  top: 5px;
  right: 8px;
  font-size: 16px;
  color: #666;
  cursor: pointer;
}

#popup-content {
  max-height: 300px;
  overflow-y: auto;
  padding-right: 20px;
}

.feature-info-table {
  border-collapse: collapse;
  width: 100%;
  margin-bottom: 10px;
}

.feature-info-table th,
.feature-info-table td {
  border: 1px solid #ddd;
  padding: 8px;
  text-align: left;
}

.feature-info-table th {
  background-color: #f4f4f4;
}

#attribute-panel {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: #f6f9fb;
  padding: 30px 20px;
  max-height: 300px;
  overflow-y: auto;
  overflow-x: hidden;
  box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.2);
  z-index: 1001;
  transform: translateY(calc(100% + 10px));
  transition: transform 0.3s ease-in-out;
}

#attribute-panel.visible {
  transform: translateY(0);
}

#attribute-panel h4 {
  margin-top: 0;
  font-size: 20px;
  line-height: 28px;
  margin-bottom: 12px;
  margin-top: 24px;
}

.attribute-header h3 {
  font-size: 26px;
  line-height: 30px;
  margin: 0;
}

.attribute-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

#close-attributes {
  background: none;
  border: none;
  font-size: 20px;
  cursor: pointer;
  padding: 5px;
}

.feature-info-table {
  border-collapse: collapse;
  width: 100%;
  margin-bottom: 10px;
  font-size: 12px;
  line-height: 18px;
}

.feature-info-table th,
.feature-info-table td {
  border: 1px solid #ddd;
  padding: 8px;
  text-align: left;
}

.feature-info-table th {
  background-color: #37474f;
  white-space: nowrap;
  color: #fff;
  font-weight: 400;
}

.panel-button {
  position: absolute;
  right: 10px;
  background: #f6f9fb;
  border: none;
  width: 40px;
  height: 40px;
  border-radius: 4px;
  box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
  cursor: pointer;
  z-index: 1002;
  display: flex;
  align-items: center;
  justify-content: center;
}

.panel-button:hover {
  background: #f4f4f4;
}

#filter-button {
  top: 10px;
}

#legend-button {
  top: 60px;
}

#filter-panel,
#legend-panel {
  transform: translateX(calc(100% + 10px));
  transition: transform 0.3s ease-in-out;
}

#filter-panel.visible,
#legend-panel.visible {
  transform: translateX(0);
}

.panel-button i {
  font-size: 20px;
}

.panel-header {
  display: flex;
  align-items: center;
  margin-bottom: 10px;
}

.panel-header .left-part {
  width: 90%;
  display: flex;
  align-items: center;
}

.panel-header .right-part {
  width: 10%;
  display: flex;
  align-items: center;
  justify-content: flex-end;
}

.panel-closer {
  background: none;
  border: none;
  font-size: 20px;
  cursor: pointer;
  padding: 5px;
  color: #666;
  margin-left: 10px;
  flex-shrink: 0;
}

.checkbox-container {
  display: flex;
  align-items: center;
  margin-bottom: 8px;
  margin-left: 8px;
}

.checkbox-container .left-part {
  display: flex;
  align-items: center;
  justify-content: center;
}

.checkbox-container .right-part {
  display: flex;
  align-items: center;
  justify-content: center;
}

.checkbox-container input[type="checkbox"] {
  margin: 0 15px 3px 0 !important;
}

.panel-header h3,
.checkbox-container label {
  margin: 0;
}

.checkbox-container label {
  margin: 0;
}

.checkbox__title {
  font-size: 22px;
  line-height: 28px;
  margin-top: 0;
  margin-bottom: 8px;
}

/* Стили для выпадающего списка автозаполнения */
.autocomplete-items {
  position: absolute;
  border: 1px solid #d4d4d4;
  border-top: none;
  z-index: 1003;
  top: 100%;
  left: 0;
  right: 0;
  background-color: white;
  max-height: 200px;
  overflow-y: auto;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.autocomplete-items div {
  padding: 8px 10px;
  cursor: pointer;
  border-bottom: 1px solid #f4f4f4;
}

.autocomplete-items div:hover {
  background-color: #f4f4f4;
}

#name-filter {
  position: relative;
}

/* Стиль для контейнера поля поиска */
.search-container {
  position: relative;
  width: 100%;
}

.panel-closer:after,
.panel-closer:before {
  position: absolute;
  left: 50%;
  content: " ";
  height: 100%;
  width: 2px;
  top: 0;
  background-color: rgba(27, 31, 44, 0.87);
}

.panel-closer {
  position: absolute;
  right: 16px;
  top: 14px;
  width: 20px !important;
  height: 20px;
  opacity: 0.4;
  transition: opacity 0.2s ease-in;
}

.panel-closer:hover {
  opacity: 1;
}

.panel-closer:before {
  transform: rotate(45deg);
}

.panel-closer:after {
  transform: rotate(-45deg);
}

#filter-panel,
#legend-panel {
  top: 0;
  right: 0;
  bottom: 0;
  border-radius: 0;
  width: 300px;
  background-color: #f6f9fb;
  padding: 30px 20px;
  box-shadow: 0 0 10px rgba(0, 0, 0, 0.2);
  display: flex;
  flex-direction: column;
}

.left-part {
  font-size: 26px !important;
  line-height: 30px;
}

.panel-header {
  margin-bottom: 18px;
}

.select-container select {
  display: block;
  width: 100%;
  height: 38px;
  font-size: 16px;
  line-height: 1.5;
  color: #495057;
  background-color: #fff;
  background-clip: padding-box;
  border-radius: 2px;
  border: 1px solid rgba(0, 0, 0, 0.1);
  transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
  cursor: pointer;
  margin-bottom: 14px !important;
  appearance: none;
}

.select-container .fa-angle-down {
  position: absolute;
  bottom: 2px;
  right: 2px;
  pointer-events: none;
  background: #fff;
  padding: 9px;
}

.search-container,
.select-container {
  position: relative;
}

.select-container select:focus+.fa-angle-down {
  transform: rotate(180deg);
}

.search-container input {
  display: block;
  width: 100%;
  height: 38px;
  padding: 6px 12px;
  font-size: 18px;
  line-height: 1.5;
  color: #495057;
  background-color: #fff;
  background-clip: padding-box;
  border-radius: 2px;
  border: 1px solid rgba(0, 0, 0, 0.1);
  transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
  outline: none;
}

.search-icon img {
  width: 24px;
  height: 24px;
}

.search-icon {
  position: absolute;
  pointer-events: none;
  top: 7px;
  right: 2px;
  background: #fff;
  height: 24px;
  padding-right: 5px;
  padding-left: 5px;
}

.select-container select:focus {
  border-color: #80bdff;
  box-shadow: 0 0 0 2px #1a4414 !important;
}

.select-container select:focus-visible {
  outline: none;
}

.select__title {
  font-size: 15px;
  line-height: 24px;
  margin-top: 0;
  margin-bottom: 3px;
  font-weight: 400;
}

.filter__buttons {
  margin-top: auto;
}

#print-button {
  color: #fff;
  border: 1px solid #0e3808;
  padding: 8px 20px;
  border-radius: 4px;
  background-color: #1a4414;
  cursor: pointer;
  transition: all 0.2s ease-in-out;
}

#print-button:hover {
  background-color: #012b00;
  border-color: #002600;
}

#clear-button {
  border: 1px solid rgba(0, 0, 0, 0.1);
  padding: 8px 20px;
  border-radius: 4px;
  background-color: #fff;
  cursor: pointer;
  transition: all 0.2s ease-in-out;
}

#clear-button:disabled {
  opacity: 0.5;
  cursor: auto;
}

#region:disabled {
  background-color: #f6f9fb;
  position: relative;
}

#region:disabled+.fa-angle-down {
  background-color: #f6f9fb;
  opacity: 0.7;
}

.table-box {
  overflow-x: auto;
}

@media screen and (max-width: 760px) {

  #filter-panel,
  #legend-panel,
  #attribute-panel {
    top: auto;
    bottom: 0;
    left: 0;
    right: 0;
    width: 100%;
    max-height: 450px;
    transform: translateY(calc(100% + 10px));
    overflow-y: auto;
    padding: 0;
    border-radius: 24px 24px 0 0;
  }

  #filter-panel.visible,
  #legend-panel.visible {
    transform: translateY(0);
  }

  .panel-header,
  .attribute-header {
    position: sticky;
    top: 0;
    left: 0;
    z-index: 5;
    background-color: #f6f9fb;
    padding-top: 16px;
    padding-bottom: 8px;
    padding: 16px 12px 12px 12px;
  }

  .filter-panel__box {
    padding: 0 12px;
  }

  .panel-closer {
    top: 20px;
  }

  .filter__buttons {
    margin-top: 14px;
  }

  .logo img {
    width: 50px;
  }

  #legend-image {
    padding: 0 12px;
    margin-bottom: 20px;
  }

  #attribute-content {
    padding: 0 12px;
  }

  .feature-info-table th {
    white-space: unset;
  }
}

@media print {

  #filter-panel,
  #legend-panel,
  #attribute-panel,
  #filter-button,
  #legend-button,
  .ol-zoom,
  .ol-zoomslider {
    display: none !important;
  }
}

@media screen and (orientation: landscape) and (max-height: 460px) {
  .logo {
    display: none;
  }
}