/* Класс для скрытия элементов */
.hidden {
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

/* =================== Стили для RainViewer =================== */

/* Стиль для контейнера ползунка */
#timeSliderContainer {
    background-color: rgba(255, 255, 255, 0.85);
    padding: 10px 15px;
    position: absolute;
    bottom: 60px; 
    left: 50%; 
    transform: translateX(-50%);
    background: rgba(255,255,255,0.8);
    padding: 15px 20px;
    border-radius: 4px; 
    z-index: 2;
    box-shadow: 0 2px 6px rgba(0,0,0,0.3);
    display: flex;
    align-items: center;
    gap: 5px;
    width: 400px; /* Увеличили ширину для размещения меток */
    box-sizing: border-box; /* Включаем паддинги в ширину */
    justify-content: space-between; /* Равномерное распределение */
}

/* Обёртка для ползунка и метки времени */
.slider-wrapper {
    position: relative; /* Для абсолютного позиционирования метки */
    width: 300px; /* Совпадает с шириной ползунка */
}

/* Стиль для метки времени */
#timeLabel {
    position: absolute;
    top: -15px; /* Расстояние над ползунком */
    left: 50%;
    transform: translateX(-50%);
    color: #000000;
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 12px;
    white-space: nowrap;
    pointer-events: none;
    transition: left 0.1s ease-out; /* Плавное перемещение */
}

/* Стиль для ползунка */
#timeSlider {
    width: 100%;
    -webkit-appearance: none;
    appearance: none;
    height: 6px;
    background: #00BFFF; /* Голубой цвет фона ползунка */
    outline: none;
    border-radius: 3px;
    background-image: linear-gradient(to right, #00BFFF 0%, #00BFFF 100%);
    position: relative;
}

#timeSlider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 16px;
    height: 16px;
    background: #00BFFF; /* Голубой цвет кнопки */
    border: 2px solid #ebefff; /* Светло-голубая граница */
    border-radius: 50%;
    cursor: pointer;
    margin-top: -5px;
    box-shadow: 0 0 2px rgba(0,0,0,0.5);
    position: relative;
    z-index: 2;
}

#timeSlider::-moz-range-thumb {
    width: 16px;
    height: 16px;
    background: #00BFFF; /* Голубой цвет кнопки */
    border: 2px solid #ebefff; /* Светло-голубая граница */
    border-radius: 50%;
    cursor: pointer;
    box-shadow: 0 0 2px rgba(0,0,0,0.5);
    position: relative;
    z-index: 2;
}

/* Стиль для контейнера нижних меток */
.labels-container {
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: relative;
}


/* Стиль для меток */
#leftLabel, #rightLabel {
    font-size: 12px;
    color: #000;
    white-space: nowrap; /* Предотвращает перенос текста */
    position: absolute;
    bottom: 0px; /* Расстояние под временной шкалой */
}

#leftLabel {
    left: 100px; /* Расположение слева */
    transform: translateX(0);
}

#rightLabel {
    right: 50px; /* Расположение справа */
    transform: translateX(0);
}

/* Стиль для кнопки Play/Pause */
#playPauseButton {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 18px;
    color: #00BFFF;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    transition: transform 0.2s;
}

#playPauseButton:hover {
    transform: scale(1.2);
}

#playPauseButton:focus {
    outline: none;
}

/* Стиль для метки "now" */
#nowLabel {
    position: absolute;
    top: 25px; /* Расстояние под ползунком */
    left: 60%; /* Фиксированное положение по горизонтали */
    transform: translateX(-50%);
    font-size: 12px;
    color: #000;
    white-space: nowrap;
    pointer-events: none; /* Чтобы не мешать взаимодействию с ползунком */
    transition: none; /* Отключаем плавное перемещение */
}

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

/* Стили для 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;
}

/* Стили для переключателей слоёв */
.layer-toggle {
    margin-top: 10px;
}

.layer-toggle label {
    display: flex;
    align-items: center;
    margin-bottom: 5px;
    cursor: pointer;
    font-size: 14px;
    color: #333;
}

.layer-toggle input {
    margin-right: 10px;
    cursor: pointer;
}

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

/* Спиннер загрузки */
#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;
}

/* =================== Бургер-меню для сравнения слоев =================== */

/* Контейнеры для меню чекбоксов слоев сравнения */
.compare-layer-controls {
    position: absolute;
    top: 10px; /* Выравниваем по высоте с бургер-меню */
    z-index: 20;
    background: rgba(255, 255, 255, 0.9);
    padding: 10px;
    border-radius: 8px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
    width: 200px;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease, opacity 0.3s ease;
    opacity: 0;
}

.compare-layer-controls.open {
    max-height: 300px;
    opacity: 1;
    margin-top: 0;
}

#beforeLayerControls {
    left: 60px;
}

#afterLayerControls {
    right: 60px;
}

/* Метка для бургер-меню сравнения слоев */
.compare-menu-toggle {
    position: absolute;
    top: 10px; /* Оставляем в верху */
    z-index: 21;
    width: 40px; /* Вернули к исходному размеру */
    height: 40px; /* Вернули к исходному размеру */
    border-radius: 50%;
    background: white;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
}

#beforeMenuToggle {
    left: 10px;
}

#afterMenuToggle {
    right: 10px;
}

.compare-menu-toggle span {
    display: block;
    width: 20px; /* Вернули к исходному размеру */
    height: 3px; /* Вернули к исходному размеру */
    background-color: #333;
    margin: 2px 0;
    border-radius: 3px;
    transition: all 0.3s ease;
}

.compare-menu-toggle.open span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px); /* Вернули к исходным значениям */
}

.compare-menu-toggle.open span:nth-child(2) {
    opacity: 0;
}

.compare-menu-toggle.open span:nth-child(3) {
    transform: rotate(-45deg) translate(5px, -5px); /* Вернули к исходным значениям */
}

/* Стили для чекбоксов в меню слоев */
.compare-layer-item {
    margin-bottom: 10px;
}

.compare-layer-item label {
    display: flex;
    align-items: center;
    font-size: 16px;
    cursor: pointer;
}

.compare-layer-item input[type="checkbox"] {
    margin-right: 10px;
    width: 16px;
    height: 16px;
}

/* Стиль для активной метки чекбокса */
.compare-layer-item input[type="checkbox"]:checked + span {
    font-weight: bold;
    color: #2980b9;
}

/* =================== Чекбоксы =================== */

/* Общий контейнер для чекбоксов */
#checkboxContainer {
    position: absolute;
    top: 10px;
    left: 10px;
    z-index: 1000;
    background-color: rgba(255, 255, 255, 0.9);
    padding: 10px;
    border-radius: 8px;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
    display: flex;
    flex-direction: column;
    gap: 10px;
    max-width: 220px;
    transition: transform 0.3s ease, opacity 0.3s ease;
}

/* Индивидуальные стили для чекбоксов */
#checkboxContainer label {
    font-size: 18px;
    display: flex;
    align-items: center;
}

/* Стили для вложенных чекбоксов OpenWeather */
#weatherLayers {
    margin-left: 20px;
    display: none;
    flex-direction: column;
    gap: 5px;
}

/* =================== Сечи (Ticks) =================== */

.tick {
    display: none;
}

#tickLeft {
    left: 125px; /* Соответствует leftLabel */
    transform: translateX(0);
}

#tickNow {
    left: calc(75px + 300px * 60%); /* Соответствует позиции nowLabel */
    transform: translateX(-50%);
}

#tickRight {
    right: 5px;
    transform: translateX(50%);
}

/* =================== Бургер-меню для основных настроек =================== */

/* Скрытый чекбокс для бургер-меню */
.menu-toggle-checkbox {
    display: none;
}

/* Метка-бургер */
.menu-toggle-label {
    display: none; /* Скрыть по умолчанию, показать в медиазапросах */
    position: absolute;
    top: 10px;
    left: 10px;
    width: 30px;
    height: 25px;
    flex-direction: column;
    justify-content: space-between;
    cursor: pointer;
    z-index: 1001;
}

.menu-toggle-label span {
    display: block;
    width: 100%;
    height: 4px;
    background-color: white;
    border-radius: 2px;
    transition: all 0.3s ease;
}

/* Анимация бургер-иконки при открытии меню */
.menu-toggle-checkbox:checked + .menu-toggle-label span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

.menu-toggle-checkbox:checked + .menu-toggle-label span:nth-child(2) {
    opacity: 0;
}

.menu-toggle-checkbox:checked + .menu-toggle-label span:nth-child(3) {
    transform: rotate(-45deg) translate(5px, -5px);
}

/* =================== Responsive Styles =================== */

@media (max-width: 1024px) {
    /* Убираем отступы и задаём размеры для body и html */
    html, body {
        margin: 0;
        padding: 0;
        width: 100vw;
        height: 100vh;
        overflow: hidden;
    }

    /* Увеличиваем размер search-container для мобильных */
    .search-container {
        position: fixed;
        top: 0;
        width: 100%;
        height: 50px;
        z-index: 1001;
        display: flex;
        align-items: center;
        padding: 0 60px 0 50px; /* сверху: 0, справа: 50px, снизу: 0, слева: 0 */
        box-sizing: border-box;
        left: 10px;
    }
    
    /* Увеличиваем поле ввода */
    .search-container input[type="text"] {
        flex: 1;                 /* поле занимает всю ширину контейнера */
        height: 36px;            /* подгоняем высоту */
        font-size: 16px;
        padding: 8px;         /* внутренние отступы слева/справа */
        color: #000000;             /* цвет текста (при тёмном фоне) */
        background-color: rgb(255, 255, 255); /* полупрозрачный фон */
        border: none;
        border-radius: 4px;      /* скруглим углы */
        box-sizing: border-box;
    }
    
    /* Увеличиваем кнопку поиска */
    .search-container button {
        display: none;
    }

    /* Скрываем блок ошибок или делаем его более компактным */
    .error-message {
        display: none;
    }

    /* Увеличиваем подсказки поиска */
    .search-suggestions div {
        padding: 0px;       /* Увеличиваем отступы в подсказках */
        font-size: 16px;     /* Увеличиваем размер шрифта */
    }
    
    #controlsMenu, .controls {
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        height: 0px;
        display: flex;
        align-items: center;
        background-color: rgba(255, 255, 255, 0); /* полупрозрачный фон */
        box-sizing: border-box;
    }

    .geojson-controls {
        display: none !important;
    }

    #beforeLayerControls {
        left: 55px; /* Сдвигаем вправо на мобильных */
    }

    #afterLayerControls {
        right: 55px; /* Сдвигаем влево на мобильных */
    }

    /* Контейнер для сравнения */
    .compare-container {
        width: 100%;
        height: 50vh;
        top: 50%;
        border-radius: 0;
        border: none;
        box-shadow: none;
        margin: 0;
        padding: 0;
        position: absolute;
    }

    /* Элементы управления */
    .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;
    }

    .controls input[type="text"], .controls button {
        font-size: 14px;
    }

    /* Меню слоев сравнения на мобильных устройствах */
    .compare-layer-controls {
        width: 180px;
        padding: 8px;
        top: 10px; /* Обновили позицию */
    }

    .compare-menu-toggle {
        width: 40px; /* Вернули к исходному */
        height: 40px; /* Вернули к исходному */
        top: 8px;
    }

    .compare-layer-item label {
        font-size: 14px;
    }

    #checkboxContainer input[type="checkbox"] {
        width: 20px;
        height: 20px;
        margin-right: 10px;
        cursor: pointer;
        z-index: 1020;
    }

    /* Кнопка "Мое местоположение" */
    .my-location-button {
        display: flex;
        align-items: center;
        justify-content: center;
        width: 35px;
        height: 35px;
        background-color: #fff;
        cursor: pointer;
        position: absolute;
        top: 27px; /* Отступ от верхнего края */
        right: 8px; /* Отступ от правого края */
        z-index: 2016;
        box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
        transition: background-color 0.3s, border-color 0.3s;
    }

    /* Ползунок времени */
    #timeSliderContainer {
        width: 50%;
        padding: 10px;
        bottom: 80px;
    }

    #timeSlider {
        width: 80%;
    }

    #leftLabel, #rightLabel {
        font-size: 10px;
    }

    /* Спиннер */
    #globalSpinner {
        width: 50px;
        height: 50px;
        border-width: 8px;
    }

    /* Бургер-меню для основных настроек */
    .menu-toggle-label {
        display: flex; /* Показывать на мобильных устройствах */
        z-index: 1010;
        top: 8px; /* Отступ от верхнего края */
        left: 8px; /* Отступ от правого края */
    }

    .menu-toggle-label span {
        background-color: white !important;
    }

    /* Контейнер чекбоксов при открытом меню */
    .menu-toggle-checkbox:checked ~ #checkboxContainer {
        transform: translateX(0);
        opacity: 1;
        pointer-events: auto;
        left: 50px;
        z-index: 2010;
    }

    #checkboxContainer {
        transform: translateX(-110%);
        opacity: 0;
        left: 50px;
        pointer-events: none;
        padding-left: 20px;
    }

    #checkboxContainer label {
        font-size: 18px;
        display: flex;
        align-items: center;
    }

    /* Корректируем стиль для самого крестика */
    .menu-toggle-checkbox:checked + .menu-toggle-label span:nth-child(1),
    .menu-toggle-checkbox:checked + .menu-toggle-label span:nth-child(3) {
        background-color: #fbf6f6; /* Делаем темнее для лучшей видимости */
    }
}

/* Выделение выбранной даты в календаре */
.flatpickr-day.selected, 
.flatpickr-day.startRange, 
.flatpickr-day.endRange, 
.flatpickr-day.selected.inRange, 
.flatpickr-day.startRange.inRange, 
.flatpickr-day.endRange.inRange, 
.flatpickr-day.selected:focus, 
.flatpickr-day.startRange:focus, 
.flatpickr-day.endRange:focus {
    background: #2980b9 !important;
    border-color: #2980b9 !important;
    box-shadow: none !important;
    color: white !important;
    font-weight: bold !important;
}

.flatpickr-day.selected-date-highlight {
    background-color: #3498db !important;
    border-color: #3498db !important;
    color: white !important;
    font-weight: bold !important;
    box-shadow: 0 0 5px rgba(52, 152, 219, 0.8) !important;
    transform: scale(1.1) !important;
}

/* Стили для активного дня в календаре */
.flatpickr-day.today,
.flatpickr-day.selected,
.flatpickr-day:hover {
    border-radius: 10px !important;
}

/* Стили для иконок календаря */
.calendar-toggle {
    position: absolute;
    top: 60px;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: white;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
    z-index: 22;
    transition: transform 0.2s ease;
}

.calendar-toggle:hover {
    transform: scale(1.1);
    background-color: #f0f0f0;
}

#beforeCalendarToggle {
    left: 10px;
}

#afterCalendarToggle {
    right: 10px;
}

/* Стили для контейнера календаря */
.compare-calendar-container {
    position: absolute;
    top: 110px;
    z-index: 23;
    background: rgba(255, 255, 255, 0.95);
    padding: 12px;
    border-radius: 8px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
    opacity: 0;
    transform: translateY(-10px);
    transition: opacity 0.3s ease, transform 0.3s ease;
    pointer-events: none;
}

.compare-calendar-container.visible {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}

#beforeCalendarContainer {
    left: 10px;
}

#afterCalendarContainer {
    right: 10px;
}

/* Скрытие input элемента календаря */
.compare-date-picker {
    display: none !important;
    visibility: hidden !important;
    opacity: 0 !important;
    height: 0 !important;
    width: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
    border: none !important;
    position: absolute !important;
}

/* Стиль для индикатора выбранной даты */
.date-label {
    position: absolute;
    top: 60px;
    font-size: 12px;
    padding: 2px 8px;
    border-radius: 10px;
    background-color: rgba(52, 152, 219, 0.8);
    color: white;
    z-index: 20;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.date-label.visible {
    opacity: 1;
}

#beforeDateLabel {
    left: 60px;
}

#afterDateLabel {
    right: 60px;
}

/* Скрываем стандартный элемент поиска Mapbox */
.mapboxgl-ctrl-geocoder {
    display: none !important;
}

/* Скрываем другие стандартные элементы, если они мешают */
.mapboxgl-ctrl-top-right .mapboxgl-ctrl,
.mapboxgl-ctrl-top-left .mapboxgl-ctrl:not(.our-custom-control) {
    display: none !important;
}

.mapboxgl-compare .mapboxgl-ctrl-logo {
    display: none !important;
}

.my-location-button button:hover {
    background-color: #448aff;
}

.my-location-button button svg {
    fill: rgb(0, 0, 0);
}

/* Медиа-запрос для мобильных устройств - стили для timeSliderContainer */
@media (max-width: 768px) {
    #timeSliderContainer {
        width: 100% !important;
        left: 0 !important;
        right: 0 !important;
        bottom: 0 !important;
        transform: none !important;
        border-radius: 0 !important;
        padding: 10px 15px !important;
    }
    
    /* Основные настройки без изменения текущей структуры */
    .slider-wrapper {
        width: calc(100% - 90px) !important; /* Оставляем место для кнопок и меток */
    }
}

/* Стили для ссылки на Telegram бот */
.telegram-link-container {
  position: fixed;
  bottom: 140px; /* Отступ снизу (высота превью + отступ) */
  right: 20px;   /* Отступ справа */
  left: auto;    /* Сбрасываем отступ слева */
  z-index: 1005; /* Поверх большинства элементов */
  display: block; /* Изначально видимый */
  border-radius: 50%; /* Круглая форма */
  transition: opacity 0.3s ease, transform 0.3s ease; /* Плавное скрытие */
  transform: scale(1);
  opacity: 1;
}

/* Стили для скрытого состояния */
.telegram-link-container.hidden {
  opacity: 0;
  transform: scale(0.5);
  pointer-events: none; /* Игнорировать клики в скрытом состоянии */
}

.telegram-link-container a {
  display: block;
  text-decoration: none;
}

.telegram-icon {
  display: block;
  width: 90px;  /* Размер иконки */
  height: 90px; /* Размер иконки */
  border-radius: 50%;
  box-shadow: 0 3px 8px rgba(0,0,0,0.3);
  transition: transform 0.2s ease;
}

.telegram-icon:hover {
    transform: scale(1.1); /* Легкое увеличение при наведении */
}

.close-telegram-button {
  position: absolute;
  top: -5px;     /* Позиция кнопки */
  right: -5px;   /* Позиция кнопки */
  background-color: rgba(0, 0, 0, 0.6);
  color: white;
  border: 1px solid rgba(255, 255, 255, 0.5);
  border-radius: 50%;
  width: 22px;
  height: 22px;
  font-size: 16px;
  font-weight: bold;
  line-height: 20px; /* Центрирование крестика */
  text-align: center;
  cursor: pointer;
  padding: 0;
  z-index: 1006; /* Поверх иконки */
  box-shadow: 0 1px 3px rgba(0,0,0,0.2);
}

.close-telegram-button:hover {
  background-color: rgba(0, 0, 0, 0.8);
  transform: scale(1.1);
}

/* Адаптация для мобильных */
@media (max-width: 768px) {
    .telegram-link-container {
        bottom: 15px;
        left: 15px;
        right: auto; /* Сбрасываем отступ справа для мобильных */
    }
    .telegram-icon {
        width: 75px;
        height: 75px;
    }
    .close-telegram-button {
        width: 20px;
        height: 20px;
        font-size: 14px;
        line-height: 18px;
        top: -4px;
        right: -4px;
    }
}