/* Обнуление */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  border: 0;
  outline: 0;
  text-decoration: none;
  list-style: none;
}

body {
  font-family: "Nunito", sans-serif;
  overflow: hidden;
  font-size: 14px;
}

#arrow {
  display: none;
}

/* Кнопка меню */
label {
  position: fixed;
  top: 1rem;
  left: 1rem;
  width: 3rem;
  height: 3rem;
  background: #fff;
  border-radius: 50%;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 1001;
  transition: all 0.3s ease;
}

label .fa-times {
  display: none;
}

#arrow:checked ~ .sidebar {
  left: 0;
}

#arrow:checked ~ .container {
  margin-left: 380px;
  width: calc(100% - 380px);
}

#arrow:checked + label {
  left: 400px;
}

#arrow:checked + label .fa-bars {
  display: none;
}

#arrow:checked + label .fa-times {
  display: block;
}

/* Сайдбар */
.sidebar {
  position: fixed;
  top: 0;
  left: -380px;
  width: 380px;
  height: 100%;
  background: white;
  box-shadow: 2px 0 5px rgba(0, 0, 0, 0.1);
  transition: left 0.3s ease;
  z-index: 1000;
  padding: 1.5rem;
  overflow-y: auto;
}

/* Поиск */
.search-group {
  display: flex;
  margin-bottom: 1.5rem;
  border: 1px solid #ddd;
  border-radius: 8px;
  overflow: hidden;
}

/* Интуп поиска */
.search-input {
  flex: 1;
  padding: 1rem;
  font-size: 1rem;
  border: none;
  flex-shrink: 1;
  min-width: 0;
}

/* Кнопка поиска */
.search-btn {
  background: #0095b6;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 50px;
  flex-shrink: 0;
  transition: background 0.2s;
}

.search-btn:hover {
  background: #007a9b;
}

.search-btn svg {
  width: 20px;
  height: 20px;
  fill: white;
}

.results-title {
  font-size: 1.2rem;
  font-weight: bold;
  margin-bottom: 0.8rem;
  color: #333;
}

.results-list {
  font-size: 1rem;
}

.snt-item {
  padding: 0.8rem;
  border-bottom: 1px solid #eee;
  cursor: pointer;
  transition: background 0.2s;
  border-radius: 5px;
}

.snt-item:hover {
  background: #f5f5f5;
}

.snt-name {
  font-weight: bold;
  margin-bottom: 0.3rem;
  color: #0095b6;
}

.snt-address {
  font-size: 0.9rem;
  color: #666;
}

/* Карта */
.container {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100vh;
  transition: all 0.3s ease;
}

.map-container {
  width: 100%;
  height: 100%;
}

#map {
  width: 100%;
  height: 100%;
  transition: all 0.3s ease;
}

/* Инфо-панель */
.info-panel {
  position: fixed;
  top: 0;
  right: -380px;
  width: 380px;
  height: 100%;
  background: white;
  box-shadow: -2px 0 5px rgba(0, 0, 0, 0.1);
  transition: right 0.3s ease;
  z-index: 999;
  padding: 1.5rem;
  overflow-y: auto;
}

.info-panel.active {
  right: 0;
}

/* Активна инфо-панель */
.info-panel.active ~ .container {
  width: calc(100% - 380px);
}

/* Активны сайдбар и инфо-панель */
#arrow:checked ~ .info-panel.active ~ .container {
  margin-left: 380px;
  width: calc(100% - 760px);
}

.info-panel h2 {
  margin-bottom: 1rem;
  color: #0095b6;
  border-bottom: 1px solid #eee;
  padding-bottom: 0.5rem;
  padding-right: 2rem;
}

/* Кресик инфо-панели */
.close-info {
  position: absolute;
  top: 1.5rem;
  right: 1.5rem;
  background: none;
  border: none;
  font-size: 1.2rem;
  cursor: pointer;
  color: #666;
  width: 30px;
  height: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  transition: background 0.2s;
}

.close-info:hover {
  background: #f5f5f5;
}

.info-section {
  margin-bottom: 1.5rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid #eee;
}

.info-section h3 {
  color: #333;
  margin-bottom: 0.8rem;
  font-size: 1.1rem;
}

.info-section p {
  margin-bottom: 0.5rem;
  line-height: 1.4;
}

.lots-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 0.5rem;
}

/* Участки */
.lot-btn {
  background: #e6f7ff;
  border: 1px solid #0095b6;
  border-radius: 5px;
  padding: 8px 12px;
  font-size: 0.9rem;
  color: #0095b6;
  cursor: pointer;
  transition: all 0.2s ease;
  min-width: 50px;
  text-align: center;
}

.lot-btn:hover {
  background: #0095b6;
  color: white;
  transform: translateY(-1px);
  box-shadow: 0 2px 4px rgba(0, 149, 182, 0.3);
}

.lot-btn:active {
  transform: translateY(0);
  box-shadow: 0 1px 2px rgba(0, 149, 182, 0.3);
}

/* Скроллбары */
.sidebar::-webkit-scrollbar,
.info-panel::-webkit-scrollbar {
  width: 8px;
}

.sidebar::-webkit-scrollbar-track,
.info-panel::-webkit-scrollbar-track {
  background: #f1f1f1;
  border-radius: 4px;
}

.sidebar::-webkit-scrollbar-thumb,
.info-panel::-webkit-scrollbar-thumb {
  background: #c1c1c1;
  border-radius: 4px;
}

.sidebar::-webkit-scrollbar-thumb:hover,
.info-panel::-webkit-scrollbar-thumb:hover {
  background: #a8a8a8;
}

/* Для Firefox */
.sidebar,
.info-panel {
  scrollbar-width: thin;
  scrollbar-color: #c1c1c1 #f1f1f1;
}

/* Адаптивность */
@media (max-width: 1200px) {
  .sidebar {
    width: 350px;
    left: -350px;
  }

  #arrow:checked ~ .container {
    margin-left: 350px;
    width: calc(100% - 350px);
  }

  #arrow:checked + label {
    left: 370px;
  }

  .info-panel {
    width: 350px;
    right: -350px;
  }

  .info-panel.active ~ .container {
    width: calc(100% - 350px);
  }

  #arrow:checked ~ .info-panel.active ~ .container {
    margin-left: 350px;
    width: calc(100% - 700px);
  }
}

@media (max-width: 992px) {
  .sidebar {
    width: 320px;
    left: -320px;
  }

  #arrow:checked ~ .container {
    margin-left: 320px;
    width: calc(100% - 320px);
  }

  #arrow:checked + label {
    left: 340px;
  }

  .info-panel {
    width: 320px;
    right: -320px;
  }

  .info-panel.active ~ .container {
    width: calc(100% - 320px);
  }

  #arrow:checked ~ .info-panel.active ~ .container {
    margin-left: 320px;
    width: calc(100% - 640px);
  }
}

@media (max-width: 768px) {
  .sidebar {
    width: 300px;
    left: -300px;
  }

  #arrow:checked ~ .container {
    margin-left: 300px;
    width: calc(100% - 300px);
  }

  #arrow:checked + label {
    left: 320px;
  }

  .info-panel {
    width: 300px;
    right: -300px;
  }

  .info-panel.active ~ .container {
    width: calc(100% - 300px);
  }

  #arrow:checked ~ .info-panel.active ~ .container {
    margin-left: 300px;
    width: calc(100% - 600px);
  }

  .lot-btn {
    padding: 6px 10px;
    font-size: 0.85rem;
    min-width: 45px;
  }
}

@media (max-width: 576px) {
  .sidebar {
    width: 280px;
    left: -280px;
  }

  #arrow:checked ~ .container {
    margin-left: 280px;
    width: calc(100% - 280px);
  }

  #arrow:checked + label {
    left: 300px;
  }

  .info-panel {
    width: 280px;
    right: -280px;
  }

  .info-panel.active ~ .container {
    width: calc(100% - 280px);
  }

  #arrow:checked ~ .info-panel.active ~ .container {
    margin-left: 280px;
    width: calc(100% - 560px);
  }

  label {
    width: 2.5rem;
    height: 2.5rem;
    top: 0.8rem;
    left: 0.8rem;
  }

  #arrow:checked + label {
    left: 300px;
  }

  .lot-btn {
    padding: 5px 8px;
    font-size: 0.8rem;
    min-width: 40px;
  }
}
