/*! © 2026 Cyber Affinity LLC. All rights reserved. Use is subject to https://www.cyber-affinity.com/terms — copying or redistributing this code is not permitted. */
/* Vendor Comparison & RFP Scorecard — tool-specific styles (shared classes live in /styles.css) */
.vs-wrap { max-width: 1240px; }
#view .cw-section { grid-template-columns: minmax(0, 1fr); }
#view .cw-section > * { min-width: 0; }

/* Summary strip */
.vs-summary { margin-top: 16px; display: flex; flex-wrap: wrap; gap: 10px 24px; align-items: center; justify-content: space-between; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 12px 16px; }
.vs-summary > p { margin: 0; }
.vs-sum-lead { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 10px; min-width: 0; overflow-wrap: anywhere; }
.vs-sum-label { font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em; color: var(--accent); }
.vs-sum-flags { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }

.vs-nav { display: flex; justify-content: space-between; gap: 12px; margin-top: 28px; }
.vs-grow { flex: 1 1 auto; min-width: 0; }
.vs-msg { display: flex; flex-wrap: wrap; gap: 6px 10px; align-items: center; color: var(--muted); }
.vs-msg.ok { color: var(--accent); font-weight: 600; }
.vs-offscreen { position: fixed; left: -9999px; top: 0; opacity: 0; }

/* Import */
.vs-import { border-color: rgba(45, 212, 191, 0.45); }
.vs-import p { margin: 0; }
.vs-import-row { display: flex; flex-wrap: wrap; gap: 10px 16px; align-items: center; }

/* Criteria + vendors */
.vs-crit-grid { display: grid; grid-template-columns: minmax(0, 1fr) 180px 150px 150px; gap: 12px; align-items: end; }
.vs-crit-side { display: grid; gap: 2px; padding-bottom: 6px; }
.vs-crit-foot { display: flex; gap: 12px; align-items: end; }
.vs-must { border-left: 3px solid var(--accent); }
.vs-acts { display: flex; gap: 2px; align-items: center; white-space: nowrap; }
.vs-mini { font-size: 16px; padding: 4px 6px; }
.vs-mini:disabled { opacity: 0.35; cursor: default; }
.vs-mini:disabled:hover { background: none; color: var(--muted); }
.vs-vendor-grid { display: grid; grid-template-columns: minmax(0, 1fr) 220px auto; gap: 12px; align-items: end; }
@media (max-width: 860px) {
  .vs-crit-grid { grid-template-columns: 1fr 1fr; }
  .vs-crit-grid > .vs-grow { grid-column: 1 / -1; }
}
@media (max-width: 560px) {
  .vs-crit-grid, .vs-vendor-grid { grid-template-columns: 1fr; }
  .vs-vendor-grid .rr-x { justify-self: end; }
  .vs-crit-foot { flex-wrap: wrap; }
  .vs-crit-foot .vs-acts { margin-left: auto; }
}

/* Score matrix */
.vs-scale { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px 16px; font-size: 14px; color: var(--muted); }
.vs-scale strong { color: var(--text); }
.vs-matrix { min-width: 0; }
.vs-matrix th { text-align: left; font-size: 13px; vertical-align: bottom; padding: 8px 6px; }
.vs-matrix .vs-th-crit { min-width: 240px; }
.vs-matrix .vs-th-v { min-width: 150px; overflow-wrap: anywhere; }
.vs-matrix td, .vs-matrix .vs-td-crit { vertical-align: top; }
.vs-td-crit { font-weight: 400; min-width: 240px; padding: 8px 6px; }
.vs-cname { display: block; font-weight: 600; color: var(--text); overflow-wrap: anywhere; }
.vs-cmeta { display: flex; flex-wrap: wrap; gap: 4px 6px; align-items: center; font-size: 12px; color: var(--muted); margin-top: 3px; }
.vs-td { display: table-cell; }
.vs-td > * + * { margin-top: 4px; }
.vs-matrix td select.vs-score { width: 100%; min-width: 130px; border-color: var(--line); }
.vs-matrix td select.vs-blank { color: var(--muted); border-style: dashed; }
.vs-matrix td select.vs-fail { border-color: rgba(248, 113, 113, 0.6); color: #fca5a5; }
.vs-matrix td input.vs-comment { width: 100%; font-size: 12px; }
.vs-cell-flag { display: inline-block; }
.vs-has-note { display: inline-block; font-size: 12px; color: var(--accent-2); cursor: help; }
.vs-total-row th, .vs-total-row td { background: var(--bg-alt); border-bottom: 0; vertical-align: top; }
.vs-total { font-size: 20px; }
@media (max-width: 640px) {
  .vs-matrix .vs-th-crit, .vs-td-crit { min-width: 170px; }
  .vs-matrix .vs-th-v { min-width: 130px; }
}

/* Results */
.vs-stats { margin-top: 0; }
.vs-stat-name { font-size: 18px !important; line-height: 1.3; overflow-wrap: anywhere; }
.vs-notes { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.vs-notes li { background: var(--surface); border: 1px solid var(--line); border-radius: 10px; padding: 8px 12px; color: var(--text); font-size: 15px; }
.vs-notes li .flag { margin-right: 4px; }
.vs-notes li.muted { color: var(--muted); }
.vs-rank { min-width: 760px; }
.vs-rank th { text-align: left; font-size: 13px; padding: 8px 6px; }
.vs-rank td { vertical-align: top; }
.vs-rank .flag { white-space: normal; }
.vs-out td { opacity: 0.7; }
.vs-score-cell { min-width: 150px; }
.vs-num { font-weight: 700; font-variant-numeric: tabular-nums; }
.vs-bar { display: block; height: 6px; margin-top: 4px; background: var(--bg); border: 1px solid var(--line); border-radius: 999px; overflow: hidden; }
.vs-bar-fill { display: block; height: 100%; width: 0; background: var(--accent); }
.vs-bar-fill.out { background: rgba(248, 113, 113, 0.6); }
.vs-inline-flag { margin-left: 6px; }
.vs-card-warn { border-color: rgba(253, 224, 71, 0.45); }
.cw-card p { margin: 0; }

/* Decision record (preview + print) */
.vs-paper { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: clamp(16px, 3vw, 32px); overflow-x: auto; }
.vs-doc { display: grid; gap: 18px; max-width: 1000px; overflow-wrap: anywhere; }
.vs-doc-head { border-bottom: 2px solid var(--accent); padding-bottom: 12px; }
.vs-doc-eyebrow { margin: 0 0 4px; font-size: 13px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.08em; color: var(--accent); }
.vs-doc .vs-doc-title { font-size: 28px; margin: 0 0 8px; line-height: 1.2; }
.vs-doc-meta { display: flex; flex-wrap: wrap; gap: 4px 24px; margin: 0; font-size: 14px; }
.vs-doc-meta div { display: flex; gap: 6px; }
.vs-doc-meta dt { color: var(--muted); }
.vs-doc-meta dd { margin: 0; font-weight: 600; color: var(--text); }
.vs-doc-sec { display: grid; gap: 8px; }
.vs-doc-sec h3 { font-size: 19px; margin: 0; color: var(--accent-2); }
.vs-doc-sub { font-size: 15px; font-weight: 700; margin: 6px 0 0; }
.page .vs-doc-p, .vs-doc-p { margin: 0; white-space: pre-wrap; color: var(--text); }
.vs-doc ul { margin: 0; padding-left: 22px; }
.page .vs-doc li { color: var(--text); margin: 3px 0; }
.vs-doc-small { margin: 0; font-size: 13px; color: var(--muted); }
.vs-doc-table { width: 100%; min-width: 0; border-collapse: collapse; font-size: 14px; }
.vs-doc-table th, .vs-doc-table td { border: 1px solid var(--line); padding: 6px 10px; text-align: left; white-space: normal; overflow-wrap: anywhere; vertical-align: top; }
.vs-doc-table th { background: var(--bg); }
.vs-doc-matrix td:nth-child(n+2), .vs-doc-matrix th:nth-child(n+2) { text-align: center; }
.vs-doc-matrix tbody tr:last-child td { font-weight: 700; }

/* Printing: only the generated decision record is printed — never the editing UI. */
#vs-print { display: none; }
@media print {
  body.vs-printing { page: wide; background: #fff !important; }
  body.vs-printing > *:not(#vs-print) { display: none !important; }
  body.vs-printing #vs-print { display: block; color: #111; width: 100%; max-width: 100%; overflow: visible; }
  #vs-print .vs-doc { max-width: none; width: 100%; gap: 14px; }
  #vs-print, #vs-print * { color: #111 !important; background: transparent !important; box-shadow: none !important; }
  #vs-print dt, #vs-print .vs-doc-eyebrow, #vs-print .vs-doc-small { color: #444 !important; }
  #vs-print .vs-doc-head { border-bottom-color: #111; }
  #vs-print .vs-doc-sec h3 { font-size: 15pt; border-bottom: 1px solid #bbb; padding-bottom: 2px; break-after: avoid; }
  #vs-print .vs-doc-sub { break-after: avoid; }
  #vs-print .vs-doc-table { width: 100% !important; min-width: 0 !important; table-layout: auto !important; font-size: 9.5pt; }
  #vs-print .vs-doc-table th, #vs-print .vs-doc-table td { border: 1px solid #999; padding: 3px 5px !important; white-space: normal !important; overflow-wrap: anywhere !important; word-break: break-word !important; }
  #vs-print .vs-doc-table th { background: #f0f0f0 !important; }
  #vs-print .vs-doc-table tr { break-inside: avoid; }
  #vs-print .vs-doc-p, #vs-print li { overflow-wrap: anywhere; word-break: break-word; }
  #vs-print .vs-doc-vendor { break-inside: avoid; }
}
