/* ============================================================
   Auto BXH — Bảng Xếp Hạng Bóng Đá
   public/css/standings.css
   ============================================================ */

/* ── Wrapper ─────────────────────────────────────────────── */
.abxh-wrapper {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
    font-size: 14px;
    color: #222;
    margin: 16px 0;
}

.abxh-title {
    font-size: 17px;
    font-weight: 700;
    margin: 0 0 10px 0;
    padding-bottom: 6px;
    border-bottom: 2px solid #1a73e8;
    color: #111;
}

.abxh-notice {
    color: #666;
    font-style: italic;
    padding: 12px;
    background: #f8f8f8;
    border-left: 3px solid #ccc;
    border-radius: 4px;
}

/* ── Scroll wrapper cho mobile ───────────────────────────── */
.abxh-table-wrap {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    /* Ẩn scrollbar ngang trên mobile (vẫn cuộn được, không thấy thanh xấu) */
    scrollbar-width: none;        /* Firefox */
    -ms-overflow-style: none;     /* IE / Edge cũ */
}
.abxh-table-wrap::-webkit-scrollbar {
    display: none;                /* Chrome / Safari / mobile WebKit */
}

/* ── Table ───────────────────────────────────────────────── */
.abxh-table {
    width: 100%;
    border-collapse: collapse;
    min-width: 480px;
}

.abxh-table thead tr {
    background-color: #f1f3f4;
    border-bottom: 2px solid #ddd;
}

.abxh-table th {
    padding: 8px 10px;
    text-align: center;
    font-size: 12px;
    font-weight: 600;
    color: #555;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    white-space: nowrap;
}

.abxh-table th.abxh-col-team {
    text-align: left;
}

.abxh-table tbody tr {
    border-bottom: 1px solid #eee;
    transition: background-color 0.12s ease;
}

.abxh-table tbody tr:last-child {
    border-bottom: none;
}

.abxh-table tbody tr:hover {
    background-color: #f5f9ff;
}

.abxh-table td {
    padding: 7px 10px;
    text-align: center;
    vertical-align: middle;
    line-height: 1.4;
}

/* Ngăn theme override height của row */
.abxh-table tbody tr {
    height: auto !important;
}

.abxh-table td.abxh-col-team {
    text-align: left;
}

/* ── Columns ─────────────────────────────────────────────── */
.abxh-col-pos  { width: 36px; }
.abxh-col-team { min-width: 160px; }
.abxh-col-num  { width: 36px; font-size: 13px; color: #444; }
.abxh-col-pts  { width: 40px; }
.abxh-col-form { width: 100px; }

/* ── Position badge ──────────────────────────────────────── */
.abxh-pos {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    font-size: 12px;
    font-weight: 700;
    color: #555;
}

/* ── Team cell ───────────────────────────────────────────── */
.abxh-team-cell {
    display: flex;
    align-items: center;
    gap: 8px;
}

.abxh-logo {
    width: 24px !important;
    height: 24px !important;
    max-width: 24px !important;
    max-height: 24px !important;
    min-width: 24px;
    object-fit: contain;
    flex-shrink: 0;
    display: inline-block;
}

.abxh-team-name {
    font-weight: 500;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 180px;
}

/* ── Points ──────────────────────────────────────────────── */
.abxh-col-pts strong {
    font-size: 14px;
    font-weight: 700;
    color: #111;
}

/* ── Zone colors (dải màu theo vị trí) ──────────────────── */
.abxh-zone-cl {
    border-left: 3px solid #1a73e8; /* Champions League — xanh dương */
}
.abxh-zone-el {
    border-left: 3px solid #f4a20a; /* Europa League — cam */
}
.abxh-zone-rel {
    border-left: 3px solid #e53935; /* Xuống hạng — đỏ */
}

/* ── Form badges ─────────────────────────────────────────── */
.abxh-form {
    display: inline-flex;
    gap: 3px;
    align-items: center;
}

.abxh-form span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 18px;
    height: 18px;
    border-radius: 3px;
    font-size: 10px;
    font-weight: 700;
    color: #fff;
}

.abxh-form-w  { background-color: #2e7d32; } /* Thắng — xanh lá */
.abxh-form-d  { background-color: #f57f17; } /* Hòa — vàng cam */
.abxh-form-l  { background-color: #c62828; } /* Bại — đỏ */
.abxh-form-na { color: #bbb; font-size: 12px; }

/* ── Updated timestamp ───────────────────────────────────── */
.abxh-updated {
    font-size: 11px;
    color: #999;
    margin: 6px 0 0 0;
    text-align: right;
}

/* ── Responsive: ẩn cột phong độ dưới 600px ─────────────── */
@media (max-width: 600px) {
    .abxh-hide-mobile {
        display: none;
    }

    .abxh-team-name {
        max-width: 120px;
    }

    .abxh-table th,
    .abxh-table td {
        padding: 6px 6px;
    }
}

@media (max-width: 400px) {
    .abxh-team-name {
        max-width: 90px;
    }
}
