/* ================================================================
   BDK Mini Cards – BXH / KQBĐ / Lịch Thi Đấu  (slide dạng card)
   ================================================================ */

/* ---- Wrapper ---- */
.bdk-mc-wrap {
    margin: 5px 0;
    background: var(--bdk-bg, #fff);
    border-radius: 12px;
    box-shadow: 0 2px 12px rgba(0,0,0,.08);
    overflow: hidden;
}

/* ---- Header strip ---- */
.bdk-mc-header {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 16px;
    background: var(--fs-color-primary, #1a7a4a);
    color: #fff;
}
.bdk-mc-icon { font-size: 18px; line-height: 1; }
.bdk-mc-title { font-weight: 700; font-size: 14px; letter-spacing: .4px; flex: 1; }

/* ---- Outer ---- */
.bdk-mc-slider-outer {
    position: relative;
    padding: 0;   /* no nav buttons anymore */
}

/* ---- Scrollable track ---- */
.bdk-mc-slider {
    overflow: hidden;
    padding: 12px 0;
}
.bdk-mc-track {
    display: flex;
    gap: 12px;
    overflow-x: auto;
    scroll-behavior: smooth;
    scroll-snap-type: x mandatory;
    padding: 2px 10px 12px; /* tăng left/right padding để thẻ đầu và cuối không bị dính sát mép */
    min-height: 120px;
}
/* Hiện thanh cuộn cho máy tính */
.bdk-mc-track::-webkit-scrollbar { 
    height: 6px; 
}
.bdk-mc-track::-webkit-scrollbar-track { 
    background: #f1f1f1; 
    border-radius: 4px;
}
.bdk-mc-track::-webkit-scrollbar-thumb { 
    background: #ccc; 
    border-radius: 4px; 
}
.bdk-mc-track::-webkit-scrollbar-thumb:hover { 
    background: #aaa; 
}

/* ================================================================
   CARD base
   ================================================================ */
.bdk-card {
    flex: 0 0 auto;
    scroll-snap-align: start;
    background: #fff;
    border-radius: 10px;
    box-shadow: 0 1px 6px rgba(0,0,0,.10);
    overflow: hidden;
    transition: transform .18s ease, box-shadow .18s ease;
    text-decoration: none;
    color: inherit;
    display: flex;
    flex-direction: column;
}
.bdk-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 16px rgba(0,0,0,.14);
}

/* ---- Card header ---- */
.bdk-card-head {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 7px 10px 5px;
    background: linear-gradient(135deg, #f5f5f5 0%, #ebebeb 100%);
    border-bottom: 1px solid #e8e8e8;
    min-height: 32px;
}
.bdk-league-logo {
    width: 22px;
    height: 22px;
    object-fit: contain;
    border-radius: 3px;
}
.bdk-league-name {
    font-size: 11px;
    font-weight: 600;
    color: #333;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 130px;
    flex: 1;
}
.bdk-season {
    font-size: 10px;
    color: #888;
    white-space: nowrap;
    flex-shrink: 0;
}
.bdk-league-name-sm {
    font-size: 10px;
    font-weight: 600;
    color: #555;
    flex: 1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100px;
}

/* ---- Status badges ---- */
.bdk-status {
    font-size: 9px;
    font-weight: 700;
    padding: 2px 6px;
    border-radius: 100px;
    white-space: nowrap;
    flex-shrink: 0;
}
.bdk-status-ft     { background: #eee; color: #666; }
.bdk-status-sched  { background: #e3f2fd; color: #1565c0; }
.bdk-status-live   { background: #ffebee; color: #c62828; animation: bdk-pulse 1.2s infinite; }
@keyframes bdk-pulse {
    0%,100% { opacity: 1; } 50% { opacity: .5; }
}

/* ================================================================
   BXH card – narrow, table-based
   ================================================================ */
.bdk-card-bxh {
    width: 200px;
}
.bdk-bxh-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 11px;
}
.bdk-bxh-table thead tr {
    background: #f9f9f9;
}
.bdk-bxh-table th {
    padding: 5px 4px;
    text-align: center;
    font-weight: 600;
    color: #888;
    font-size: 10px;
    border-bottom: 1px solid #eee;
}
.bdk-bxh-table td {
    padding: 5px 4px;
    text-align: center;
    vertical-align: middle;
    border-bottom: 1px solid #f2f2f2;
}
.bdk-bxh-table tbody tr:last-child td { border-bottom: none; }
.t-left { text-align: left !important; }
.td-rank { font-weight: 700; font-size: 12px; width: 22px; }
.td-team { display: flex !important; align-items: center; gap: 5px; }
.td-team img { width: 18px; height: 18px; object-fit: contain; flex-shrink: 0; }
.td-team span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 80px; }
.td-pts { font-weight: 700; color: var(--fs-color-primary, #1a7a4a); }
.top1 td { background: linear-gradient(90deg,rgba(255,215,0,.12) 0%,transparent 100%); }
.top1 .td-rank { color: #d4a800; }
.top3 .td-rank { color: #888; }

/* ================================================================
   Match card (KQBD & LTD) – wider
   ================================================================ */
.bdk-card-match {
    width: 220px;
    min-height: 100px;
}
.bdk-match-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 8px;
    gap: 4px;
    flex: 1;
}
.bdk-team {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
    width: 72px;
    flex-shrink: 0;
}
.bdk-team img {
    width: 36px;
    height: 36px;
    object-fit: contain;
}
.bdk-team span {
    font-size: 10px;
    text-align: center;
    line-height: 1.3;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    color: #333;
    font-weight: 500;
}
/* Score box (KQBD) */
.bdk-score-box {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 3px;
    flex: 1;
}
.bdk-score {
    font-size: 18px;
    font-weight: 800;
    color: #222;
    letter-spacing: 1px;
    white-space: nowrap;
}
.bdk-score-box small { font-size: 9px; color: #999; }

/* VS box (LTD) */
.bdk-vs-box {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    flex: 1;
}
.bdk-vs {
    font-size: 13px;
    font-weight: 800;
    color: #bbb;
    letter-spacing: 1px;
}
.bdk-time-badge {
    background: var(--fs-color-primary, #1a7a4a);
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    padding: 2px 8px;
    border-radius: 20px;
    white-space: nowrap;
}

/* ================================================================
   Skeleton loading
   ================================================================ */
.bdk-skeleton {
    animation: bdk-shimmer 1.4s ease-in-out infinite;
    pointer-events: none;
}
@keyframes bdk-shimmer {
    0%,100% { opacity: 1; } 50% { opacity: .5; }
}
.bdk-card.bdk-skeleton.bdk-card-bxh { width: 200px; height: 160px; }
.bdk-card.bdk-skeleton.bdk-card-match { width: 220px; height: 100px; }
.sk-logo, .sk-badge { width: 22px; height: 22px; background: #ddd; border-radius: 4px; }
.sk-line { margin: 8px 10px; height: 10px; background: #e5e5e5; border-radius: 4px; }
.sk-rows { padding: 4px 10px; display: flex; flex-direction: column; gap: 6px; }
.sk-row { height: 8px; background: #eeeeee; border-radius: 4px; }
.sk-top { padding: 7px 10px; background: #f0f0f0; display: flex; gap: 6px; }
.sk-match { padding: 10px 8px; display: flex; align-items: center; justify-content: space-between; }
.sk-team { width: 60px; height: 40px; background: #e8e8e8; border-radius: 6px; }
.sk-score, .sk-vsbox { width: 60px; height: 24px; background: #e0e0e0; border-radius: 6px; }

/* ================================================================
   No data
   ================================================================ */
.bdk-no-data {
    padding: 24px;
    text-align: center;
    color: #aaa;
    font-size: 12px;
}

/* ================================================================
   Dark theme support
   ================================================================ */
body.dark .bdk-mc-wrap,
body.dark .bdk-card {
    background: #1e2330;
    color: #e0e0e0;
}
body.dark .bdk-card-head { background: #252a3a; border-color: #333; }
body.dark .bdk-league-name { color: #ccc; }
body.dark .bdk-bxh-table th { color: #aaa; border-color: #333; }
body.dark .bdk-bxh-table td { border-color: #2a2f3f; }
body.dark .bdk-team span { color: #ccc; }
body.dark .bdk-score { color: #fff; }
body.dark .bdk-skeleton { background: #252a3a; }
body.dark .bdk-mc-track::-webkit-scrollbar-track { background: #1a1e29; }
body.dark .bdk-mc-track::-webkit-scrollbar-thumb { background: #3f475c; }
body.dark .bdk-mc-track::-webkit-scrollbar-thumb:hover { background: #5a6682; }
