

/* Start:/dairytrends/map/css/style.css?179157213912035*/
.filter-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 12px;
    border-radius: 20px;
    border: 1px solid #e0e0e0;
    background-color: #f8f9fa;
    color: #495057;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.2s ease;
    cursor: pointer;
    outline: none;
    box-shadow: none;
}

.filter-btn:hover {
    background-color: #e9ecef;
    border-color: #d0d7de;
}

.filter-btn.active {
    background-color: #e3f2fd;
    border-color: #bbdefb;
    color: #1976d2;
}

.filter-btn .btn-icon {
    display: inline-flex;
    width: 16px;
    height: 16px;
}

.filter-btn .btn-text {
    white-space: nowrap;
}

.filter-btn.loading {
    opacity: 0.8;
    pointer-events: none;
}

.filter-btn .spinner {
    width: 14px;
    height: 14px;
    border: 2px solid rgba(0,0,0,0.1);
    border-radius: 50%;
    border-top-color: #495057;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.btn-expand-map {
    border: none;
    background: transparent;
    color: #999;
    padding: 0 8px;
    cursor: pointer;
    transition: color 0.2s;
}
.btn-expand-map:hover {
    color: #333;
}
.btn-expand-map svg {
    width: 18px;
    height: 18px;
}

.map-help {
    background: #f5f8ff;
    border-left: 3px solid #0078d7;
    border-radius: 6px;
    margin-bottom: 12px;
    font-size: 13px;
    color: #333;
}
.map-help__header {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 14px;
    cursor: pointer;
    user-select: none;
}
.map-help__header:hover {
    background: #eaf2ff;
}
.map-help__icon { font-size: 15px; }
.map-help__title { font-weight: 600; }
.map-help__date {
    margin-left: auto;
    color: #666;
    font-size: 12px;
}
.map-help__arrow {
    transition: transform 0.2s;
    font-size: 10px;
    color: #666;
}
.map-help__arrow.open { transform: rotate(180deg); }
.map-help__body {
    padding: 0 14px 12px 14px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.map-help__item { line-height: 1.5; }
.map-help__item--muted {
    color: #888;
    font-size: 12px;
    border-top: 1px dashed #d0d7de;
    padding-top: 8px;
    margin-top: 4px;
}
@media (max-width: 768px) {
    .map-help__date { display: none; }
    .map-help__body { font-size: 12px; }
}

.dt-map-page {
    height: calc(100vh - var(--dt-header-height, 170px));
    width: 100%;
    padding: 0;
    margin: 0;
    overflow: hidden;
    background: #e9eef2;
}

.dt-map-layout {
    display: flex;
    width: 100%;
    height: 100%;
    overflow: hidden;
}

/* --- Сайдбар --- */
.dt-map-sidebar {
    width: 400px;
    flex-shrink: 0;
    height: 100%;
    background: #fff;
    border-right: 1px solid #e0e0e0;
    overflow-y: auto;
    overflow-x: hidden;
    display: flex;
    flex-direction: column;
    box-shadow: 2px 0 8px rgba(0, 0, 0, 0.03);
    z-index: 2;
}

.dt-map-sidebar__header {
    padding: 18px 20px 14px;
    border-bottom: 1px solid #e0e0e0;
    position: sticky;
    top: 0;
    background: #fff;
    z-index: 2;
}

.dt-map-sidebar__title {
    font-size: 18px;
    font-weight: 700;
    margin: 0 0 4px 0;
    color: #222;
    line-height: 1.2;
}

.dt-map-sidebar__region {
    font-size: 13px;
    color: #666;
}

.dt-map-sidebar__region-link {
    color: #0078d7;
    text-decoration: none;
    border-bottom: 1px dashed currentColor;
    display: inline-flex;
    align-items: center;
    gap: 2px;
}

.dt-map-sidebar__region-link:hover {
    color: #005a9e;
}

.dt-map-sidebar__section {
    padding: 16px 20px;
    border-bottom: 1px solid #eee;
}

.dt-map-sidebar__section:last-child {
    border-bottom: none;
}

.dt-map-sidebar__section--legend {
    flex: 1;
    min-height: 60px;
    background: #fafbfc;
}

.dt-map-sidebar__section-title {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    color: #999;
    margin-bottom: 10px;
    letter-spacing: 0.5px;
}

/* Кнопки фильтров */
.dt-map-sidebar__filters {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.dt-filter-btn {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    border: 1px solid #dee2e6;
    background: #fff;
    border-radius: 8px;
    cursor: pointer;
    text-align: left;
    font-size: 14px;
    font-family: inherit;
    color: #222;
    transition: background 0.15s, border-color 0.15s;
    width: 100%;
}

.dt-filter-btn:hover {
    background: #f8f9fa;
}

.dt-filter-btn.active {
    background: #e6f3ff;
    border-color: #0078d7;
    color: #0078d7;
}

.dt-filter-btn--reset {
    justify-content: center;
    color: #c0392b;
    border-style: dashed;
}

.dt-filter-btn--reset:hover {
    background: #fdecea;
}

.dt-filter-btn__icon {
    display: inline-flex;
    width: 20px;
    height: 20px;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.dt-filter-btn__icon svg {
    width: 20px;
    height: 20px;
}

.dt-filter-btn__text {
    flex: 1;
}

/* Подфильтры (диапазоны) */
.dt-map-sidebar__subfilter {
    margin-top: 12px;
    padding-left: 10px;
    border-left: 2px solid #0078d7;
}

.dt-map-sidebar__subfilter-title {
    font-size: 12px;
    font-weight: 600;
    color: #555;
    margin-bottom: 8px;
}

.dt-range-row {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 6px;
}

.dt-input {
    flex: 1;
    min-width: 0;
    padding: 6px 8px;
    border: 1px solid #dee2e6;
    border-radius: 4px;
    font-size: 13px;
    font-family: inherit;
    width: 100%;
}

.dt-input:focus {
    outline: none;
    border-color: #0078d7;
    box-shadow: 0 0 0 2px rgba(0, 120, 215, 0.1);
}

.dt-range-dash {
    color: #999;
}

.dt-product-row {
    margin-bottom: 8px;
}

.dt-product-row__label {
    display: block;
    font-size: 12px;
    color: #666;
    margin-bottom: 4px;
}

/* --- Карта --- */
.dt-map-viewport {
    flex: 1;
    position: relative;
    min-width: 0;
    height: 100%;
    background: #e9eef2;
}

.dt-map-canvas {
    width: 100%;
    height: 100%;
    position: relative;
}

.dt-map-loading-overlay {
    position: absolute;
    inset: 0;
    background: rgba(255, 255, 255, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 5;
    pointer-events: none;
}

/* Слоты, которые заполняет map.js */
#custom-menu {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

#custom-menu>button {
    width: 100%;
    justify-content: flex-start !important;
    text-align: left;
}

#legend-container {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

/* Адаптация для мобильных */
/* ==========================================================
   Мобильная версия — карта на весь экран,
   сайдбар как bottom-sheet (в стиле 2GIS)
   ========================================================== */
@media (max-width: 900px) {

    .dt-map-page {
        height: 100vh;
        height: 100dvh;
        min-height: 0;
        max-height: none;
        overflow: hidden;
        position: relative;
    }

    .dt-map-layout {
        display: block;
        position: relative;
        width: 100%;
        height: 100%;
        overflow: hidden;
    }

    /* Карта — на весь экран */
    .dt-map-viewport {
        position: absolute;
        inset: 0;
        width: 100%;
        height: 100%;
        min-height: 0;
        flex: none;
    }

    /* Сайдбар — как выезжающий снизу лист */
    .dt-map-sidebar {
        position: absolute;
        left: 0;
        right: 0;
        bottom: 0;
        width: 100%;
        height: 45vh;
        /* свёрнутое состояние — половина экрана */
        max-height: 92vh;
        border-right: none;
        border-top: 1px solid #e0e0e0;
        border-top-left-radius: 16px;
        border-top-right-radius: 16px;
        box-shadow: 0 -6px 24px rgba(0, 0, 0, 0.18);
        overflow-y: auto;
        overflow-x: hidden;
        transition: height 0.25s ease;
        z-index: 30;
        padding-top: 18px;
        /* место под «ручку» */
        background: #fff;
    }

    /* «Ручка» сверху листа — визуальный индикатор перетаскивания */
    .dt-map-sidebar::before {
        content: '';
        position: sticky;
        top: 0;
        display: block;
        width: 44px;
        height: 4px;
        margin: 0 auto 6px;
        border-radius: 2px;
        background: #d0d0d0;
        z-index: 2;
    }

    /* Развёрнутое состояние */
    .dt-map-sidebar.is-expanded {
        height: 92vh;
    }

    /* Заголовок сайдбара — кликабельный (тап = свернуть/развернуть) */
    .dt-map-sidebar__header {
        position: relative;
        cursor: pointer;
        padding-top: 6px;
    }

    /* Иконка-стрелка справа у заголовка */
    .dt-map-sidebar__header::after {
        content: '▲';
        position: absolute;
        right: 18px;
        top: 50%;
        transform: translateY(-50%) rotate(0deg);
        font-size: 10px;
        color: #888;
        transition: transform 0.25s;
        pointer-events: none;
    }

    .dt-map-sidebar.is-expanded .dt-map-sidebar__header::after {
        transform: translateY(-50%) rotate(180deg);
    }

    /* Кнопки «Режимы карты» и легенды — оставляем в потоке */
    #legend-container {
        position: absolute;
        top: auto;
        bottom: 10px;
        left: 10px;
        right: 10px;
        max-width: none;
        max-height: 40vh;
        z-index: 5;
        /* ниже листа, если он развёрнут */
    }

    .dt-map-sidebar.is-expanded~.dt-map-viewport #legend-container,
    .dt-map-layout:has(.dt-map-sidebar.is-expanded) #legend-container {
        display: none;
        /* когда лист развёрнут, легенду скрываем */
    }
}

/* ==========================================================
   Плавающая панель легенд поверх карты
   ========================================================== */
#legend-container {
    position: absolute;
    top: auto;
    bottom: 16px;
    left: 16px;
    z-index: 10;
    display: flex;
    flex-direction: column;
    gap: 10px;
    max-width: 340px;
    max-height: calc(100% - 32px);
    overflow-y: auto;
    overflow-x: hidden;
    pointer-events: none;
    padding-right: 4px;
}

#legend-container>* {
    pointer-events: auto;
    /* а каждая легенда — ловит */
}

/* Тонкий скроллбар, если легенд много */
#legend-container::-webkit-scrollbar {
    width: 6px;
}

#legend-container::-webkit-scrollbar-thumb {
    background: rgba(0, 0, 0, 0.15);
    border-radius: 3px;
}

/* Чуть компактнее сами легенды, раз они поверх карты */
#legend-container .custom-legend {
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15) !important;
    border-radius: 10px !important;
    font-size: 12px !important;
}

/* На мобилке — растягиваем по ширине карты снизу */

body:has(.dt-map-page) footer {
    display: none !important;
}
/* End */


/* Start:/bitrix/components/bitrix/system.show_message/templates/.default/style.min.css?147074288651*/
font.errortext{color:red}font.notetext{color:green}
/* End */
/* /dairytrends/map/css/style.css?179157213912035 */
/* /bitrix/components/bitrix/system.show_message/templates/.default/style.min.css?147074288651 */
