/*
 * VIMA Static World Map — frontend styles.
 * All selectors are scoped below .vima-map to avoid theme/plugin collisions.
 */
.vima-map {
    --vima-map-country: #dce3df;
    --vima-map-country-border: #ffffff;
    --vima-map-country-active: #0f6344;
    --vima-map-country-hover: #025f99;
    --vima-map-marker: #025f99;
    --vima-map-marker-ring: #ffffff;
    --vima-map-text: #1e2d27;
    --vima-map-muted: #5f6f68;
    --vima-map-surface: #ffffff;
    --vima-map-shadow: 0 12px 32px rgba(16, 42, 33, 0.2);
    position: relative;
    width: 100%;
}

.vima-map__stage {
    position: relative;
    width: 100%;
    aspect-ratio: 1200 / 590;
    isolation: isolate;
}

.vima-map__svg {
    display: block;
    width: 100%;
    height: 100%;
    overflow: visible;
}

.vima-map__country {
    fill: var(--vima-map-country);
    stroke: var(--vima-map-country-border);
    stroke-width: 0.85;
    vector-effect: non-scaling-stroke;
    transition: fill 180ms ease;
    pointer-events: none;
}

.vima-map__country--active {
    fill: var(--vima-map-country-active);
    pointer-events: visiblePainted;
    cursor: default;
}

.vima-map__country--active:hover {
    fill: var(--vima-map-country-hover);
    outline: none;
}

.vima-map__markers {
    position: absolute;
    inset: 0;
    z-index: 2;
    pointer-events: none;
}

.vima-map__marker {
    position: absolute;
    left: var(--vima-map-x);
    top: var(--vima-map-y);
    width: 34px;
    height: 34px;
    margin: 0;
    padding: 0;
    transform: translate(-50%, -50%) translate(var(--vima-map-dx, 0), var(--vima-map-dy, 0));
    border: 0;
    border-radius: 50%;
    background: transparent;
    cursor: pointer;
    pointer-events: auto;
    -webkit-tap-highlight-color: transparent;
}

.vima-map__marker-dot {
    position: absolute;
    left: 50%;
    top: 50%;
    width: 12px;
    height: 12px;
    transform: translate(-50%, -50%);
    border: 2px solid var(--vima-map-marker-ring);
    border-radius: 50%;
    background: var(--vima-map-marker);
    box-shadow: 0 1px 5px rgba(0, 0, 0, 0.28);
    transition: transform 160ms ease, box-shadow 160ms ease;
}

.vima-map__marker:hover .vima-map__marker-dot,
.vima-map__marker:focus-visible .vima-map__marker-dot,
.vima-map__marker[aria-expanded="true"] .vima-map__marker-dot {
    transform: translate(-50%, -50%) scale(1.35);
    box-shadow: 0 0 0 5px rgba(2, 95, 153, 0.2), 0 2px 7px rgba(0, 0, 0, 0.28);
}

.vima-map__marker:focus-visible {
    outline: 2px solid var(--vima-map-country-hover);
    outline-offset: 1px;
}

.vima-map__tooltip {
    position: absolute;
    z-index: 5;
    width: min(340px, calc(100% - 16px));
    padding: 18px;
    border: 1px solid rgba(15, 99, 68, 0.2);
    border-radius: 10px;
    background: var(--vima-map-surface);
    box-shadow: var(--vima-map-shadow);
    color: var(--vima-map-text);
}

.vima-map__tooltip[hidden] {
    display: none;
}

.vima-map__tooltip::after {
    position: absolute;
    left: var(--vima-map-arrow-x, 50%);
    width: 12px;
    height: 12px;
    transform: translateX(-50%) rotate(45deg);
    background: var(--vima-map-surface);
    content: "";
}

.vima-map__tooltip[data-placement="top"]::after {
    bottom: -6px;
    border-right: 1px solid rgba(15, 99, 68, 0.2);
    border-bottom: 1px solid rgba(15, 99, 68, 0.2);
}

.vima-map__tooltip[data-placement="bottom"]::after {
    top: -6px;
    border-top: 1px solid rgba(15, 99, 68, 0.2);
    border-left: 1px solid rgba(15, 99, 68, 0.2);
}

.vima-map__tooltip-close {
    position: absolute;
    top: 7px;
    right: 8px;
    display: grid;
    width: 30px;
    height: 30px;
    padding: 0;
    place-items: center;
    border: 0;
    border-radius: 50%;
    background: transparent;
    color: var(--vima-map-muted);
    font: inherit;
    font-size: 22px;
    line-height: 1;
    cursor: pointer;
}

.vima-map__tooltip-close:hover,
.vima-map__tooltip-close:focus-visible {
    background: #edf3f0;
    color: var(--vima-map-text);
    outline: none;
}

.vima-map__country-label {
    margin: 0 32px 3px 0;
    color: var(--vima-map-country-active);
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.vima-map__location-title {
    margin: 0 32px 12px 0;
    color: var(--vima-map-text);
    font-size: clamp(18px, 2vw, 22px);
    line-height: 1.2;
}

.vima-map__location-entries {
    display: grid;
    gap: 12px;
}

.vima-map__location-entry + .vima-map__location-entry {
    padding-top: 12px;
    border-top: 1px solid #e5ebe8;
}

.vima-map__companies {
    margin: 0 0 4px;
    color: var(--vima-map-text);
    font-size: 13px;
    font-weight: 700;
    line-height: 1.35;
}

.vima-map__location-entry address {
    margin: 0;
    color: var(--vima-map-muted);
    font-size: 13px;
    font-style: normal;
    line-height: 1.45;
}

.vima-map__tooltip-link {
    display: inline-flex;
    margin-top: 15px;
    color: var(--vima-map-country-active);
    font-size: 14px;
    font-weight: 700;
    text-underline-offset: 3px;
}

.vima-map__tooltip-link:hover,
.vima-map__tooltip-link:focus-visible {
    color: var(--vima-map-country-hover);
}

.vima-map__noscript {
    margin: 10px 0 0;
    color: var(--vima-map-muted);
    font-size: 13px;
}

@media (max-width: 640px) {
    .vima-map__stage {
        min-height: 250px;
    }

    .vima-map__marker {
        width: 38px;
        height: 38px;
    }

    .vima-map__marker-dot {
        width: 11px;
        height: 11px;
    }

    .vima-map__tooltip {
        padding: 16px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .vima-map__country,
    .vima-map__marker-dot {
        transition: none;
    }
}
