/**
 * cockpit-adversarial.css — P53 · Adversarial Cockpit
 *
 * .ac-* namespace (Adversarial Cockpit).
 * Follows the same design language as cockpit-skeleton.css.
 * Light-mode panel injected above the scroll area.
 */

/* ── Mount ────────────────────────────────────────────────────────────────── */

.ac-mount {
    margin: 0 0 16px 0;
}

/* ── Cockpit shell ────────────────────────────────────────────────────────── */

.ac-cockpit {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    box-shadow: 0 2px 12px rgba(0,0,0,0.08);
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    font-size: 13px;
    color: #1a202c;
    overflow: hidden;
}

/* ── Header ───────────────────────────────────────────────────────────────── */

.ac-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    padding: 14px 16px 10px;
    border-bottom: 1px solid #e2e8f0;
    background: #f8fafc;
}

.ac-header-left {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.ac-header-title {
    font-size: 15px;
    font-weight: 600;
    color: #1a202c;
}

.ac-header-sub {
    font-size: 12px;
    color: #64748b;
}

.ac-header-close {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 18px;
    color: #94a3b8;
    padding: 0 4px;
    line-height: 1;
}
.ac-header-close:hover { color: #475569; }

/* ── Overall risk banner ──────────────────────────────────────────────────── */

.ac-banner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 16px;
    border-bottom: 1px solid;
}

.ac-banner-left {
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.ac-banner-label {
    font-size: 14px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.ac-banner-sub {
    font-size: 12px;
    color: #374151;
}

.ac-banner-gauge {
    flex-shrink: 0;
}

/* ── Section cards container ──────────────────────────────────────────────── */

.ac-sections {
    padding: 12px 16px;
    border-bottom: 1px solid #e2e8f0;
    max-height: 480px;
    overflow-y: auto;
}

/* ── Section card ─────────────────────────────────────────────────────────── */

.ac-sec-card {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 12px 14px;
    margin-bottom: 10px;
}

.ac-sec-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 8px;
}

.ac-sec-title {
    font-size: 13px;
    font-weight: 600;
    color: #1e293b;
    flex: 1;
    min-width: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-right: 10px;
}

.ac-sec-score-badge {
    display: flex;
    align-items: baseline;
    gap: 3px;
    padding: 3px 8px;
    border-radius: 5px;
    flex-shrink: 0;
}

.ac-sec-score-label {
    font-size: 10px;
    color: #64748b;
    font-weight: 500;
}

/* ── Vulnerability factors ────────────────────────────────────────────────── */

.ac-factors {
    list-style: none;
    margin: 0 0 8px;
    padding: 0;
}

.ac-factor {
    font-size: 11px;
    color: #92400e;
    background: #fef3c7;
    border-radius: 4px;
    padding: 2px 8px;
    margin-bottom: 3px;
    line-height: 1.5;
}
.ac-factor::before {
    content: '▲ ';
    font-size: 9px;
    opacity: 0.7;
}

/* ── Counter-argument block ───────────────────────────────────────────────── */

.ac-counter-block {
    margin-bottom: 8px;
}

.ac-sub-label {
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #64748b;
    margin-bottom: 4px;
}

.ac-counter-text {
    font-size: 12px;
    color: #1e293b;
    line-height: 1.5;
    margin: 0 0 6px;
    font-style: italic;
}

.ac-counter-cites {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
}

.ac-cite-chip {
    display: inline-block;
    padding: 2px 7px;
    background: #eff6ff;
    border: 1px solid #bfdbfe;
    border-radius: 4px;
    font-size: 10px;
    color: #1d4ed8;
    text-decoration: none;
    font-family: inherit;
}
.ac-cite-chip:hover { background: #dbeafe; }

/* ── Distinguishing authorities ───────────────────────────────────────────── */

.ac-distinguishing {
    margin-bottom: 8px;
}

.ac-distinguish-row {
    display: flex;
    align-items: baseline;
    gap: 6px;
    margin-bottom: 4px;
    font-size: 11px;
}

.ac-distinguish-link {
    color: #7c3aed;
    text-decoration: none;
    font-weight: 500;
    flex-shrink: 0;
}
.ac-distinguish-link:hover { text-decoration: underline; }

.ac-distinguish-rationale {
    color: #64748b;
    font-style: italic;
    line-height: 1.4;
}

/* ── Doctrine warning ─────────────────────────────────────────────────────── */

.ac-doctrine-warning {
    display: flex;
    align-items: flex-start;
    gap: 6px;
    background: #fef3c7;
    border: 1px solid #fde68a;
    border-radius: 5px;
    padding: 6px 10px;
    margin-bottom: 8px;
    font-size: 11px;
    color: #92400e;
    line-height: 1.4;
}

.ac-doctrine-icon {
    flex-shrink: 0;
    font-size: 12px;
}

/* ── Per-Canton rejection rates ───────────────────────────────────────────── */

.ac-canton-rates {
    margin-bottom: 8px;
}

.ac-canton-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 4px;
}

.ac-canton-chip {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 3px 8px;
    background: #f1f5f9;
    border: 1px solid #e2e8f0;
    border-radius: 5px;
    font-size: 11px;
    cursor: default;
}

.ac-canton-name {
    color: #374151;
    font-weight: 500;
}

.ac-canton-pct {
    font-weight: 700;
    font-size: 11px;
}

/* ── Per-section action buttons ───────────────────────────────────────────── */

.ac-sec-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 8px;
    padding-top: 8px;
    border-top: 1px solid #e2e8f0;
}

.ac-btn {
    padding: 5px 12px;
    border-radius: 5px;
    font-size: 12px;
    font-weight: 500;
    cursor: pointer;
    border: 1px solid transparent;
    font-family: inherit;
    white-space: nowrap;
}

.ac-btn-strengthen {
    background: #eff6ff;
    color: #1d4ed8;
    border-color: #bfdbfe;
}
.ac-btn-strengthen:hover { background: #dbeafe; }

.ac-btn-counter {
    background: #f5f3ff;
    color: #6d28d9;
    border-color: #ddd6fe;
}
.ac-btn-counter:hover { background: #ede9fe; }

.ac-btn-rewrite {
    background: #f0fdf4;
    color: #15803d;
    border-color: #bbf7d0;
}
.ac-btn-rewrite:hover { background: #dcfce7; }

/* ── Empty state ──────────────────────────────────────────────────────────── */

.ac-empty {
    color: #94a3b8;
    font-size: 13px;
    padding: 8px 0;
}

/* ── Global action bar ────────────────────────────────────────────────────── */

.ac-action-bar {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 16px;
    background: #f8fafc;
    border-top: 1px solid #e2e8f0;
}

.ac-btn-primary {
    background: #2563eb;
    color: #ffffff;
    border-color: #1d4ed8;
    padding: 8px 18px;
    font-size: 13px;
}
.ac-btn-primary:hover { background: #1d4ed8; }

.ac-btn-tertiary {
    background: none;
    color: #64748b;
    border-color: transparent;
    padding: 8px 12px;
    font-size: 13px;
}
.ac-btn-tertiary:hover { color: #374151; }

/* ── Loading / done states ────────────────────────────────────────────────── */

.ac-loading {
    color: #64748b;
    font-size: 12px;
    font-style: italic;
    padding: 4px 0;
}

.ac-done {
    color: #15803d;
    font-size: 12px;
    font-weight: 500;
}
