/* =========================================================
   BetVictor 伟德广告卡 (统一视觉调色版)
   ========================================================= */

.tp-bv-wrap,
.tp-bv-wrap * {
    box-sizing: border-box;
}

.tp-bv-wrap {
    width: 100%;
    max-width: 820px;
    margin: 0 auto 20px auto;
    container-type: inline-size;
}

.tp-bv-card {
    /* 核心色彩系统重塑：单一主色系 + 严密字阶 + 唯一评级金点缀 */
    --bv-primary: #0284c7;       /* 品牌天蓝：核心操作与引导色 */
    --bv-primary-hover: #0369a1; /* 按钮悬浮深蓝 */
    --bv-dark: #151f2b;          /* 品牌深青黑（与Logo底色呼应） */
    --bv-surface: #f8fafc;       /* 浅灰底色（优惠框/标签） */
    
    --text-main: #1e293b;        /* 标题与主要文字：沉稳 Slate 墨色 */
    --text-sub: #475569;         /* 描述与副标题 */
    --text-muted: #94a3b8;       /* 弱提示与法律说明 */
    --border-color: #e2e8f0;     /* 统一边框色 */
    --badge-gold: #d97706;       /* 评级徽章金 */

    position: relative;
    display: grid;
    grid-template-columns: 160px minmax(200px, 1fr) 140px;
    gap: 18px;
    align-items: center;

    width: 100%;
    padding: 16px 20px;

    background: #ffffff;
    border: 1px solid var(--border-color);
    border-radius: 12px;
    box-shadow: 0 4px 16px rgba(15, 23, 42, 0.04);
    overflow: hidden;

    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", Arial, sans-serif;
}

/* 顶部装饰线：换成通透内敛的品牌蓝微渐变 */
.tp-bv-card::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--bv-primary) 0%, #38bdf8 100%);
}

/* =========================================================
   左侧：品牌区域
   ========================================================= */
.tp-bv-brand {
    min-width: 0;
}

.tp-bv-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 6px;
    margin-bottom: 8px;
}

.tp-bv-rating {
    display: flex;
    align-items: center;
    gap: 6px;
    white-space: nowrap;
}

/* A+ 评分徽章：唯一保留的金橙色点缀，体现含金量 */
.tp-bv-rating-score {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 24px;
    min-width: 32px;
    padding: 0 6px;
    color: #ffffff;
    background: var(--badge-gold);
    border-radius: 5px;
    font-size: 13px;
    line-height: 1;
    font-weight: 700;
}

.tp-bv-rating-text {
    color: var(--text-sub);
    font-size: 11px;
    line-height: 1.2;
    font-weight: 500;
}

/* 推广合作：低对比中性标签 */
.tp-bv-ad {
    display: inline-block;
    padding: 3px 6px;
    color: var(--text-muted);
    background: var(--bv-surface);
    border: 1px solid var(--border-color);
    border-radius: 4px;
    font-size: 10px;
    line-height: 1;
    white-space: nowrap;
}

/* Logo 容器 */
.tp-bv-logo {
    display: block;
    width: 100%;
    max-width: 160px;
    overflow: hidden;
    background: var(--bv-dark);
    border-radius: 8px;
    border: 1px solid rgba(0, 0, 0, 0.05);
}

.tp-bv-logo svg {
    display: block;
    width: 100%;
    height: auto;
}

/* =========================================================
   中间：内容区域
   ========================================================= */
.tp-bv-content {
    min-width: 0;
}

/* 标题统一为 Slate 墨色，去除突兀的靛蓝 */
.tp-bv-title {
    margin: 0 0 4px !important;
    padding: 0 !important;
    color: var(--text-main) !important;
    font-size: 18px !important;
    line-height: 1.35 !important;
    font-weight: 700 !important;
}

.tp-bv-desc {
    margin: 0 0 10px !important;
    padding: 0 !important;
    color: var(--text-sub) !important;
    font-size: 13px !important;
    line-height: 1.55 !important;
}

/* 优惠区块：纯净灰白卡片底，左侧使用主色标识条 */
.tp-bv-offer {
    position: relative;
    padding: 8px 12px 8px 14px;
    background: var(--bv-surface);
    border: 1px solid var(--border-color);
    border-radius: 6px;
}

.tp-bv-offer::before {
    content: "";
    position: absolute;
    top: 6px;
    bottom: 6px;
    left: 0;
    width: 3px;
    background: var(--bv-primary);
    border-radius: 0 2px 2px 0;
}

.tp-bv-offer-label {
    display: block;
    margin-bottom: 2px;
    color: var(--bv-primary);
    font-size: 10.5px;
    line-height: 1.3;
    font-weight: 700;
    letter-spacing: 0.02em;
}

.tp-bv-offer-main {
    color: var(--text-main);
    font-size: 13px;
    line-height: 1.4;
    font-weight: 600;
}

.tp-bv-offer-note {
    margin-top: 2px;
    color: var(--text-muted);
    font-size: 10.5px;
    line-height: 1.3;
}

/* =========================================================
   右侧：操作按钮区域
   ========================================================= */
.tp-bv-actions {
    display: flex;
    flex-direction: column;
    gap: 8px;
    min-width: 0;
}

/* 主按钮：品牌蓝底 + 纯白文字（对比度清晰鲜明） */
.tp-bv-primary {
    display: flex !important;
    align-items: center;
    justify-content: center;
    gap: 6px;

    width: 100%;
    min-height: 38px;
    padding: 8px 12px !important;

    color: #ffffff !important;
    background: var(--bv-primary) !important;
    border: 1px solid var(--bv-primary) !important;
    border-radius: 6px !important;

    box-shadow: 0 2px 8px rgba(2, 132, 199, 0.25);
    text-decoration: none !important;
    font-size: 13.5px !important;
    line-height: 1.2 !important;
    font-weight: 600 !important;
    white-space: nowrap;

    transition: all 0.2s ease;
}

.tp-bv-primary:hover {
    background: var(--bv-primary-hover) !important;
    border-color: var(--bv-primary-hover) !important;
    box-shadow: 0 4px 12px rgba(2, 132, 199, 0.35);
}

/* 次按钮：简约中性线框，与主按钮拉开清晰的主次层次 */
.tp-bv-secondary {
    display: flex !important;
    align-items: center;
    justify-content: center;
    gap: 5px;

    width: 100%;
    min-height: 34px;
    padding: 6px 10px !important;

    color: var(--text-sub) !important;
    background: #ffffff !important;
    border: 1px solid var(--border-color) !important;
    border-radius: 6px !important;

    text-decoration: none !important;
    font-size: 12px !important;
    line-height: 1.2 !important;
    font-weight: 500 !important;
    white-space: nowrap;

    transition: all 0.2s ease;
}

.tp-bv-secondary:hover {
    color: var(--text-main) !important;
    background: var(--bv-surface) !important;
    border-color: #cbd5e1 !important;
}

/* 法律合规声明 */
.tp-bv-legal {
    text-align: center;
    color: var(--text-muted);
    font-size: 9.5px;
    line-height: 1.2;
}

/* =========================================================
   响应式断点 (Container Queries)
   ========================================================= */
@container (max-width: 700px) {
    .tp-bv-card {
        grid-template-columns: 140px minmax(0, 1fr);
        gap: 14px;
        padding: 14px;
    }

    .tp-bv-logo {
        max-width: 140px;
    }

    .tp-bv-actions {
        grid-column: 1 / -1;
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 8px 10px;
    }

    .tp-bv-legal {
        grid-column: 1 / -1;
    }
}

@container (max-width: 520px) {
    .tp-bv-card {
        display: block;
        padding: 14px;
        border-radius: 10px;
    }

    .tp-bv-brand {
        margin-bottom: 12px;
    }

    .tp-bv-logo {
        width: 160px;
        max-width: 100%;
    }

    .tp-bv-content {
        margin-bottom: 12px;
    }

    .tp-bv-title {
        font-size: 17px !important;
    }

    .tp-bv-desc {
        font-size: 12.5px !important;
    }

    .tp-bv-actions {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 8px;
    }

    .tp-bv-legal {
        grid-column: 1 / -1;
    }
}

@container (max-width: 380px) {
    .tp-bv-actions {
        display: flex;
        flex-direction: column;
    }

    .tp-bv-logo {
        width: 140px;
    }
}

/* =========================================================
   回退兼容 (Fallback)
   ========================================================= */
@media (max-width: 820px) {
    @supports not (container-type: inline-size) {
        .tp-bv-card {
            grid-template-columns: 140px minmax(0, 1fr);
        }

        .tp-bv-actions {
            grid-column: 1 / -1;
            display: grid;
            grid-template-columns: 1fr 1fr;
        }

        .tp-bv-legal {
            grid-column: 1 / -1;
        }
    }
}

@media (max-width: 560px) {
    @supports not (container-type: inline-size) {
        .tp-bv-card {
            display: block;
        }

        .tp-bv-brand,
        .tp-bv-content {
            margin-bottom: 12px;
        }

        .tp-bv-actions {
            display: flex;
            flex-direction: column;
        }
    }
}