/*body {
    background-color: #b9e8ff;
}*/

@media only screen and (max-width: 800px) {
    .no-more-tables table,
    .no-more-tables thead,
    .no-more-tables tbody,
    .no-more-tables th,
    .no-more-tables td,
    .no-more-tables tr {
        display: block;
    }

    .no-more-tables thead tr {
        position: absolute;
        top: -9999px;
        left: -9999px;
    }

    .no-more-tables tr {
        border: 1px solid #ccc;
    }

    .no-more-tables td {
        border: none;
        border-bottom: 1px solid #eee;
        position: relative;
        padding-left: 50%;
        white-space: normal;
        text-align: right;
    }

    .no-more-tables td:before {
        position: absolute;
        top: 6px;
        left: 6px;
        width: 45%;
        padding-right: 10px;
        white-space: nowrap;
        text-align: left;
        font-weight: bold;
    }

    .no-more-tables td:before {
        content: attr(data-title);
    }
}

.no-more-tables table {
    width: 100%;
}

.no-more-tables td, th {
    text-align: right;
    /*white-space: nowrap;*/
}

.no-more-tables td.numeric,
.no-more-tables th.numeric {
    text-align: right;
}

.breadcrumb-scroll {
    display: flex;
    flex-wrap: nowrap;
    overflow-y: auto;
}

li.breadcrumb-item {
    white-space: nowrap;
    /*display: inline-block;*/
    /*float: none;*/
}


.modern-map {
    /* 1. Базовая высота, чтобы карта никогда не схлопывалась (аналог твоего if targetHeight > 420) */
    min-height: 420px;

    /* 2. Современная магия: берем 100% видимого экрана и вычитаем шапку/отступы (твои 225px) */
    height: calc(100dvh - 225px);

    /* 3. Ограничитель для гигантских мониторов, чтобы карта не стала высотой в 2 метра */
    max-height: 800px;
}

/* --- Стили для кастомных HTML маркеров MapLibre --- */

.esya-marker-container {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    /* КРИТИЧНО ВАЖНО: Разрешаем элементу ловить мышь */
    pointer-events: auto !important;
}

/* При наведении выносим маркер поверх остальных */
.esya-marker-container:hover {
    z-index: 1000 !important;
}

.esya-marker-icon {
    position: relative;
    z-index: 2;
    border-radius: 50%;
    color: white;
    display: flex;
    justify-content: center;
    align-items: center;
    font-weight: bold;
    border: 2px solid white;
    box-shadow: 0 2px 5px rgba(0,0,0,0.4);
    font-size: 13px;
    transition: transform 0.2s ease;
}

/* Анимация увеличения самой иконки при наведении */
.esya-marker-container:hover .esya-marker-icon {
    transform: scale(1.1);
}

.esya-marker-label {
    position: absolute;
    left: 100%;
    top: 50%;
    transform: translateY(-50%);
    margin-left: 8px;
    z-index: 1;

    background: rgba(255, 255, 255, 0.95);
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 12px;
    color: #333;
    box-shadow: 0 2px 8px rgba(0,0,0,0.2);
    white-space: nowrap;
    border: 1px solid rgba(0,0,0,0.1);

    /* Плавное появление и микро-движение */
    transition: opacity 0.2s ease, visibility 0.2s ease, transform 0.2s ease;
}

/* Состояние скрытого текста */
.esya-marker-label.hover-only {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transform: translateY(-50%) translateX(-5px);
}

/* Состояние при наведении курсора */
.esya-marker-container:hover .esya-marker-label.hover-only {
    opacity: 1;
    visibility: visible;
    transform: translateY(-50%) translateX(0);
}
