/* =================== Основные стили =================== */

/* Стили для body и html */
body, html {
    margin: 0;
    padding: 0;
    height: 100%;
    font-family: Arial, sans-serif;
    overflow: hidden;
    background: #111;
    font-size: 18px;
}

@media (max-width: 768px) {
    body, html {
        font-size: 18px;
    }
}

/* Контейнер для основной карты */
#mainMap {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
}

/* Контейнер для сравнения карт */
.compare-container {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 600px;
    height: 600px;
    transform: translate(-50%, -50%);
    z-index: 3;
    border-radius: 0;
    border: none;
    box-shadow: none;
    margin: 0;
    padding: 0;
    position: absolute;
}

/* Карты внутри контейнера сравнения */
#beforeCompare, #afterCompare {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.date-header {
    display: none !important;
}

/* =================== Элементы управления =================== */

/* Контейнер управления */
.controls {
    position: absolute;
    top: 10px;
    right: 10px;
    z-index: 15;
    background-color: rgba(255, 255, 255, 0.9);
    padding: 15px;
    border-radius: 8px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
    width: 310px;
    transition: max-height 0.3s ease, opacity 0.3s ease;
    overflow: hidden;
    max-height: 1000px;
    opacity: 1;
    display: block !important;
    visibility: visible !important;
}

.controls.collapsed {
    max-height: 180px;
    opacity: 0.9;
}

/* Поисковый контейнер */
.search-container {
    margin-bottom: 10px;
    position: relative;
}

/* Стиль для текстовых полей */
input[type="text"] {
    width: 100%;
    padding: 8px;
    margin-top: 5px;
    box-sizing: border-box;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-size: 16px;
}

/* Стили для предложений поиска */
.search-suggestions {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background-color: white;
    border: 1px solid #ccc;
    border-top: none;
    max-height: 150px;
    overflow-y: auto;
    z-index: 20;
    display: none;
}

.search-suggestions div {
    padding: 8px;
    cursor: pointer;
}

.search-suggestions div:hover {
    background-color: #f0f0f0;
}

/* Стиль для кнопок */
button {
    width: 100%;
    padding: 8px;
    margin-top: 5px;
    background-color: #3498db;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 16px;
    transition: background-color 0.3s;
}

button:hover {
    background-color: #2980b9;
}

/* Спиннер загрузки */
#globalSpinner {
    display: none;
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    border: 6px solid #f3f3f3;
    border-top: 6px solid #3498db;
    border-radius: 50%;
    width: 30px;
    height: 30px;
    animation: spin 1s linear infinite;
    z-index: 1000;
}

@keyframes spin {
    0% { transform: translate(-50%, -50%) rotate(0deg); }
    100% { transform: translate(-50%, -50%) rotate(360deg); }
}

/* Кнопка "Мое местоположение" */
.my-location-button {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 35px;
    height: 35px;
    background-color: #fff;
    border: 2px solid #ccc;
    border-radius: 50%;
    cursor: pointer;
    position: absolute;
    top: 50%;
    right: 10px;
    transform: translateY(-50%);
    z-index: 16;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
    transition: background-color 0.3s, border-color 0.3s;
}

.my-location-button:hover {
    background-color: #f0f0f0;
    border-color: #3498db;
}

.my-location-button button {
    background: none;
    border: none;
    padding: 0;
    margin: 0;
    cursor: pointer;
}

.my-location-button svg {
    width: 14px;
    height: 14px;
}

/* Сообщения об ошибках */
.error-message {
    color: red;
    margin-top: 10px;
    display: none;
} 