/**
 * Github Runners and Analytics pages styles
 */

/* Base styles inherited from styles.css */
@import url('/css/styles.css');

/* Chart container */
.chart-container {
    position: relative;
    height: 300px;
    width: 100%;
}

.auto-refresh-toggle {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.9em;
    cursor: pointer;
    user-select: none;
}

/* Runner name cell styling */
.runner-name-cell {
    vertical-align: middle !important;
    font-weight: 600;
    border-right: 2px solid var(--text-color) !important;
}

/* Column width adjustments for runners table */
/* 1=Runner Name, 2=Repository, 3=Status, 4=Busy, 5=OS, 6=Labels */
#runners-table thead th:nth-child(1),
#runners-table tbody td:nth-child(1) {
    width: 22%;
}

#runners-table thead th:nth-child(2),
#runners-table tbody td:nth-child(2) {
    width: 25%;
}

#runners-table thead th:nth-child(6),
#runners-table tbody td:nth-child(6) {
    width: 27%;
}

#runners-table thead th:nth-child(3),
#runners-table tbody td:nth-child(3),
#runners-table thead th:nth-child(4),
#runners-table tbody td:nth-child(4),
#runners-table thead th:nth-child(5),
#runners-table tbody td:nth-child(5) {
    width: 10%;
    white-space: nowrap;
}

/* GitHub link button */
.github-link {
    display: inline-block;
    padding: 6px 12px;
    background-color: var(--text-color);
    color: var(--bg-color);
    text-decoration: none;
    border-radius: var(--border-radius-sm);
    font-size: 0.9em;
    font-weight: 500;
    transition: opacity var(--transition-fast), transform var(--transition-fast);
}

.github-link:hover {
    opacity: 0.8;
    transform: translateY(-1px);
}

.github-link:active {
    transform: translateY(0);
}

/* Busy badges */
.busy-yes {
    background-color: var(--error-color);
    color: white;
}

.busy-no {
    background-color: var(--success-color);
    color: white;
}

/* Labels display */
.labels-container {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
}

.label-badge {
    display: inline-block;
    padding: 3px 8px;
    background-color: rgba(var(--text-color-rgba, 0, 0, 0), 0.1);
    border: 1px solid var(--text-color);
    border-radius: var(--border-radius-sm);
    font-size: 0.8em;
    font-family: monospace;
}

/* Repository display */
.repo-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.repo-list li {
    padding: 2px 0;
    font-family: monospace;
    font-size: 0.9em;
}

/* Info Panel */
.info-panel {
    padding: 20px;
    margin-top: 20px;
    border: 2px solid var(--text-color);
    border-radius: var(--border-radius-lg);
    background-color: var(--bg-color);
}

.info-panel h3 {
    margin-top: 0;
    font-weight: 500;
    letter-spacing: 1px;
    border-bottom: 1px dashed var(--text-color);
    padding-bottom: 10px;
}

#runner-details {
    font-family: monospace;
    font-size: 0.9em;
}

#runner-details dl {
    display: grid;
    grid-template-columns: 200px 1fr;
    gap: 10px;
    margin: 0;
}

#runner-details dt {
    font-weight: bold;
    color: var(--text-color);
}

#runner-details dd {
    margin: 0;
    color: var(--text-color);
}

#runner-details dd .link {
    color: var(--text-color);
    text-decoration: none;
    margin: 15px 0;
    letter-spacing: 1px;
    text-transform: none;
}

/* Fix pagination text contrast for specific tables */
#runners-table_wrapper .dataTables_info,
#runners-table_wrapper .dataTables_paginate .paginate_button,
#runners-table_wrapper .dataTables_paginate a.paginate_button,
#jobs-table_wrapper .dataTables_info,
#jobs-table_wrapper .dataTables_paginate .paginate_button,
#jobs-table_wrapper .dataTables_paginate a.paginate_button {
    color: var(--text-color) !important;
}

#runners-table_wrapper .dataTables_paginate .paginate_button.current,
#runners-table_wrapper .dataTables_paginate a.paginate_button.current,
#runners-table_wrapper .dataTables_paginate a.paginate_button:hover:not(.disabled):not(.current),
#jobs-table_wrapper .dataTables_paginate .paginate_button.current,
#jobs-table_wrapper .dataTables_paginate a.paginate_button.current,
#jobs-table_wrapper .dataTables_paginate a.paginate_button:hover:not(.disabled):not(.current) {
    color: var(--bg-color) !important;
}

#runners-table_wrapper .dataTables_info,
#jobs-table_wrapper .dataTables_info {
    color: var(--text-color) !important;
}

/* Capacity header layout for runner filters and buttons */
.capacity-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
    margin-bottom: 20px;
}

.capacity-header-content {
    flex: 1;
    display: flex;
    align-items: center;
}

.runner-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    align-items: center;
}