/* The runs UI (bg-projects build 15): edge tab, drawer, home page, row pills. */

.edge-show-tab-runs {
    right: 0;
    top: calc(50% + 84px);
    width: 22px;
    height: 72px;
    border-right: none;
    border-radius: 10px 0 0 10px;
    flex-direction: column;
    gap: 4px;
}
.edge-show-tab-runs:hover { width: 26px; }
.runs-tab-label {
    writing-mode: vertical-rl;
    transform: rotate(180deg);
    font-size: 9px;
    letter-spacing: 0.12em;
    font-weight: 600;
}
.runs-tab-badge {
    min-width: 14px;
    height: 14px;
    padding: 0 3px;
    border-radius: 7px;
    background: var(--sl-amber, #f59e0b);
    color: #111;
    font-size: 9px;
    font-weight: 700;
    line-height: 14px;
    text-align: center;
}
.runs-tab-badge.hidden { display: none; }

.runs-panel {
    position: fixed;
    right: 0;
    top: 56px;
    bottom: 0;
    width: 340px;
    z-index: 9001;
    display: flex;
    flex-direction: column;
    background: rgba(24, 24, 27, 0.92);
    border-left: 1px solid rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    box-shadow: -8px 0 24px rgba(0, 0, 0, 0.35);
    color: var(--text-primary, #e4e4e7);
    font-size: 12px;
}
.runs-panel.hidden { display: none; }
.runs-panel-head {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 12px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}
.runs-panel-title { font-weight: 600; font-size: 13px; flex: 1; }
.runs-link, .runs-close, .runs-btn {
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--text-secondary, #a1a1aa);
    border-radius: 6px;
    padding: 2px 8px;
    font-size: 11px;
    cursor: pointer;
}
.runs-link:hover, .runs-close:hover, .runs-btn:hover { color: #fff; background: rgba(255, 255, 255, 0.12); }
.runs-close { padding: 0 7px; font-size: 14px; line-height: 18px; }
.runs-panel-body { overflow: auto; padding: 8px 12px 16px; }

.runs-section { margin-bottom: 12px; }
.runs-section-title {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 10px;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--text-secondary, #a1a1aa);
    margin: 6px 0;
}
.runs-count { color: var(--text-primary, #e4e4e7); }
.runs-row {
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 8px;
    padding: 6px 8px;
    margin-bottom: 6px;
    background: rgba(255, 255, 255, 0.03);
}
.runs-row-main { display: flex; align-items: center; gap: 6px; min-width: 0; }
.runs-row-name { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; flex: 1; }
.runs-row-meta, .runs-row-sub { color: var(--text-secondary, #a1a1aa); font-size: 11px; }
.runs-row-sub { margin-top: 3px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.runs-row-actions { display: flex; gap: 4px; margin-top: 6px; }
.runs-empty { color: var(--text-secondary, #a1a1aa); font-size: 11px; padding: 8px 2px; }

.runs-pill, .home-runs-pill {
    display: inline-block;
    padding: 1px 7px;
    border-radius: 999px;
    font-size: 10px;
    font-weight: 600;
    letter-spacing: 0.02em;
    line-height: 16px;
    white-space: nowrap;
}
.runs-pill-queued, .home-runs-pill-queued { background: rgba(161, 161, 170, 0.18); color: #d4d4d8; }
.runs-pill-running, .home-runs-pill-running {
    background: rgba(245, 158, 11, 0.18);
    color: #fbbf24;
    animation: runs-pulse 1.6s ease-in-out infinite;
}
.runs-pill-awaiting, .home-runs-pill-awaiting { background: rgba(59, 130, 246, 0.2); color: #93c5fd; }
.runs-pill-finished { background: rgba(34, 197, 94, 0.16); color: #86efac; }
.runs-pill-failed { background: rgba(239, 68, 68, 0.18); color: #fca5a5; }
.runs-pill-canceled { background: rgba(161, 161, 170, 0.14); color: #a1a1aa; }
@keyframes runs-pulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.55; } }

.home-runs-pill { margin-left: 8px; vertical-align: middle; }

.runs-page .home-tab-header { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.runs-page-controls { display: flex; align-items: center; gap: 10px; }
.runs-cap-label { font-size: 12px; color: var(--text-secondary, #a1a1aa); }
.runs-cap { margin-left: 6px; background: rgba(255, 255, 255, 0.06); color: inherit; border: 1px solid rgba(255, 255, 255, 0.1); border-radius: 6px; padding: 2px 6px; }
.runs-page-body { max-width: 760px; }
