/* =============================================
   Phase 2 — PDM Features CSS
   ============================================= */

/* Status badge in section-toggle header */
.repo-status-badge {
    font-size: 10px;
    padding: 2px 8px;
    border-radius: 10px;
    font-weight: 600;
    margin-left: auto;
    margin-right: 8px;
    white-space: nowrap;
    flex-shrink: 0;
}

/* ---- RELEASES ---- */
.releases-list {
    padding: 0 16px 8px;
}
.release-item {
    display: flex;
    gap: 10px;
    padding: 8px 0;
    border-bottom: 1px solid rgba(255,255,255,0.04);
    font-size: 12px;
}
.release-item:last-child { border-bottom: none; }
.release-tag {
    font-family: 'JetBrains Mono', monospace;
    color: var(--accent);
    font-size: 11px;
    flex-shrink: 0;
    font-weight: 600;
}
.release-info { flex: 1; min-width: 0; }
.release-name {
    color: var(--text-secondary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.release-meta {
    color: var(--text-muted);
    font-size: 11px;
    margin-top: 2px;
}

/* ---- ECO / PULL REQUESTS ---- */
.eco-list {
    padding: 0 16px 8px;
}
.eco-item {
    display: flex;
    gap: 10px;
    padding: 8px 0;
    border-bottom: 1px solid rgba(255,255,255,0.04);
    font-size: 12px;
    cursor: pointer;
    transition: background 0.12s;
    border-radius: 6px;
    padding: 8px;
}
.eco-item:last-child { border-bottom: none; }
.eco-item:hover { background: rgba(255,255,255,0.04); }
.eco-status {
    font-size: 10px;
    padding: 2px 6px;
    border-radius: 4px;
    font-weight: 600;
    flex-shrink: 0;
    align-self: flex-start;
    text-transform: capitalize;
}
.eco-info { flex: 1; min-width: 0; }
.eco-title {
    color: var(--text-secondary);
    font-weight: 500;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.eco-meta {
    color: var(--text-muted);
    font-size: 11px;
    margin-top: 2px;
}
.eco-meta code {
    font-family: 'JetBrains Mono', monospace;
    font-size: 10px;
    background: rgba(255,255,255,0.08);
    padding: 0 3px;
    border-radius: 3px;
}
.eco-labels {
    display: flex;
    gap: 4px;
    flex-wrap: wrap;
    margin-top: 4px;
}
.eco-label {
    font-size: 9px;
    padding: 1px 5px;
    border-radius: 4px;
    font-weight: 500;
}

/* ---- BOM PANEL ---- */
.bom-panel {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    bottom: 16px;
    width: calc(100% - 400px);
    max-width: 900px;
    max-height: 40vh;
    z-index: 20;
    display: flex;
    flex-direction: column;
    background: var(--glass-bg);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    border: 1px solid var(--glass-border);
    border-radius: 16px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
    overflow: hidden;
}
.bom-panel-head {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 10px 16px;
    border-bottom: 1px solid var(--glass-border);
    flex-shrink: 0;
}
.bom-panel-head .panel-title { flex: 1; }
.bom-panel-body {
    flex: 1;
    overflow: auto;
    padding: 0;
}
.bom-panel-body::-webkit-scrollbar { width: 6px; height: 6px; }
.bom-panel-body::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.12); border-radius: 3px; }

.bom-empty {
    padding: 24px;
    text-align: center;
    color: var(--text-muted);
    font-size: 13px;
}

.bom-data-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 12px;
}
.bom-data-table th {
    position: sticky;
    top: 0;
    background: var(--glass-bg);
    padding: 8px 12px;
    text-align: left;
    font-weight: 600;
    color: var(--text-secondary);
    border-bottom: 1px solid var(--glass-border);
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    white-space: nowrap;
}
.bom-data-table td {
    padding: 6px 12px;
    border-bottom: 1px solid rgba(255,255,255,0.03);
    color: var(--text-secondary);
    white-space: nowrap;
    cursor: default;
    outline: none;
}
.bom-data-table td:focus {
    background: rgba(99,102,241,0.15);
    color: var(--text);
    outline: 1px solid var(--accent);
    outline-offset: -1px;
    cursor: text;
}
.bom-data-table tr:hover td {
    background: rgba(0, 220, 255, 0.08);
    color: var(--text);
}
.bom-data-table tr:last-child td { border-bottom: none; }

/* ---- PDM MODAL (shared by PN, Release, ECO) ---- */
.pdm-modal-overlay {
    position: fixed;
    inset: 0;
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
}
.pdm-modal {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 16px;
    box-shadow: 0 16px 48px rgba(0, 0, 0, 0.5);
    width: 380px;
    max-width: 90vw;
    overflow: hidden;
}
.pdm-modal-head {
    padding: 16px 20px 12px;
    border-bottom: 1px solid rgba(255,255,255,0.06);
}
.pdm-modal-title {
    font-size: 15px;
    font-weight: 600;
    color: var(--text);
    display: block;
}
.pdm-modal-subtitle {
    font-size: 12px;
    color: var(--text-muted);
    margin-top: 2px;
    display: block;
}
.pdm-modal-body {
    padding: 16px 20px;
}
.pdm-modal-foot {
    padding: 12px 20px 16px;
    display: flex;
    gap: 8px;
    justify-content: flex-end;
    border-top: 1px solid rgba(255,255,255,0.06);
}

.pdm-field {
    margin-bottom: 14px;
}
.pdm-field:last-child { margin-bottom: 0; }
.pdm-label {
    display: block;
    font-size: 11px;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 6px;
}
.pdm-select {
    width: 100%;
    padding: 8px 10px;
    background: rgba(255,255,255,0.06);
    border: 1px solid var(--glass-border);
    border-radius: 8px;
    color: var(--text);
    font-family: inherit;
    font-size: 13px;
    outline: none;
    cursor: pointer;
}
.pdm-select:focus { border-color: var(--accent); }
select.pdm-select option { background: #1a1a2e; color: var(--text); }
.pdm-input, .pdm-textarea {
    width: 100%;
    padding: 8px 10px;
    background: rgba(255,255,255,0.06);
    border: 1px solid var(--glass-border);
    border-radius: 8px;
    color: var(--text);
    font-family: 'JetBrains Mono', monospace;
    font-size: 14px;
    outline: none;
    box-sizing: border-box;
}
.pdm-textarea {
    font-family: inherit;
    font-size: 13px;
    resize: vertical;
    min-height: 60px;
}
.pdm-input:focus, .pdm-textarea:focus { border-color: var(--accent); }
.pdm-note {
    font-size: 11px;
    color: var(--text-muted);
    padding: 6px 0 0;
}
.pdm-field-inline {
    margin-bottom: 8px;
}
.pdm-label-inline {
    font-size: 12px;
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    gap: 6px;
    cursor: pointer;
}
.pdm-label-inline input[type="checkbox"] {
    accent-color: var(--accent);
}

.pdm-btn {
    padding: 8px 16px;
    border: 1px solid var(--glass-border);
    border-radius: 8px;
    background: rgba(255,255,255,0.06);
    color: var(--text-secondary);
    font-family: inherit;
    font-size: 12px;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.12s, color 0.12s, border-color 0.12s;
}
.pdm-btn:hover {
    background: rgba(255,255,255,0.1);
    color: var(--text);
}
.pdm-btn.primary {
    background: var(--accent);
    color: #fff;
    border-color: var(--accent);
}
.pdm-btn.primary:hover {
    background: #7c3aed;
}
.pdm-btn.secondary {
    background: transparent;
}
.pdm-btn.disabled, .pdm-btn:disabled {
    opacity: 0.35;
    cursor: not-allowed;
    pointer-events: none;
}

/* ---- BUTTON LOADING ANIMATION ---- */
.btn-loading {
    pointer-events: none;
    opacity: 0.8;
    animation: btn-pulse 1.2s ease-in-out infinite;
}
.btn-loading .btn-dots::after {
    content: '';
    animation: btn-dots-step 1.5s steps(1) infinite;
}
@keyframes btn-pulse {
    0%, 100% { opacity: 0.8; }
    50% { opacity: 0.5; }
}
@keyframes btn-dots-step {
    0%      { content: '.'; }
    33%     { content: '..'; }
    66%     { content: '...'; }
}
