/* ============================================================
   АПС-МОНИТОР — индикаторы маркеров/кластеров за экраном
   (off-screen edge indicators)
   Тёмная тема: графит #1a1a1a + золото #aa9974 (unionsk.ru)

   Объекты/кластеры, выходящие за пределы видимой области карты,
   отображаются индикаторами по краям экрана (как в компьютерных
   играх). Контейнер лежит ПОВЕРХ карты и оверлеев Яндекса, но
   НИЖЕ хедера/футера (1150), контекстных меню (1200) и стека
   уведомлений (1250). Позиция каждого индикатора задаётся из JS
   через style.transform (translate + каскадный сдвиг).
   ============================================================ */

/* --- Контейнер индикаторов ---
   position: fixed на весь экран: индикаторы живут в DOM вне #map
   (у карты свой z-index-контекст и обрезка), поэтому крепятся к body.
   pointer-events: none — контейнер не перехватывает клики, проходящие
   сквозь него; кликабельны только сами индикаторы (pointer-events: auto). */
.aps-edge-indicators {
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 1140; /* выше карты/оверлеев ymaps, ниже хедера/футера (1150),
                      ниже контекстных меню (1200) и уведомлений (1250) */
    overflow: hidden;
}

/* --- Сам индикатор ---
   width/height 40px — совпадают с APS.EDGE_INDICATOR_SIZE (constants.js),
   центровка через transform: translate(-50%, -50%) + каскадный сдвиг
   вдоль края (style.transform дописывается из JS). */
.aps-edge-indicator {
    position: absolute;
    width: 40px;
    height: 40px;
    pointer-events: auto;
    cursor: pointer;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.6);
    transition: transform 0.15s ease, box-shadow 0.15s ease;
    user-select: none;
}

.aps-edge-indicator:hover {
    box-shadow: 0 0 0 3px var(--brand), 0 4px 14px rgba(0, 0, 0, 0.7);
}

/* Внутренняя капля-иконка (фон SVG из JS) */
.aps-edge-indicator__icon {
    position: absolute;
    inset: 0;
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
}

/* Счётчик событий/объектов поверх капли */
.aps-edge-indicator__count {
    position: relative;
    font-family: var(--font-main);
    font-size: 12px;
    font-weight: 800;
    line-height: 1;
    color: #ffffff;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.8);
}

/* Индикатор-группа «+N скрытых» (переполнение края) */
.aps-edge-indicator--overflow {
    background: var(--surface-2);
    border: 1px solid var(--brand);
}

.aps-edge-indicator--overflow .aps-edge-indicator__count {
    font-size: 11px;
}

/* Анимация появления: мягкий «выезд» с края. Отключается при
   prefers-reduced-motion. */
.aps-edge-indicator {
    animation: aps-edge-pop 0.2s ease-out;
}

@keyframes aps-edge-pop {
    from {
        opacity: 0;
        transform: translate(-50%, -50%) scale(0.6);
    }
    to {
        opacity: 1;
        transform: translate(-50%, -50%) scale(1);
    }
}

@media (prefers-reduced-motion: reduce) {
    .aps-edge-indicator {
        animation: none;
    }
}
