/* Image Pins Public Styles */
.image-pins-container {
    position: relative;
    margin: 20px 0;
}

.image-pins-container.original .image-pins-wrapper {
    display: inline-block;
    max-width: 100%;
}

.image-pins-container.fullscreen .image-pins-wrapper {
    width: 100vw;
    margin-left: calc(-50vw + 50%);
}

.image-pins-container.fullscreen .image-pins-img {
    width: 100%;
}

.image-pins-wrapper {
    position: relative;
    display: inline-block;
}

.image-pins-img {
    display: block;
    max-width: 100%;
    height: auto;
}

.image-pin {
    position: absolute;
    transform: translate(-50%, -50%);
    cursor: pointer;
    z-index: 10;
}

.pin-marker {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    position: relative;
    animation: pulse 2s infinite;
    box-shadow: 0 0 0 0 rgba(0, 0, 0, 0.7);
}

@keyframes pulse {
    0% {
        box-shadow: 0 0 0 0 rgba(0, 0, 0, 0.7);
    }
    70% {
        box-shadow: 0 0 0 10px rgba(0, 0, 0, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(0, 0, 0, 0);
    }
}

.pin-tooltip {
    position: absolute;
    background: white;
    border-radius: 4px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.15);
    min-width: 200px;
    max-width: 300px;
    z-index: 100;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.tooltip-link {
    display: block;
    text-decoration: none;
    color: inherit;
}

.tooltip-content {
    padding: 15px;
}

.tooltip-title {
    font-size: 16px;
    font-weight: bold;
    margin: 0 0 8px 0;
    color: #2c3e50;
}

.tooltip-text {
    font-size: 14px;
    line-height: 1.5;
    color: #555;
}

.pin-tooltip .tooltip-arrow {
    position: absolute;
    width: 0;
    height: 0;
}

/* Tooltip position: TOP */
.pin-tooltip.position-top {
    bottom: calc(100% + 15px);
    left: 50%;
    transform: translateX(-50%);
}

.pin-tooltip.position-top .tooltip-arrow {
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    border-left: 10px solid transparent;
    border-right: 10px solid transparent;
    border-top: 10px solid white;
}

/* Tooltip position: BOTTOM */
.pin-tooltip.position-bottom {
    top: calc(100% + 15px);
    left: 50%;
    transform: translateX(-50%);
}

.pin-tooltip.position-bottom .tooltip-arrow {
    top: -10px;
    left: 50%;
    transform: translateX(-50%);
    border-left: 10px solid transparent;
    border-right: 10px solid transparent;
    border-bottom: 10px solid white;
}

/* Tooltip position: LEFT */
.pin-tooltip.position-left {
    right: calc(100% + 15px);
    top: 50%;
    transform: translateY(-50%);
}

.pin-tooltip.position-left .tooltip-arrow {
    right: -10px;
    top: 50%;
    transform: translateY(-50%);
    border-top: 10px solid transparent;
    border-bottom: 10px solid transparent;
    border-left: 10px solid white;
}

/* Tooltip position: RIGHT */
.pin-tooltip.position-right {
    left: calc(100% + 15px);
    top: 50%;
    transform: translateY(-50%);
}

.pin-tooltip.position-right .tooltip-arrow {
    left: -10px;
    top: 50%;
    transform: translateY(-50%);
    border-top: 10px solid transparent;
    border-bottom: 10px solid transparent;
    border-right: 10px solid white;
}

/* Trigger types */
.image-pin[data-trigger="always"] .pin-tooltip {
    opacity: 1;
    visibility: visible;
}

.image-pin[data-trigger="hover"]:hover .pin-tooltip,
.image-pin[data-trigger="click"].active .pin-tooltip {
    opacity: 1;
    visibility: visible;
}

/* Responsive adjustments */
@media (max-width: 767px) {
    .tooltip-content {
        padding: 10px;
    }
    
    .pin-tooltip {
        min-width: 150px;
        max-width: 200px;
    }
    
    .tooltip-title {
        font-size: 14px;
    }
    
    .tooltip-text {
        font-size: 13px;
    }
    
    .image-pins-container.fullscreen .image-pins-wrapper {
        margin-left: 0;
        width: 100%;
    }
    
    /* On mobile, force top position for better visibility */
    .pin-tooltip.position-left,
    .pin-tooltip.position-right {
        right: auto;
        left: 50%;
        top: auto;
        bottom: calc(100% + 15px);
        transform: translateX(-50%);
    }
    
    .pin-tooltip.position-left .tooltip-arrow,
    .pin-tooltip.position-right .tooltip-arrow {
        right: auto;
        left: 50%;
        top: auto;
        bottom: -10px;
        transform: translateX(-50%);
        border: none;
        border-left: 10px solid transparent;
        border-right: 10px solid transparent;
        border-top: 10px solid white;
    }
}