/* ========================================
   Build Info Panel Styles
   ======================================== */

.build-info-panel {
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.1), rgba(139, 92, 246, 0.1));
    border: 1px solid rgba(139, 92, 246, 0.3);
    border-radius: 15px;
    padding: 20px;
    margin-bottom: 25px;
    backdrop-filter: blur(10px);
}

.build-info-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 1px solid rgba(139, 92, 246, 0.2);
}

.build-info-header h3 {
    margin: 0;
    color: var(--text-primary);
    font-size: 1.1rem;
    font-weight: 600;
}

.build-info-badges {
    display: flex;
    align-items: center;
    gap: 10px;
}

.build-info-version {
    font-size: 0.9rem;
    font-weight: 600;
    color: #4b5563;
    font-family: 'Consolas', 'Monaco', monospace;
}

.release-type-badge {
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.release-type-badge.nightly {
    background: linear-gradient(135deg, #6366f1 0%, #818cf8 100%);
    color: white;
}

.release-type-badge.dev {
    background: linear-gradient(135deg, #f59e0b 0%, #f97316 100%);
    color: white;
}

.release-type-badge.prerelease {
    background: linear-gradient(135deg, #10b981 0%, #14b8a6 100%);
    color: white;
}

/* Revert badge on bump-PR rows (GitHub label `bump-pr-revert`). Amber pill so
   a revert stands out from the normal OPEN/DRAFT/merged state chips. */
.bump-revert-badge {
    display: inline-block;
    padding: 1px 7px;
    margin-right: 4px;
    border-radius: 10px;
    font-size: 0.68rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.4px;
    vertical-align: middle;
    background: rgba(245, 158, 11, 0.18);
    color: #f59e0b;
    border: 1px solid rgba(245, 158, 11, 0.45);
}

/* Workflow Runs Grid */
.workflow-runs-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 12px;
    margin-bottom: 15px;
}

.workflow-run-card {
    background: var(--bg-elevated);
    border: 1px solid var(--card-border);
    border-radius: 10px;
    padding: 12px;
    transition: all 0.2s ease;
}

.workflow-run-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.15);
    border-color: var(--primary);
}

.workflow-run-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 8px;
}

.workflow-icon {
    display: inline-flex;
    align-items: center;
    gap: 2px;
    font-size: 1.1rem;
    color: var(--text-secondary, #888);
}
.workflow-icon [data-lucide], .workflow-icon svg.lucide {
    width: 16px;
    height: 16px;
}

.workflow-name {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-primary);
}

.workflow-run-details {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.workflow-run-link {
    font-size: 0.8rem;
    color: var(--primary);
    text-decoration: none;
    font-weight: 500;
}

.workflow-run-link:hover {
    color: var(--primary-light);
    text-decoration: underline;
}

.workflow-run-sha {
    font-size: 0.7rem;
    color: var(--text-secondary);
    font-family: 'Consolas', 'Monaco', monospace;
}

/* Build Download Section */
.build-download-section {
    display: flex;
    align-items: center;
    gap: 10px;
    padding-top: 12px;
    border-top: 1px solid rgba(139, 92, 246, 0.2);
}

.build-info-label {
    font-size: 0.75rem;
    color: #6b7280;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.build-info-value {
    font-size: 0.9rem;
    color: #1f2937;
    font-weight: 500;
    word-break: break-all;
}

.build-info-link {
    color: #6366f1;
    text-decoration: none;
    transition: color 0.2s;
}

.build-info-link:hover {
    color: #818cf8;
    text-decoration: underline;
}

/* Download Button Group */
.download-btn-group {
    display: inline-flex;
    gap: 6px;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
}

/* Download buttons — colored gradient backgrounds (original style) with
   WHITE text so icons and labels are always readable. Light mode gets
   softer tints instead of the full-saturation gradients. */
.download-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0;
    padding: 6px 10px;
    font-size: 1.1rem;
    font-weight: 600;
    border-radius: 8px;
    text-decoration: none;
    transition: transform 0.12s ease, box-shadow 0.12s ease;
    white-space: nowrap;
    border: none;
    min-width: 36px;
    min-height: 32px;
    letter-spacing: 0;
    color: #fff;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
}

.download-btn:hover {
    transform: translateY(-1px);
    filter: brightness(1.08);
}

.download-btn .dl-icon {
    font-size: 0.8rem;
}

.download-btn.dl-tarball {
    background: linear-gradient(135deg, #059669 0%, #34d399 100%);
    box-shadow: 0 3px 8px rgba(5, 150, 105, 0.3);
}
.download-btn.dl-tarball:hover {
    box-shadow: 0 5px 15px rgba(5, 150, 105, 0.4);
}

.download-btn.dl-deb {
    background: linear-gradient(135deg, #db2777 0%, #f472b6 100%);
    box-shadow: 0 3px 8px rgba(219, 39, 119, 0.3);
}
.download-btn.dl-deb:hover {
    box-shadow: 0 5px 15px rgba(219, 39, 119, 0.4);
}

.download-btn.dl-rpm {
    background: linear-gradient(135deg, #d97706 0%, #fbbf24 100%);
    box-shadow: 0 3px 8px rgba(217, 119, 6, 0.3);
}
.download-btn.dl-rpm:hover {
    box-shadow: 0 5px 15px rgba(217, 119, 6, 0.4);
}

/* Light theme: softer pastel backgrounds so they don't scream on white */
[data-theme="light"] .download-btn.dl-tarball { background: linear-gradient(135deg, #6ee7b7 0%, #a7f3d0 100%); color: #064e3b; box-shadow: 0 2px 6px rgba(5,150,105,0.2); }
[data-theme="light"] .download-btn.dl-deb     { background: linear-gradient(135deg, #f9a8d4 0%, #fbcfe8 100%); color: #831843; box-shadow: 0 2px 6px rgba(219,39,119,0.2); }
[data-theme="light"] .download-btn.dl-rpm     { background: linear-gradient(135deg, #fde68a 0%, #fef3c7 100%); color: #78350f; box-shadow: 0 2px 6px rgba(217,119,6,0.2); }

/* No Download Available */
.no-download {
    color: #9ca3af;
    font-size: 0.8rem;
    font-style: italic;
}

/* Responsive adjustments for build info */
@media (max-width: 768px) {
    .build-info-panel {
        padding: 15px;
    }

    .build-info-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }


}

/* ========================================
   Submodule PRs Tab Styles
   ======================================== */

/* Submodule PRs Table specific styles */
#submodule-prs-table td,
#pr-activity-table td {
    vertical-align: middle;
}

#submodule-prs-table .status-badge,
#pr-activity-table .status-badge {
    min-width: 80px;
    font-size: 0.7rem;
    padding: 6px 10px;
    min-height: 28px;
}

/* CI Checks Badge - Compact version */
#pr-activity-table .status-badge {
    font-size: 0.75rem;
    min-width: 60px;
}

/* ========================================
   Bump PRs Tab Specific Styles
   ======================================== */

/* SHA Code Display */
.sha-code {
    font-family: 'Consolas', 'Monaco', 'Courier New', monospace;
    font-size: 0.8rem;
    padding: 3px 8px;
    background: rgba(99, 102, 241, 0.1);
    border-radius: 4px;
    color: #4b5563;
    letter-spacing: 0.5px;
}

/* Path Code Display */
.path-code {
    font-family: 'Consolas', 'Monaco', 'Courier New', monospace;
    font-size: 0.75rem;
    padding: 2px 6px;
    background: rgba(107, 114, 128, 0.1);
    border-radius: 4px;
    color: #6b7280;
}

/* Submodule Name Link */
.submodule-name-link {
    color: var(--text-primary);
    text-decoration: none;
    transition: color 0.2s;
    font-weight: 600;
}

.submodule-name-link:hover {
    color: var(--primary);
}

/* SHA Link */
.sha-link {
    text-decoration: none;
}

.sha-link:hover .sha-code {
    background: rgba(99, 102, 241, 0.2);
    color: #6366f1;
}

/* Commits Behind Badge */
.commits-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 5px 12px;
    border-radius: 12px;
    font-size: 0.8rem;
    font-weight: 600;
    min-width: 80px;
}

.commits-badge.current {
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.15), rgba(5, 150, 105, 0.15));
    color: #059669;
    border: 1px solid rgba(16, 185, 129, 0.3);
}

.commits-badge.warning {
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.15), rgba(217, 119, 6, 0.15));
    color: #b45309;
    border: 1px solid rgba(245, 158, 11, 0.3);
}

.commits-badge.stale {
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.15), rgba(220, 38, 38, 0.15));
    color: #dc2626;
    border: 1px solid rgba(239, 68, 68, 0.3);
}

.commits-badge.unknown {
    background: #e5e7eb;
    color: #6b7280;
}

/* Age Badge */
.age-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 4px 10px;
    border-radius: 10px;
    font-size: 0.75rem;
    font-weight: 600;
}

.age-badge.current {
    background: rgba(16, 185, 129, 0.15);
    color: #059669;
}

.age-badge.warning {
    background: rgba(245, 158, 11, 0.15);
    color: #b45309;
}

.age-badge.stale {
    background: rgba(239, 68, 68, 0.15);
    color: #dc2626;
}

/* No PR Indicator */
.no-pr {
    color: #9ca3af;
    font-style: italic;
}

/* Bump PRs Table Styles */
#open-bump-prs-table td,
#submodule-status-table td,
#merged-bump-prs-table td {
    vertical-align: middle;
}

.bump-date {
    color: #888;
    font-size: 0.85em;
    margin-left: 4px;
}

#bump-prs-tab .status-badge {
    min-width: 70px;
    font-size: 0.7rem;
    padding: 5px 8px;
    min-height: 26px;
}
