/* Compact Games Table Styles */
#gamesTable {
    font-size: 0.85em;
}

#gamesTable th,
#gamesTable td {
    padding: 0.4rem 0.5rem;
    vertical-align: middle;
}

#gamesTable .badge-sm {
    font-size: 0.65em;
    padding: 0.2em 0.4em;
}

#gamesTable .btn-group-sm > .btn,
#gamesTable .btn-sm {
    padding: 0.2rem 0.4rem;
    font-size: 0.75rem;
}

#gamesTable tbody tr:hover {
    background-color: rgba(0, 123, 255, 0.1);
}

#gamesTable .table-light {
    background-color: rgba(248, 249, 250, 0.8);
}

/* Enhanced readability */
#gamesTable .text-center {
    text-align: center;
}

#gamesTable .text-nowrap {
    white-space: nowrap;
}

/* Quick Game Results Display */
.quick-game-results {
    max-width: 200px;
}

.quick-game-results div {
    margin-bottom: 2px;
    line-height: 1.2;
}

.quick-game-results .badge {
    font-size: 0.7em;
    padding: 1px 4px;
    color:blue;
}

/* Opponents and Partners Display */
#gamesTable .opponents-partners {
    max-width: 250px;
    font-size: 0.8em;
    line-height: 1.3;
    word-wrap: break-word;
}

#gamesTable .opponents-partners .opponents {
    color: #dc3545;
    font-weight: 500;
}

#gamesTable .opponents-partners .partners {
    color: #28a745;
    font-weight: 500;
}

/* Quick Games Table Styling - Medium */
#quickGamesTable {
    font-size: 0.95em;
}

#quickGamesTable th,
#quickGamesTable td {
    padding: 0.45rem 0.55rem;
    vertical-align: middle;
    line-height: 1.35;
}

#quickGamesTable .quick-game-results {
    text-align: left;
    font-size: 0.85em;
    max-width: 210px;
}

#quickGamesTable .quick-game-results div {
    margin-bottom: 1px;
    line-height: 1.1;
}

#quickGamesTable .quick-game-results .badge {
    font-size: 0.6em;
    padding: 1px 3px;
}

/* Medium button styling for quick games */
#quickGamesTable .btn-sm {
    padding: 0.2rem 0.4rem;
    font-size: 0.75rem;
    margin: 0 1px;
}

/* Truncate long text in cells */
#quickGamesTable td[title] {
    max-width: 120px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* Make table headers medium */
#quickGamesTable th {
    font-size: 0.9em;
    font-weight: 600;
    padding: 0.4rem 0.45rem;
    border-bottom: 1px solid #dee2e6;
}

/* Reduce table margins */
#quickGamesTable {
    margin-bottom: 0.5rem;
}

/* Make the entire table container medium-sized */
#quick-games-section .table-responsive {
    font-size: 1em;
}

/* Compact checkbox styling */
#quickGamesTable .form-check-input {
    width: 0.9em;
    height: 0.9em;
    margin-top: 0.1em;
}

/* Quick Games Selection Styles */
#quickGamesTable .quick-game-select {
    cursor: pointer;
    transform: scale(1.1);
}

#quickGamesTable .quick-game-select:hover {
    transform: scale(1.2);
}

#selectAllQuickGamesCheck {
    cursor: pointer;
    transform: scale(1.1);
}

#selectAllQuickGamesCheck:hover {
    transform: scale(1.2);
}

/* Selection controls styling */
.btn-group .btn-sm {
    font-size: 0.75rem;
    padding: 0.25rem 0.5rem;
}

/* Make selection controls more compact */
#quick-games-section .row.mb-3 {
    margin-bottom: 1rem !important;
}

#quick-games-section .btn-group {
    gap: 2px;
}

/* Hover effects for selected rows */
#quickGamesTable tr:has(.quick-game-select:checked) {
    background-color: rgba(0, 123, 255, 0.1) !important;
    border-left: 3px solid #007bff;
}

/* Disabled button styling */
.btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Quick game table row hover */
#quickGamesTable tbody tr:hover {
    background-color: rgba(248, 249, 250, 0.8);
}