/* Leaderboard table */
.leaderboard-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 1rem;
}

.leaderboard-table th,
.leaderboard-table td {
    padding: 1rem 1rem;
    text-align: left;
    vertical-align: middle;
    height: 1rem;
}

.leaderboard-table th {
    background-color: var(--bgtint);
    font-weight: 600;
    top: 0;
    cursor: pointer;
    user-select: none;
    transition: background-color 0.2s;
    z-index: 10;
}

/* Sorting indicators */
.leaderboard-table th.sortable::after {
    content: '';
    display: inline-block;
    width: 1.5rem;
    height: 1.5rem;
    margin-left: 0.5rem;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 16 16' fill='none'%3E%3Cpath d='M8 2L11 6H5L8 2Z' fill='%23666' stroke='%23666' stroke-width='0.5'/%3E%3Cpath d='M8 14L5 10H11L8 14Z' fill='%23666' stroke='%23666' stroke-width='0.5'/%3E%3C/svg%3E");
    background-size: contain;
    background-repeat: no-repeat;
    opacity: 0.6;
    vertical-align: text-top;
}

.leaderboard-table th.sortable.sort-asc::after {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 16 16' fill='none'%3E%3Cpath d='M8 4L11 10H5L8 4Z' fill='%23333' stroke='%23333' stroke-width='0.5'/%3E%3C/svg%3E");
    opacity: 1;
}

.leaderboard-table th.sortable.sort-desc::after {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 16 16' fill='none'%3E%3Cpath d='M8 12L5 6H11L8 12Z' fill='%23333' stroke='%23333' stroke-width='0.5'/%3E%3C/svg%3E");
    opacity: 1;
}

/* Mini heatmap */
.mini-heatmap {
    display: grid;
    grid-template-columns: repeat(6, 0.65rem);
    grid-template-rows: repeat(5, 0.65rem);
    margin: auto;
    width: fit-content;
}

.mini-heatmap-cell {
    border-radius: 0;
    position: relative;
}

.mini-heatmap-cell[data-tooltip]:hover::after {
    content: attr(data-tooltip);
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0, 0, 0, 0.9);
    color: white;
    padding: 0.2rem 0.3rem;
    border-radius: 0.3rem;
    font-size: 0.8rem;
    font-weight: 600;
    white-space: nowrap;
    z-index: 1000;
    pointer-events: none;
}

.mini-heatmap-cell[data-tooltip]:hover::before {
    content: '';
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%) translateY(100%);
    border: 0.4rem solid transparent;
    border-top-color: rgba(0, 0, 0, 0.9);
    z-index: 1000;
}

/* Model cell styling */
.model-cell {
    align-items: center;
    box-sizing: border-box;
}

.company-icon {
    width: 1.5rem;
    height: 1.5rem;
    margin-right: 0.5rem;
    vertical-align: text-top;
}

.icon-placeholder {
    width: 1.5rem;
    height: 1.5rem;
    margin-right: 0.5rem;
    vertical-align: text-top;
}
