/* Benchmark Directory Styles */

/* Category badges */
.bench_cat_badge {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 5px;
    font-size: 12px;
    font-weight: 600;
    white-space: nowrap;
    border: 1px solid;
}

.bench_cat_coding { background: #eef3ff; color: #4a6fa5; border-color: #d6e2f5; }
.bench_cat_web { background: #eef7f0; color: #4a8c5c; border-color: #d4ebd9; }
.bench_cat_tool-use { background: #fef6e8; color: #9a7030; border-color: #f0e0c0; }
.bench_cat_computer-use { background: #f4eefa; color: #7a52a0; border-color: #e0d0f0; }
.bench_cat_reasoning { background: #fff3e0; color: #e65100; border-color: #ffe0b2; }
.bench_cat_data-science { background: #e8f5e9; color: #2e7d32; border-color: #c8e6c9; }
.bench_cat_safety { background: #fce4ec; color: #c62828; border-color: #f8bbd0; }
.bench_cat_domain-specific { background: #e3f2fd; color: #1565c0; border-color: #bbdefb; }
.bench_cat_multimodal { background: #f3e5f5; color: #7b1fa2; border-color: #e1bee7; }
.bench_cat_general { background: #f0f1f3; color: #5a5e64; border-color: #dcdfe3; }
.bench_cat_multi-agent { background: #fef0ef; color: #b85450; border-color: #f5d6d4; }

/* Filter pills — match agent page style */
.bench-filter-pills {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.bench-filter-pill {
    display: inline-block;
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 13px;
    text-decoration: none;
    border: 1px solid #ddd;
    color: #555;
    cursor: pointer;
    transition: all 0.2s;
    user-select: none;
}

.bench-filter-pill:hover, .bench-filter-pill.active {
    background: #1a73e8;
    color: #fff;
    border-color: #1a73e8;
    text-decoration: none;
}

.bench-filter-pill i {
    margin-right: 4px;
}

/* Table — fit to viewport, description wraps */
#benchTable_wrapper {
    overflow-x: hidden;
}

#benchTable {
    width: 100% !important;
    table-layout: fixed;
}

#benchTable th,
#benchTable td {
    vertical-align: middle;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Column widths: expand(20) + name(18%) + category(9%) + tasks(5%) + trophy(3%) + description(auto) + year(5%) */
#benchTable th:nth-child(1),
#benchTable td:nth-child(1) { width: 20px; }
#benchTable th:nth-child(2),
#benchTable td:nth-child(2) { width: 18%; white-space: normal; }
#benchTable th:nth-child(3),
#benchTable td:nth-child(3) { width: 9%; }
#benchTable th:nth-child(4),
#benchTable td:nth-child(4) { width: 5%; }
#benchTable th:nth-child(5),
#benchTable td:nth-child(5) { width: 3%; }
#benchTable th:nth-child(6),
#benchTable td:nth-child(6) { white-space: normal; word-wrap: break-word; }
#benchTable th:nth-child(7),
#benchTable td:nth-child(7) { width: 5%; }

#benchTable_wrapper .dataTables_filter {
    margin-bottom: 10px;
}

/* Expand chevron */
.bench-expand-btn {
    cursor: pointer;
    color: #1a73e8;
    font-size: 14px;
    transition: transform 0.2s;
    display: inline-block;
}

.bench-expand-btn.expanded {
    transform: rotate(90deg);
}

/* Expanded detail panel */
.bench-detail {
    padding: 16px 24px;
    background: #f8f9fa;
    border-radius: 6px;
    margin: 4px 0;
}

.bench-detail-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

@media (max-width: 900px) {
    .bench-detail-grid {
        grid-template-columns: 1fr;
    }
}

.bench-detail-section {
    margin-bottom: 12px;
}

.bench-detail-section h4 {
    font-size: 13px;
    font-weight: 700;
    color: #555;
    margin-bottom: 4px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.bench-detail-section p {
    font-size: 14px;
    line-height: 1.5;
    color: #333;
    margin-bottom: 0;
}

.bench-detail-links {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-top: 14px;
    padding-top: 12px;
    border-top: 1px solid #e8e8e8;
}

.bench-detail-links a {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 5px 14px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 13px;
    text-decoration: none;
    color: #555;
    transition: all 0.15s;
}

.bench-detail-links a:hover {
    background: #1a73e8;
    color: #fff;
    border-color: #1a73e8;
    text-decoration: none;
}

.bench-use-cases {
    list-style: none;
    padding: 0;
    margin: 0;
}

.bench-use-cases li {
    padding: 2px 0;
    font-size: 14px;
    color: #333;
}

.bench-use-cases li::before {
    content: "\2192  ";
    color: #1a73e8;
    font-weight: bold;
}

/* Leaderboard indicator */
.bench-lb-yes { color: #f0ad4e; }
.bench-lb-yes:hover { color: #d4942a; }
.bench-lb-no { color: #ddd; }

/* Stats row */
.bench-stats {
    display: flex;
    gap: 24px;
    flex-wrap: wrap;
    padding: 10px 16px;
    background: #f8f9fa;
    border-radius: 8px;
}

.bench-stat {
    text-align: center;
}

.bench-stat-num {
    font-size: 20px;
    font-weight: 700;
    color: #1a73e8;
}

.bench-stat-label {
    font-size: 11px;
    color: #888;
}

/* Name column */
.bench-name {
    font-weight: 600;
    color: #1a73e8;
    cursor: pointer;
}

.bench-name:hover {
    text-decoration: underline;
}

.bench-org {
    font-size: 12px;
    color: #999;
    display: block;
    margin-top: 1px;
}

.bench-desc-short {
    color: #666;
    display: block;
    white-space: normal;
    line-height: 1.4;
}

/* Dark theme */
.dark_theme .bench-detail {
    background: #252525;
}

.dark_theme .bench-detail-section p,
.dark_theme .bench-use-cases li {
    color: #ccc;
}

.dark_theme .bench-detail-section h4 {
    color: #aaa;
}

.dark_theme .bench-detail-links {
    border-top-color: #444;
}

.dark_theme .bench-detail-links a {
    border-color: #444;
    color: #aaa;
}

.dark_theme .bench-detail-links a:hover {
    background: #1a73e8;
    color: #fff;
}

.dark_theme .bench-filter-pill {
    border-color: #444;
    color: #aaa;
}

.dark_theme .bench-filter-pill:hover,
.dark_theme .bench-filter-pill.active {
    background: #1a73e8;
    color: #fff;
    border-color: #1a73e8;
}

.dark_theme .bench-stats {
    background: #1e1e1e;
}

.dark_theme .bench-lb-no {
    color: #444;
}

.dark_theme .bench_cat_coding { background: #1a2233; color: #7aa3d4; border-color: #2a3a55; }
.dark_theme .bench_cat_web { background: #1a2b1e; color: #6db87a; border-color: #2a4030; }
.dark_theme .bench_cat_tool-use { background: #2b2518; color: #c9a050; border-color: #403520; }
.dark_theme .bench_cat_computer-use { background: #251a30; color: #a070c0; border-color: #352840; }
.dark_theme .bench_cat_reasoning { background: #2b1e10; color: #e08040; border-color: #403018; }
.dark_theme .bench_cat_data-science { background: #1a2b1e; color: #5cb860; border-color: #2a4030; }
.dark_theme .bench_cat_safety { background: #2b1a1e; color: #e05050; border-color: #402828; }
.dark_theme .bench_cat_domain-specific { background: #1a2233; color: #5090d0; border-color: #2a3a55; }
.dark_theme .bench_cat_multimodal { background: #251a30; color: #b070d0; border-color: #352840; }
.dark_theme .bench_cat_general { background: #222; color: #999; border-color: #333; }
.dark_theme .bench_cat_multi-agent { background: #2b1a1e; color: #d07070; border-color: #402828; }
