/* 热点容器 */
.geniatech-hotspot-container {
    width: 100%;
    max-width: 100%;
    position: relative;
    display: inline-block;
    margin: 0 auto;
}

/* 热点图片容器 */
.geniatech-hotspot-image {
    position: relative;
    display: block;
    width: 100%;
    height: 400px;
    overflow: hidden;
    border-radius: 8px;
}

.geniatech-hotspot-image img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
}

/* 热点标记 */
.geniatech-hotspot-marker {
    position: absolute;
    background-color: #ff4757;
    border: 3px solid #ffffff;
    border-radius: 50%;
    cursor: pointer;
    z-index: 10;
    transform: translate(-50%, -50%);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    overflow: visible;
    min-width: 20px;
    min-height: 20px;
}

/* 热点图标 */
.geniatech-hotspot-icon {
    object-fit: contain;
    max-width: none;
    max-height: none;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 2;
    pointer-events: none;
}

/* 默认热点图标 */
.geniatech-hotspot-default-icon {
    color: #ffffff;
    font-size: 16px;
    font-weight: bold;
    line-height: 1;
    position: relative;
    z-index: 2;
    pointer-events: none;
}

/* 热点悬停效果 */
.geniatech-hotspot-marker:hover {
    transform: translate(-50%, -50%) scale(1.2);
}

/* 热点动画 - 脉冲 */
.geniatech-hotspot-marker.pulse {
    animation: hotspot-pulse 2s infinite;
}

@keyframes hotspot-pulse {
    0% {
        box-shadow: 0 0 0 0 rgba(255, 71, 87, 0.7);
    }
    70% {
        box-shadow: 0 0 0 10px rgba(255, 71, 87, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(255, 71, 87, 0);
    }
}

/* 热点动画 - 弹跳 */
.geniatech-hotspot-marker.bounce {
    animation: hotspot-bounce 2s infinite;
}

@keyframes hotspot-bounce {
    0%, 20%, 53%, 80%, 100% {
        transform: translate(-50%, -50%) translateY(0);
    }
    40%, 43% {
        transform: translate(-50%, -50%) translateY(-8px);
    }
    70% {
        transform: translate(-50%, -50%) translateY(-4px);
    }
    90% {
        transform: translate(-50%, -50%) translateY(-2px);
    }
}

/* 热点动画 - 摇摆 */
.geniatech-hotspot-marker.shake {
    animation: hotspot-shake 3s infinite;
}

@keyframes hotspot-shake {
    0%, 100% {
        transform: translate(-50%, -50%) rotate(0deg);
    }
    10%, 30%, 50%, 70%, 90% {
        transform: translate(-50%, -50%) rotate(-3deg);
    }
    20%, 40%, 60%, 80% {
        transform: translate(-50%, -50%) rotate(3deg);
    }
}

/* 信息框样式 */
.geniatech-hotspot-tooltip {
    position: absolute;
    width: 300px;
    background-color: #ffffff;
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.15);
    z-index: 100;
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: all 0.3s ease;
    pointer-events: none;
}

/* 信息框显示状态 */
.geniatech-hotspot-marker:hover .geniatech-hotspot-tooltip {
    opacity: 1 !important;
    visibility: visible !important;
    transform: translateY(0) !important;
    pointer-events: auto !important;
}

/* 信息框位置 - 上方 */
.geniatech-hotspot-tooltip.top {
    bottom: 100%;
    left: 90%;
    transform: translateX(-90%) translateY(10px);
    margin-bottom: 20px;
}

.geniatech-hotspot-tooltip.top::before {
    content: '';
    position: absolute;
    top: 100%; /* 提示工具底部 */
    left: 14%;
    margin-left: -5px;
    border-width:10px;
    border-style: solid;
    border-color: #ffffff transparent transparent transparent;
    z-index: 1;
}

.geniatech-hotspot-marker:hover .geniatech-hotspot-tooltip.top {
    transform: translateX(-90%) translateY(0) !important;
}

/* 自定义偏移的上方提示框 */
.geniatech-hotspot-tooltip.top[style*="left"] {
    transform: translateX(-50%) translateY(10px);
}

.geniatech-hotspot-marker:hover .geniatech-hotspot-tooltip.top[style*="left"] {
    transform: translateX(-50%) translateY(0) !important;
}

/* 信息框位置 - 下方 */
.geniatech-hotspot-tooltip.bottom {
    top: 100%;
    left: 90%;
    transform: translateX(-90%) translateY(-10px);
    margin-top: 20px;
}

.geniatech-hotspot-tooltip.bottom::before {
    content: '';
    position: absolute;
    bottom: 100%; /* 提示工具顶部 */
    left: 50%;
    margin-left: -5px;
    border-width: 5px;
    border-style: solid;
    border-color: transparent transparent #ffffff transparent;
    z-index: 1;
}

.geniatech-hotspot-marker:hover .geniatech-hotspot-tooltip.bottom {
    transform: translateX(-90%) translateY(0) !important;
}

/* 自定义偏移的下方提示框 */
.geniatech-hotspot-tooltip.bottom[style*="left"] {
    transform: translateX(-50%) translateY(-10px);
}

.geniatech-hotspot-marker:hover .geniatech-hotspot-tooltip.bottom[style*="left"] {
    transform: translateX(-50%) translateY(0) !important;
}

/* 信息框位置 - 左侧 */
.geniatech-hotspot-tooltip.left {
    right: 100%;
    top: 10%;
    transform: translateY(-10%) translateX(10px);
    margin-right: 20px;
}

.geniatech-hotspot-tooltip.left::before {
    content: '';
    position: absolute;
    left: 100%; /* 提示工具右侧 */
    top: 50%;
    margin-top: -5px;
    border-width: 5px;
    border-style: solid;
    border-color: transparent transparent transparent #ffffff;
    z-index: 1;
}

.geniatech-hotspot-marker:hover .geniatech-hotspot-tooltip.left {
    transform: translateY(-10%) translateX(0) !important;
}

/* 自定义偏移的左侧提示框 */
.geniatech-hotspot-tooltip.left[style*="top"] {
    transform: translateY(-50%) translateX(10px);
}

.geniatech-hotspot-marker:hover .geniatech-hotspot-tooltip.left[style*="top"] {
    transform: translateY(-50%) translateX(0) !important;
}

/* 信息框位置 - 右侧 */
.geniatech-hotspot-tooltip.right {
    left: 100%;
    top: 10%;
    transform: translateY(-10%) translateX(-10px);
    margin-left: 20px;
}

.geniatech-hotspot-tooltip.right::before {
    content: '';
    position: absolute;
    right: 100%; /* 提示工具左侧 */
    top: 50%;
    margin-top: -5px;
    border-width: 5px;
    border-style: solid;
    border-color: transparent #ffffff transparent transparent;
    z-index: 1;
}

.geniatech-hotspot-marker:hover .geniatech-hotspot-tooltip.right {
    transform: translateY(-10%) translateX(0) !important;
}

/* 自定义偏移的右侧提示框 */
.geniatech-hotspot-tooltip.right[style*="top"] {
    transform: translateY(-50%) translateX(-10px);
}

.geniatech-hotspot-marker:hover .geniatech-hotspot-tooltip.right[style*="top"] {
    transform: translateY(-50%) translateX(0) !important;
}

/* 信息框标题 */
.geniatech-hotspot-tooltip-title {
    font-size: 16px;
    font-weight: 600;
    color: #333333;
    margin-bottom: 8px;
    line-height: 1.4;
}

/* 信息框内容 */
.geniatech-hotspot-tooltip-content {
    font-size: 14px;
    color: #666666;
    line-height: 1.6;
    margin: 0;
}

.geniatech-hotspot-tooltip-content p {
    margin: 0 0 10px 0;
}

.geniatech-hotspot-tooltip-content p:last-child {
    margin-bottom: 0;
}

/* 编辑器中的拖拽功能 */
.elementor-editor-active .geniatech-hotspot-marker {
    cursor: move;
}

.elementor-editor-active .geniatech-hotspot-marker:hover {
    background-color: #5b73f7;
}

.elementor-editor-active .geniatech-hotspot-marker.dragging {
    z-index: 1000;
    opacity: 0.8;
}

/* 编辑器中的辅助线 */
.elementor-editor-active .geniatech-hotspot-image::before,
.elementor-editor-active .geniatech-hotspot-image::after {
    content: '';
    position: absolute;
    background: rgba(91, 115, 247, 0.3);
    z-index: 5;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.2s ease;
}

.elementor-editor-active .geniatech-hotspot-image::before {
    width: 1px;
    height: 100%;
    left: 50%;
    top: 0;
}

.elementor-editor-active .geniatech-hotspot-image::after {
    width: 100%;
    height: 1px;
    left: 0;
    top: 50%;
}

.elementor-editor-active .geniatech-hotspot-image:hover::before,
.elementor-editor-active .geniatech-hotspot-image:hover::after {
    opacity: 1;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .geniatech-hotspot-tooltip {
        width: 250px;
        padding: 15px;
    }
    
    .geniatech-hotspot-tooltip-title {
        font-size: 14px;
    }
    
    .geniatech-hotspot-tooltip-content {
        font-size: 12px;
    }
    
    .geniatech-hotspot-marker {
        min-width: 18px;
        min-height: 18px;
    }
    
    .geniatech-hotspot-default-icon {
        font-size: 14px;
    }
}

@media (max-width: 480px) {
    .geniatech-hotspot-tooltip {
        width: 200px;
        padding: 12px;
    }
    
    .geniatech-hotspot-marker {
        min-width: 15px;
        min-height: 15px;
    }
    
    .geniatech-hotspot-default-icon {
        font-size: 12px;
    }
}

/* 自动调整信息框位置（防止超出边界） */
.geniatech-hotspot-tooltip.auto-adjust-left {
    left: 0 !important;
    transform: translateX(0) !important;
}

.geniatech-hotspot-tooltip.auto-adjust-right {
    right: 0 !important;
    left: auto !important;
    transform: translateX(0) !important;
}

.geniatech-hotspot-tooltip.auto-adjust-top {
    top: 0 !important;
    bottom: auto !important;
    transform: translateY(0) !important;
}

.geniatech-hotspot-tooltip.auto-adjust-bottom {
    bottom: 0 !important;
    top: auto !important;
    transform: translateY(0) !important;
}

/* 加载动画 */
.geniatech-hotspot-container.loading .geniatech-hotspot-marker {
    opacity: 0;
    animation: hotspot-fade-in 0.5s ease forwards;
}

@keyframes hotspot-fade-in {
    from {
        opacity: 0;
        transform: translate(-50%, -50%) scale(0.5);
    }
    to {
        opacity: 1;
        transform: translate(-50%, -50%) scale(1);
    }
}

/* 热点标记的延迟加载动画 */
.geniatech-hotspot-marker:nth-child(1) { animation-delay: 0.1s; }
.geniatech-hotspot-marker:nth-child(2) { animation-delay: 0.2s; }
.geniatech-hotspot-marker:nth-child(3) { animation-delay: 0.3s; }
.geniatech-hotspot-marker:nth-child(4) { animation-delay: 0.4s; }
.geniatech-hotspot-marker:nth-child(5) { animation-delay: 0.5s; }
.geniatech-hotspot-marker:nth-child(6) { animation-delay: 0.6s; }
.geniatech-hotspot-marker:nth-child(7) { animation-delay: 0.7s; }
.geniatech-hotspot-marker:nth-child(8) { animation-delay: 0.8s; }
