﻿.stats-header {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    margin-bottom: 20px;
    font-weight: 600;
    font-size: 18px;
}

    .stats-header .team {
        text-align: center;
    }

    .stats-header .vs {
        opacity: 0.6;
        font-size: 14px;
    }

.possession-wrapper {
    display: flex;
    justify-content: space-around;
    align-items: center;
    margin-top: 20px;
}

.ring {
    position: relative;
    width: 160px;
    height: 160px;
}

    .ring svg {
        transform: rotate(-90deg);
    }

    .ring text {
        font-size: 20px;
        font-weight: bold;
        fill: #111;
        text-anchor: middle;
        dominant-baseline: middle;
    }

.team-label {
    text-align: center;
    margin-top: 10px;
    font-weight: 600;
}

/* =========================
   ELITE STATS HEADER
   ========================= */

.stats-header-elite {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    margin-bottom: 16px;
    padding: 10px 0;
}

.team-block {
    display: flex;
    flex-direction: column;
    gap: 4px;
    text-align: center;
}

    .team-block.home {
        text-align: right;
    }

    .team-block.away {
        text-align: left;
    }

.team-name {
    font-weight: 600;
    font-size: 1rem;
}

.team-stat {
    font-size: 1.4rem;
    font-weight: 700;
}

.team-points {
    font-size: 0.9rem;
    color: #6b7280;
}

/* colour accents */
.team-block.home .team-stat {
    color: #2563eb;
}

.team-block.away .team-stat {
    color: #ef4444;
}

/* =========================
   STAT TITLE
   ========================= */

.stat-title {
    text-align: center;
    font-size: 0.8rem;
    color: #9ca3af;
    min-width: 120px;
}

    .stat-title .label {
        font-size: 12px;
        text-transform: uppercase;
        letter-spacing: 1px;
        opacity: 0.6;
    }

    .stat-title .divider {
        width: 1px;
        height: 30px;
        background: #e5e7eb;
        margin: 6px auto;
    }

/* =========================
   STATS LIST
   ========================= */

.stats-list-wrapper {
    width: 100%;
    max-width: 600px;
}

.stats-list {
    background: #fff;
    border-radius: 16px;
    padding: 20px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.05);
    margin-top: 20px;
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.stats-section-title {
    font-weight: 600;
    letter-spacing: 0.5px;
    margin-top: 1.5rem;
    margin-bottom: 0.5rem;
}

.stat-row {
    display: grid;
    grid-template-columns: 40px 1fr 40px;
    align-items: center;
    gap: 10px;
}

.stat-value {
    font-weight: 600;
    text-align: center;
}

    .stat-value.home {
        color: #2563eb;
    }

    .stat-value.away {
        color: #ef4444;
    }

.stat-bar {
    text-align: center;
}

.stat-label {
    font-size: 12px;
    text-transform: uppercase;
    opacity: 0.6;
    margin-bottom: 4px;
}

.bar-track {
    display: flex;
    height: 8px;
    background: #eee;
    border-radius: 6px;
    overflow: hidden;
}

.bar-home {
    background: #2563eb;
}

.bar-away {
    background: #ef4444;
}

/* =========================
   CARD
   ========================= */

.section-card {
    width: 100%;
    max-width: 620px;
    background: #fff;
    border-radius: 16px;
    padding: 18px 20px;
    margin-bottom: 16px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.section-title {
    font-weight: 600;
    font-size: 0.85rem;
    letter-spacing: 0.6px;
    color: #374151;
    margin-bottom: 12px;
    text-transform: uppercase;
}

/* =========================
   H2H HEADER
   ========================= */

.h2h-header {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    margin-bottom: 20px;
}

.team-side {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

    .team-side.home {
        text-align: right;
        border-right: 3px solid var(--team-color);
        padding-right: 12px;
    }

    .team-side.away {
        text-align: left;
        border-left: 3px solid var(--team-color);
        padding-left: 12px;
    }

.team-meta {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

    .team-meta .big {
        font-size: 1.3rem;
        font-weight: 700;
    }

    .team-meta .label {
        font-size: 0.75rem;
        color: #6b7280;
    }

.vs {
    font-size: 0.8rem;
    color: #9ca3af;
    padding: 0 10px;
}

/* =========================
   HIGHLIGHTS / TABLE
   ========================= */

.highlight-team {
    background: #eef2ff;
    font-weight: 900;
    box-shadow: inset 3px 0 0 #6366f1;
}

.highlight-home td:first-child {
    border-left: 3px solid var(--row-color, #2563eb);
}

.highlight-away td:first-child {
    border-left: 3px solid var(--row-color, rgb(239, 68, 68));
}

.elite-table-wrapper table {
    border-radius: 12px;
    overflow: hidden;
    font-size: 0.85rem;
}

.table thead th {
    font-size: 0.7rem;
    letter-spacing: 0.5px;
}

.table tbody tr:hover {
    background: #f9fafb;
}

/* =========================
   FORM GRID
   ========================= */

.form-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 16px;
    max-width: 1000px;
    margin: 0 auto 16px;
}

@media (min-width: 768px) {
    .form-grid {
        grid-template-columns: 1fr 1fr;
    }

        .form-grid .section-title {
            text-align: center;
        }
}

/* =========================
   MATCH LIST
   ========================= */

.match-item {
    padding: 6px 0;
    border-bottom: 1px solid #f1f5f9;
}

    .match-item:last-child {
        border-bottom: none;
    }

/* =========================
   CONTEXT
   ========================= */

.context-note {
    text-align: center;
    font-size: 0.75rem;
    color: #6b7280;
    margin-bottom: 12px;
    opacity: 0.8;
}

.context-banner {
    max-width: 620px;
    margin: 0 auto 16px;
    padding: 10px 14px;
    border-radius: 10px;
    background: #f8fafc;
    border: 1px solid #e5e7eb;
    font-size: 0.85rem;
    color: #374151;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

/* =========================
   FORM BADGES
   ========================= */

.form-strip {
    display: flex;
    gap: 6px;
    justify-content: center;
    margin-bottom: 10px;
}

.form-badge {
    width: 22px;
    height: 22px;
    font-size: 0.7rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    color: white;
    cursor: pointer;
}

    .form-badge.w {
        background: #16a34a;
    }

    .form-badge.d {
        background: #6b7280;
    }

    .form-badge.l {
        background: #dc2626;
    }

/* =========================
   H2H BADGES
   ========================= */

.h2h-result-badge {
    width: 22px;
    height: 22px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 12px;
    border-radius: 50%;
    color: white;
    flex-shrink: 0;
}

    .h2h-result-badge.w {
        background: #16a34a;
    }

    .h2h-result-badge.d {
        background: #6b7280;
    }

    .h2h-result-badge.l {
        background: #dc2626;
    }

/* =========================
   H2H SUMMARY STRIP (MERGED)
   ========================= */

.h2h-summary-strip {
    display: flex;
    justify-content: center;
    align-items: stretch;
    gap: 1rem;
    text-align: center;
    padding: 0.75rem 1rem;
    border-radius: 12px;
    background: #f8f9fa;
    border: 1px solid rgba(0,0,0,0.08);
}

    .h2h-summary-strip .team,
    .h2h-summary-strip .divider {
        flex: 1;
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
    }

    .h2h-summary-strip .value {
        font-size: 1.6rem;
        font-weight: 700;
        line-height: 1.1;
    }

    .h2h-summary-strip .label {
        font-size: 0.75rem;
        color: #6c757d;
        white-space: nowrap;
        max-width: 140px;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    .h2h-summary-strip .sub {
        font-size: 0.7rem;
        color: #adb5bd;
        min-height: 1rem;
    }

/* =========================
   H2H INSIGHT
   ========================= */

.h2h-insight {
    font-size: 0.95rem;
    padding: 0.4rem 0.75rem;
    border-radius: 8px;
    background: #f8f9fa;
    border: 1px solid rgba(0,0,0,0.06);
}

.h2h-summary-strip {
    position: relative;
}

    /* base layout already exists, we just enhance it */

    /* middle divider (Home | Draws) */
    .h2h-summary-strip .team.home {
        position: relative;
    }

        .h2h-summary-strip .team.home::after {
            content: "";
            position: absolute;
            right: 0;
            top: 10%;
            height: 80%;
            width: 1px;
            background: rgba(0,0,0,0.15);
        }

    /* middle divider (Draws | Away) */
    .h2h-summary-strip .team.draws {
        position: relative;
    }

        .h2h-summary-strip .team.draws::after {
            content: "";
            position: absolute;
            right: 0;
            top: 10%;
            height: 80%;
            width: 1px;
            background: rgba(0,0,0,0.15);
        }

.h2h-mini-stats {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
    text-align: center;
    margin-bottom: 12px;
}

@media (min-width: 768px) {
    .h2h-mini-stats {
        grid-template-columns: repeat(4, 1fr);
    }
}

.h2h-mini-stats .stat {
    background: #f8f9fa;
    border: 1px solid rgba(0,0,0,0.06);
    border-radius: 10px;
    padding: 8px 6px;
}

.h2h-mini-stats .value {
    font-size: 1.1rem;
    font-weight: 700;
    line-height: 1.2;
}

.h2h-mini-stats .label {
    font-size: 0.7rem;
    color: #6c757d;
    margin-top: 2px;
}


.form-strip-mini {
    display: flex;
    justify-content: center;
    gap: 4px;
}

.form-dot {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    font-size: 11px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
}

    .form-dot.W {
        background: #16a34a;
    }

    .form-dot.D {
        background: #6b7280;
    }

    .form-dot.L {
        background: #dc2626;
    }

.fixture-meta {
    grid-column: 1 / -1;
    text-align: center;
    font-size: 0.75rem;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    color: #9ca3af;
    margin-bottom: 6px;
}

.fixture-meta-value {
    font-weight: 700;
    color: #111827;
    text-transform: none;
    margin-left: 6px;
}

.impact-wrapper {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 16px;
    margin-top: 12px;
}

.impact-card {
    border-radius: 12px;
    padding: 14px;
    background: #fff;
    box-shadow: 0 2px 6px rgba(0,0,0,0.06);
    text-align: center;
}

    .impact-card.home {
        border-top: 4px solid #0d6efd; /* blue */
    }

    .impact-card.away {
        border-top: 4px solid #dc3545; /* red */
    }

.impact-team {
    font-weight: 600;
    font-size: 1.05rem;
    margin-bottom: 10px;
}

.impact-row {
    align-items: center;
    font-size: 0.9rem;
    padding: 6px 8px;
    border-radius: 8px;
    margin-bottom: 6px;
}

    .impact-row strong {
        font-size: 0.95rem;
    }

    .impact-row.positive {
        background: #e9f7ef;
        color: #198754;
    }

    .impact-row.negative {
        background: #fdecea;
        color: #dc3545;
    }
/* =========================
   FIXTURE CARD (BASE)
   ========================= */

.fixture-card {
    background: #fff;
    border-bottom: 1px solid #e5e7eb;
    padding: 12px 10px;
}

/* TIME */
.fixture-time {
    text-align: center;
    font-size: 0.75rem;
    color: #6b7280;
    margin-bottom: 6px;
}

/* TEAMS ROW */
.fixture-teams {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    gap: 8px;
}

/* TEAM ALIGNMENT */
.team.home {
    text-align: right;
}

.team.away {
    text-align: left;
}

/* SCORE */
.fixture-score {
    font-weight: 700;
    font-size: 1rem;
}

/* =========================
   MOBILE POLISH (BBC feel)
   ========================= */

@media (max-width: 576px) {

    .fixture-card {
        padding: 14px 12px;
    }

    .team-name {
        font-size: 0.9rem;
    }

    .fixture-score {
        font-size: 1rem;
    }
}

/* =========================
   DESKTOP (compact row)
   ========================= */

@media (min-width: 768px) {

    .fixture-card {
        display: flex;
        align-items: center;
        justify-content: space-between;
        padding: 10px 0;
        border-bottom: 1px solid #f1f5f9;
    }

    .fixture-time {
        width: 70px;
        margin: 0;
        text-align: left;
    }

    .fixture-teams {
        flex: 1;
        display: grid;
        grid-template-columns: 1fr auto 1fr;
        align-items: center;
    }

    .team.home {
        justify-self: end;
    }

    .team.away {
        justify-self: start;
    }
}

.team {
    display: flex;
    align-items: center;
    gap: 6px;
}

    .team.home {
        justify-content: flex-end;
    }

    .team.away {
        justify-content: flex-start;
    }

.team-name {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
@media (hover: hover) {
    .fixture-card:hover {
        background: #f9fafb;
        cursor: pointer;
    }
}