/* style.css */
body {
    margin: 0;
    padding: 0;
    font-family: Arial, sans-serif;
}
#map {
    height: 100vh;
    width: 100%;
}
.info {
    position: absolute;
    top: 10px;
    right: 10px;
    background: white;
    padding: 15px;
    border-radius: 8px;
    z-index: 1000;
    box-shadow: 0 0 15px rgba(0,0,0,0.3);
    max-width: 300px;
    max-height: 80vh;
    overflow-y: auto;
}
.progress {
    border: 1px solid #ccc;
    border-radius: 5px;
    padding: 10px;
    background: #f9f9f9;
}

.progress-header {
    cursor: pointer;
    user-select: none;
    display: flex;
    align-items: center;
    gap: 10px;
}

.progress-content {
    overflow: hidden;
    transition: max-height 0.3s ease-out, opacity 0.3s ease;
    max-height: 100px;
    opacity: 1;
}

.progress-content.collapsed {
    max-height: 0;
    opacity: 0;
}

.toggle-btn::before {
    content: '▼';
    display: inline-block;
    transition: transform 0.3s ease;
    font-size: 0.8em;
}

.toggle-btn.collapsed::before {
    transform: rotate(-90deg);
}
.category-toggle {
    margin: 5px 0;
    display: flex;
    align-items: center;
}
.category-toggle input {
    margin-right: 8px;
}
button {
    margin: 5px 0;
    padding: 8px 12px;
    background: #4CAF50;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    width: 100%;
}
button:hover {
    background: #45a049;
}
#search {
    width: 100%;
    padding: 8px;
    margin-bottom: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
}
.marker-count {
    font-size: 0.9em;
    color: #666;
    margin-left: 5px;
}
.tab {
    overflow: hidden;
    border: 1px solid #ccc;
    background-color: #f1f1f1;
    border-radius: 4px;
    margin-bottom: 10px;
}
.tab button {
    background-color: inherit;
    float: left;
    border: none;
    outline: none;
    cursor: pointer;
    padding: 10px 16px;
    transition: 0.3s;
    color: #333;
    margin: 0;
    width: auto;
}
.tab button:hover {
    background-color: #ddd;
}
.tab button.active {
    background-color: #ccc;
}
.tabcontent {
    display: none;
    padding: 6px 0;
    border-top: none;
}
.tabcontent.active {
    display: block;
}
.stats {
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px solid #eee;
}
.stats div {
    margin: 5px 0;
    font-size: 0.9em;
}

/* Стили для инструмента измерения */
.distance-measure-control {
    background: white;
    padding: 5px;
    border-radius: 4px;
    cursor: pointer;
}
.measure-mode-active {
    background-color: #FF9800;
    color: white;
}

/* Стили для popup с ссылкой */
.popup-link {
    display: block;
    margin-top: 10px;
    padding: 8px 12px;
    background-color: #4CAF50;
    color: white;
    text-align: center;
    text-decoration: none;
    border-radius: 4px;
}
.popup-link:hover {
    background-color: #45a049;
}

/* Стили для фильтрации */
.filter-section {
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px solid #eee;
}
.filter-section select, .filter-section input {
    width: 100%;
    padding: 8px;
    margin-bottom: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
}

/* Стили для уведомлений */
.notification {
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0, 0, 0, 0.7);
    color: white;
    padding: 10px 20px;
    border-radius: 5px;
    z-index: 1000;
    display: none;
}
.leaflet-popup-content {
    min-width: 200px;
}
.leaflet-popup-content b {
    color: #333;
}
.marker-cluster {
    transition: transform 0.3s ease;
}

.marker-cluster:hover {
    transform: scale(1.1);
}

/* Темная тема */
@media (prefers-color-scheme: dark) {
    .info {
        background: #2d3748;
        color: white;
    }
    
    .tab {
        background-color: #4a5568;
    }
    
    .tab button {
        color: white;
    }
}
/* Стили для подсказок поиска */
.search-suggestions {
    position: absolute;
    background: white;
    border: 1px solid #ddd;
    border-radius: 4px;
    max-height: 200px;
    overflow-y: auto;
    z-index: 1001;
    width: calc(100% - 16px);
    margin-top: 2px;
}

.suggestion-item {
    padding: 8px 12px;
    cursor: pointer;
    border-bottom: 1px solid #eee;
}

.suggestion-item:hover {
    background-color: #f5f5f5;
}

.suggestion-item:last-child {
    border-bottom: none;
}

/* Анимации */
.marker-cluster {
    transition: transform 0.2s ease;
}

.marker-cluster:hover {
    transform: scale(1.05);
}

.leaflet-marker-icon {
    transition: transform 0.2s ease;
}

.leaflet-marker-icon:hover {
    transform: scale(1.1);
}

/* Темная тема */
@media (prefers-color-scheme: dark) {
    .info {
        background: #2d3748;
        color: white;
    }
    
    .tab {
        background-color: #4a5568;
        border-color: #718096;
    }
    
    .tab button {
        color: white;
        background-color: #4a5568;
    }
    
    .tab button:hover {
        background-color: #718096;
    }
    
    .tab button.active {
        background-color: #2d3748;
    }
    
    .category-toggle label {
        color: white;
    }
    
    .filter-section select, 
    .filter-section input {
        background-color: #2d3748;
        color: white;
        border-color: #718096;
    }
}

/* Адаптивность для мобильных */
@media (max-width: 768px) {
    .info {
        max-width: 250px;
        right: 5px;
        top: 5px;
        padding: 10px;
    }
    
    .tab button {
        padding: 8px 12px;
        font-size: 0.9em;
    }
    
    .stats div {
        font-size: 0.8em;
    }
}

/* Индикатор загрузки */
@keyframes pulse {
    0% { opacity: 1; }
    50% { opacity: 0.5; }
    100% { opacity: 1; }
}

.loading {
    animation: pulse 1.5s infinite;
}