/**
 * ============================================================
 *  ux-enhance.css — 交互体验增强样式
 *  [v2.1.0] 阶段十一：筛选标签 + 行悬停 + 空状态 + 异常态
 * ============================================================
 */

/* ========== 筛选条件标签 ========== */
.ux-filter-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    align-items: center;
    padding: 6px 0;
    margin-bottom: 8px;
}

.ux-filter-tag {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 3px 8px;
    background: rgba(24, 144, 255, 0.12);
    border: 1px solid rgba(24, 144, 255, 0.3);
    border-radius: 4px;
    font-size: 12px;
    color: #8ab4f8;
    white-space: nowrap;
}

.ux-tag-label {
    color: #E0E6ED;
}

.ux-tag-value {
    color: #e0e0e0;
    font-weight: 500;
}

.ux-tag-close {
    cursor: pointer;
    color: #AAB0B8;
    font-size: 14px;
    line-height: 1;
    margin-left: 2px;
    padding: 0 2px;
    border-radius: 2px;
    transition: color 0.2s, background 0.2s;
}

.ux-tag-close:hover {
    color: #f5222d;
    background: rgba(245, 34, 45, 0.1);
}

.ux-filter-reset {
    cursor: pointer;
    color: #1890ff;
    font-size: 12px;
    padding: 3px 8px;
    border-radius: 4px;
    transition: color 0.2s, background 0.2s;
}

.ux-filter-reset:hover {
    color: #40a9ff;
    background: rgba(24, 144, 255, 0.08);
}

/* ========== 快捷筛选 ========== */
.ux-quick-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    padding: 4px 0;
    margin-bottom: 8px;
}

.ux-quick-btn {
    padding: 4px 12px;
    border: 1px solid #333;
    border-radius: 4px;
    background: transparent;
    color: #aaa;
    font-size: 12px;
    cursor: pointer;
    transition: all 0.2s;
    white-space: nowrap;
}

.ux-quick-btn:hover {
    border-color: #1890ff;
    color: #1890ff;
}

.ux-quick-btn.active {
    background: rgba(24, 144, 255, 0.15);
    border-color: #1890ff;
    color: #1890ff;
    font-weight: 500;
}

/* ========== 行选中与悬停操作 ========== */
.ux-row-selected {
    background: rgba(24, 144, 255, 0.08) !important;
}

.ux-row-selected td {
    border-bottom-color: rgba(24, 144, 255, 0.2) !important;
}

.ux-hover-actions {
    display: inline-flex;
    gap: 4px;
    margin-left: 8px;
    vertical-align: middle;
    opacity: 0;
    transition: opacity 0.2s;
}

tr:hover .ux-hover-actions {
    opacity: 1;
}

.ux-hover-btn {
    padding: 2px 8px;
    border: 1px solid #333;
    border-radius: 3px;
    background: rgba(255,255,255,0.05);
    color: #aaa;
    font-size: 11px;
    cursor: pointer;
    transition: all 0.15s;
    white-space: nowrap;
}

.ux-hover-btn:hover {
    background: rgba(24, 144, 255, 0.15);
    border-color: #1890ff;
    color: #1890ff;
}

.ux-hover-btn.btn-danger:hover {
    background: rgba(245, 34, 45, 0.15);
    border-color: #f5222d;
    color: #f5222d;
}

/* ========== 空状态 ========== */
.ux-empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 48px 24px;
    text-align: center;
}

.ux-empty-icon {
    font-size: 48px;
    margin-bottom: 16px;
    opacity: 0.6;
}

.ux-empty-title {
    font-size: 16px;
    font-weight: 500;
    color: #ccc;
    margin-bottom: 8px;
}

.ux-empty-desc {
    font-size: 13px;
    color: #E0E6ED;
    margin-bottom: 20px;
    max-width: 360px;
    line-height: 1.5;
}

.ux-empty-action {
    padding: 8px 24px;
    font-size: 14px;
}

/* ========== 异常态 ========== */
.ux-error-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 48px 24px;
    text-align: center;
}

.ux-error-icon {
    font-size: 48px;
    margin-bottom: 16px;
}

.ux-error-title {
    font-size: 16px;
    font-weight: 500;
    color: #faad14;
    margin-bottom: 8px;
}

.ux-error-desc {
    font-size: 13px;
    color: #E0E6ED;
    margin-bottom: 20px;
    max-width: 360px;
    line-height: 1.5;
}

.ux-error-retry {
    padding: 8px 24px;
    font-size: 14px;
}

/* ========== 表格行点击样式 ========== */
.table-section table tbody tr {
    cursor: pointer;
    transition: background 0.15s;
}

.table-section table tbody tr:hover {
    background: rgba(255,255,255,0.03);
}

/* ========== [fix-search] 全局搜索覆盖层 ========== */
.ux-search-overlay {
    display: none;
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    z-index: 999998;
    background: rgba(0,0,0,0.5);
    font-family: sans-serif;
}
.ux-search-overlay.ux-search-active {
    display: block;
}
.ux-search-box {
    position: absolute;
    top: 18%;
    left: 50%;
    transform: translateX(-50%);
    width: 560px;
    max-width: 90vw;
    background: #1a1a2e;
    border: 2px solid #1890ff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 8px 32px rgba(0,0,0,0.5);
}
.ux-search-input {
    width: 100%;
    background: #252540;
    color: #e0e0e0;
    border: none;
    border-bottom: 1px solid #2a2a4a;
    padding: 12px 16px;
    font-size: 15px;
    outline: none;
    box-sizing: border-box;
}
.ux-search-input:focus {
    border-bottom-color: #1890ff;
    box-shadow: inset 0 -2px 0 #1890ff;
}
.ux-search-results {
    max-height: 320px;
    overflow-y: auto;
    padding: 8px 0;
}
.ux-search-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 16px;
    cursor: pointer;
    transition: background 0.15s;
    color: #e0e0e0;
    border-bottom: 1px solid #1f1f3a;
}
.ux-search-item:hover {
    background: #252540;
}
.ux-search-icon {
    font-size: 18px;
    flex-shrink: 0;
}
.ux-search-name {
    font-size: 14px;
}
.ux-search-empty {
    text-align: center;
    color: #AAB0B8;
    padding: 32px 16px;
    font-size: 14px;
}
