/* ---------- TZ Livescore Plugin Styling ---------- */


.tz-livescore-box {
    margin: 0 auto;
    background: var(--surface, #101613);
    border: 1px solid var(--line, #223028);
    border-radius: 8px;
    padding: 16px;
    max-width: 800px;
}

.tz-livescore-table {
    width: 100%;
    border-collapse: collapse;
    color: var(--ink, #ffffff);
}

.tz-livescore-table tr {
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.tz-livescore-table tr:last-child {
    border-bottom: none;
}

.tz-livescore-table td {
    padding: 12px 10px;
    font-size: 14px;
    vertical-align: middle;
}

.tz-ls-league {
    color: var(--muted, #82988C);
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    width: 20%;
    font-weight: 700;
}

.tz-ls-team {
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
}

.tz-ls-home {
    justify-content: flex-end;
    text-align: right;
}

.tz-ls-away {
    justify-content: flex-start;
    text-align: left;
}

.tz-ls-score {
    text-align: center;
    font-weight: 700;
    color: var(--amber, #FFB72B);
    white-space: nowrap;
    width: 80px;
    font-size: 16px;
}

.tz-ls-minute {
    text-align: right;
    color: var(--red, #FF3B30);
    font-size: 12px;
    font-weight: 700;
    width: 60px;
}

.tz-livescore-empty {
    color: var(--muted, #82988C);
    text-align: center;
    padding: 24px;
    margin: 0;
    font-size: 14px;
}

/* ---------- Upcoming Fixtures Page ---------- */
.tz-fixtures-wrap {
    display: flex;
    flex-direction: column;
    gap: 16px;
    max-width: 800px;
    margin: 16px auto;
}

.tz-fixtures-day {
    background: var(--surface, #101613);
    border: 1px solid var(--line, #223028);
    border-radius: 8px;
    padding: 14px 18px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.tz-fixtures-date {
    font-size: 13px;
    font-weight: 700;
    margin-bottom: 12px;
    color: var(--amber, #FFB72B);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    border-bottom: 1px solid var(--line, #223028);
    padding-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.tz-fixtures-date::before {
    content: "";
    display: inline-block;
    width: 3px;
    height: 12px;
    background: var(--red, #FF3B30);
    border-radius: 2px;
}

.tz-fixtures-table tr {
    transition: background-color 0.15s ease;
}

.tz-fixtures-table tr:hover {
    background-color: rgba(255, 255, 255, 0.02);
}

.tz-fixtures-table td {
    padding: 8px 10px;
    font-size: 13px;
}

.tz-ls-kickoff {
    font-family: 'JetBrains Mono', monospace;
    font-size: 12px;
    color: var(--ink, #ffffff);
    font-weight: 600;
    width: 50px;
}

.tz-ls-vs {
    text-align: center;
    font-size: 10px;
    color: var(--muted, #82988C);
    font-weight: 700;
    text-transform: uppercase;
    width: 30px;
    opacity: 0.6;
}

.tz-ls-venue {
    font-size: 10px;
    color: var(--muted, #82988C);
    text-align: right;
    max-width: 154px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    opacity: 0.8;
}

.tz-team-logo {
    display: inline-block;
    vertical-align: middle;
    object-fit: contain;
    margin-right: 8px;
    width: 20px;
    height: 20px;
}

.tz-fixtures-table .tz-ls-team {
    width: 32%;
}

.tz-fixtures-table .tz-ls-league {
    width: 110px;
}

.tz-fixtures-table .tz-ls-league-badge {
    display: inline-block;
    font-size: 9px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    background: var(--line, #223028);
    color: var(--muted, #82988C);
    padding: 2px 6px;
    border-radius: 4px;
    max-width: 90px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    vertical-align: middle;
}

/* ---------- Standings Tabs & Tables ---------- */
.tz-standings-wrap {
    margin: 24px auto;
    background: var(--surface, #101613);
    border: 1px solid var(--line, #223028);
    border-radius: 8px;
    overflow: hidden;
    max-width: 1000px;
}

.tz-tabs {
    display: flex;
    background: rgba(0, 0, 0, 0.15);
    border-bottom: 1.5px solid var(--line, #223028);
    overflow-x: auto;
    scrollbar-width: thin;
}

.tz-tab-btn {
    background: transparent;
    border: none;
    outline: none;
    color: var(--muted, #82988C);
    padding: 14px 22px;
    font-weight: 700;
    font-size: 13px;
    cursor: pointer;
    font-family: inherit;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    border-bottom: 3.5px solid transparent;
    transition: color 0.15s ease, border-color 0.15s ease, background-color 0.15s ease;
    white-space: nowrap;
}

.tz-tab-btn:hover {
    color: var(--ink, #F5F9F7);
    background: rgba(255, 255, 255, 0.01);
}

.tz-tab-btn.active {
    color: var(--amber, #FFB72B);
    border-bottom-color: var(--amber, #FFB72B);
    background: rgba(255, 255, 255, 0.03);
}

.tz-tab-content {
    display: none;
    padding: 16px;
}

.tz-tab-content.active {
    display: block;
}

.tz-standings-table th {
    text-align: left;
    padding: 12px 10px;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--muted, #82988C);
    border-bottom: 2px solid var(--line, #223028);
    font-weight: 700;
}

.tz-standings-table td {
    padding: 12px 10px;
}

.tz-standings-table tr.tz-top-four {
    border-left: 3px solid var(--success, #34C759);
}

.tz-standings-table tr.tz-relegation {
    border-left: 3px solid var(--red, #FF3B30);
}

.tz-st-pos {
    width: 40px;
    text-align: center;
    color: var(--muted, #82988C);
    font-weight: 700;
}

.tz-st-team {
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--ink, #ffffff);
}

.tz-st-pl,
.tz-st-w,
.tz-st-d,
.tz-st-l,
.tz-st-gd {
    text-align: center;
}

.tz-st-pts {
    text-align: right;
    font-weight: 700;
    color: var(--amber, #FFB72B);
}

.tz-gd-pos {
    color: var(--success, #34C759);
    font-weight: 600;
}

.tz-gd-neg {
    color: var(--red, #FF3B30);
    font-weight: 600;
}

@media (max-width: 768px) {
    .tz-livescore-table td {
        font-size: 13px;
        padding: 8px 6px;
    }

    .tz-ls-league {
        display: none;
    }

    .tz-ls-venue {
        display: none;
    }

    .tz-standings-table th:nth-child(4),
    .tz-standings-table th:nth-child(5),
    .tz-standings-table th:nth-child(6),
    .tz-standings-table td:nth-child(4),
    .tz-standings-table td:nth-child(5),
    .tz-standings-table td:nth-child(6) {
        display: none;
    }
}

/* ---------- Livescore.com Style Matches Rows ---------- */
.tz-match-list {
    display: flex;
    flex-direction: column;
    background: var(--surface, #101613);
    border: 1px solid var(--line, #223028);
    border-radius: 8px;
    overflow: hidden;
    margin: 8px 0;
}

.tz-match-row {
    display: grid;
    grid-template-columns: 80px 1fr 100px 1fr 120px;
    align-items: center;
    padding: 12px 16px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.04);
    transition: background-color 0.15s ease;
}

.tz-match-row:last-child {
    border-bottom: none;
}

.tz-match-row:hover {
    background-color: rgba(255, 255, 255, 0.02);
}

.tz-match-time-col {
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.tz-match-time-val {
    font-family: 'JetBrains Mono', monospace;
    font-size: 13px;
    font-weight: 700;
    color: var(--amber, #FFB72B);
}

.tz-match-time-col.is-live .tz-match-time-val {
    color: var(--red, #FF3B30);
    animation: tz-fade-text 1.5s infinite;
}

@keyframes tz-fade-text {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0.55;
    }
}

.tz-match-team-home {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 12px;
    text-align: right;
}

.tz-match-team-away {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 12px;
    text-align: left;
}

.tz-team-name-lbl {
    font-size: 13.5px;
    font-weight: 600;
    color: var(--ink, #ffffff);
}

.is-winner .tz-team-name-lbl {
    font-weight: 700;
    color: #ffffff;
}

.tz-match-crest {
    width: 22px;
    height: 22px;
    object-fit: contain;
    flex-shrink: 0;
}

.tz-match-scores-cell {
    display: flex;
    justify-content: center;
    align-items: center;
}

.tz-score-display {
    background: rgba(0, 0, 0, 0.25);
    border: 1px solid var(--line, #223028);
    border-radius: 4px;
    padding: 4px 12px;
    font-family: 'JetBrains Mono', monospace;
    font-size: 13px;
    font-weight: 700;
    color: var(--amber, #FFB72B);
    text-align: center;
    min-width: 60px;
}

.tz-score-display.is-live {
    border-color: rgba(255, 59, 48, 0.3);
}

.tz-match-league-col {
    display: flex;
    justify-content: flex-end;
    align-items: center;
}

.tz-league-badge {
    display: inline-block;
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    background: var(--line, #223028);
    color: var(--muted, #82988C);
    padding: 3px 8px;
    border-radius: 4px;
    max-width: 100px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .tz-match-row {
        grid-template-columns: 60px 1fr 70px 1fr;
    }

    .tz-match-league-col {
        display: none;
    }

    .tz-team-name-lbl {
        font-size: 12.5px;
    }

    .tz-score-display {
        font-size: 12px;
        min-width: 52px;
        padding: 3px 8px;
    }

    .tz-match-crest {
        width: 18px;
        height: 18px;
    }
}

/* ---------- League Hub Pages Layout ---------- */
.tz-league-hub-wrap {
    margin: 24px auto;
    max-width: 1200px;
}

.tz-league-header-banner {
    background: linear-gradient(135deg, rgba(16, 22, 19, 0.95), rgba(7, 11, 9, 0.95));
    border: 1px solid var(--line, #223028);
    border-radius: 8px;
    padding: 24px 32px;
    margin-bottom: 24px;
    position: relative;
    overflow: hidden;
}

.tz-league-header-banner::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    background: var(--amber, #FFB72B);
}

.tz-league-title {
    font-family: 'Barlow Condensed', sans-serif;
    font-size: 32px;
    color: var(--amber, #FFB72B);
    margin: 0 0 6px 0;
    letter-spacing: 0.05em;
}

.tz-league-subtitle {
    font-size: 14px;
    color: var(--muted, #82988C);
    margin: 0;
}

.tz-league-two-col {
    display: grid;
    grid-template-columns: 1.8fr 1.2fr;
    gap: 24px;
}

.tz-section-title {
    font-family: 'Barlow Condensed', sans-serif;
    font-size: 20px;
    color: var(--ink, #ffffff);
    margin: 0 0 16px 0;
    letter-spacing: 0.04em;
    border-bottom: 2px solid var(--line, #223028);
    padding-bottom: 8px;
    text-transform: uppercase;
}

.tz-league-main-col {
    background: var(--surface, #101613);
    border: 1px solid var(--line, #223028);
    border-radius: 8px;
    padding: 20px;
}

.tz-league-side-col {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.tz-league-fixtures-section,
.tz-league-news-section {
    background: var(--surface, #101613);
    border: 1px solid var(--line, #223028);
    border-radius: 8px;
    padding: 20px;
}

.tz-match-row.single-league-row {
    grid-template-columns: 90px 1fr 60px 1fr;
}

/* League News Cards */
.tz-league-news-cards {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.tz-news-card {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--line, #223028);
    border-radius: 6px;
    padding: 14px;
    transition: transform 0.2s ease, border-color 0.2s ease;
}

.tz-news-card:hover {
    transform: translateY(-2px);
    border-color: var(--amber, #FFB72B);
}

.tz-news-card-title {
    font-size: 14px;
    font-weight: 700;
    margin: 0 0 8px 0;
}

.tz-news-card-title a {
    color: var(--ink, #ffffff);
    text-decoration: none;
    transition: color 0.15s ease;
}

.tz-news-card-title a:hover {
    color: var(--amber, #FFB72B);
}

.tz-news-card-excerpt {
    font-size: 12px;
    color: var(--muted, #82988C);
    margin: 0 0 10px 0;
    line-height: 1.5;
}

.tz-news-card-more {
    font-size: 11px;
    font-weight: 700;
    color: var(--amber, #FFB72B);
    text-decoration: none;
    text-transform: uppercase;
}

.tz-news-card-more:hover {
    text-decoration: underline;
}

/* Responsive adjustments */
@media (max-width: 991px) {
    .tz-league-two-col {
        grid-template-columns: 1fr;
    }
}

/* ---------- Fixtures Page Premium Redesign ---------- */

/* Suppress the default theme page title on the Fixtures page.
   page.php outputs <h1 class="entry-title display"> automatically;
   our shortcode adds its own sub-line, so we hide the duplicate. */
.page-id-14 h1.entry-title,
.tz-fixtures-page-wrap~h1.entry-title {
    display: none !important;
}

/* Amber focus rings — bespoke, not browser-default */
.tz-fixtures-page-wrap a:focus-visible,
.tz-fixtures-page-wrap button:focus-visible,
.tz-date-pill:focus-visible,
.tz-league-chips .chip:focus-visible {
    outline: 2px solid var(--amber);
    outline-offset: 2px;
}

.tz-fixtures-page-wrap {
    margin-top: 0;
}

/* Style the theme's h1.entry-title as the Fixtures page hero heading */
.page-id-14 .entry-title,
.tz-fixtures-page-wrap+.entry-title {
    font-family: 'Barlow Condensed', sans-serif;
    font-size: 34px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.01em;
    padding: 36px 0 4px;
    line-height: 1.1;
}

/* Sub-line: league names beneath the h1 */
.tz-fixtures-sub {
    color: var(--muted);
    font-size: 13px;
    margin-top: 6px;
    margin-bottom: 0;
    padding-bottom: 4px;
}



.tz-date-rail-shell {
    position: sticky;
    top: 0;
    z-index: 99;
    background: var(--bg);
    padding: 20px 0 14px;
    border-bottom: 1px solid var(--line);
    margin-bottom: 20px;
}

.tz-date-rail {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    scrollbar-width: none;
    padding-bottom: 2px;
}

.tz-date-rail::-webkit-scrollbar {
    display: none;
}

.tz-date-pill {
    flex: 0 0 auto;
    min-width: 64px;
    min-height: 56px;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 8px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 3px;
    color: var(--muted);
    font-family: inherit;
    transition: border-color .15s ease, color .15s ease, background .15s ease;
    cursor: pointer;
}

.tz-date-pill .dow {
    font-size: 10px;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.tz-date-pill .num {
    font-size: 17px;
    font-weight: 700;
    color: var(--ink);
    font-family: 'IBM Plex Mono', monospace;
}

.tz-date-pill .tag {
    font-size: 8px;
    color: var(--red);
    font-weight: 700;
    letter-spacing: 0.06em;
    height: 10px;
}

.tz-date-pill:hover {
    border-color: var(--amber);
}

.tz-date-pill.active,
.tz-date-pill[aria-pressed="true"] {
    background: linear-gradient(180deg, rgba(255, 183, 43, 0.14), rgba(255, 183, 43, 0.04));
    border-color: var(--amber);
}

.tz-date-pill.active .num,
.tz-date-pill.active .dow,
.tz-date-pill[aria-pressed="true"] .num,
.tz-date-pill[aria-pressed="true"] .dow {
    color: var(--amber);
}

.tz-league-chips {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    padding: 10px 0 24px;
}

.tz-league-chips .chip {
    padding: 9px 16px;
    min-height: 36px;
    border-radius: 999px;
    border: 1px solid var(--line);
    background: var(--surface);
    color: var(--muted);
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.02em;
    display: inline-flex;
    align-items: center;
    transition: all .15s ease;
    cursor: pointer;
    font-family: inherit;
}

.tz-league-chips .chip:hover {
    border-color: var(--amber);
    color: var(--ink);
}

.tz-league-chips .chip.active,
.tz-league-chips .chip[aria-pressed="true"] {
    background: var(--amber);
    border-color: var(--amber);
    color: var(--bg);
}

.tz-comp-group {
    margin-bottom: 34px;
}

.tz-comp-group.is-hidden {
    display: none;
}

.tz-comp-head {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 12px;
}

.tz-comp-badge {
    width: 22px;
    height: 22px;
    border-radius: 5px;
    background: var(--surface-2);
    border: 1px solid var(--line);
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 9px;
    font-weight: 700;
    color: var(--muted);
    overflow: hidden;
}

.tz-comp-badge img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.tz-comp-head h2 {
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--muted);
    font-weight: 700;
    font-family: 'Barlow Condensed', sans-serif;
    margin: 0;
}

.tz-comp-head .count {
    margin-left: auto;
    font-size: 11px;
    color: var(--muted);
}

.tz-fixture-list {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 6px;
    overflow: hidden;
}

.tz-fixture-row {
    display: grid;
    grid-template-columns: 64px 1fr auto 1fr 90px;
    align-items: center;
    gap: 14px;
    padding: 16px 20px;
    border-bottom: 1px solid var(--line);
    transition: background .12s ease;
}

.tz-fixture-row:last-child {
    border-bottom: none;
}

.tz-fixture-row:hover {
    background: var(--surface-2);
}

.tz-fixture-row.is-live {
    background: linear-gradient(90deg, rgba(255, 183, 43, 0.06), transparent 40%);
}

.tz-fixture-row .kickoff {
    text-align: left;
}

.tz-fixture-row .kickoff .time {
    font-size: 14px;
    font-weight: 600;
    color: var(--muted);
    font-family: 'IBM Plex Mono', monospace;
}

.tz-fixture-row .kickoff.is-live .time {
    display: none;
}

.tz-fixture-row .live-minute {
    display: none;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    font-weight: 700;
    color: var(--red);
    font-family: 'IBM Plex Mono', monospace;
}

.tz-fixture-row .kickoff.is-live .live-minute {
    display: inline-flex;
}

.tz-fixture-row .live-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--red);
    box-shadow: 0 0 0 0 rgba(255, 59, 48, 0.6);
    animation: pulse-dot 1.8s ease-out infinite;
}

@keyframes pulse-dot {
    0% {
        box-shadow: 0 0 0 0 rgba(255, 59, 48, 0.55);
    }

    70% {
        box-shadow: 0 0 0 6px rgba(255, 59, 48, 0);
    }

    100% {
        box-shadow: 0 0 0 0 rgba(255, 59, 48, 0);
    }
}

@media (prefers-reduced-motion: reduce) {
    .tz-fixture-row .live-dot {
        animation: none;
    }
}

.tz-fixture-row .kickoff .ft {
    font-size: 11px;
    color: var(--muted);
    font-weight: 600;
}

.tz-fixture-row .team {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 14px;
    font-weight: 500;
}

.tz-fixture-row .team.home {
    justify-content: flex-end;
    text-align: right;
}

.tz-fixture-row .team.away {
    justify-content: flex-start;
}

.tz-fixture-row .team .crest {
    width: 26px;
    height: 26px;
    border-radius: 50%;
    background: var(--surface-2);
    border: 1px solid var(--line);
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 9px;
    font-weight: 700;
    color: var(--muted);
}

.tz-fixture-row .team .crest img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.tz-fixture-row .team.win {
    font-weight: 700;
    color: var(--ink);
}

.tz-fixture-row .score-mid {
    text-align: center;
    font-size: 16px;
    font-weight: 700;
    color: var(--amber);
    white-space: nowrap;
    min-width: 50px;
    font-family: 'IBM Plex Mono', monospace;
}

.tz-fixture-row .score-mid .vs {
    color: var(--muted);
    font-weight: 500;
    font-size: 12px;
    font-family: 'Barlow', sans-serif;
}

.tz-fixture-row .venue {
    text-align: right;
    font-size: 11px;
    color: var(--muted);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.tz-fixtures-page-wrap .empty-state {
    padding: 60px 20px;
    text-align: center;
    color: var(--muted);
    font-size: 14px;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 6px;
}

.tz-date-panel {
    display: none;
}

.tz-date-panel.active {
    display: block;
}

@media (max-width: 720px) {
    .tz-fixture-row {
        grid-template-columns: 52px 1fr auto 1fr;
        padding: 14px 14px;
    }

    .tz-fixture-row .venue {
        display: none;
    }

    .tz-fixture-row .team .crest {
        width: 22px;
        height: 22px;
    }
}