.vikingo-hotspot-wrapper {
    position: relative;
    display: inline-block;
    width: 100%;
}

.vikingo-hotspot-base {
    display: block;
    width: 100%;
    height: auto;
}

.vikingo-hotspot-item {
    position: absolute;
    transform: translate(-50%, -50%);
    z-index: 10;
}

.vikingo-marker {
    width: 30px;
    height: 30px;
    background-color: #000;
    color: #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 0 10px rgba(0,0,0,0.3);
    transition: transform 0.3s ease;
}

.vikingo-marker:hover {
    transform: scale(1.1);
}

.vikingo-tooltip {
    position: absolute;
    background-color: #fff;
    color: #333;
    padding: 10px;
    border-radius: 4px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
    width: max-content;
    max-width: 200px;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
    z-index: 20;
}

/* Tooltip Directions */
.vikingo-tooltip-top {
    bottom: calc(100% + 10px);
    left: 50%;
    transform: translateX(-50%);
}

.vikingo-tooltip-bottom {
    top: calc(100% + 10px);
    left: 50%;
    transform: translateX(-50%);
}

.vikingo-tooltip-left {
    right: calc(100% + 10px);
    top: 50%;
    transform: translateY(-50%);
}

.vikingo-tooltip-right {
    left: calc(100% + 10px);
    top: 50%;
    transform: translateY(-50%);
}

/* Interaction: Hover */
.vikingo-hotspot-wrapper[data-interaction="hover"] .vikingo-hotspot-item:hover .vikingo-tooltip {
    opacity: 1;
    visibility: visible;
}

/* Interaction: Click */
.vikingo-hotspot-item.is-active .vikingo-tooltip {
    opacity: 1;
    visibility: visible;
}

/* Responsive Overrides */
@media (max-width: 767px) {
    /* Increase click target size for markers to comply with accessibility guidelines */
    .vikingo-marker {
        position: relative;
    }
    .vikingo-marker::after {
        content: '';
        position: absolute;
        width: 48px;
        height: 48px;
        top: 50%;
        left: 50%;
        transform: translate(-50%, -50%);
    }

    /* Reset desktop hover scales to prevent sticky effects */
    .vikingo-marker:hover {
        transform: none;
    }

    /* Display tooltips as a unified banner/card at the bottom of the image */
    .vikingo-hotspot-wrapper .vikingo-tooltip {
        position: absolute;
        bottom: 15px;
        left: 15px;
        right: 15px;
        top: auto !important;
        width: auto !important;
        max-width: calc(100% - 30px) !important;
        box-sizing: border-box;
        margin: 0 !important;
        transform: translateY(10px) !important;
        z-index: 30;
        box-shadow: 0 8px 25px rgba(0,0,0,0.2);
        border: 1px solid rgba(0,0,0,0.08);
        border-radius: 8px;
        transition: opacity 0.3s cubic-bezier(0.2, 1, 0.3, 1), transform 0.3s cubic-bezier(0.2, 1, 0.3, 1), visibility 0.3s !important;
    }

    /* Hover tooltips are converted to click-driven on mobile, so reset CSS hover state */
    .vikingo-hotspot-wrapper[data-interaction="hover"] .vikingo-hotspot-item:hover .vikingo-tooltip {
        opacity: 0;
        visibility: hidden;
        transform: translateY(10px) !important;
    }

    /* Enable active display via is-active class */
    .vikingo-hotspot-item.is-active .vikingo-tooltip {
        opacity: 1;
        visibility: visible;
        transform: translateY(0) !important;
    }
}

