/* cockpit-evidence.css — P4 · Evidence cockpit styles */

/* ── Mount wrapper ──────────────────────────────────────────────────────── */
.ec-mount {
    margin: 8px 12px;
    font-family: var(--ip-font, "Inter", sans-serif);
    font-size: 13px;
    color: var(--ip-text, #e0e0e0);
}

/* ── Cockpit shell ─────────────────────────────────────────────────────── */
.ec-cockpit {
    background: var(--ip-bg-surface, #1a1a2e);
    border: 1px solid var(--vc-border, rgba(150,145,175,0.18));
    border-radius: 10px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    max-height: 80vh;
    overflow-y: auto;
}

/* ── Header ────────────────────────────────────────────────────────────── */
.ec-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px 10px;
    background: var(--ip-bg-surface-alt, rgba(108,99,255,0.08));
    border-bottom: 1px solid var(--vc-border, rgba(150,145,175,0.12));
    flex-shrink: 0;
}
.ec-header-title {
    font-size: 14px;
    font-weight: 700;
    color: var(--vc-primary, #6c63ff);
    letter-spacing: -0.01em;
}
.ec-header-count {
    font-size: 11px;
    font-weight: 400;
    color: var(--ip-text-muted, #888);
    margin-left: 4px;
}
.ec-header-close {
    background: none;
    border: none;
    color: var(--ip-text-muted, #888);
    cursor: pointer;
    font-size: 18px;
    line-height: 1;
    padding: 0 4px;
}
.ec-header-close:hover { color: var(--ip-text, #e0e0e0); }

/* ── Section title (shared) ────────────────────────────────────────────── */
.ec-section-title {
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--ip-text-muted, #888);
    margin-bottom: 6px;
    padding: 10px 16px 0;
}

/* ── Gap banners ───────────────────────────────────────────────────────── */
.ec-gaps-section {
    padding: 0 12px 8px;
    flex-shrink: 0;
    border-bottom: 1px solid var(--vc-border, rgba(150,145,175,0.10));
}

.ec-gap-banner {
    border-radius: 6px;
    padding: 9px 12px;
    margin-bottom: 6px;
    border-left: 3px solid;
}

/* High severity — red */
.ec-gap-high {
    background: rgba(239,68,68,0.10);
    border-color: #ef4444;
}
.ec-gap-high .ec-gap-dot     { background: #ef4444; }
.ec-gap-high .ec-gap-type    { color: #ef4444; }
.ec-gap-high .ec-gap-action-btn { border-color: #ef4444; color: #ef4444; }
.ec-gap-high .ec-gap-action-btn:hover { background: rgba(239,68,68,0.15); }

/* Medium severity — amber */
.ec-gap-medium {
    background: rgba(245,158,11,0.09);
    border-color: #f59e0b;
}
.ec-gap-medium .ec-gap-dot     { background: #f59e0b; }
.ec-gap-medium .ec-gap-type    { color: #f59e0b; }
.ec-gap-medium .ec-gap-action-btn { border-color: #f59e0b; color: #f59e0b; }
.ec-gap-medium .ec-gap-action-btn:hover { background: rgba(245,158,11,0.12); }

/* Low severity — blue */
.ec-gap-low {
    background: rgba(59,130,246,0.09);
    border-color: #3b82f6;
}
.ec-gap-low .ec-gap-dot     { background: #3b82f6; }
.ec-gap-low .ec-gap-type    { color: #3b82f6; }
.ec-gap-low .ec-gap-action-btn { border-color: #3b82f6; color: #3b82f6; }
.ec-gap-low .ec-gap-action-btn:hover { background: rgba(59,130,246,0.12); }

.ec-gap-header {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 4px;
}
.ec-gap-dot {
    display: inline-block;
    width: 7px;
    height: 7px;
    border-radius: 50%;
    flex-shrink: 0;
}
.ec-gap-type {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}
.ec-gap-severity {
    font-size: 9px;
    font-weight: 600;
    text-transform: uppercase;
    color: var(--ip-text-muted, #888);
    background: rgba(255,255,255,0.06);
    padding: 1px 5px;
    border-radius: 3px;
}
.ec-gap-context {
    font-size: 10px;
    color: var(--ip-text-muted, #888);
    margin-left: auto;
    max-width: 160px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.ec-gap-desc {
    font-size: 11px;
    color: var(--ip-text-secondary, #c0beb6);
    line-height: 1.45;
    margin-bottom: 6px;
}
.ec-gap-footer { display: flex; align-items: center; }
.ec-gap-action-btn {
    background: none;
    border: 1px solid;
    border-radius: 4px;
    padding: 3px 10px;
    font-size: 11px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.12s;
}

/* ── Evidence list ─────────────────────────────────────────────────────── */
.ec-ev-section {
    padding: 0 12px 8px;
    flex: 1;
    overflow-y: auto;
}

.ec-ev-controls {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 4px 6px;
    flex-wrap: wrap;
}
.ec-control-label {
    font-size: 10px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--ip-text-muted, #888);
}
.ec-sort-wrap { display: flex; align-items: center; gap: 5px; }
.ec-sort-select,
.ec-filter-chip {
    background: var(--ip-bg-surface-alt, rgba(255,255,255,0.05));
    border: 1px solid var(--vc-border, rgba(150,145,175,0.2));
    border-radius: 4px;
    color: var(--ip-text, #e0e0e0);
    font-size: 11px;
    padding: 3px 6px;
    cursor: pointer;
}
.ec-filter-chips {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
}

.ec-ev-count {
    font-size: 10px;
    color: var(--ip-text-muted, #888);
    padding: 0 4px 6px;
}

.ec-ev-list { display: flex; flex-direction: column; gap: 6px; }
.ec-ev-empty {
    font-size: 12px;
    color: var(--ip-text-muted, #888);
    text-align: center;
    padding: 16px 0;
}

/* ── Evidence item ─────────────────────────────────────────────────────── */
.ec-ev-item {
    border: 1px solid var(--vc-border, rgba(150,145,175,0.14));
    border-radius: 7px;
    padding: 9px 11px;
    background: rgba(255,255,255,0.02);
    transition: border-color 0.12s, opacity 0.12s;
}
.ec-ev-item:hover { border-color: var(--vc-primary, #6c63ff); }
.ec-ev-dropped { opacity: 0.35; border-style: dashed; }
.ec-ev-pinned  { border-color: rgba(34,197,94,0.5); }

.ec-ev-header {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 4px;
    flex-wrap: wrap;
}
.ec-ev-title {
    font-size: 12px;
    font-weight: 600;
    color: var(--ip-text, #e0e0e0);
    flex: 1;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* Credibility badges */
.ec-cred-badge {
    font-size: 9px;
    font-weight: 800;
    padding: 1px 5px;
    border-radius: 3px;
    flex-shrink: 0;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}
.ec-cred-a { background: rgba(34,197,94,0.15);  color: #22c55e; border: 1px solid rgba(34,197,94,0.3); }
.ec-cred-b { background: rgba(59,130,246,0.15); color: #3b82f6; border: 1px solid rgba(59,130,246,0.3); }
.ec-cred-c { background: rgba(245,158,11,0.13); color: #f59e0b; border: 1px solid rgba(245,158,11,0.3); }
.ec-cred-d { background: rgba(239,68,68,0.12);  color: #ef4444; border: 1px solid rgba(239,68,68,0.3); }

.ec-conflict-badge {
    font-size: 9px;
    font-weight: 700;
    background: rgba(239,68,68,0.15);
    color: #ef4444;
    border: 1px solid rgba(239,68,68,0.3);
    border-radius: 3px;
    padding: 1px 5px;
    text-transform: uppercase;
    flex-shrink: 0;
}
.ec-dissent-badge {
    font-size: 9px;
    font-weight: 700;
    background: rgba(168,85,247,0.15);
    color: #a855f7;
    border: 1px solid rgba(168,85,247,0.3);
    border-radius: 3px;
    padding: 1px 5px;
    text-transform: uppercase;
    flex-shrink: 0;
}
.ec-pin-badge {
    font-size: 9px;
    font-weight: 700;
    background: rgba(34,197,94,0.15);
    color: #22c55e;
    border: 1px solid rgba(34,197,94,0.3);
    border-radius: 3px;
    padding: 1px 5px;
    flex-shrink: 0;
    max-width: 120px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.ec-ev-meta {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
    margin-bottom: 4px;
}
.ec-ev-type {
    font-size: 9px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    padding: 1px 5px;
    border-radius: 3px;
    background: rgba(255,255,255,0.07);
    color: var(--ip-text-muted, #888);
}
.ec-ev-type-case        { color: #60a5fa; background: rgba(96,165,250,0.1); }
.ec-ev-type-commentary  { color: #a78bfa; background: rgba(167,139,250,0.1); }
.ec-ev-type-legislation { color: #34d399; background: rgba(52,211,153,0.1); }
.ec-ev-type-doctrine    { color: #f9a8d4; background: rgba(249,168,212,0.1); }
.ec-ev-type-news        { color: #fbbf24; background: rgba(251,191,36,0.1); }

.ec-ev-year {
    font-size: 10px;
    color: var(--ip-text-muted, #888);
}
.ec-ev-angle {
    font-size: 10px;
    color: var(--ip-text-muted, #888);
    font-style: italic;
    max-width: 120px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.ec-ev-snippet {
    font-size: 11px;
    color: var(--ip-text-secondary, #c0beb6);
    line-height: 1.4;
    margin-bottom: 7px;
}

/* Per-item action buttons */
.ec-ev-actions {
    display: flex;
    gap: 5px;
    flex-wrap: wrap;
}
.ec-ev-btn {
    font-size: 10px;
    font-weight: 600;
    padding: 3px 8px;
    border-radius: 4px;
    border: 1px solid var(--vc-border, rgba(150,145,175,0.2));
    background: none;
    color: var(--ip-text-muted, #888);
    cursor: pointer;
    transition: background 0.1s, color 0.1s, border-color 0.1s;
}
.ec-ev-btn:hover            { background: rgba(255,255,255,0.05); color: var(--ip-text, #e0e0e0); }
.ec-ev-drop                 { border-color: rgba(239,68,68,0.35); color: #ef4444; }
.ec-ev-drop:hover           { background: rgba(239,68,68,0.1); }
.ec-ev-restore              { border-color: rgba(34,197,94,0.35); color: #22c55e; }
.ec-ev-restore:hover        { background: rgba(34,197,94,0.1); }
.ec-ev-opposite             { border-color: rgba(168,85,247,0.35); color: #a855f7; }
.ec-ev-opposite:hover       { background: rgba(168,85,247,0.1); }
.ec-ev-pin:hover            { border-color: rgba(34,197,94,0.4); color: #22c55e; }

/* ── Action bar ────────────────────────────────────────────────────────── */
.ec-action-bar {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 14px 12px;
    border-top: 1px solid var(--vc-border, rgba(150,145,175,0.10));
    background: var(--ip-bg-surface, #1a1a2e);
    flex-shrink: 0;
    flex-wrap: wrap;
}
.ec-btn {
    font-size: 12px;
    font-weight: 600;
    padding: 7px 14px;
    border-radius: 6px;
    border: 1px solid transparent;
    cursor: pointer;
    transition: background 0.13s, opacity 0.13s;
    white-space: nowrap;
}
.ec-btn-primary {
    background: var(--vc-primary, #6c63ff);
    color: #fff;
}
.ec-btn-primary:hover  { background: #7b74ff; }
.ec-btn-secondary {
    background: none;
    border: 1px solid var(--vc-primary, #6c63ff);
    color: var(--vc-primary, #6c63ff);
}
.ec-btn-secondary:hover { background: rgba(108,99,255,0.1); }
.ec-btn-tertiary {
    background: none;
    border: 1px solid var(--vc-border, rgba(150,145,175,0.2));
    color: var(--ip-text-muted, #888);
}
.ec-btn-tertiary:hover { background: rgba(255,255,255,0.04); color: var(--ip-text, #e0e0e0); }

.ec-loading {
    font-size: 12px;
    color: var(--ip-text-muted, #888);
    padding: 6px 4px;
    font-style: italic;
}
