/* 图标按钮组件样式 */
.wd-icon-buttons-container {
    position: fixed;
    display: flex;
    z-index: 9999;
    pointer-events: auto;
    /* 自定义尺寸支持 */
    align-content: flex-start;
    justify-content: center;
    align-items: center;
    box-sizing: border-box;
    /* 相对定位支持 */
    position: relative; /* 为绝对定位的按钮提供定位上下文 */
}

.wd-icon-button {
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    backdrop-filter: blur(10px);
    position: relative;
    overflow: hidden;
    cursor: pointer;
    user-select: none;
    margin: 0 !important;
    padding: 0 !important;
    box-sizing: border-box !important;
    
    /* UE兼容性：确保没有任何边框、阴影和变换效果 */
    border: none !important;
    box-shadow: none !important;
    outline: none !important;
    transform: none !important;
    scale: none !important;
    transition: none !important;
    animation: none !important;
    
    /* 完全静态外观 - 移除所有交互状态视觉效果 */
    -webkit-tap-highlight-color: transparent !important;
    -webkit-touch-callout: none !important;
    -webkit-user-select: none !important;
    -moz-user-select: none !important;
    -ms-user-select: none !important;
    user-select: none !important;
}

/* 绝对定位按钮的特殊样式 */
.wd-icon-button-absolute {
    /* 确保绝对定位按钮不受flex布局影响 */
    margin: 0 !important;
    flex: none !important;
    position: absolute !important;
    /* 优化绝对定位按钮的层级 */
    z-index: 1 !important;
}

/* 完全禁用所有交互状态 - 图标保持静态外观 */
.wd-icon-button:hover,
.wd-icon-button:hover *,
.wd-icon-button:focus,
.wd-icon-button:focus *,
.wd-icon-button:active,
.wd-icon-button:active *,
.wd-icon-button:visited,
.wd-icon-button:visited *,
.wd-icon-button:link,
.wd-icon-button:link *,
.wd-icon-button.selected,
.wd-icon-button.selected *,
.wd-icon-button:target,
.wd-icon-button:target * {
    /* 强制保持静态外观，移除所有交互状态 */
    transform: none !important;
    scale: none !important;
    zoom: 1 !important;
    box-shadow: none !important;
    text-decoration: none !important;
    opacity: inherit !important;
    filter: none !important;
    transition: none !important;
    animation: none !important;
    background: inherit !important;
    color: inherit !important;
    border: none !important;
    outline: none !important;
    outline-offset: 0 !important;
    text-shadow: none !important;
    cursor: inherit !important;
    -webkit-transform: none !important;
    -moz-transform: none !important;
    -ms-transform: none !important;
    -webkit-transition: none !important;
    -moz-transition: none !important;
    -ms-transition: none !important;
    -webkit-appearance: none !important;
    -moz-appearance: none !important;
    appearance: none !important;
}

/* ::before 伪元素光效动画已移除以简化代码 */

.wd-icon {
    font-size: inherit;
    line-height: 1;
    pointer-events: none;
    display: block;
}

.wd-icon-image {
    pointer-events: none;
    display: block;
    border-radius: inherit;
    width: 100% !important;
    height: 100% !important;
    max-width: 100% !important;
    max-height: 100% !important;
    min-width: 100% !important;
    min-height: 100% !important;
    object-fit: cover !important;
    margin: 0 !important;
    padding: 0 !important;
    border: none !important;
    outline: none !important;
    box-sizing: border-box !important;
    
    /* 移除悬停提示 */
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
    -webkit-touch-callout: none;
    -webkit-tap-highlight-color: transparent;
    
    /* 强制禁用任何变换效果 */
    transform: none !important;
    scale: none !important;
    transition: none !important;
    animation: none !important;
    filter: none !important;
}

.wd-icon {
    /* 强制禁用emoji图标的变换效果 */
    transform: none !important;
    scale: none !important;
    transition: none !important;
    animation: none !important;
    filter: none !important;
}

/* UE兼容性：移除所有加载动画以避免与UE环境冲突 */

/* 2K和4K显示优化 */
@media (min-width: 2560px) {
    .wd-icon-button {
        min-width: 60px !important;
        min-height: 60px !important;
    }
    
    .wd-icon {
        font-size: 32px !important;
    }
}

@media (min-width: 3840px) {
    .wd-icon-button {
        min-width: 80px !important;
        min-height: 80px !important;
    }
    
    .wd-icon {
        font-size: 40px !important;
    }
    
    .wd-icon-buttons-container {
        gap: 20px !important;
    }
}

/* 高对比度模式 */
@media (prefers-contrast: high) {
    .wd-icon-button {
        border: none !important;
        box-shadow: none !important;
        background: inherit !important;
    }
    
}

/* 减少动画模式 */
@media (prefers-reduced-motion: reduce) {
    .wd-icon-button,
    .wd-icon-buttons-container,
    .wd-icon-button::before {
        animation: none;
        transition: none;
    }
}

/* 打印样式 */
@media print {
    .wd-icon-buttons-container {
        display: none;
    }
}

/* 编辑器样式 */
.wd-icon-buttons-preview {
    border: 2px dashed #ddd;
    border-radius: 8px;
    padding: 20px;
    background: #fafafa;
    text-align: center;
}

.wd-icon-buttons-preview h4 {
    margin: 0 0 15px 0;
    color: #333;
    font-size: 16px;
}

/* Gutenberg编辑器兼容性 */
.wp-block-wd-widgets-icon-buttons {
    position: relative;
    min-height: 100px;
}

/* 无障碍支持 */
.wd-icon-button[aria-label] {
    /* 增强可访问性 */
}

/* 移除focus-visible状态 */

/* 主题兼容性 */
.wd-icon-buttons-container * {
    box-sizing: border-box;
}

/* 防止与其他样式冲突 */
.wd-icon-buttons-container,
.wd-icon-buttons-container * {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen-Sans, Ubuntu, Cantarell, 'Helvetica Neue', sans-serif;
}

/* RTL支持 */
[dir="rtl"] .wd-icon-buttons-container {
    direction: rtl;
}

/* RTL相关样式已移除（因为已移除光效动画） */

/* UE/游戏引擎兼容性修复 */
.wd-icon-button,
.wd-icon-button * {
    -webkit-appearance: none !important;
    -moz-appearance: none !important;
    appearance: none !important;
}

.wd-icon-image {
    /* 强制覆盖任何可能的UE默认样式 */
    background: none !important;
    background-color: transparent !important;
    background-image: none !important;
    vertical-align: top !important;
    line-height: 0 !important;
    font-size: 0 !important;
}

/* 防止UE中的边框/阴影问题 */
.wd-icon-button {
    isolation: isolate;
}

.wd-icon-button,
.wd-icon-image {
    contain: layout style paint;
}

/* UE兼容性：移除focus和hover状态的视觉变化，确保在UE环境中按钮保持一致外观 */

/* 彻底移除所有交互状态 - 强制静态外观 */
.wd-icon-buttons-container .wd-icon-button,
.wd-icon-buttons-container .wd-icon-button:hover,
.wd-icon-buttons-container .wd-icon-button:focus,
.wd-icon-buttons-container .wd-icon-button:active,
.wd-icon-buttons-container .wd-icon-button:visited,
.wd-icon-buttons-container .wd-icon-button:link,
.wd-icon-buttons-container .wd-icon-button.selected,
.wd-icon-buttons-container .wd-icon-button:target,
.wd-icon-buttons-container .wd-icon-button:focus-visible,
.wd-icon-buttons-container .wd-icon-button *,
.wd-icon-buttons-container .wd-icon-button:hover *,
.wd-icon-buttons-container .wd-icon-button:focus *,
.wd-icon-buttons-container .wd-icon-button:active *,
.wd-icon-buttons-container .wd-icon-button:visited *,
.wd-icon-buttons-container .wd-icon-button:link *,
.wd-icon-buttons-container .wd-icon-button.selected *,
.wd-icon-buttons-container .wd-icon-button:target *,
.wd-icon-buttons-container .wd-icon-button:focus-visible * {
    /* 完全禁用变换效果 */
    transform: none !important;
    scale: none !important;
    zoom: 1 !important;
    transition: none !important;
    animation: none !important;
    filter: none !important;
    -webkit-transform: none !important;
    -moz-transform: none !important;
    -ms-transform: none !important;
    -webkit-transition: none !important;
    -moz-transition: none !important;
    -ms-transition: none !important;
    -webkit-animation: none !important;
    -moz-animation: none !important;
    -ms-animation: none !important;
    
    /* 完全禁用边框和阴影 */
    border: none !important;
    border-radius: inherit !important;
    box-shadow: none !important;
    outline: none !important;
    outline-offset: 0 !important;
    -webkit-box-shadow: none !important;
    -moz-box-shadow: none !important;
    text-shadow: none !important;
    
    /* 防止UE环境中的其他视觉效果 */
    opacity: inherit !important;
    background: inherit !important;
    color: inherit !important;
}