/* ==========================================
   Hotspot Widget Styles
   ========================================== */

/* 主容器 */
.hotspot-wrapper {
    position: relative;
    width: 100%;
}

.hotspot-container {
    position: relative;
    width: 100%;
    height: 500px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

/* Hotspot 图片 */
.hotspot-image {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
}

/* Hotspot 标记点 */
.hotspot-marker {
    position: absolute;
    transform: translate(-50%, -50%);
    cursor: pointer;
    z-index: 10;
}

/* Hotspot 中心点 */
.hotspot-point {
    width: 20px;
    height: 20px;
    background-color: #ff0000;
    border-radius: 50%;
    position: relative;
    z-index: 3;
    box-shadow: 0 0 10px currentColor;
    transition: all 0.3s ease;
}

.hotspot-marker:hover .hotspot-point {
    transform: scale(1.2);
    box-shadow: 0 0 15px currentColor;
}

/* 雷达动画效果 - 第一层 */
.hotspot-point::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 100%;
    height: 100%;
    border: 2px solid #ff0000;
    border-radius: 50%;
    transform: translate(-50%, -50%);
    animation: radar-pulse 2s ease-out infinite;
    z-index: 1;
}

/* 雷达动画效果 - 第二层 */
.hotspot-point::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 100%;
    height: 100%;
    border: 2px solid #ff0000;
    border-radius: 50%;
    transform: translate(-50%, -50%);
    animation: radar-pulse 2s ease-out infinite 1s;
    z-index: 1;
}

/* 雷达脉冲动画 */
@keyframes radar-pulse {
    0% {
        width: 100%;
        height: 100%;
        opacity: 0.6;
    }
    50% {
        opacity: 0.3;
    }
    100% {
        width: 300%;
        height: 300%;
        opacity: 0;
    }
}

/* 弹窗样式 */
.hotspot-popup {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 999999;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* 弹窗遮罩 */
.hotspot-popup-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(5px);
    z-index: 1;
    animation: overlay-fade-in 0.3s ease-out forwards;
}

/* 遮罩关闭动画 */
.hotspot-popup-overlay.popup-overlay-closing {
    animation: overlay-fade-out 0.25s ease-in forwards;
}

/* 弹窗内容 */
.hotspot-popup-content {
    position: relative;
    background-color: #ffffff;
    padding: 40px;
    border-radius: 10px;
    max-width: 600px;
    width: 90%;
    max-height: 80vh;
    overflow-y: auto;
    z-index: 2;
    box-shadow: 0 10px 50px rgba(0, 0, 0, 0.3);
    animation: popup-slide-in 0.3s ease-out forwards;
}

/* 弹窗关闭动画 */
.hotspot-popup-content.popup-closing {
    animation: popup-slide-out 0.25s ease-in forwards;
}

/* 弹窗动画 */
@keyframes popup-slide-in {
    from {
        opacity: 0;
        transform: scale(0.9) translateY(-20px);
    }
    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

/* 弹窗关闭动画 */
@keyframes popup-slide-out {
    from {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
    to {
        opacity: 0;
        transform: scale(0.9) translateY(-20px);
    }
}

/* 遮罩淡入动画 */
@keyframes overlay-fade-in {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

/* 遮罩淡出动画 */
@keyframes overlay-fade-out {
    from {
        opacity: 1;
    }
    to {
        opacity: 0;
    }
}

/* 弹窗关闭按钮 */
.hotspot-popup-close {
    position: absolute;
    top: 15px;
    right: 15px;
    width: 35px;
    height: 35px;
    background-color: transparent;
    border: none;
    font-size: 30px;
    line-height: 1;
    color: #666;
    cursor: pointer;
    transition: all 0.3s ease;
    z-index: 3;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
}

.hotspot-popup-close:hover {
    color: #333;
    transform: rotate(90deg);
}

/* 弹窗标题 */
.hotspot-popup-title {
    margin: 0 0 20px 0;
    font-size: 28px;
    font-weight: 700;
    color: #333;
    line-height: 1.3;
}

/* 弹窗描述 */
.hotspot-popup-description {
    font-size: 16px;
    line-height: 1.6;
    color: #666;
}

.hotspot-popup-description p {
    margin: 0 0 15px 0;
}

.hotspot-popup-description p:last-child {
    margin-bottom: 0;
}

/* 滚动条样式 */
.hotspot-popup-content::-webkit-scrollbar {
    width: 8px;
}

.hotspot-popup-content::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 10px;
}

.hotspot-popup-content::-webkit-scrollbar-thumb {
    background: #888;
    border-radius: 10px;
}

.hotspot-popup-content::-webkit-scrollbar-thumb:hover {
    background: #555;
}

/* ==========================================
   响应式设计 - 手机端
   ========================================== */

@media (max-width: 768px) {
    .hotspot-container {
        height: 300px;
    }

    /* 手机端 Hotspot 点更大一些，便于点击 */
    .hotspot-point {
        width: 25px;
        height: 25px;
    }

    /* 弹窗内容 */
    .hotspot-popup-content {
        width: 95%;
        max-width: none;
        padding: 25px;
        max-height: 90vh;
        border-radius: 15px;
    }

    /* 弹窗标题 */
    .hotspot-popup-title {
        font-size: 22px;
        margin-bottom: 15px;
        padding-right: 30px;
    }

    /* 弹窗描述 */
    .hotspot-popup-description {
        font-size: 15px;
        line-height: 1.5;
    }

    /* 关闭按钮 */
    .hotspot-popup-close {
        width: 30px;
        height: 30px;
        font-size: 25px;
        top: 10px;
        right: 10px;
    }
}

@media (max-width: 480px) {
    .hotspot-container {
        height: 250px;
    }

    .hotspot-popup-content {
        padding: 20px;
    }

    .hotspot-popup-title {
        font-size: 20px;
    }

    .hotspot-popup-description {
        font-size: 14px;
    }

        .hotspot-popup-content {
        width: 85%;
        max-width: 90%;
    }
}

/* 平板端 */
@media (min-width: 769px) and (max-width: 1024px) {
    .hotspot-container {
        height: 400px;
    }

    .hotspot-popup-content {
        width: 85%;
        max-width: 650px;
    }
}

/* 编辑器模式下的样式调整 */
.elementor-editor-active .hotspot-popup {
    pointer-events: none;
}

.elementor-editor-active .hotspot-marker {
    pointer-events: auto;
}
