/* ═══════════════════════════════════════════
   R Map Point — Frontend Styles  v1.1.0
   ═══════════════════════════════════════════ */

/* ── Container ──
   No width/max-width override — let Gutenberg layout (Constrained/Flow)
   control horizontal sizing via get_block_wrapper_attributes(). */
.rmp-container {
    position: relative;
    overflow: hidden;
    line-height: 0;
    font-size: 0;
}

.rmp-viewport {
    position: relative;
    width: 100%;
    height: 0;
    overflow: hidden;
    /* padding-bottom set inline from image aspect ratio */
}

.rmp-map-inner {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.rmp-map-img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    pointer-events: none;
    user-select: none;
    -webkit-user-select: none;
}

/* ── Point ──
   Pixel-based translate: circle center always at the coordinate. */
.rmp-point {
    position: absolute;
    transform: translate(
        calc(var(--rmp-size, 36px) / -2),
        calc(var(--rmp-size, 36px) / -2)
    );
    z-index: 10;
    cursor: default;
}

.rmp-point.rmp-has-desc {
    cursor: pointer;
}

/* Lift open/hovered point above siblings */
.rmp-point.rmp-tooltip-open,
.rmp-point.rmp-has-desc:hover {
    z-index: 50;
}

/* ── Body (circle / pill) ── */
.rmp-body {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    height: var(--rmp-size, 36px);
    min-width: var(--rmp-size, 36px);
    border-radius: calc(var(--rmp-size, 36px) / 2);
    background: var(--rmp-pc, #0f5ff8);
    color: var(--rmp-fc, #fff);
    padding: 0;
    box-sizing: border-box;
    z-index: 2;
    white-space: nowrap;
    line-height: 1;
    font-size: 16px;
    font-family: 'Oswald', var(--global-heading-font-family, sans-serif);
    transition: box-shadow 0.2s ease;
}

.rmp-point:not(.rmp-has-name) .rmp-body {
    justify-content: center;
}

.rmp-point.rmp-has-name .rmp-body {
    padding-left: calc(var(--rmp-size, 36px) * 0.22);
    padding-right: calc(var(--rmp-size, 36px) * 0.4);
}

/* ── Icon (plus) ── */
.rmp-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    color: var(--rmp-fc, #fff);
}
.rmp-icon svg {
    display: block;
}

/* ── Name text ── */
.rmp-name {
    font-size: 16px;
    font-family: 'Oswald', var(--global-heading-font-family, sans-serif);
    font-weight: 400;
    color: var(--rmp-fc, #fff);
    letter-spacing: 0.02em;
}

/* ── Pulse ring ── */
.rmp-pulse {
    position: absolute;
    top: 50%;
    left: calc(var(--rmp-size, 36px) / 2);
    width: var(--rmp-size, 36px);
    height: var(--rmp-size, 36px);
    border-radius: 50%;
    background: var(--rmp-pc, #0f5ff8);
    opacity: 0;
    transform: translate(-50%, -50%) scale(1);
    z-index: 1;
    pointer-events: none;
    animation: rmpPulse 2.6s ease-out infinite;
}

@keyframes rmpPulse {
    0%   { opacity: 0.45; transform: translate(-50%, -50%) scale(1);   }
    100% { opacity: 0;    transform: translate(-50%, -50%) scale(2.4); }
}

/* ── Tooltip ── */
.rmp-tooltip {
    position: absolute;
    top: calc(100% + 10px);
    left: calc(var(--rmp-size, 36px) / 2);
    transform: translateX(-50%);
    z-index: 20;
    pointer-events: none;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.22s ease, visibility 0.22s ease;
}

.rmp-tooltip-arrow {
    position: absolute;
    top: -6px;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 0;
    border-left: 7px solid transparent;
    border-right: 7px solid transparent;
    border-bottom: 7px solid #000;
}

.rmp-tooltip-text {
    display: block;
    width: 190px;
    padding: 10px 12px;
    background: #000;
    color: #fff;
    border-radius: 8px;
    font-size: 16px;
    font-family: 'Oswald', var(--global-heading-font-family, sans-serif);
    font-weight: 400;
    text-align: center;
    line-height: 1.35;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.3);
}

.rmp-point.rmp-tooltip-open .rmp-tooltip {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

/* ── Hover (desktop) ── */
@media (hover: hover) and (pointer: fine) {
    .rmp-point.rmp-has-desc:hover .rmp-tooltip {
        opacity: 1;
        visibility: visible;
        pointer-events: auto;
    }
    .rmp-point.rmp-has-desc:hover .rmp-body {
        box-shadow: 0 0 0 3px rgba(255,255,255,0.5);
    }
}

/* ── Mobile pan ── */
.rmp-container.rmp-mobile-active .rmp-viewport {
    cursor: grab;
    touch-action: none;
}
.rmp-container.rmp-mobile-active.rmp-dragging .rmp-viewport {
    cursor: grabbing;
}
