/**
 * 局部遮挡功能样式文件
 * 定义遮罩层的基础样式和动画效果
 */

/* 遮罩层基础样式 */
.content-mask-overlay {
    position: absolute !important;
    top: 0 !important;
    left: 0 !important;
    width: 100% !important;
    height: 100% !important;
    pointer-events: none !important;
    z-index: 8000 !important;
    user-select: none !important;
    -webkit-user-select: none !important;
    -moz-user-select: none !important;
    -ms-user-select: none !important;
    /* 🚀 性能优化：移除过渡动画，实现立即显示 */
}

/* 遮罩容器 */
.content-mask-container {
    position: absolute !important;
    pointer-events: none !important;
    z-index: 8000 !important;
    overflow: hidden !important;
}

/* 模糊效果 */
.content-mask-blur {
    filter: blur(3px) !important;
    -webkit-filter: blur(3px) !important;
    -moz-filter: blur(3px) !important;
    -o-filter: blur(3px) !important;
    -ms-filter: blur(3px) !important;
}

/* 深色遮罩 */
.content-mask-dark {
    background-color: rgba(0, 0, 0, 0.7) !important;
}

/* 浅色遮罩 */
.content-mask-light {
    background-color: rgba(255, 255, 255, 0.7) !important;
}

/* 自定义颜色遮罩 */
.content-mask-custom {
    background-color: rgba(0, 0, 0, 0.5) !important;
}

/* 圆角遮罩 */
.content-mask-rounded {
    border-radius: 8px !important;
}

/* 动画效果 */
@keyframes contentMaskFadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes contentMaskPulse {
    0% {
        opacity: 0.6;
    }
    50% {
        opacity: 0.9;
    }
    100% {
        opacity: 0.6;
    }
}

.content-mask-fade-in {
    animation: contentMaskFadeIn 0.3s ease-in-out !important;
}

.content-mask-pulse {
    animation: contentMaskPulse 2s ease-in-out infinite !important;
}

/* 响应式适配 */
@media screen and (max-width: 768px) {
    .content-mask-overlay {
        -webkit-tap-highlight-color: transparent !important;
    }
}

/* 高对比度模式支持 */
@media (prefers-contrast: high) {
    .content-mask-overlay {
        border: 2px solid #000000 !important;
    }
}

/* 减少动画模式支持 */
@media (prefers-reduced-motion: reduce) {
    .content-mask-overlay {
        animation: none !important;
    }
    
    .content-mask-fade-in,
    .content-mask-pulse {
        animation: none !important;
    }
}

/* 确保遮罩始终在正确层级 */
.content-mask-overlay,
.content-mask-container {
    z-index: 8000 !important;
    pointer-events: none !important;
    user-select: none !important;
    -webkit-user-select: none !important;
    -moz-user-select: none !important;
    -ms-user-select: none !important;
}

/* 防止遮罩被其他样式覆盖 */
.content-mask-overlay *,
.content-mask-container * {
    pointer-events: none !important;
    user-select: none !important;
    -webkit-user-select: none !important;
    -moz-user-select: none !important;
    -ms-user-select: none !important;
}

/* 调试模式样式 */
.content-mask-debug {
    border: 2px dashed #ff0000 !important;
    box-shadow: 0 0 0 2px rgba(255, 0, 0, 0.3) !important;
}

.content-mask-debug::before {
    content: "MASK" !important;
    position: absolute !important;
    top: -20px !important;
    left: 0 !important;
    background: #ff0000 !important;
    color: #ffffff !important;
    padding: 2px 4px !important;
    font-size: 10px !important;
    font-weight: bold !important;
    z-index: 10001 !important;
}

/* 精确文字遮罩样式 */
.content-mask-precise {
    border-radius: 2px !important;
    min-width: 1px !important;
    min-height: 1em !important;
    box-sizing: border-box !important;
    line-height: 1 !important;
}
