/* ==========================================================================
   ДИФ — маркеры и попапы карты объектов (Yandex Maps v3)
   ========================================================================== */

.map__canvas {
    position: absolute;
    inset: 0;
}

.map-marker {
    position: relative;
    transform: translate(-50%, -100%);
    cursor: pointer;
}

/* Капля-пин фирменного зелёного цвета со сквозным отверстием */
.map-marker__pin {
    display: block;
    width: 26px;
    height: 26px;
    margin: 0 auto;
    padding: 0;
    border: 1px solid #fff;
    border-radius: 50% 50% 50% 0;
    background: radial-gradient(circle at 50% 50%, #fff 0 6px, var(--mint-600) 6px);
    box-shadow: 0 2px 6px rgb(0 0 0 / 0.3);
    transform: rotate(-45deg);
    transition: transform var(--dur-base) var(--ease-out);
    -webkit-mask: radial-gradient(circle 5px at 50% 50%, transparent 98%, #000);
    mask: radial-gradient(circle 5px at 50% 50%, transparent 98%, #000);
}

.map-marker:hover .map-marker__pin,
.map-marker--active .map-marker__pin {
    transform: rotate(-45deg) scale(1.15);
}

.map-marker__label {
    position: absolute;
    top: 50%;
    left: 100%;
    margin-left: 6px;
    padding: 3px 8px;
    border-radius: 6px;
    background: rgb(255 255 255 / 0.92);
    box-shadow: 0 1px 3px rgb(0 0 0 / 0.18);
    font: 600 12px/1.3 var(--font-sans);
    color: var(--ink-900);
    white-space: nowrap;
    transform: translateY(-50%);
}

.map-popup {
    position: absolute;
    bottom: calc(100% + 10px);
    left: 50%;
    width: 17.5rem;
    padding: 1rem 2.5rem 1rem 1.125rem;
    border-radius: var(--radius-md);
    background: #fff;
    box-shadow: var(--shadow-lg);
    color: var(--ink-900);
    font-family: var(--font-sans);
    cursor: default;
    transform: translateX(-50%);
    animation: map-pop var(--dur-base) var(--ease-out);
}

@keyframes map-pop {
    from {
        opacity: 0;
        transform: translate(-50%, 6px);
    }
}

.map-popup--list {
    bottom: calc(100% - 8px);
    max-height: 20rem;
    overflow-y: auto;
    overscroll-behavior: contain;
}

.map-card__type {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    max-width: 100%;
    margin-bottom: 0.5rem;
    padding: 0.3125rem 0.75rem;
    border-radius: 0.75rem;
    background: var(--c-accent-soft);
    color: var(--c-accent-text);
    font-size: 11px;
    font-weight: 700;
    line-height: 1.3;
    text-align: center;
    text-wrap: balance;
}

.map-card__title {
    margin: 0 0 0.25rem;
    font-size: 0.9375rem;
    font-weight: 700;
    line-height: 1.3;
}

.map-card__client {
    margin: 0;
    color: var(--c-text-muted);
    font-size: 0.8125rem;
    line-height: 1.4;
}

.map-popup__close {
    position: absolute;
    top: 0.5rem;
    right: 0.5rem;
    display: grid;
    place-items: center;
    width: 1.75rem;
    height: 1.75rem;
    border-radius: 50%;
    color: var(--gray-500);
    font-size: 1.25rem;
    line-height: 1;
}

.map-popup__close:hover {
    background: var(--c-surface-2);
    color: var(--ink-900);
}

.map-popup__item {
    padding: 0.75rem 0;
    border-bottom: 1px solid var(--c-border);
}

.map-popup__item:first-of-type {
    padding-top: 0;
}

.map-popup__item:last-of-type {
    border-bottom: 0;
}

.map-popup__more {
    display: block;
    width: 100%;
    margin-top: 0.5rem;
    padding: 0.5rem 0;
    border-radius: var(--radius-pill);
    background: var(--c-surface-2);
    color: var(--c-accent-text);
    font: 700 13px/1 var(--font-sans);
}

.map-popup__more:hover {
    background: var(--c-accent-soft);
}

.map-cluster-wrap {
    position: relative;
}

.map-cluster {
    display: grid;
    place-items: center;
    width: 38px;
    height: 38px;
    padding: 0;
    border: 3px solid #fff;
    border-radius: 50%;
    background: var(--mint-600);
    color: #fff;
    font: 700 13px/1 var(--font-sans);
    box-shadow: 0 0 0 5px rgb(18 167 116 / 0.25), 0 2px 8px rgb(0 0 0 / 0.25);
    transform: translate(-50%, -50%);
    transition: background-color var(--dur-fast) var(--ease-out);
}

.map-cluster:hover {
    background: var(--mint-700);
}
