/* ==========================================================================
   TCHAMPIONSHIP PUBLIC STYLES - FULL VERSION (CONSOLIDATED)
   ========================================================================== */

/* Main Wrapper - Absolute center alignment anchor override */
.tchmp-public-container {
    display: block !important;
    width: 100% !important;
    max-width: 1232px !important;
    position: relative !important;
    margin-left: auto !important;
    margin-right: auto !important;
    margin-top: 40px !important;
    margin-bottom: 40px !important;
    padding: 0 15px !important;
    box-sizing: border-box !important;
    left: 0 !important;
    right: 0 !important;
    transform: none !important;
    float: none !important;
    clear: both !important;
    font-family: Mulish, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif !important;
    color: rgb(43, 45, 66);
}

/* Force Font Stack across sub-elements */
.tchmp-public-table,
.tchmp-public-table th,
.tchmp-public-table td,
.tchmp-public-table span,
.tchmp-stage-header,
.tchmp-tabs-nav a,
.tchmp-fixtures-summary,
.tchmp-squad-table {
    font-family: inherit !important;
}

/* Main Title centering */
.tchmp-main-title {
    text-align: center;
    margin: 30px 0 40px 0;
    font-weight: 700;
}

/* Card Wrapper for Standings & Groups */
.tchmp-card {
    background: #fff;
    border: 1px solid #eee;
    border-top: 4px solid #0073aa;
    padding: 30px;
    margin-bottom: 30px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
    border-radius: 4px;
}

/* Standings Table Styling */
.tchmp-public-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 10px;
}

.tchmp-public-table thead th {
    background-color: #f8f9fa;
    color: rgb(43, 45, 66);
    padding: 12px 10px;
    text-transform: none;
    font-size: 14px;
    font-weight: 700;
    text-align: left;
    border-bottom: 2px solid #eee;
}

.tchmp-public-table td {
    padding: 15px;
    border-bottom: 1px solid #f0f0f0;
    vertical-align: middle;
}

/* Team Names & Badges */
.tchmp-team-cell {
    font-weight: 700;
}

/* Target the direct link wrapper inside the cell to enforce the horizontal layout */
.tchmp-team-cell .tchmp-hub-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    /* This will now cleanly separate the flag image and the text label */
    text-decoration: none;
    /* Prevents unwanted underline artifacts if desired */
}

.team-badge-preview {
    width: 20px;
    height: auto;
    vertical-align: middle;
    object-fit: contain;
    flex-shrink: 0;
}

/* Tabs Navigation */
.tchmp-tabs-nav {
    display: flex;
    gap: 10px;
    margin-bottom: 30px;
    border-bottom: 1px solid #eee;
    padding-bottom: 15px;
}

.tchmp-tabs-list {
    list-style: none !important;
    padding: 0 !important;
    margin: 0 !important;
    display: flex;
    gap: 25px;
}

.tchmp-tab-link {
    text-decoration: none;
    color: #555;
    padding: 12px 24px;
    font-weight: 700;
    border-radius: 4px;
    background: #f9f9f9;
    border: 1px solid #eee;
    transition: all 0.2s ease;
}

.tchmp-tab-link:hover {
    background: #f0f0f0;
    color: #0073aa;
}

.tchmp-tab-link.active {
    background: #0073aa;
    color: #fff;
    border-color: #0073aa;
}

/* Fixtures/Results Alignment */
.tchmp-match-table {
    width: 100%;
    border-collapse: collapse;
}

.tchmp-match-meta {
    width: 20%;
    text-align: left;
    color: #888;
    font-size: 0.85em;
}

/* Home Column Layout Container */
.tchmp-match-home {
    width: 34%;
    text-align: right !important;
    font-weight: 700;
}

.tchmp-match-home .tchmp-hub-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    justify-content: flex-end;
    /* Keeps alignment flush against the score column */
}

.tchmp-match-score {
    width: 12%;
    text-align: center !important;
}

/* Clickable Result Pills */
.tchmp-result-link {
    display: inline-block;
    background: #f1f1f1;
    padding: 6px 16px;
    border-radius: 4px;
    font-weight: 700;
    text-decoration: none !important;
    color: #2b2d42 !important;
    min-width: 60px;
    white-space: nowrap;
    transition: all 0.2s ease-in-out;
}

.tchmp-result-link:hover {
    background-color: #2271b1 !important;
    color: #ffffff !important;
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.tchmp-result-link:active {
    transform: translateY(0);
}

/* Away Column Layout Container */
.tchmp-match-away {
    width: 34%;
    text-align: left !important;
    font-weight: 700;
}

.tchmp-match-away .tchmp-hub-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    justify-content: flex-start;
    /* Spreads elements standardly outward to the right */
}

/* Match Center Specifics */
.tchmp-match-center {
    width: 100%;
    max-width: 100%;
    margin: 0 auto;
}

.tchmp-scoreboard {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    padding: 30px 0;
}

.tchmp-score-team {
    flex: 1;
    text-align: center;
}

.tchmp-large-badge {
    width: 100px;
    height: 100px;
    object-fit: contain;
    margin-bottom: 15px;
}

.tchmp-score-team h3 {
    margin: 0;
    font-size: 1.6em;
    font-weight: 800;
    color: #2b2d42;
}

.tchmp-main-score {
    font-size: 4em;
    font-weight: 900;
    color: #2b2d42;
    line-height: 1;
}

.tchmp-vs {
    font-size: 2.5em;
    font-weight: 900;
    color: #ccc;
}

/* Squad Layout */
.tchmp-squads-container {
    margin-top: 40px;
}

.tchmp-squads-grid {
    display: flex;
    gap: 30px;
}

.tchmp-squad-column {
    flex: 1;
    background: #fff;
    border: 1px solid #eee;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.02);
}

.tchmp-squad-table {
    width: 100%;
    border-collapse: collapse;
}

.tchmp-squad-table th {
    text-align: left;
    padding: 10px;
    border-bottom: 2px solid #eee;
    font-size: 0.85em;
    color: #888;
}

.tchmp-squad-table td {
    padding: 12px 10px;
    border-bottom: 1px solid #f9f9f9;
}

/* Ultra Thin Stat Columns */
.tchmp-column-name {
    width: auto;
    text-align: left;
}

.tchmp-column-stat {
    width: 1%;
    white-space: nowrap;
    text-align: center !important;
    padding-left: 10px !important;
    padding-right: 10px !important;
    font-weight: 700;
}

.col-num {
    width: 35px;
    font-weight: 700;
    color: #0073aa;
}

.pos-badge {
    font-size: 0.75em;
    background: #eee;
    padding: 2px 6px;
    border-radius: 3px;
    font-weight: 700;
    color: #666;
}

/* Discipline Cards */
.card-yellow {
    width: 10px;
    height: 14px;
    background-color: #ffd700;
    border-radius: 2px;
    display: inline-block;
    border: 1px solid rgba(0, 0, 0, 0.1);
    vertical-align: middle;
}

.card-red {
    width: 10px;
    height: 14px;
    background-color: #ff4d4d;
    border-radius: 2px;
    display: inline-block;
    border: 1px solid rgba(0, 0, 0, 0.1);
    vertical-align: middle;
}

/* Final Standings Specifics */
.tchmp-standings-wrap {
    max-width: 750px;
    margin: 0 auto;
}

.tchmp-standings-title {
    text-align: center;
    margin-bottom: 30px;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-weight: 700;
}

.tchmp-col-medal {
    width: 40px;
    text-align: right !important;
    padding-right: 5px !important;
}

.tchmp-col-placing {
    width: 60px;
    text-align: left !important;
    padding-left: 5px !important;
    font-weight: 700;
    font-size: 1.1em;
}

/* Helpers & Extras */
.tchmp-knockout-stage-wrap {
    margin-bottom: 50px;
}

.tchmp-stage-header {
    border-left: 4px solid #0073aa;
    padding-left: 15px;
    margin-bottom: 25px;
    font-size: 1.8em;
    font-weight: 700;
    text-align: left !important;
}

.tchmp-fixtures-details {
    margin-top: 15px;
    border: 1px solid #eee;
    border-radius: 4px;
}

.tchmp-fixtures-summary {
    padding: 15px;
    cursor: pointer;
    font-weight: 700;
    background: #fafafa;
    border: none;
    width: 100%;
    text-align: left;
}

.tchmp-center {
    text-align: center !important;
}

.tchmp-bold {
    font-weight: 700 !important;
}

.tchmp-no-data {
    padding: 30px;
    text-align: center;
    background: #f9f9f9;
    border-radius: 4px;
    border: 1px dashed #ccc;
    color: #666;
}

/* Responsive Overrides */
@media (max-width: 768px) {
    .tchmp-squads-grid {
        flex-direction: column;
    }

    .tchmp-scoreboard {
        flex-direction: column;
    }

    .tchmp-main-score {
        font-size: 3em;
    }

    .tchmp-match-home,
    .tchmp-match-away {
        width: 40%;
    }
}

/* ==========================================================================
   TCHMP Player Profile Styles
   ========================================================================== */

.tchmp-player-controls {
    display: flex;
    justify-content: flex-end;
    margin-bottom: 15px;
}

/* Header Section */
.tchmp-player-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: #fff;
    padding: 25px 40px;
    border-top: 4px solid #004a99;
    border-left: 1px solid #eee;
    border-right: 1px solid #eee;
    border-bottom: 1px solid #eee;
    border-radius: 4px;
    margin-bottom: 30px;
}

.tchmp-player-header h1 {
    font-size: 48px;
    margin: 0;
    color: #2c3344;
    font-weight: 800;
    letter-spacing: -1px;
    line-height: 1;
}

.tchmp-player-headshot {
    width: 150px;
    height: 150px;
    border-radius: 4px;
    object-fit: cover;
    border: 1px solid #ddd;
    background: #f9f9f9;
}

/* Grid Layout */
.tchmp-stats-grid {
    display: flex;
    gap: 30px;
}

.tchmp-col-left {
    flex: 1;
}

.tchmp-col-right {
    flex: 2;
}

/* Card Components */
.tchmp-card-header {
    border-top: 4px solid #004a99;
    padding: 15px 20px;
    border-bottom: 1px solid #f0f0f0;
}

.tchmp-card-header h3 {
    margin: 0;
    font-size: 20px;
    color: #2c3344;
    text-align: center;
    font-weight: 700;
}

.tchmp-card-body {
    padding: 20px;
}

/* Stats Rows */
.tchmp-stat-row {
    display: flex;
    justify-content: space-between;
    padding: 12px 0;
    border-bottom: 1px solid #eee;
    align-items: center;
}

.tchmp-stat-row:last-child {
    border-bottom: none;
}

.tchmp-stat-label {
    font-weight: 600;
    color: #555;
}

.tchmp-stat-value {
    font-weight: 800;
    color: #004a99;
    font-size: 16px;
}

/* Tables */
.tchmp-table {
    width: 100%;
    border-collapse: collapse;
}

.tchmp-table th {
    background: #fcfcfc;
    text-align: left;
    padding: 12px 15px;
    color: #888;
    font-weight: 600;
    text-transform: uppercase;
    font-size: 11px;
    border-bottom: 1px solid #eee;
}

.tchmp-table td {
    padding: 14px 15px;
    border-bottom: 1px solid #f6f6f6;
    font-size: 15px;
    vertical-align: middle;
}

/* Bio & Links */
.tchmp-bio-text {
    line-height: 1.6;
    font-size: 15px;
    color: #444;
}

.tchmp-bio-text p {
    margin-bottom: 1em;
}

.tchmp-link {
    color: #004a99;
    text-decoration: none;
    font-weight: 600;
}

.tchmp-link:hover {
    text-decoration: underline;
}

/* Select2 Customization */
.select2-container--default .select2-selection--single {
    height: 40px !important;
    border-radius: 20px !important;
    border: 1px solid #ccc !important;
    padding-top: 5px;
}

/* ==========================================================================
   TCHMP Team View Specific Styles
   ========================================================================== */

/* Blue-bordered card style for Performance/Honours/Most Capped */
.tchmp-card-bordered {
    background: #fff;
    border: 1px solid #eee;
    border-top: 4px solid #004a99;
    border-radius: 4px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    margin-bottom: 30px;
    overflow: hidden;
}

/* Centered header style for the team cards */
.tchmp-card-header-simple {
    padding: 20px 20px 10px;
    text-align: center;
}

.tchmp-card-header-simple h3 {
    margin: 0;
    font-size: 1.5rem;
    color: #333;
    font-weight: 700;
}

/* Link styling for player names in the table */
.tchmp-link-styled {
    color: #004a99;
    text-decoration: none;
    font-weight: 600;
    transition: color 0.2s ease;
}

.tchmp-link-styled:hover {
    text-decoration: underline;
    color: #002d5e;
}

/* The "Part of [Country]" link box */
.tchmp-org-badge {
    display: flex;
    align-items: center;
    gap: 12px;
    background: #f9f9f9;
    padding: 10px 20px;
    border-radius: 8px;
    border: 1px solid #eee;
    text-decoration: none;
    color: inherit;
    transition: background 0.2s;
}

.tchmp-org-badge:hover {
    background: #f0f0f0;
}

/* --- Organization & Hub Styles --- */

/* Hero Strip */
.tchmp-hero-strip {
    display: flex;
    align-items: center;
    gap: 20px;
    padding: 20px 30px;
    margin-bottom: 20px;
}

.tchmp-hero-strip img {
    height: 60px;
    width: auto;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.1));
}

.tchmp-hero-strip h1 {
    margin: 0;
    font-size: 2.8rem;
    line-height: 1.1;
}

/* Tab System */
.tchmp-main-tabs {
    display: flex;
    gap: 5px;
    margin-bottom: 20px;
    border-bottom: 2px solid #eee;
}

.tchmp-tab-trigger {
    padding: 12px 25px;
    cursor: pointer;
    font-weight: bold;
    font-size: 1.1rem;
    color: #666;
    background: #f9f9f9;
    border-radius: 8px 8px 0 0;
    transition: all 0.2s ease;
    border: 1px solid #eee;
    border-bottom: none;
    margin-bottom: -2px;
}

.tchmp-tab-trigger:hover {
    color: #0056b3;
}

.tchmp-tab-trigger.active {
    color: #0056b3;
    background: #fff;
    border-top: 3px solid #0056b3;
    border-bottom: 2px solid #fff;
}

.tchmp-tab-panel {
    display: none;
}

.tchmp-tab-panel.active {
    display: block;
}

/* Links & Typography */
.tchmp-hub-link {
    color: #333;
    text-decoration: none;
    transition: all 0.2s ease;
}

.tchmp-hub-link:hover {
    text-decoration: underline;
    color: #0056b3;
}

.tchmp-season-link {
    color: #888;
    text-decoration: none;
    font-size: 0.95rem;
    line-height: 1.4;
    display: inline-block;
}

.tchmp-season-link:hover {
    color: #0056b3;
    text-decoration: underline;
}

/* Cards & Layout */
.tchmp-card-framed {
    border-top: 3px solid #0056b3;
    overflow: hidden;
    padding: 20px;
}

.tchmp-aligned-table td {
    vertical-align: middle !important;
}

.tchmp-medal-box {
    display: flex;
    align-items: center;
    gap: 5px;
}

/* Pills & Badges */
.tchmp-stat-pill {
    background: #f0f0f0;
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 0.8rem;
    font-weight: bold;
    color: #666;
    display: inline-block;
}

.tchmp-points-pill {
    background: linear-gradient(135deg, #1e3c72 0%, #2a5298 100%);
    color: #fff;
    border: 1px solid #162a4d;
    min-width: 24px;
    height: 24px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    padding: 0 10px;
    font-size: 0.75rem;
    font-weight: 900;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.3), 0 1px 2px rgba(0, 0, 0, 0.15);
    line-height: 1;
}

/* Caps Milestone Pills */
.tchmp-caps-pill {
    min-width: 24px;
    height: 24px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    padding: 0 6px;
    font-size: 0.75rem;
    font-weight: 900;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.3), 0 1px 2px rgba(0, 0, 0, 0.15);
    line-height: 1;
    border: 1px solid;
}

.caps-gold {
    background: linear-gradient(135deg, #B8860B 0%, #FEE140 50%, #D4AC0D 100%);
    border-color: #9A7B0C;
    color: #3e2e00;
}

.caps-silver {
    background: linear-gradient(135deg, #7F8C8D 0%, #FFFFFF 50%, #95A5A6 100%);
    border-color: #6C7A7B;
    color: #2c3e50;
}

.caps-bronze {
    background: linear-gradient(135deg, #804A00 0%, #E69138 50%, #A0522D 100%);
    border-color: #6E3A00;
    color: #2d1400;
}

/* Pagination Hub */
.tchmp-pagination-hub {
    margin-top: 15px;
    display: flex;
    justify-content: center;
    gap: 10px;
    align-items: center;
}

.tchmp-pagination-info {
    font-size: 0.75rem;
    color: #888;
}

/* --- Collective Honours Specific Column Tweaks --- */

/* Tighten the first column (Placing/Medal) */
.tchmp-aligned-table th:first-child,
.tchmp-aligned-table td:first-child {
    width: 1%;
    white-space: nowrap;
    padding-right: 15px !important;
}

/* Tighten the second column (Team Name) */
.tchmp-aligned-table th:nth-child(2),
.tchmp-aligned-table td:nth-child(2) {
    width: 25%;
    padding-right: 15px !important;
}

/* Let the third column (Season) take all remaining space */
.tchmp-aligned-table th:nth-child(3),
.tchmp-aligned-table td:nth-child(3) {
    width: auto;
}

/* ==========================================================================
   COMPETITION ARCHIVE STYLES (view-tchampionship.php)
   ========================================================================== */

/* 1. Golden Base Container Setup - Center Layout Alignment */
.tch-archive-container {
    display: block !important;
    width: 100% !important;
    max-width: 1232px !important;
    position: relative !important;
    margin-left: auto !important;
    margin-right: auto !important;
    margin-top: 40px !important;
    margin-bottom: 40px !important;
    padding: 0 15px !important;
    padding-bottom: 140px !important;
    box-sizing: border-box !important;
    left: 0 !important;
    right: 0 !important;
    transform: none !important;
    float: none !important;
    clear: both !important;
    font-family: Mulish, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif !important;
    color: rgb(43, 45, 66) !important;
}

/* 2. Filter Bar Styling */
.tch-filter-form {
    background: #ffffff !important;
    padding: 25px !important;
    border-radius: 8px !important;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05) !important;
    border: 1px solid #eef0f2 !important;
    display: grid !important;
    grid-template-columns: 2fr 1.5fr 1fr 120px !important;
    gap: 20px !important;
    margin-bottom: 40px !important;
    align-items: start !important;
    box-sizing: border-box !important;
}

.tch-filter-group {
    display: flex !important;
    flex-direction: column !important;
    gap: 8px !important;
}

.tch-filter-group label {
    font-weight: 700 !important;
    font-size: 12px !important;
    text-transform: uppercase !important;
    color: #7f8c8d !important;
    letter-spacing: 0.8px !important;
    margin: 0 !important;
}

.tch-filter-group input,
.tch-filter-group select {
    height: 46px !important;
    padding: 0 15px !important;
    border: 1px solid #dcdde1 !important;
    border-radius: 6px !important;
    font-size: 14px !important;
    font-family: inherit !important;
    color: rgb(43, 45, 66) !important;
    background-color: #ffffff !important;
    outline: none !important;
    box-sizing: border-box !important;
    width: 100% !important;
    transition: border-color 0.2s ease !important;
}

.tch-filter-group input:focus,
.tch-filter-group select:focus {
    border-color: #2271b1 !important;
}

.tch-submit-btn {
    height: 46px !important;
    background: #2271b1 !important;
    color: #fff !important;
    border: none !important;
    border-radius: 6px !important;
    cursor: pointer !important;
    font-weight: 700 !important;
    font-size: 14px !important;
    font-family: inherit !important;
    text-transform: uppercase !important;
    letter-spacing: 0.5px !important;
    transition: background 0.2s ease, transform 0.1s ease !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    box-sizing: border-box !important;
    width: 100% !important;
}

.tch-submit-btn:hover {
    background: #135e96 !important;
}

.tch-submit-btn:active {
    transform: scale(0.98) !important;
}

/* 3. Results Architecture & Competition Cards */
.tch-results-list {
    display: flex !important;
    flex-direction: column !important;
    gap: 16px !important;
    margin-bottom: 40px !important;
}

.tch-event-row {
    display: grid !important;
    grid-template-columns: 80px 1fr 200px !important;
    align-items: center !important;
    background: #ffffff !important;
    padding: 24px !important;
    border-radius: 8px !important;
    border: 1px solid #eef0f2 !important;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.02) !important;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1) !important;
    box-sizing: border-box !important;
}

.tch-event-row:hover {
    border-color: #2271b1 !important;
    transform: translateY(-2px) !important;
    box-shadow: 0 8px 24px rgba(34, 113, 177, 0.08) !important;
}

.tch-year-badge {
    background: #f0f6fb !important;
    color: #2271b1 !important;
    font-weight: 800 !important;
    font-size: 16px !important;
    width: 60px !important;
    height: 60px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    border-radius: 8px !important;
    border: 1px solid rgba(34, 113, 177, 0.12) !important;
}

.tch-event-main {
    padding-left: 10px !important;
    text-align: left !important;
}

.tch-event-main h4 {
    margin: 0 0 10px 0 !important;
    font-size: 20px !important;
    font-weight: 700 !important;
    color: rgb(43, 45, 66) !important;
    line-height: 1.3 !important;
    text-align: left !important;
}

.tch-meta-pill {
    background: #f1f2f6 !important;
    padding: 6px 14px !important;
    border-radius: 20px !important;
    font-size: 12px !important;
    font-weight: 600 !important;
    color: #57606f !important;
    margin-right: 10px !important;
    display: inline-flex !important;
    align-items: center !important;
    gap: 6px !important;
}

.tch-view-btn {
    background: #2271b1 !important;
    color: #ffffff !important;
    text-align: center !important;
    padding: 12px 24px !important;
    border-radius: 6px !important;
    text-decoration: none !important;
    font-weight: 700 !important;
    font-size: 14px !important;
    display: block !important;
    transition: background 0.2s ease !important;
    box-sizing: border-box !important;
    border: 1px solid transparent !important;
}

.tch-view-btn:hover {
    background: #135e96 !important;
    color: #ffffff !important;
}

/* 4. Server-Side Pagination Components */
div.tch-pagination {
    display: flex !important;
    justify-content: center !important;
    gap: 8px !important;
    margin-top: 20px !important;
    margin-bottom: 40px !important;
    padding-top: 40px !important;
    clear: both !important;
}

.tch-pagination .page-numbers {
    padding: 10px 16px !important;
    background: #ffffff !important;
    border: 1px solid #dcdde1 !important;
    border-radius: 6px !important;
    text-decoration: none !important;
    color: #2271b1 !important;
    font-weight: 700 !important;
    font-size: 14px !important;
    transition: all 0.2s ease !important;
}

.tch-pagination .page-numbers:hover {
    border-color: #2271b1 !important;
    background: #f0f6fb !important;
}

.tch-pagination .page-numbers.current {
    background: #2271b1 !important;
    color: #ffffff !important;
    border-color: #2271b1 !important;
    box-shadow: 0 4px 12px rgba(34, 113, 177, 0.25) !important;
}

.tch-no-results {
    text-align: center !important;
    padding: 40px !important;
    background: #ffffff !important;
    border-radius: 8px !important;
    border: 1px dashed #dcdde1 !important;
    color: #7f8c8d !important;
    font-size: 16px !important;
}

/* 5. Fluid Mobile Breakout Controls */
@media (max-width: 900px) {
    .tch-filter-form {
        grid-template-columns: 1fr !important;
        gap: 15px !important;
        padding: 20px !important;
    }

    .tch-event-row {
        grid-template-columns: 1fr !important;
        gap: 20px !important;
        text-align: center !important;
        padding: 20px !important;
    }

    .tch-year-badge {
        margin: 0 auto !important;
    }

    .tch-event-main {
        padding-left: 0 !important;
        text-align: center !important;
    }

    .tch-event-main h4 {
        text-align: center !important;
    }

    .tch-meta-pill {
        margin: 4px !important;
    }

    .tch-archive-container {
        padding-bottom: 80px !important;
    }
}

/* ==========================================================================
   PLAYER PROFILE CLEANUP (view-player.php)
   ========================================================================== */

/* 1. Eliminate the double-border duplication artifact */
.tchmp-stats-grid .tchmp-card-header {
    border-bottom: none !important;
    padding-bottom: 12px !important;
}

/* 2. Style the top container border for data columns */
.tchmp-stats-grid .tchmp-card-body,
.tchmp-stats-grid .tchmp-table thead th {
    border-top: 2px solid #eef0f2 !important;
}

/* 3. Sync table head alignment layout safely */
.tchmp-stats-grid .tchmp-table thead th {
    background-color: #fcfdfd !important;
    font-weight: 700 !important;
    text-transform: uppercase !important;
    font-size: 11px !important;
    letter-spacing: 0.5px !important;
    color: #7f8c8d !important;
    padding: 12px 15px !important;
}

/* 4. Smooth out Row Hover States inside Honours Table */
.tchmp-stats-grid .tchmp-table tbody tr {
    transition: background-color 0.2s ease !important;
}

.tchmp-stats-grid .tchmp-table tbody tr:hover {
    background-color: #f8fafc !important;
}

/* ==========================================================================
   FORCE-KILL THE DOUBLE BORDER ACCIDENTS
   ========================================================================== */

/* Target both possible class variations directly and completely wipe their borders */
div.tchmp-card-header,
.tchmp-card-header,
div.tchmp_card_header,
.tchmp_card_header {
    border: none !important;
    border-bottom: 0px solid transparent !important;
    background: transparent !important;
    padding-bottom: 15px !important;
    margin-bottom: 0 !important;
}

/* Ensure the light border belongs strictly to the data column container below it */
.tchmp-stats-grid .tchmp-card-body,
.tchmp-stats-grid .tchmp-table thead th {
    border-top: 2px solid #eef0f2 !important;
}

/* Remove any top borders from the table element itself that might stack */
.tchmp-stats-grid table.tchmp-table {
    border-top: none !important;
}

/* Safely hide all auto-injected <br> tags across the entire Tchampionship plugin */
.tchmp-public-container br,
.tchmp-archive-container br {
    display: none !important;
}

/* TUK-inspired fixes as the template was playing up! */

/* 1. Force Pos / Placing column to center across all tables */
.tchmp-standings-table th:first-child,
.tchmp-standings-table td:first-child,
.tchmp-final-table th:first-child,
.tchmp-final-table td:first-child {
    text-align: center !important;
}

/* 2. Force Team cell text-alignment to left across all table structures */
.tchmp-standings-table td.tchmp-team-cell,
.tchmp-final-table td .tchmp-team-cell,
.tchmp-final-table td:last-child {
    text-align: left !important;
}

/* 3. Normalize team crest & link flex layout (works on <a> or <div> wrappers) */
.tchmp-standings-table .tchmp-team-cell a.tchmp-hub-link,
.tchmp-final-table .tchmp-team-cell {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: flex-start !important;
    gap: 8px !important;
}

/* Override Kubio anchor styles for Tchampionship navigation tabs */
.tchmp-tabs-nav a.tchmp-tab-link.active,
.tchmp-tabs-nav a.tchmp-tab-link.active:hover,
.tchmp-tabs-nav a.tchmp-tab-link.active:focus {
    color: #ffffff !important;
}

/* Set inactive tab link text color and hover state */
.tchmp-tabs-nav a.tchmp-tab-link:not(.active) {
    color: #333333 !important;
}

.tchmp-tabs-nav a.tchmp-tab-link:not(.active):hover {
    color: #000000 !important;
    background-color: #f0f0f0 !important;
}

/* Match Referees Styles */
.tchmp-referees-container {
    margin-top: 30px;
}

.tchmp-referees-list {
    list-style: none;
    margin: 0;
    padding: 15px 20px;
    display: flex;
    flex-wrap: wrap;
    gap: 20px 40px;
    justify-content: center;
    align-items: center;
}

.tchmp-referee-item {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-size: 0.95rem;
}

.tchmp-referee-role {
    font-weight: 600;
    color: #555;
}

.tchmp-referee-details {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.tchmp-flag-icon {
    width: 20px;
    height: auto;
    border-radius: 2px;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.15);
}

/* Ensure medals keep natural aspect ratio */
.tchmp-public-table td img {
    max-height: 24px !important;
    max-width: 24px !important;
    width: auto !important;
    height: auto !important;
    object-fit: contain !important;
}

/* Force container left-alignment across TUK theme structures */
.tchmp-public-container {
    margin-left: 0 !important;
    text-align: left !important;
}