/* MITRE ATT&CK matrix workspace shared by every SOC console that carries the
 * ATT&CK tab (Modules 6–12, soc-m06-assessment-related-search.js). Laid out
 * like attack.mitre.org: one column per tactic, techniques alphabetical,
 * sub-techniques expandable. Colours follow the Module 03 console. */
.attack-panel{display:grid;gap:12px;min-width:0;color:#172b43;font-size:13px}
.attack-panel h3{margin:0;color:#1e3a5f;font-size:17px}
.attack-panel h3 sup{font-size:.55em}
.attack-panel h4{margin:8px 0 0;color:#1e3a5f;font-size:11px;letter-spacing:.06em;text-transform:uppercase}
.attack-head{display:flex;flex-wrap:wrap;align-items:flex-end;justify-content:space-between;gap:10px 18px}
.attack-head p{margin:4px 0 0;max-width:640px;color:#64748b;font-size:12px;line-height:1.5}
.attack-filter{display:grid;gap:4px;min-width:min(100%,260px);color:#475569;font-size:11px;font-weight:700}
.attack-filter input{box-sizing:border-box;width:100%;min-height:34px;padding:6px 10px;border:1px solid #aebdca;border-radius:7px;font:inherit;font-weight:500}
.attack-filter input:focus{outline:2px solid #f9731666;border-color:#f97316}

.attack-legend{display:flex;flex-wrap:wrap;gap:6px 14px;margin:0;padding:0;list-style:none;color:#475569;font-size:11px}
.attack-legend li{display:flex;align-items:center;gap:5px}
.attack-legend i{width:12px;height:12px;border:1px solid #cbd5e1;border-radius:3px;background:#fff}

/* Matrix: horizontal scroll inside the console, sticky tactic headers. */
.attack-matrix{display:grid;grid-auto-flow:column;grid-auto-columns:minmax(150px,1fr);gap:6px;max-height:520px;overflow:auto;padding:0 0 6px;border:1px solid #dbe3ed;border-radius:10px;background:#f8fafc;overscroll-behavior:contain}
.attack-matrix:focus-visible{outline:2px solid #f97316;outline-offset:2px}
.attack-col{min-width:0}
.attack-col-head{position:sticky;top:0;z-index:1;display:grid;gap:2px;padding:9px 8px;background:#102b46;color:#b9cce0;font-size:10px;text-align:center}
.attack-col-head a{color:#fff;font-size:12px;font-weight:800;text-decoration:none}
.attack-col-head a:hover{text-decoration:underline}
.attack-col ul{display:grid;gap:4px;margin:0;padding:6px 5px 0;list-style:none}
.attack-tech{min-width:0}

.attack-panel .attack-cell{display:flex;flex-direction:column;align-items:flex-start;gap:1px;box-sizing:border-box;width:100%;margin:0;padding:6px 7px;border:1px solid #cbd5e1;border-radius:6px;background:#fff;color:#172b43;font:600 11.5px/1.3 Inter,system-ui,sans-serif;text-align:left;cursor:pointer}
.attack-panel .attack-cell:hover{border-color:#f97316}
.attack-panel .attack-cell:focus-visible{outline:2px solid #f97316;outline-offset:1px}
.attack-cell-name{overflow-wrap:anywhere}
.attack-cell-id{color:#64748b;font:500 10px ui-monospace,Consolas,monospace}
.attack-panel .attack-cell.is-supported,.attack-legend .is-supported{border-color:#16a34a;background:#dcfce7}
.attack-panel .attack-cell.is-needs-review,.attack-legend .is-needs-review{border-color:#d97706;background:#fef3c7}
.attack-panel .attack-cell.is-unsupported,.attack-legend .is-unsupported{border-color:#94a3b8;background:#e2e8f0}
.attack-panel .attack-cell.is-unsupported .attack-cell-name{text-decoration:line-through}
.attack-panel .attack-cell.is-selected,.attack-legend .is-selected{border-color:#f97316;background:#fff7ed;box-shadow:0 0 0 2px #f97316}
.has-mapped-sub>.attack-cell{border-left:4px solid #1e3a5f}

.attack-subs{margin:2px 0 0 8px;padding-left:6px;border-left:2px solid #dbe3ed}
.attack-subs summary{padding:2px 0;color:#1e3a5f;font-size:10.5px;font-weight:700;cursor:pointer}
.attack-subs ul{padding:3px 0 2px}
.attack-subs .attack-cell{font-weight:500}

.attack-matrix.is-filtering .attack-tech{opacity:.28}
.attack-matrix.is-filtering .attack-tech.is-match{opacity:1}
.attack-matrix.is-filtering .attack-tech.is-match>.attack-cell{border-color:#f97316}

.attack-notice{margin:-4px 0 0;color:#64748b;font-size:10.5px}

/* Mapping form */
.attack-form{display:grid;gap:10px;padding:14px;border:1px solid #dbe3ed;border-radius:10px;background:#fff}
.attack-form label{display:grid;gap:4px;color:#334155;font-size:12px;font-weight:700}
.attack-form select,.attack-form input[type=number],.attack-form textarea,.attack-row-actions input{box-sizing:border-box;width:100%;min-height:36px;padding:7px 9px;border:1px solid #aebdca;border-radius:6px;font:inherit;font-weight:500}
.attack-form textarea{resize:vertical}
.attack-form-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(180px,1fr));gap:10px}
.attack-selected{padding:9px 11px;border:1px dashed #aebdca;border-radius:7px;background:#f8fafc;color:#64748b;font-size:12px;line-height:1.5}
.attack-selected.has-selection{border:1px solid #f97316;background:#fff7ed;color:#172b43}
.attack-selected span{font-weight:700;color:#1e3a5f}
.attack-selected a{margin-left:6px;color:#c2410c;font-size:11px;white-space:nowrap}
.attack-evidence-set{margin:0;padding:0;border:0}
.attack-evidence-set legend{margin-bottom:6px;color:#334155;font-size:12px;font-weight:700}
.attack-evidence-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(190px,1fr));gap:6px}
.attack-form label.attack-evidence{display:flex;align-items:flex-start;gap:8px;padding:7px 9px;border:1px solid #dbe3ed;border-radius:7px;background:#f8fafc;font-weight:500;cursor:pointer}
.attack-form label.attack-evidence:has(input:checked){border-color:#1e3a5f;background:#eef4fb}
.attack-evidence input{margin-top:2px}
.attack-evidence span{display:grid;gap:1px;min-width:0;overflow-wrap:anywhere}
.attack-evidence strong{font-family:ui-monospace,Consolas,monospace;font-size:11.5px}
.attack-evidence small{color:#64748b;font-size:10.5px}
.attack-form-actions{display:flex;flex-wrap:wrap;gap:8px}
.attack-panel .attack-primary{border-color:#f97316;background:#f97316;color:#fff}
.attack-panel .attack-primary:hover:not(:disabled){background:#ea580c}
.attack-panel [data-m06-mapping-feedback]:empty{display:none}
.attack-panel [data-m06-mapping-feedback]{margin:0;color:#a32323;font-weight:600}

/* Saved mappings */
.attack-table-wrap{overflow-x:auto;border:1px solid #dbe3ed;border-radius:10px}
.attack-table{width:100%;border-collapse:collapse;font-size:12px}
.attack-table th{padding:8px 10px;background:#f1f5f9;color:#475569;font-size:10.5px;letter-spacing:.05em;text-align:left;text-transform:uppercase;white-space:nowrap}
.attack-table td{padding:8px 10px;border-top:1px solid #e2e8f0;vertical-align:top}
.attack-table a{color:#1e3a5f}
.attack-table code{padding:1px 4px;border-radius:4px;background:#f1f5f9;font-size:11px}
.attack-rationale{min-width:200px;max-width:340px;color:#334155;line-height:1.45}
.attack-row-actions{white-space:nowrap}
.attack-row-actions details{display:inline-block}
.attack-row-actions summary{display:inline-block;padding:7px 11px;border:1px solid #cbd5e1;border-radius:7px;color:#a32323;font-size:12px;font-weight:700;cursor:pointer}
.attack-row-actions form{display:grid;gap:6px;min-width:220px;margin-top:6px;white-space:normal}
.attack-pill{display:inline-block;padding:2px 8px;border-radius:999px;font-size:11px;font-weight:700;white-space:nowrap}
.attack-pill.is-supported{background:#dcfce7;color:#166534}
.attack-pill.is-needs-review{background:#fef3c7;color:#92400e}
.attack-pill.is-unsupported{background:#e2e8f0;color:#334155}
.attack-empty{margin:0;color:#64748b}

@media (max-width:640px){
  .attack-matrix{grid-auto-columns:minmax(138px,1fr);max-height:440px}
}
