.oo-map {
    position: relative;
    width: 100%;
    overflow: visible;
}

.oo-map img {
    max-width: 100%;
    height: auto;
}

.oo-map .oo-map-runtime-image,
.oo-map img.oo-map-image,
.oo-map .oo-map-image img {
    display: block;
    width: 100%;
    height: auto;
}

.oo-map-floor,
.oo-map-x,
.oo-map-y,
.oo-map-title,
.oo-map-popup-content,
.oo-map-link {
    display: none !important;
}

.oo-map-anchor {
    position: absolute;
    z-index: 20;
    width: 0;
    height: 0;
}

.oo-map-marker {
    position: absolute;
    left: 0;
    top: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    min-width: 0;
    padding: 0;
    border: 0;
    background: transparent;
    transform: translate(-50%, -100%);
    cursor: pointer;
    font: inherit;
    color: inherit;
    overflow: visible;
}

.oo-map-pin {
    order: 2;
    position: relative;
    z-index: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    width: var(--oo-marker-size, 34px);
    height: var(--oo-marker-size, 34px);
    padding: 4px;
    box-sizing: border-box;
    border: 1px solid rgba(31, 37, 43, .95);
    border-radius: 50%;
    background: rgba(255, 255, 255, 1);
    box-shadow:
        0 0 0 3px rgba(255, 255, 255, .98),
        0 0 0 4px rgba(31, 37, 43, .88),
        0 4px 11px rgba(0, 0, 0, .42);
    transition: transform .18s ease, box-shadow .18s ease;
}

.oo-map-pin::before {
    content: '';
    position: absolute;
    z-index: 0;
    inset: -5px;
    border: 2px solid rgba(255, 255, 255, .92);
    border-radius: 50%;
    box-shadow: 0 0 0 1px rgba(31, 37, 43, .32);
    pointer-events: none;
    animation: oo-map-marker-halo 1.9s ease-out infinite;
}

@keyframes oo-map-marker-halo {
    0% {
        opacity: .82;
        transform: scale(.96);
    }
    70%, 100% {
        opacity: 0;
        transform: scale(1.48);
    }
}

.oo-map-marker:hover .oo-map-pin,
.oo-map-marker:focus-visible .oo-map-pin,
.oo-map-anchor--open .oo-map-pin {
    transform: translateY(-2px) scale(1.06);
}

.oo-map-pin svg {
    position: relative;
    z-index: 1;
    display: block;
    width: 100%;
    height: 100%;
    fill: #d7263d;
}

.oo-map-label {
    order: 1;
    display: block;
    max-width: 180px;
    padding: 5px 8px;
    border-radius: 5px;
    background: rgba(255, 255, 255, .96);
    box-shadow: 0 2px 8px rgba(0, 0, 0, .16);
    color: #1f252b;
    font-size: 12px;
    font-weight: 700;
    line-height: 1.2;
    white-space: nowrap;
    pointer-events: none;
}

.oo-map-label--hover {
    opacity: 0;
    visibility: hidden;
    transform: translateY(4px);
    transition: opacity .16s ease, transform .16s ease, visibility .16s ease;
}

.oo-map-marker:hover .oo-map-label--hover,
.oo-map-marker:focus-visible .oo-map-label--hover,
.oo-map-anchor--open .oo-map-label--hover {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.oo-map-popup {
    --oo-popup-shift-x: 0px;
    position: absolute;
    left: 0;
    bottom: calc(var(--oo-marker-size, 34px) + 48px);
    z-index: 30;
    width: max-content;
    min-width: 210px;
    max-width: min(320px, calc(100vw - 24px));
    padding: 14px;
    border: 1px solid rgba(0, 0, 0, .09);
    border-radius: 9px;
    background: #fff;
    box-shadow: 0 8px 30px rgba(0, 0, 0, .2);
    color: #222;
    line-height: 1.45;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transform: translate(calc(-50% + var(--oo-popup-shift-x)), 6px);
    transition: opacity .16s ease, transform .16s ease, visibility .16s ease;
}

.oo-map-popup::after {
    content: '';
    position: absolute;
    left: calc(50% - var(--oo-popup-shift-x));
    bottom: -7px;
    width: 13px;
    height: 13px;
    border-right: 1px solid rgba(0, 0, 0, .09);
    border-bottom: 1px solid rgba(0, 0, 0, .09);
    background: #fff;
    transform: translateX(-50%) rotate(45deg);
}

.oo-map-anchor--open .oo-map-popup {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transform: translate(calc(-50% + var(--oo-popup-shift-x)), 0);
}

.oo-map-popup__title {
    margin: 0 0 7px;
    font-size: 16px;
    font-weight: 700;
    line-height: 1.25;
}

.oo-map-popup__content {
    font-size: 13px;
}

.oo-map-popup__content > :first-child {
    margin-top: 0;
}

.oo-map-popup__content > :last-child {
    margin-bottom: 0;
}

.oo-map-popup__link {
    display: inline-block;
    margin-top: 10px;
    padding: 7px 11px;
    border-radius: 5px;
    background: #1f252b;
    color: #fff !important;
    font-size: 12px;
    font-weight: 700;
    line-height: 1.2;
    text-decoration: none !important;
}

.oo-map-marker:focus-visible {
    outline: 2px solid currentColor;
    outline-offset: 4px;
    border-radius: 4px;
}

@media (prefers-reduced-motion: reduce) {
    .oo-map-pin::before {
        animation: none;
        opacity: .55;
        transform: scale(1.12);
    }
}

@media (max-width: 767px) {
    /* Mobilon a térképen csak a jelölő látszik. */
    .oo-map-label {
        display: none !important;
    }

    /* Kicsit nagyobb érintési cél és jobb kontraszt mobilon. */
    .oo-map-marker {
        min-width: 42px;
        min-height: 42px;
        justify-content: center;
    }

    .oo-map-pin {
        width: max(var(--oo-marker-size, 34px), 38px);
        height: max(var(--oo-marker-size, 34px), 38px);
        padding: 5px;
        border: 2px solid rgba(31, 37, 43, .92);
        background: rgba(255, 255, 255, .98);
        box-shadow: 0 2px 8px rgba(0, 0, 0, .28);
    }

    /* Mobilon a halo ne növelje meg optikailag a jelölőt. */
    .oo-map-pin::before {
        display: none;
    }

    .oo-map-popup {
        bottom: calc(var(--oo-marker-size, 34px) + 18px);
        min-width: 190px;
    }
}
