/* Карты JS API Яндекса — см. js/ymaps.js */
.ymap {
    position: relative;
    width: 100%;
    height: 400px;
    background: #eef0f2;
}

.ymap--portfolio {
    height: 315px;
}

/* рамка как у прежнего iframe: в style.css глобальное iframe { border: 4px solid #ccc } */
.contacts_map .ymap {
    box-sizing: content-box;
    border: 4px solid #ccc;
}

.ymap iframe {
    display: block;
    border: 0;
}

/* метки — SVG из js/ymaps.js; остриё (у шоурума — точка под хвостиком)
   ровно в координате */
.ymap-pin {
    position: absolute;
    width: 22px;
    height: 30px;
    transform: translate(-11px, -29px);
    cursor: pointer;
}

.ymap-pin svg {
    display: block;
    filter: drop-shadow(0 1px 1.5px rgba(0, 0, 0, 0.35));
}

/* SVG 36x46 растянут до 44x56 — круг как у маркера в прежнем виджете */
.ymap-pin--office {
    width: 44px;
    height: 56px;
    transform: translate(-22px, -53px);
    cursor: default;
}

/* над меткой по центру; у края карты js/ymaps.js добавляет --edge-* */
.ymap-pin__label {
    display: none;
    position: absolute;
    bottom: 100%;
    left: 50%;
    z-index: 1;
    width: max-content;
    max-width: 220px;
    margin-bottom: 4px;
    padding: 4px 8px;
    transform: translateX(-50%);
    border-radius: 4px;
    background: #fff;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.25);
    color: #222;
    font-size: 13px;
    line-height: 1.3;
}

/* подпись шоурума — справа от круга, как «Профит» в старом виджете */
.ymap-pin--office .ymap-pin__label {
    display: block;
    top: 21px;
    bottom: auto;
    left: 100%;
    margin: 0 0 0 6px;
    transform: translateY(-50%);
    font-size: 14px;
    font-weight: 600;
}

.ymap-pin--edge-left .ymap-pin__label {
    left: 0;
    transform: none;
}

.ymap-pin--edge-right .ymap-pin__label {
    right: 0;
    left: auto;
    transform: none;
}

.ymap-pin--edge-top .ymap-pin__label {
    top: 100%;
    bottom: auto;
    margin-top: 4px;
    margin-bottom: 0;
}

.ymap-pin--open .ymap-pin__label,
.ymap-pin:hover .ymap-pin__label {
    display: block;
}

/* карточка шоурума — в левом верхнем углу карты, по клику на маркер */
.ymap-card {
    position: absolute;
    top: 12px;
    left: 12px;
    z-index: 10;
    box-sizing: border-box;
    width: 320px;
    max-width: calc(100% - 24px);
    padding: 16px 16px 14px;
    border-radius: 12px;
    background: #fff;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.2);
    color: #222;
    font-size: 14px;
    line-height: 1.4;
}

.ymap-card[hidden] {
    display: none;
}

.ymap-card__close {
    position: absolute;
    top: 6px;
    right: 8px;
    padding: 0 4px;
    border: 0;
    background: none;
    color: #999;
    font-size: 22px;
    line-height: 1;
    cursor: pointer;
}

.ymap-card__title {
    margin-right: 20px;
    color: #1e5bb8;
    font-size: 18px;
    font-weight: 600;
}

.ymap-card__subtitle {
    margin: 2px 0 10px;
    color: #777;
    font-size: 13px;
}

.ymap-card__row {
    margin-bottom: 6px;
}

.ymap-card__row a {
    color: inherit;
}

.ymap-card__actions {
    display: flex;
    gap: 8px;
    margin-top: 12px;
}

.ymap-card__btn {
    flex: 1;
    padding: 8px 10px;
    border-radius: 8px;
    background: #eef3fd;
    color: #1e5bb8;
    font-size: 14px;
    font-weight: 600;
    text-align: center;
    text-decoration: none;
}

.ymap-card__btn--primary {
    background: #1e5bb8;
    color: #fff;
}
