/* 1. Hlavní kontejner pro responzivitu */
.table-responsive {
    background-color: transparent !important;
    margin-top: 10px;
    margin-bottom: 20px;
    display: block !important;
    width: 100% !important;
    overflow-x: auto !important;
    -webkit-overflow-scrolling: touch;
}

/* Vynucení sjednocené velikosti písma v obou tabulkách a zrušení bílého rámečku kolem tabulek */
.table-responsive, .sparta-table, .player-matches-table, .player-summary-table {
    border: none !important;
}
.player-matches-table th, .player-summary-table th,
.player-matches-table td, .player-summary-table td {
    font-size: 0.85rem !important;
}

/* Vynucení čistého vzhledu hlavičky jako v Rekordech (přebití starého červeného pozadí z style.css) */
.player-matches-table th, .player-summary-table th {
    background: transparent !important;
    border-bottom: 2px solid var(--color-primary) !important;
}

/* 2. Fix pro červený řádek CELKEM v bilanci */
.total-row {
    background-color: #AC1F2D !important;
}
.total-row td {
    font-weight: bold !important;
    color: #ffffff !important;
    border-top: none !important;
    border-bottom: none !important;
}

/* 6. Styl pro NAŠEPTÁVAČ */
.search-suggestions {
    background: #252545 !important;
    border: 1px solid rgba(255,255,255,0.1) !important;
    border-radius: var(--radius-md);
    overflow: hidden;
    margin-top: 5px;
    position: absolute;
    width: 100%;
    z-index: 9999;
}
.suggestion-item {
    padding: 12px 15px;
    cursor: pointer;
    color: #ffffff !important;
    background: #252545 !important;
    border-bottom: 1px solid rgba(255,255,255,0.05);
}
.suggestion-item:hover, .suggestion-item.selected {
    background-color: var(--color-primary-dark) !important;
}

/* Odstranění linky u posledních řádků */
.player-matches-table tr:last-child td,
#player-summary-body tr:last-child td {
    border-bottom: none !important;
}

/* TOTÁLNÍ PŘEBITÍ STYLU TLAČÍTKA */
#load-more-container #load-more-btn,
body #load-more-container button#load-more-btn {
    display: inline-block !important;
    padding: 15px 35px !important;
    background-color: var(--color-primary-dark) !important;
    background: var(--color-primary-dark) !important;
    color: #ffffff !important;
    border: 2px solid var(--color-primary-dark) !important;
    border-radius: var(--radius-md) !important;
    font-family: var(--font-body) !important;
    font-weight: 700 !important;
    text-transform: uppercase !important;
    font-size: 14px !important;
    letter-spacing: 1px !important;
    cursor: pointer !important;
    transition: all 0.3s ease-in-out !important;
    box-shadow: none !important;
    text-decoration: none !important;
    line-height: 1 !important;
}

#load-more-container #load-more-btn:hover,
body #load-more-container button#load-more-btn:hover {
    background-color: #ffffff !important;
    background: #ffffff !important;
    color: var(--color-primary-dark) !important;
    border-color: var(--color-primary-dark) !important;
}

/* --- UNIKÁTNÍ STYLY PRO TABULKU HRÁČE --- */
/* Používáme specifické názvy player-X, aby se neovlivnil zbytek webu */

.player-matches-table .cell-score {
    text-align: center !important;
    padding: 6px 10px !important; /* Stejný padding jako zbytek sparta-table */
    font-weight: 800 !important;
    display: table-cell !important; /* OPRAVA ROZBITÝCH LINEK: Přepisuje inline-block z globálního stylu */
    vertical-align: middle !important;
}

.player-matches-table .score-badge {
    display: inline-block !important;
    padding: 0 !important;
    background: transparent !important;
    border-radius: 0 !important;
    min-width: 45px;
    text-align: center;
}

/* Výhra - zelený text */
.player-matches-table .player-win {
    color: #28a745 !important;
    background: transparent !important;
}

/* Remíza - žlutý text */
.player-matches-table .player-draw {
    color: #ffc107 !important;
    background: transparent !important;
}

/* Prohra - červený text */
.player-matches-table .player-loss {
    color: #dc3545 !important;
    background: transparent !important;
}

/* Styl pro karty hráčů v tabulce */
.card-yellow { background-color: #ffc107; display: inline-block; width: 10px; height: 14px; margin-right: 3px; border-radius: 2px; vertical-align: middle; }
.card-red { background-color: #dc3545; display: inline-block; width: 10px; height: 14px; margin-right: 3px; border-radius: 2px; vertical-align: middle; }

/* 7. NAŠEPTÁVAČ INPUT */
#player-search-input {
    width: 100% !important;
    box-sizing: border-box !important;
    padding: 15px 20px !important;
    font-size: 1.1rem !important;
    font-family: var(--font-body) !important;
    border-radius: var(--radius-md) !important;
    border: 1px solid rgba(255,255,255,0.2) !important;
    background: var(--color-bg-dark) !important;
    color: white !important;
    outline: none !important;
}

#player-search-input:focus {
    border-color: var(--color-primary) !important;
    box-shadow: 0 0 10px rgba(172, 31, 45, 0.3) !important;
}

/* --- CENTROVÁNÍ SLOUPCŮ --- */
/* První tabulka (Zápasy): Skóre, Min, G, Karty (od 4. sloupce dále) */
.player-matches-table th:nth-child(n+4),
.player-matches-table td:nth-child(n+4) {
    text-align: center !important;
}

/* Druhá tabulka (Bilance): Všechny sloupce kromě prvního */
.player-summary-table th:not(:first-child),
.player-summary-table td:not(:first-child),
#player-summary-body td:not(:first-child) {
    text-align: center !important;
}
