.wpb-im-container {
    position: relative;
    width: 100%;
    margin-bottom: 20px;
}

.wpb-im-image-wrapper {
    position: relative;
    display: inline-block;
    max-width: 100%;
}

.wpb-im-image-wrapper img {
    display: block;
    width: 100%;
    height: auto;
}

.wpb-im-marker-point {
    position: absolute;
    width: 30px;
    height: 30px;
    margin-left: -15px;
    /* Center horizontally */
    margin-top: -30px;
    /* Pin bottom to point */
    cursor: default;
    z-index: 10;
}

.wpb-im-marker-icon {
    display: block;
    width: 100%;
    height: 100%;
    background-color: var(--marker-color, #e53935);
    border-radius: 50% 50% 0 50%;
    transform: rotate(45deg);
    box-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
    border: 2px solid #fff;
    transition: transform 0.2s, background-color 0.2s;
    position: relative;
    box-sizing: border-box;
    cursor: pointer;
}

.wpb-im-custom-marker-img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
    /* Optional: make round by default? or leave rect? Let's assume square or user style. */
    border: 2px solid #fff;
    box-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
    transition: transform 0.2s;
    cursor: pointer;
}

/* --- Styles --- */

/* Circle */
.wpb-im-style-circle .wpb-im-marker-icon,
.wpb-im-style-pulsating_circle .wpb-im-marker-icon {
    border-radius: 50%;
    transform: none;
}

/* Square */
.wpb-im-style-square .wpb-im-marker-icon,
.wpb-im-style-pulsating_square .wpb-im-marker-icon {
    border-radius: 3px;
    transform: none;
}

/* Pulsating Effect */
.wpb-im-style-pulsating_circle .wpb-im-marker-icon::before,
.wpb-im-style-pulsating_square .wpb-im-marker-icon::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    border-radius: 50%;
    border: 2px solid var(--marker-color, #e53935);
    opacity: 0;
    animation: wpb-im-pulse 2s infinite;
    pointer-events: none;
    box-sizing: border-box;
}

.wpb-im-style-pulsating_square .wpb-im-marker-icon::before {
    border-radius: 3px;
}

@keyframes wpb-im-pulse {
    0% {
        transform: scale(0.5);
        opacity: 0.8;
    }

    100% {
        transform: scale(1.2);
        opacity: 0;
    }
}

/* Magnifying Glass */
.wpb-im-style-magnifying_glass .wpb-im-marker-icon {
    background-color: transparent !important;
    border: 2px solid var(--marker-color, #e53935);
    border-radius: 50%;
    transform: none;
    box-shadow: none;
}

.wpb-im-style-magnifying_glass .wpb-im-marker-icon::after {
    content: '';
    position: absolute;
    bottom: -4px;
    right: -4px;
    width: 8px;
    height: 4px;
    background-color: var(--marker-color, #e53935);
    transform: rotate(45deg);
    transform-origin: 0 50%;
}


/* Hover States */
.wpb-im-marker-point:hover,
.wpb-im-marker-point.active {
    z-index: 100;
}

.wpb-im-marker-point:hover .wpb-im-marker-icon,
.wpb-im-marker-point.active .wpb-im-marker-icon {
    background-color: var(--marker-color, #e53935);
    /* Keep same color or lighten? */
    filter: brightness(1.2);
    /* Simple hover effect */
    transform: scale(1.1);
}

.wpb-im-style-location_pin:hover .wpb-im-marker-icon,
.wpb-im-style-location_pin.active .wpb-im-marker-icon {
    transform: rotate(45deg) scale(1.1);
}

.wpb-im-style-circle:hover .wpb-im-marker-icon,
.wpb-im-style-pulsating_circle:hover .wpb-im-marker-icon,
.wpb-im-style-square:hover .wpb-im-marker-icon,
.wpb-im-style-pulsating_square:hover .wpb-im-marker-icon {
    transform: scale(1.1);
}

.wpb-im-marker-point:hover .wpb-im-custom-marker-img {
    transform: scale(1.1);
}

.wpb-im-marker-content-hidden {
    display: none;
}

/* Tooltip/Modal */
.wpb-im-marker-tooltip {
    position: absolute;
    bottom: 40px;
    left: 50%;
    transform: translateX(-50%);
    width: 250px;
    background: #fff;
    padding: 15px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.15);
    border-radius: 4px;
    z-index: 20;
    text-align: left;
    display: none;
    cursor: default;
}

.wpb-im-marker-tooltip.visible {
    display: block;
    animation: wpb-im-fadein 0.2s ease-out;
}

.wpb-im-marker-tooltip h4 {
    margin-top: 0;
    margin-bottom: 8px;
    font-size: 16px;
    color: #333;
}

.wpb-im-popup-image {
    display: block;
    max-width: 100%;
    height: auto;
    margin-bottom: 10px;
    border-radius: 4px;
}

.wpb-im-desc {
    font-size: 13px;
    line-height: 1.5;
    color: #666;
    margin-bottom: 10px;
}

.wpb-im-btn {
    display: inline-block;
    padding: 5px 10px;
    background: #1e88e5;
    color: #fff;
    text-decoration: none;
    font-size: 12px;
    border-radius: 3px;
    transition: background 0.2s;
}

.wpb-im-btn:hover {
    background: #1565c0;
    color: #fff;
}

/* Triangle for tooltip */
.wpb-im-marker-tooltip::after {
    content: '';
    position: absolute;
    top: 100%;
    left: 50%;
    margin-left: -8px;
    border-width: 8px;
    border-style: solid;
    border-color: #fff transparent transparent transparent;
}

@keyframes wpb-im-fadein {
    from {
        opacity: 0;
        transform: translateX(-50%) translateY(5px);
    }

    to {
        opacity: 1;
        transform: translateX(-50%) translateY(0);
    }
}

/* Mobile responsive */
@media (max-width: 600px) {
    .wpb-im-marker-tooltip {
        width: 200px;
    }
}