/* Custom styles for LMB Analytics */

/* Table sorting */
.table-sortable th {
    cursor: pointer;
    user-select: none;
    position: relative;
    padding-right: 20px;
}

.table-sortable th:hover {
    background-color: rgba(0,0,0,.05);
}

.table-sortable th::after {
    content: '↕';
    position: absolute;
    right: 5px;
    opacity: 0.3;
}

.table-sortable th.sorted-asc::after {
    content: '↑';
    opacity: 1;
}

.table-sortable th.sorted-desc::after {
    content: '↓';
    opacity: 1;
}

/* Player search dropdown */
#player-search {
    border-bottom: 1px solid transparent;
}

#player-dropdown {
    max-height: 200px;
    overflow-y: auto;
    border: 1px solid #dee2e6;
    border-top: none;
    border-radius: 0 0 0.375rem 0.375rem;
}

#player-dropdown a {
    padding: 0.25rem 1rem;
    display: block;
    color: #0d6efd;
    text-decoration: none;
}

#player-dropdown a:hover {
    background-color: #e9ecef;
}

#player-dropdown a.selected {
    background-color: #e9ecef;
    font-weight: bold;
}

#selected-players {
    display: flex;
    flex-wrap: wrap;
    gap: 0.25rem;
}

.selected-player-tag {
    background-color: #e9ecef;
    border: 1px solid #ced4da;
    border-radius: 0.25rem;
    padding: 0.25rem 0.5rem;
    font-size: 0.875em;
    display: flex;
    align-items: center;
}

.selected-player-tag button {
    background: none;
    border: none;
    margin-left: 0.5rem;
    color: #6c757d;
    padding: 0;
    font-size: 1em;
    cursor: pointer;
}

.selected-player-tag button:hover {
    color: #dc3545;
}

/* Badge and chip styles */
.badge {
    font-size: 0.9em;
    padding: 0.375rem 0.75rem;
}

.card-header h5 {
    font-size: 1.1rem;
    font-weight: 600;
    margin: 0;
}

/* Data table styling */
.table-hover tbody tr:hover {
    background-color: rgba(0, 0, 0, 0.025);
}

.table-sm th,
.table-sm td {
    padding: 0.5rem 0.75rem;
    font-size: 0.875rem;
}

.table th[data-sort="float"] {
    text-align: right;
}

.table td[data-sort="float"] {
    text-align: right;
}

/* Navigation breadcrumb */
.breadcrumb {
    font-size: 0.9rem;
}

.breadcrumb-item a {
    color: #6c757d;
    text-decoration: none;
}

.breadcrumb-item a:hover {
    color: #0d6efd;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .table-responsive {
        font-size: 0.75rem;
    }

    .table th,
    .table td {
        padding: 0.25rem;
        white-space: nowrap;
    }
}

/* Loading state */
.loading {
    opacity: 0.5;
    pointer-events: none;
}