.cm-nest-hotspots {
    position: relative;
    width: 100%;
    height: 100%;
}

.cm-nest-hotspot-wrapper {
    position: relative; /* Force relative positioning */
    display: inline-block;
    width: 100%;
    height: 100%;
}

.cm-nest-hotspots-container {
    position: absolute; /* Force absolute positioning */
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 100;
}

.cm-nest-hotspots.cm-cloned {
    display: block;
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 100;
    pointer-events: none;
}

.cm-nest-hotspot {
    pointer-events: auto;
    position: absolute; /* Force absolute positioning */
    max-width: calc(100% - 20px);
    max-height: calc(100% - 20px);
    transform: translate(-50%, -50%); /* Center the hotspot on its position */
}

.cm-nest-hotspot-content {
    position: relative;
    box-sizing: border-box;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
    padding: 0;
    text-align: center;
    border-radius: 50%;
    width: 30px;
    height: 30px;
    transform-origin: center;
}

/* Hotspot styles */
.cm-nest-hotspot-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    background-color: rgba(0, 0, 0, 0.8);
    border-radius: 50%;
    color: #fff;
    transition: all 0.3s ease;
}

.cm-nest-hotspot-icon i {
    font-size: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    width: auto;
    height: auto;
    line-height: 1;
}

.cm-nest-hotspot:hover .cm-nest-hotspot-icon {
    transform: scale(1.1);
    transition: transform 0.3s ease;
    background-color: rgba(0, 0, 0, 0.9);
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

.cm-nest-hotspot[aria-expanded="true"] .cm-nest-hotspot-icon {
    background-color: rgba(0, 0, 0, 1);
    box-shadow: 0 2px 6px rgba(0,0,0,0.3);
}

.cm-nest-hotspot-text {
    padding: 5px 10px;
    border-radius: 3px;
    background-color: rgba(0, 0, 0, 0.8);
    color: #fff;
    font-size: 12px;
    line-height: 1.4;
}

.cm-nest-hotspot-icon-image {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    overflow: hidden;
}

.cm-nest-hotspot-icon-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.cm-nest-hotspot-default {
    width: 16px;
    height: 16px;
    background-color: rgba(0, 0, 0, 0.8);
    border-radius: 50%;
    display: block;
}

/* Animations */
.cm-nest-hotspot-animation-pulse .cm-nest-hotspot-default::before,
.cm-nest-hotspot-animation-pulse .cm-nest-hotspot-icon::before,
.cm-nest-hotspot-animation-pulse .cm-nest-hotspot-text::before,
.cm-nest-hotspot-animation-pulse .cm-nest-hotspot-icon-image::before {
    content: '';
    display: block;
    position: absolute;
    width: 100%;
    height: 100%;
    background: inherit;
    border-radius: inherit;
    z-index: -1;
    animation: cmNestHotspotPulse 2s cubic-bezier(0.455, 0.03, 0.515, 0.955) infinite;
    top: 0;
    left: 0;
}

@keyframes cmNestHotspotPulse {
    0% {
        transform: scale(1);
        opacity: 0.8;
    }
    50% {
        transform: scale(1.4);
        opacity: 0;
    }
    100% {
        transform: scale(1);
        opacity: 0;
    }
}

.cm-nest-hotspot-animation-fade .cm-nest-hotspot-default,
.cm-nest-hotspot-animation-fade .cm-nest-hotspot-icon,
.cm-nest-hotspot-animation-fade .cm-nest-hotspot-text,
.cm-nest-hotspot-animation-fade .cm-nest-hotspot-icon-image {
    animation: cmNestHotspotFade 2s ease-in-out infinite;
}

@keyframes cmNestHotspotFade {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

/* Tooltip styles */
.cm-nest-tooltip {
    display: none;
    visibility: hidden;
    opacity: 0;
}

/* Hint.css customization */
.cm-nest-hotspot[data-hint]:after {
    background-color: #333;
    color: #fff;
    padding: 8px 12px;
    font-size: 14px;
    line-height: 1.4;
    min-width: 150px;
    max-width: 300px;
    white-space: normal;
    text-wrap: wrap;
    box-shadow: 0 2px 10px rgba(0,0,0,0.2);
}

.hint--small:after {
    width: 150px;
}

.hint--medium:after {
    width: 250px;
}

.hint--large:after {
    width: 350px;
}

/* Responsive styles */
@media screen and (max-width: 767px) {
    .cm-nest-hotspot-icon {
        width: 24px;
        height: 24px;
    }

    .cm-nest-hotspot-icon i {
        font-size: 12px;
    }

    .cm-nest-hotspot-text {
        font-size: 11px;
        padding: 4px 8px;
    }

    .cm-nest-hotspot-icon-image {
        width: 24px;
        height: 24px;
    }
    
    [data-hint]:after {
        padding: 6px 10px;
        font-size: 12px;
        max-width: 200px;
    }
}