/* The CVE detail pane (.flyout and its .fly-* parts) — the right-hand pane opened from a vulnerability
   row. Its own file because two pages open the same pane: the vulnerability list, and the UAV published
   over the CVE. Scoped under .cve-fly, the wrapper the VulnerabilityFlyout component renders, rather than
   under a page class: that is what lets it travel. Everything the pane borrowed from the list's page
   scope (.vl-pill, .vl-sq) is restated here for the same reason. Colours come from the theme tokens,
   never a literal hex, or the light theme renders black-on-black. */

.cve-fly .fly-backdrop {
    position: fixed;
    inset: 0;
    z-index: 200;
    background: rgba(0, 0, 0, 0.45);
}

.cve-fly .flyout {
    position: fixed;
    z-index: 210;
    top: 0;
    right: 0;
    height: 100vh;
    width: min(540px, calc(100vw - 24px));
    display: flex;
    flex-direction: column;
    padding: 18px 24px 0;
    background: var(--surface);
    border-left: 1px solid var(--line);
    box-shadow: -28px 0 60px -24px rgba(0, 0, 0, 0.8);
    animation: fly-in .28s cubic-bezier(0.4, 0, 0.2, 1) both;
}

.cve-fly .fly-nav {
    display: flex;
    justify-content: flex-end;
    gap: 6px;
    margin-bottom: 10px;
}
.cve-fly .fly-nav button {
    width: 28px;
    height: 28px;
    display: grid;
    place-items: center;
    border: 1px solid var(--line);
    background: transparent;
    color: var(--muted);
    cursor: pointer;
    transition: color .15s ease, border-color .15s ease;
}
.cve-fly .fly-nav button:hover:not(:disabled) { color: var(--text); border-color: rgba(255, 255, 255, 0.28); }
.cve-fly .fly-nav button:disabled { opacity: 0.35; cursor: default; }
.cve-fly .fly-nav button svg { width: 14px; height: 14px; }
.cve-fly .fly-nav .fly-x { font-size: 18px; line-height: 1; }

.cve-fly .fly-title {
    margin: 0;
    font-family: var(--font-display);
    font-size: 22px;
    font-weight: 700;
    letter-spacing: -0.01em;
    color: var(--text);
    font-variant-numeric: tabular-nums;
}

.cve-fly .fly-sub { margin: 4px 0 12px; font-size: 13.5px; color: var(--muted); }

.cve-fly .fly-rem {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    font-weight: 600;
    margin-bottom: 12px;
}
.cve-fly .fly-remdot { width: 9px; height: 9px; border-radius: 50%; flex: none; }

.cve-fly .fly-chips { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 16px; }
/* Most CVEs are not exploitable, and the row's margin was still opening a 16px hole between the status
   line and whatever follows it. */
.cve-fly .fly-chips:empty { display: none; }

.cve-fly .fly-chip {
    padding: 3px 10px;
    font-size: 11.5px;
    font-weight: 600;
    color: var(--muted);
    border: 1px solid var(--line);
    background: var(--surface-2);
    white-space: nowrap;
}
.cve-fly .fly-chip.chip-zeroday { color: #FF6B6B; border-color: rgba(255, 107, 107, 0.45); background: rgba(255, 107, 107, 0.1); }
.cve-fly .fly-chip.chip-exploit { color: #EC4899; border-color: rgba(236, 72, 153, 0.45); background: rgba(236, 72, 153, 0.1); }
/* .chip-urgent is gone with the heuristic it drew: the pane's own .fly-rem line above says whether
   SecOps has flagged the CVE, which is a decision rather than a guess. */

/* status + assignee controls */
.cve-fly .fly-controls {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-bottom: 16px;
}
.cve-fly .fly-controls label { display: grid; gap: 5px; min-width: 0; }
.cve-fly .fly-controls label > span {
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: var(--faint);
}

/* the assignee as a reader sees it — same puck + name pairing as the list column, no control */
.cve-fly .fly-assignee {
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 0;
    font-size: 13px;
    color: var(--text);
}
.cve-fly .fly-assignee > span:last-child {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* tabs */
.cve-fly .fly-tabs {
    display: flex;
    gap: 2px;
    border-bottom: 1px solid var(--line-soft);
}
.cve-fly .fly-tabs button {
    padding: 9px 12px;
    border: none;
    background: transparent;
    color: var(--muted);
    font: 500 13px var(--font-body);
    cursor: pointer;
    border-bottom: 2px solid transparent;
    margin-bottom: -1px;
    transition: color .15s ease, border-color .15s ease;
}
.cve-fly .fly-tabs button:hover { color: var(--text); }
.cve-fly .fly-tabs button.is-active {
    color: var(--text);
    font-weight: 600;
    border-bottom-color: var(--accent);
}

.cve-fly .fly-body { flex: 1; overflow-y: auto; padding: 16px 2px 20px 0; }

.cve-fly .fly-note {
    padding: 10px 14px;
    margin-bottom: 16px;
    font-size: 12.5px;
    line-height: 1.55;
    color: var(--warn);
    border: 1px solid rgba(255, 180, 84, 0.35);
    background: rgba(255, 180, 84, 0.08);
}

.cve-fly .fly-h3 {
    margin: 0 0 10px;
    font-size: 11.5px;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--accent);
}
.cve-fly .fly-h3:not(:first-child) { margin-top: 20px; }

.cve-fly .fly-desc { margin: 0; font-size: 13.5px; line-height: 1.65; color: var(--muted); }

.cve-fly .fly-facts,
.cve-fly .fly-props {
    margin: 0;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 13px 20px;
}
.cve-fly .fly-facts > div,
.cve-fly .fly-props > div { display: grid; gap: 4px; min-width: 0; }
.cve-fly .fly-wide { grid-column: 1 / -1; }

.cve-fly .fly-facts dt,
.cve-fly .fly-props dt {
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: var(--faint);
}
.cve-fly .fly-facts dd,
.cve-fly .fly-props dd {
    margin: 0;
    font-size: 13px;
    color: var(--text);
    display: flex;
    align-items: center;
    gap: 7px;
    min-width: 0;
}

.cve-fly .fly-mono {
    font-size: 11.5px !important;
    color: var(--muted) !important;
    word-break: break-all;
    font-variant-numeric: tabular-nums;
}

.cve-fly .fly-select {
    width: 100%;
    padding: 7px 10px;
    border: 1px solid var(--line);
    background: var(--surface-2);
    color: var(--text);
    font: 500 13px var(--font-body);
    border-radius: var(--radius-sm);
    cursor: pointer;
    color-scheme: dark;
}
.cve-fly .fly-select:focus { outline: none; border-color: var(--accent-line); }

.cve-fly .fly-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    gap: 8px;
}
.cve-fly .fly-list li {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 9px 12px;
    border: 1px solid var(--line);
    background: var(--surface-2);
    font-size: 13px;
    color: var(--muted);
}
.cve-fly .fly-list svg { width: 15px; height: 15px; color: var(--accent); flex: none; }

/* ─── The UAV block ───────────────────────────────────────────── */
/* Which warning covers this CVE; not a control. Suppressed on the UAV's own page, which is the answer.
   There is no card at all for a CVE nobody has flagged: that is the ordinary case across an estate of
   thousands, and a block saying so on every row would read as a problem rather than the absence of one
   (§30). The one-line .fly-rem above it is the whole answer there. */

.cve-fly .fly-work {
    margin: 14px 0;
    padding: 12px 14px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--surface-2);
}

.cve-fly .fly-workhead {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.cve-fly .fly-workref {
    color: var(--accent);
    font-size: 13.5px;
    font-weight: 700;
    text-decoration: none;
}

.cve-fly .fly-workref:hover { text-decoration: underline; }

.cve-fly .fly-worktitle {
    margin: 6px 0 10px;
    color: var(--muted);
    font-size: 12.5px;
}

/* ─── Borrowed from the list's page scope ─────────────────────── */
/* The pane draws a status pill and a severity square. Both are page-scoped where they came from, so they
   are restated against the pane's own scope: otherwise they render unstyled the moment the pane opens
   anywhere but the vulnerability list. */

.cve-fly .vl-pill {
    display: inline-flex;
    align-items: center;
    padding: 3px 10px;
    border: 1px solid currentColor;
    background: transparent;
    font-size: 11.5px;
    font-weight: 600;
    white-space: nowrap;
}

.cve-fly .vl-sq { width: 10px; height: 10px; flex: none; display: inline-block; }

@media (prefers-reduced-motion: reduce) {
    .cve-fly .flyout { animation: none; }
}
