/**
 * ABV2 数据覆盖说明页样式
 *
 * 说明：主题的后代选择器（如 .post-content table）特异性通常高于单类选择器，
 * 会覆盖本页样式，因此关键属性统一加 !important 防御。
 * 视觉基调：现代、极简、高质感；主色沿用项目绿 #07C160，避免纯黑。
 */

.abv2-cov {
    --cov-green: #07C160;
    --cov-green-dark: #059c4d;
    --cov-text: #333;
    --cov-text-dim: #8a8f99;
    --cov-border: #eceff3;
    --cov-bg-soft: #fafbfc;
    max-width: 1180px;
    margin: 0 auto;
    color: var(--cov-text);
    font-size: 15px;
    line-height: 1.75;
}

/* ---------- 顶部提示：数据持续更新 ---------- */
.abv2-cov-notice {
    display: flex;
    gap: 14px;
    align-items: flex-start;
    padding: 18px 20px;
    margin-bottom: 22px;
    background: linear-gradient(135deg, #07C160 0%, #059c4d 100%) !important;
    border-radius: 14px;
    box-shadow: 0 6px 20px rgba(7, 193, 96, .22);
}

.abv2-cov-notice-icon {
    flex-shrink: 0;
    width: 44px;
    height: 44px;
    border-radius: 11px;
    background: rgba(255, 255, 255, .2);
    display: flex;
    align-items: center;
    justify-content: center;
}

.abv2-cov-notice-body h2 {
    margin: 0 0 8px;
    font-size: 17px;
    font-weight: 800;
    color: #fff !important;
    line-height: 1.4;
}

.abv2-cov-notice-body p {
    margin: 0 0 6px !important;
    font-size: 13.5px;
    line-height: 1.7;
    color: rgba(255, 255, 255, .92) !important;
}

.abv2-cov-notice-body strong {
    color: #fff;
    font-weight: 700;
}

.abv2-cov-notice-time {
    margin-bottom: 0 !important;
    font-size: 12.5px !important;
    color: rgba(255, 255, 255, .72) !important;
}

/* ---------- 数据规模总览 ---------- */
.abv2-cov-assets {
    margin-bottom: 26px;
}

.abv2-cov-assets-title {
    margin: 0 0 4px;
    font-size: 18px;
    font-weight: 700;
    color: #1a1d20 !important;
}

.abv2-cov-assets-sub {
    margin: 0 0 14px !important;
    font-size: 13px;
    color: #8a8f99 !important;
}

.abv2-cov-assets-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(158px, 1fr));
    gap: 12px;
}

.abv2-cov-asset {
    display: flex;
    flex-direction: column;
    gap: 3px;
    padding: 14px 16px;
    background: #fff !important;
    border: 1px solid var(--cov-border) !important;
    border-radius: 11px;
    box-shadow: 0 2px 8px rgba(16, 24, 40, .04);
    transition: box-shadow .18s, transform .18s;
}

.abv2-cov-asset:hover {
    box-shadow: 0 6px 18px rgba(16, 24, 40, .09);
    transform: translateY(-1px);
}

.abv2-cov-asset-label {
    font-size: 12.5px;
    color: #8a8f99;
}

.abv2-cov-asset-value {
    font-size: 23px;
    font-weight: 800;
    color: #1a1d20;
    letter-spacing: -0.5px;
    font-variant-numeric: tabular-nums;
    line-height: 1.2;
}

.abv2-cov-asset-delta {
    font-size: 12px;
    font-variant-numeric: tabular-nums;
}

.abv2-cov-asset-delta--up {
    color: var(--cov-green-dark) !important;
    font-weight: 600;
}

.abv2-cov-asset-delta--down {
    color: #c05217 !important;
    font-weight: 600;
}

.abv2-cov-asset-delta--flat,
.abv2-cov-asset-delta--na {
    color: #a8adb5 !important;
}

/* 次要口径的数字（如近半年场次）弱化显示，与累计场次区分 */
.abv2-cov-num--dim {
    color: #9aa1ab !important;
    font-size: 13px;
}

/* ---------- 说明区 ---------- */
.abv2-cov-intro {
    margin-bottom: 28px;
}

.abv2-cov-intro h2 {
    margin: 0 0 16px;
    font-size: 24px;
    font-weight: 600;
    color: #1a1d20 !important;
    letter-spacing: -0.3px;
}

.abv2-cov-intro h3 {
    margin: 22px 0 8px;
    font-size: 16px;
    font-weight: 600;
    color: #1a1d20 !important;
}

.abv2-cov-intro p {
    margin: 0 0 12px;
    color: #4a5058 !important;
}

.abv2-cov-lead {
    padding: 16px 18px;
    background: linear-gradient(180deg, #f6fdf9 0%, #f2fbf6 100%) !important;
    border-left: 3px solid var(--cov-green) !important;
    border-radius: 8px;
    color: #2f3a35 !important;
}

.abv2-cov-legend {
    margin-top: 18px;
    padding: 12px 16px;
    background: var(--cov-bg-soft) !important;
    border: 1px solid var(--cov-border) !important;
    border-radius: 8px;
    font-size: 14px;
}

.abv2-cov-legend summary {
    cursor: pointer;
    font-weight: 600;
    color: #1a1d20;
    outline: none;
}

.abv2-cov-legend ul {
    margin: 10px 0 2px;
    padding-left: 20px;
}

.abv2-cov-legend li {
    margin: 4px 0;
    color: #5a6169 !important;
}

/* ---------- 筛选区 ---------- */
.abv2-cov-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
    padding: 14px 16px;
    margin-bottom: 14px;
    background: var(--cov-bg-soft) !important;
    border: 1px solid var(--cov-border) !important;
    border-radius: 10px;
}

.abv2-cov-input,
.abv2-cov-select {
    height: 36px;
    padding: 0 12px;
    font-size: 14px;
    color: var(--cov-text);
    background: #fff !important;
    border: 1px solid #dfe4ea !important;
    border-radius: 8px;
    outline: none;
    transition: border-color .18s, box-shadow .18s;
}

.abv2-cov-input {
    flex: 1 1 200px;
    min-width: 160px;
}

.abv2-cov-select {
    min-width: 130px;
    cursor: pointer;
}

.abv2-cov-input:focus,
.abv2-cov-select:focus {
    border-color: var(--cov-green) !important;
    box-shadow: 0 0 0 3px rgba(7, 193, 96, .12);
}

.abv2-cov-check {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 14px;
    color: #5a6169;
    cursor: pointer;
    user-select: none;
}

.abv2-cov-check input {
    accent-color: var(--cov-green);
    cursor: pointer;
}

.abv2-cov-count {
    margin-left: auto;
    font-size: 13px;
    color: var(--cov-text-dim);
    white-space: nowrap;
}

/* ---------- 表格 ---------- */
.abv2-cov-scroll {
    overflow-x: auto;
    border: 1px solid var(--cov-border) !important;
    border-radius: 12px;
    background: #fff;
    -webkit-overflow-scrolling: touch;
}

.abv2-cov-table {
    width: 100%;
    min-width: 1020px;
    border-collapse: separate;
    border-spacing: 0;
    margin: 0 !important;
    font-size: 14px;
    background: transparent !important;
}

.abv2-cov-table th,
.abv2-cov-table td {
    padding: 11px 12px;
    text-align: center;
    border: none !important;
    border-bottom: 1px solid var(--cov-border) !important;
    white-space: nowrap;
    background: transparent;
}

.abv2-cov-table thead th {
    position: sticky;
    top: 0;
    z-index: 3;
    font-size: 13px;
    font-weight: 600;
    color: #5a6169 !important;
    background: #f7f9fb !important;
    border-bottom: 1px solid #e5e9ee !important;
}

.abv2-cov-table tbody tr:hover td {
    background: #fafcfd !important;
}

.abv2-cov-table tbody tr:last-child td {
    border-bottom: none !important;
}

/* 首列吸附：横向滚动时保持赛事名可见 */
.abv2-cov-th-name,
.abv2-cov-name {
    position: sticky;
    left: 0;
    z-index: 2;
    text-align: left !important;
    font-weight: 500;
    min-width: 190px;
    max-width: 280px;
    color: #1a1d20;
    background: #fff !important;
    box-shadow: 1px 0 0 var(--cov-border);
}

.abv2-cov-table thead .abv2-cov-th-name {
    z-index: 4;
    background: #f7f9fb !important;
}

.abv2-cov-table tbody tr:hover .abv2-cov-name {
    background: #fafcfd !important;
}

.abv2-cov-dim {
    color: var(--cov-text-dim) !important;
    font-size: 13px;
}

.abv2-cov-num {
    font-variant-numeric: tabular-nums;
    color: #5a6169 !important;
}

/* ---------- 覆盖率徽章 ---------- */
.abv2-cov-badge {
    display: inline-block;
    min-width: 44px;
    padding: 3px 8px;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 600;
    font-variant-numeric: tabular-nums;
    line-height: 1.5;
}

.abv2-cov-badge--full {
    background: #e8f8f0 !important;
    color: var(--cov-green-dark) !important;
}

.abv2-cov-badge--part {
    background: #fff7e6 !important;
    color: #b26a00 !important;
}

.abv2-cov-badge--low {
    background: #ffefe6 !important;
    color: #c05217 !important;
}

.abv2-cov-badge--zero,
.abv2-cov-badge--none {
    background: #f4f5f7 !important;
    color: #a8adb5 !important;
    font-weight: 500;
}

/* 选中数据项时的列高亮 */
.abv2-cov-table .is-focus {
    background: #f2fbf6 !important;
}

/* ---------- 页脚 ---------- */
.abv2-cov-foot {
    margin-top: 20px;
    padding: 16px 18px;
    background: var(--cov-bg-soft) !important;
    border: 1px solid var(--cov-border) !important;
    border-radius: 10px;
    font-size: 13.5px;
    color: #6a7178 !important;
}

.abv2-cov-foot p {
    margin: 0 0 8px !important;
    color: #6a7178 !important;
}

.abv2-cov-updated {
    margin-bottom: 0 !important;
    padding-top: 8px;
    border-top: 1px dashed #e3e7ec;
    color: var(--cov-text-dim) !important;
}

.abv2-cov--empty {
    padding: 40px 20px;
    text-align: center;
    color: var(--cov-text-dim);
}

/* ---------- 移动端 ---------- */
@media (max-width: 768px) {
    .abv2-cov {
        font-size: 14px;
    }

    .abv2-cov-notice {
        padding: 15px 16px;
        gap: 11px;
    }

    .abv2-cov-notice-icon {
        width: 36px;
        height: 36px;
    }

    .abv2-cov-notice-body h2 {
        font-size: 15.5px;
    }

    .abv2-cov-assets-grid {
        grid-template-columns: repeat(auto-fill, minmax(132px, 1fr));
        gap: 10px;
    }

    .abv2-cov-asset {
        padding: 12px 13px;
    }

    .abv2-cov-asset-value {
        font-size: 20px;
    }

    .abv2-cov-intro h2 {
        font-size: 20px;
    }

    .abv2-cov-input {
        flex: 1 1 100%;
    }

    .abv2-cov-select {
        flex: 1 1 calc(50% - 5px);
        min-width: 0;
    }

    .abv2-cov-count {
        margin-left: 0;
        width: 100%;
    }

    .abv2-cov-table {
        min-width: 900px;
        font-size: 13px;
    }

    .abv2-cov-table th,
    .abv2-cov-table td {
        padding: 9px 10px;
    }

    .abv2-cov-th-name,
    .abv2-cov-name {
        min-width: 150px;
        max-width: 190px;
        white-space: normal;
    }
}
