/* ============================================================
   Tabela do Brasileirão — CSS
   ============================================================ */

.tbr-wrap,
.tbr-container {
    font-family: inherit;
    font-size: 14px;
    line-height: 1.4;
    color: inherit;
    max-width: 100%;
    box-sizing: border-box;
}

/* ── Abas ─────────────────────────────────────────────────── */
.tbr-tabs {
    display: flex;
}

.tbr-tab {
    flex: 1;
    padding: 9px 0;
    font-size: 13px;
    font-weight: 500;
    background: none;
    border: 1px solid #e0e0e0;
    border-bottom: none;
    cursor: pointer;
    color: #888;
    transition: background .15s, color .15s;
}

.tbr-tab:first-child { border-radius: 6px 0 0 0; }
.tbr-tab:last-child  { border-radius: 0 6px 0 0; border-left: none; }

.tbr-tab-active,
.tbr-tab[aria-selected="true"] {
    background: #f7f7f7;
    color: #111;
}

/* ── Lista ────────────────────────────────────────────────── */
.tbr-lista {
    list-style: none;
    margin: 0;
    padding: 0;
    border: 1px solid #e0e0e0;
    border-radius: 0 0 6px 6px;
    overflow: hidden;
}

.tbr-lista li {
    border-bottom: 1px solid #f0f0f0;
}

.tbr-lista li:last-child {
    border-bottom: none;
}

/* ── Linha principal ──────────────────────────────────────── */
.tbr-row {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    padding: 11px 14px;
    background: #fff;
    border: none;
    text-align: left;
    cursor: pointer;
    transition: background .12s;
    font-family: inherit;
    font-size: inherit;
}

.tbr-row:hover,
.tbr-row:focus-visible {
    background: #f7f7f7;
    outline: 2px solid #bbb;
    outline-offset: -2px;
}

.tbr-row[aria-expanded="true"] {
    background: #f7f7f7;
}

.tbr-pos {
    font-size: 12px;
    color: #aaa;
    width: 22px;
    text-align: right;
    flex-shrink: 0;
}

.tbr-nome {
    flex: 1;
    font-size: 14px;
    color: #111;
}

.tbr-pts {
    font-size: 14px;
    font-weight: 600;
    color: #111;
}

.tbr-pts-lbl {
    font-size: 11px;
    font-weight: 400;
    color: #aaa;
    margin-left: 2px;
}

.tbr-chev {
    font-size: 13px;
    color: #ccc;
    margin-left: 4px;
    flex-shrink: 0;
    transition: transform .2s;
    display: inline-block;
}

.tbr-row[aria-expanded="true"] .tbr-chev {
    transform: rotate(180deg);
}

/* ── Detalhes (expandível) ────────────────────────────────── */
.tbr-detalhe {
    display: none;
    padding: 12px 14px 14px;
    background: #f7f7f7;
    border-top: 1px solid #ebebeb;
}

.tbr-detalhe.tbr-aberto {
    display: block;
}

.tbr-det-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(72px, 1fr));
    gap: 8px;
}

.tbr-det-item {
    text-align: center;
    padding: 8px 4px;
    background: #fff;
    border-radius: 6px;
    border: 1px solid #ebebeb;
}

.tbr-det-val {
    display: block;
    font-size: 16px;
    font-weight: 600;
    color: #111;
}

.tbr-det-lbl {
    display: block;
    font-size: 10px;
    color: #aaa;
    margin-top: 2px;
    text-transform: uppercase;
    letter-spacing: .04em;
}

/* ── Erro ─────────────────────────────────────────────────── */
.tbr-erro {
    padding: 12px;
    background: #fff3f3;
    border: 1px solid #fbb;
    border-radius: 6px;
    color: #c00;
    font-size: 13px;
}

/* ── Painel oculto ────────────────────────────────────────── */
.tbr-painel[hidden] {
    display: none;
}

/* ── Responsivo ───────────────────────────────────────────── */
@media (max-width: 400px) {
    .tbr-det-item { min-width: 60px; }
    .tbr-det-val  { font-size: 14px; }
}
