/* =============================================
   Football Data SL – Style v5.0.0
   ============================================= */

/* Wrapper */
.bdsl-wrap {
    margin: 20px 0;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 2px 12px rgba(0,0,0,.10);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    font-size: 14px;
    color: #222;
    background: #fff;
}

/* Header */
.bdsl-header {
    display: flex;
    align-items: center;
    gap: 10px;
    background: #1a1a2e;
    color: #fff;
    padding: 12px 16px;
}
.bdsl-flag { font-size: 20px; line-height: 1; }
.bdsl-title { font-size: 15px; font-weight: 700; flex: 1; }
.bdsl-season { font-size: 11px; color: #aaa; white-space: nowrap; }

/* Table wrapper - horizontal scroll on mobile */
.bdsl-table-wrap { overflow-x: auto; }

/* Base table */
.bdsl-table {
    width: 100%;
    border-collapse: collapse;
    min-width: 500px;
}
.bdsl-table th,
.bdsl-table td {
    padding: 8px 10px;
    text-align: center;
    border-bottom: 1px solid #f0f0f0;
    white-space: nowrap;
}
.bdsl-table th {
    background: #f7f8fa;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .4px;
    color: #666;
}
.bdsl-table tbody tr:hover { background: #fafafa; }

/* Team crest */
.team-crest {
    width: 20px;
    height: 20px;
    object-fit: contain;
    vertical-align: middle;
    margin-right: 6px;
}

/* ── BXH specific ── */
.bdsl-bxh-table .col-pos  { width: 36px; font-weight: 700; }
.bdsl-bxh-table .col-team { text-align: left; min-width: 160px; }
.bdsl-bxh-table .col-pts  { background: #f7f8fa; font-weight: 700; color: #1a1a2e; }
.bdsl-bxh-table .col-form { min-width: 110px; }

/* Zone highlights */
.bdsl-bxh-table tr.zone-cl  .col-pos { border-left: 4px solid #1565c0; }
.bdsl-bxh-table tr.zone-el  .col-pos { border-left: 4px solid #ef6c00; }
.bdsl-bxh-table tr.zone-rel .col-pos { border-left: 4px solid #c62828; }

/* Form dots */
.form-dot {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    font-size: 10px;
    font-weight: 700;
    color: #fff;
    margin: 0 1px;
}
.f-w { background: #2e7d32; }
.f-d { background: #f9a825; }
.f-l { background: #c62828; }

/* Legend */
.bdsl-legend {
    display: flex;
    gap: 16px;
    padding: 8px 14px;
    background: #fafafa;
    font-size: 11px;
    color: #666;
    border-top: 1px solid #f0f0f0;
    flex-wrap: wrap;
}
.leg-cl { color: #1565c0; font-weight: 600; }
.leg-el { color: #ef6c00; font-weight: 600; }
.leg-rel { color: #c62828; font-weight: 600; }

/* ── Match table (lịch + kết quả) ── */
.bdsl-match-table .col-home { text-align: right; min-width: 130px; }
.bdsl-match-table .col-away { text-align: left;  min-width: 130px; }
.bdsl-match-table .col-datetime { text-align: left; min-width: 90px; }

.match-date { display: block; font-weight: 600; font-size: 13px; }
.match-time {
    display: inline-block;
    background: #e63946;
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    padding: 1px 6px;
    border-radius: 3px;
    margin-top: 2px;
}

.round-badge {
    display: inline-block;
    background: #e8f0fe;
    color: #1565c0;
    font-size: 11px;
    font-weight: 700;
    padding: 2px 7px;
    border-radius: 10px;
}

.vs-badge {
    display: inline-block;
    background: #f5f5f5;
    color: #888;
    font-size: 11px;
    font-weight: 700;
    padding: 3px 8px;
    border-radius: 4px;
}

.col-venue { color: #999; font-size: 12px; max-width: 140px; overflow: hidden; text-overflow: ellipsis; }

/* ── Kết quả ── */
.col-score-result { min-width: 80px; }
.score-box {
    display: inline-block;
    background: #1a1a2e;
    color: #fff;
    font-size: 14px;
    font-weight: 700;
    padding: 4px 12px;
    border-radius: 5px;
    letter-spacing: 1px;
}
.home-win .score-box { background: #2e7d32; }
.away-win .score-box { background: #c62828; }
.draw     .score-box { background: #f9a825; }
.winner { font-weight: 700; }

/* Footer */
.bdsl-footer {
    margin: 0;
    padding: 7px 14px;
    background: #f5f5f5;
    font-size: 11px;
    color: #aaa;
    border-top: 1px solid #eee;
}
.bdsl-footer a { color: #e63946; text-decoration: none; }

/* Error */
.bdsl-error {
    padding: 12px 16px;
    background: #fff3cd;
    border: 1px solid #ffc107;
    border-radius: 6px;
    color: #856404;
    font-size: 14px;
    margin: 10px 0;
}

/* ── Responsive ── */
@media (max-width: 640px) {
    .bdsl-table th, .bdsl-table td { padding: 6px 6px; font-size: 12px; }
    .team-crest { width: 16px; height: 16px; }
    .col-venue { display: none; }
    .bdsl-legend { gap: 8px; font-size: 10px; }
    .bdsl-bxh-table .col-form { display: none; }
}
