.ec-image-map {
    margin: 2rem 0;
}

.ec-image-map__header h2 {
    margin-bottom: 1rem;
}

.ec-image-map__viewport {
    position: relative;
    overflow: hidden;
    height: 680px;
    border: 1px solid rgba(15, 23, 42, 0.12);
    border-radius: 24px;
    aspect-ratio: 1/1;
    justify-self: center;
    background:
        radial-gradient(circle at top left, rgba(14, 165, 233, 0.18), transparent 36%),
        linear-gradient(180deg, #f8fafc 0%, #e2e8f0 100%);
    box-shadow: 0 24px 50px rgba(15, 23, 42, 0.16);
    cursor: grab;
    touch-action: none;
}

.ec-image-map__viewport.is-dragging {
    cursor: grabbing;
}

.ec-image-map__canvas {
    position: absolute;
    top: 0;
    left: 0;
    transform-origin: top left;
    will-change: transform;
}

.ec-image-map__image {
    display: block;
    width: auto;
    max-width: none;
    height: auto;
    user-select: none;
    -webkit-user-drag: none;
}

.ec-image-map__pins {
    position: absolute;
    inset: 0;
}

.ec-image-map__pin {
    position: absolute;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    padding: 0;
    border: 0;
    background: transparent;
    transform: translate(-50%, -100%);
    text-decoration: none;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    overflow: visible;
}

.ec-image-map__pin:hover,
.ec-image-map__pin:focus-visible {
    transform: translate(-50%, -100%) scale(1.08);
    box-shadow: 0 14px 28px rgba(14, 116, 144, 0.28);
}

.ec-image-map__pin--static {
    cursor: default;
}

.ec-image-map__pin-icon {
    position: absolute;
    width: 70px;
    height: 70px;
    object-fit: contain;
    pointer-events: none;
}

.ec-image-map__pin-dot {
    display: block;
    width: 16px;
    height: 16px;
    border-radius: 999px;
    background: linear-gradient(180deg, #ef4444 0%, #b91c1c 100%);
    box-shadow: 0 0 0 6px rgba(239, 68, 68, 0.24);
}

.ec-image-map__status {
    position: absolute;
    left: 1rem;
    bottom: 1rem;
    z-index: 2;
    padding: 0.7rem 1rem;
    border-radius: 12px;
    background: rgba(15, 23, 42, 0.82);
    color: #fff;
    font-size: 0.9rem;
    line-height: 1.3;
}

.ec-image-map__pin-label {
    position: absolute;
    top: calc(100% + 0.45rem);
    left: 50%;
    padding: 0.35rem 0.6rem;
    border-radius: 999px;
    background: rgba(15, 23, 42, 0.88);
    color: #fff;
    font-size: 0.75rem;
    font-weight: 600;
    line-height: 1;
    white-space: nowrap;
    transform: translateX(-50%);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease;
}

.ec-image-map__pin:hover .ec-image-map__pin-label,
.ec-image-map__pin:focus-visible .ec-image-map__pin-label {
    opacity: 1;
}

.ec-image-map__controls {
    position: absolute;
    top: 1rem;
    right: 1rem;
    z-index: 3;
    display: flex;
    gap: 0.5rem;
}

.ec-image-map__control {
    min-width: 44px;
    height: 44px;
    padding: 0 0.9rem;
    border: 0;
    border-radius: 999px;
    background: rgba(15, 23, 42, 0.82);
    color: #fff;
    font-weight: 700;
    box-shadow: 0 12px 24px rgba(15, 23, 42, 0.26);
}

.ec-image-map__hint {
    margin-top: 0.85rem;
    color: #475569;
    font-size: 0.95rem;
}

.ec-image-map--empty {
    padding: 1rem 1.25rem;
    border-radius: 16px;
    background: #f8fafc;
    color: #334155;
}

@media (max-width: 767px) {
    .ec-image-map__viewport {
        min-height: 320px;
        border-radius: 18px;
    }

    .ec-image-map__controls {
        top: 0.75rem;
        right: 0.75rem;
    }

    .ec-image-map__pin {
        width: 42px;
        height: 42px;
    }
}
