/* /team/, /league/ and /leagues (Views/Team, Views/League). Loaded after detailpage.css and
   built on its tokens and cards (dp-card, dp-section-title, dp-summary-list), so dark mode and
   the match pages' look carry over. Logical properties keep Arabic/Persian pages right. */

.hub-page .dp-main { padding-right: 0; }   /* no sticky section nav on these pages */

/* ── breadcrumb ─────────────────────────────────────────────────────────────── */
/* Both navs reset margin/padding: a global `nav` rule (site.css) shifts every <nav> 201px left. */
.hub-crumbs {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px;
    margin: 0;
    padding: 0;
    font-size: 13px;
    color: var(--muted);
}
.hub-crumbs a { color: var(--ole-blue); text-decoration: none; }
.hub-crumbs a:hover { text-decoration: underline; }
.hub-crumbs [aria-current] { color: var(--ink); font-weight: 600; }

/* ── hero ───────────────────────────────────────────────────────────────────── */
.hub-hero {
    display: flex;
    align-items: center;
    gap: 18px;
}
.hub-hero__logo {
    width: 72px;
    height: 72px;
    object-fit: contain;
    flex-shrink: 0;
}
.hub-hero__body { min-width: 0; }
.hub-hero__title {
    margin: 0 0 6px;
    font-size: 26px;
    font-weight: 800;
    line-height: 1.2;
    color: var(--ink);
    word-break: break-word;
}
.hub-hero__meta {
    display: flex;
    flex-wrap: wrap;
    gap: 6px 8px;
    font-size: 14px;
    color: var(--muted);
}
.hub-hero__meta a { color: var(--ole-blue); font-weight: 600; text-decoration: none; }
.hub-hero__meta a:hover { text-decoration: underline; }
.hub-lead { margin: 0; color: var(--muted); line-height: 1.6; }

/* ── W / D / L chips ────────────────────────────────────────────────────────── */
.hub-form { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 10px; }
.hub-chip {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 24px;
    height: 24px;
    padding: 0 4px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 800;
    color: #fff;
    background: #94a3b8;
}
.hub-chip--w { background: var(--success, #23a26d); }
.hub-chip--l { background: var(--danger, #c62828); }

.hub-count {
    margin-inline-start: auto;
    font-size: 13px;
    font-weight: 600;
    color: var(--muted);
}

/* ── tables ─────────────────────────────────────────────────────────────────── */
.hub-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}
.hub-table th,
.hub-table td {
    padding: 8px 10px;
    border-bottom: 1px solid var(--border);
    text-align: start;
    vertical-align: middle;
}
.hub-table thead th {
    font-size: 12px;
    font-weight: 700;
    letter-spacing: .03em;
    text-transform: uppercase;
    color: var(--muted);
    white-space: nowrap;
}
.hub-table tbody tr:last-child td,
.hub-table tbody tr:last-child th { border-bottom: 0; }
.hub-table a { color: var(--ink); text-decoration: none; }
.hub-table a:hover { color: var(--ole-blue); text-decoration: underline; }
.hub-table__date { white-space: nowrap; color: var(--muted); font-size: 13px; }
.hub-table__league { font-size: 13px; color: var(--muted); }
.hub-table__league a { color: var(--muted); }
.hub-table__score { text-align: center !important; white-space: nowrap; font-weight: 800; }
.hub-table__score a { color: var(--ole-blue); }
.hub-table__score small { display: block; font-weight: 500; font-size: 11px; color: var(--muted); }
.hub-table td.is-winner { font-weight: 700; }
.hub-table__outcome { width: 36px; text-align: center !important; }
.hub-table__away { text-align: start; }

.hub-stats th[scope="row"] { font-weight: 600; color: var(--ink); }
.hub-stats td,
.hub-stats thead th:not(:first-child),
.hub-teams td:not(.hub-table__team),
.hub-teams thead th:not(.hub-table__team) { text-align: center; }

@media (max-width: 640px) {
    .hub-table { font-size: 13px; }
    .hub-table th, .hub-table td { padding: 7px 6px; }
    #section-results .hub-table { min-width: 520px; }
    .hub-hero__title { font-size: 21px; }
    .hub-hero__logo { width: 56px; height: 56px; }
}

/* ── fixtures ───────────────────────────────────────────────────────────────── */
.hub-fixtures { list-style: none; margin: 0; padding: 0; }
.hub-fixtures li + li { border-top: 1px solid var(--border); }
.hub-fixtures a {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 4px 14px;
    padding: 10px 2px;
    color: var(--ink);
    text-decoration: none;
}
.hub-fixtures a:hover .hub-fixtures__teams { color: var(--ole-blue); text-decoration: underline; }
.hub-fixtures__when { min-width: 110px; font-size: 13px; color: var(--muted); white-space: nowrap; }
.hub-fixtures__teams { flex: 1 1 240px; font-weight: 700; }
.hub-fixtures__vs { font-weight: 500; color: var(--muted); margin: 0 4px; }
.hub-fixtures__league { color: var(--muted); }
.hub-live {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 800;
    text-transform: uppercase;
    color: #fff;
    background: var(--danger, #c62828);
}

/* ── chips of links (competitions, A–Z) ─────────────────────────────────────── */
.hub-links { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.hub-links li {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    border: 1px solid var(--border);
    border-radius: 999px;
    font-size: 14px;
}
.hub-links a { color: var(--ink); font-weight: 600; text-decoration: none; }
.hub-links a:hover { color: var(--ole-blue); text-decoration: underline; }
.hub-links small { color: var(--muted); font-size: 12px; }

.hub-links--columns { display: block; columns: 3 220px; column-gap: 24px; }
.hub-links--columns li { display: flex; border: 0; border-radius: 0; padding: 4px 0; break-inside: avoid; }

.hub-letters { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 8px; padding: 0; }
.hub-letters a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 30px;
    height: 30px;
    border: 1px solid var(--border);
    border-radius: 8px;
    font-weight: 700;
    color: var(--ole-blue);
    text-decoration: none;
}
.hub-letters a:hover { background: var(--soft-blue); }
.hub-letter h2 {
    margin: 18px 0 6px;
    font-size: 18px;
    font-weight: 800;
    color: var(--ink);
    scroll-margin-top: var(--sticky-top, 66px);
}

.hub-league-grid {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 8px;
}
.hub-league-grid a {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 10px;
    border: 1px solid var(--border);
    border-radius: 10px;
    color: var(--ink);
    font-weight: 600;
    text-decoration: none;
}
.hub-league-grid a:hover { border-color: var(--ole-blue); color: var(--ole-blue); }
.hub-league-grid img { width: 28px; height: 28px; object-fit: contain; flex-shrink: 0; }

/* ── league outcome shares ──────────────────────────────────────────────────── */
.hub-outcomes {
    display: flex;
    height: 14px;
    border-radius: 999px;
    overflow: hidden;
    background: var(--border);
}
.hub-outcomes__bar--home, .hub-dot--home { background: var(--ole-blue); }
.hub-outcomes__bar--draw, .hub-dot--draw { background: #94a3b8; }
.hub-outcomes__bar--away, .hub-dot--away { background: var(--ole-gold); }
.hub-outcomes__legend {
    display: flex;
    flex-wrap: wrap;
    gap: 6px 18px;
    margin-top: 10px;
    font-size: 14px;
    font-weight: 600;
    color: var(--ink);
}
.hub-dot {
    display: inline-block;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    margin-inline-end: 6px;
}
.hub-tiles {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
    margin-top: 16px;
}
.hub-tile {
    display: flex;
    flex-direction: column;
    gap: 2px;
    padding: 12px;
    border: 1px solid var(--border);
    border-radius: 12px;
    text-align: center;
}
.hub-tile b { font-size: 22px; color: var(--ink); }
.hub-tile span { font-size: 12px; color: var(--muted); }
@media (max-width: 480px) {
    .hub-tiles { grid-template-columns: 1fr; }
}

/* ── summary lists (several per card) and notes ────────────────────────────── */
.hub-page .dp-summary-list + .dp-summary-list { margin-top: .45rem; }
.hub-note { margin: 0; font-size: 12px; color: var(--muted); text-align: center; }
.hub-note--inline { margin-top: 10px; text-align: start; }

/* ── dark mode ──────────────────────────────────────────────────────────────── */
html[data-theme="dark"] .hub-crumbs a,
html[data-theme="dark"] .hub-hero__meta a,
html[data-theme="dark"] .hub-table__score a,
html[data-theme="dark"] .hub-letters a { color: #60a5fa; }
html[data-theme="dark"] .hub-letters a:hover { background: rgba(96, 165, 250, .12); }
html[data-theme="dark"] .hub-outcomes__bar--home,
html[data-theme="dark"] .hub-dot--home { background: #3b82f6; }
