/*
 * [WHAT]: Shared Light Citadel stylesheet for the MyAlaska.me Threat Coverage Matrix widget.
 * [WHY TECH]: Centralizes all table, badge, scorecard, and filter styles in one cached CSS file instead of duplicating inline styles across 40+ HTML pages.
 * [CONCEPTS USED]: CSS custom properties, responsive grid/flex layouts, semantic disposition badge classes, and accessible focus states.
 * [SECURITY / BUSINESS PURPOSE]: Guarantees uniform CISO-ready visual presentation of MITRE ATT&CK, MITRE ATLAS, and OWASP LLM threat coverage across every product page.
 */

.swarm-tm-section {
  max-width: 80rem;
  margin: 3.5rem auto;
  padding: 2rem 1.5rem;
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 1.25rem;
  box-shadow: 0 10px 30px -12px rgba(15, 23, 42, 0.08);
  font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  color: #0f172a;
}

.swarm-tm-header {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  padding-bottom: 1.25rem;
  border-bottom: 1px solid #e2e8f0;
}

.swarm-tm-eyebrow {
  display: inline-block;
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #0284c7;
  background: #f0f9ff;
  border: 1px solid #bae6fd;
  padding: 0.25rem 0.65rem;
  border-radius: 9999px;
  margin-bottom: 0.5rem;
}

.swarm-tm-title {
  margin: 0;
  font-size: 1.5rem;
  font-weight: 800;
  color: #0f172a;
  letter-spacing: -0.02em;
}

.swarm-tm-subtitle {
  margin: 0.35rem 0 0;
  font-size: 0.9rem;
  color: #475569;
  max-width: 48rem;
}

.swarm-tm-scorecards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 0.85rem;
  margin: 1.25rem 0;
}

.swarm-tm-card {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 0.85rem;
  padding: 0.9rem 1rem;
}

.swarm-tm-card-label {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #64748b;
}

.swarm-tm-card-count {
  font-size: 1.35rem;
  font-weight: 800;
  color: #0f172a;
  margin: 0.2rem 0;
}

.swarm-tm-card-desc {
  font-size: 0.8rem;
  color: #475569;
  line-height: 1.4;
}

.swarm-tm-controls {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin: 1rem 0;
}

.swarm-tm-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}

.swarm-tm-filter-btn {
  appearance: none;
  border: 1px solid #cbd5e1;
  background: #f8fafc;
  color: #334155;
  font-size: 0.76rem;
  font-weight: 700;
  padding: 0.38rem 0.75rem;
  border-radius: 9999px;
  cursor: pointer;
  transition: all 0.15s ease;
}

.swarm-tm-filter-btn:hover {
  border-color: #0284c7;
  color: #0284c7;
}

.swarm-tm-filter-btn.is-active {
  background: #0f172a;
  border-color: #0f172a;
  color: #ffffff;
}

.swarm-tm-table-wrap {
  overflow-x: auto;
  border: 1px solid #e2e8f0;
  border-radius: 0.85rem;
}

.swarm-tm-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.84rem;
  text-align: left;
}

.swarm-tm-table th {
  background: #0f172a;
  color: #f8fafc;
  font-size: 0.74rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 0.75rem 0.9rem;
  white-space: nowrap;
}

.swarm-tm-table td {
  padding: 0.75rem 0.9rem;
  border-top: 1px solid #e2e8f0;
  vertical-align: top;
  color: #1e293b;
  line-height: 1.45;
}

.swarm-tm-table tbody tr:hover {
  background: #f8fafc;
}

.swarm-tm-id {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-weight: 700;
  font-size: 0.78rem;
  color: #0369a1;
  white-space: nowrap;
}

.swarm-tm-badge {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 700;
  padding: 0.22rem 0.6rem;
  border-radius: 9999px;
  white-space: nowrap;
}

.swarm-tm-badge--eliminated {
  background: #ecfdf5;
  color: #047857;
  border: 1px solid #a7f3d0;
}

.swarm-tm-badge--blocked {
  background: #eff6ff;
  color: #1d4ed8;
  border: 1px solid #bfdbfe;
}

.swarm-tm-badge--contained {
  background: #fffbeb;
  color: #b45309;
  border: 1px solid #fde68a;
}

.swarm-tm-badge--immunized {
  background: #f0f9ff;
  color: #0369a1;
  border: 1px solid #bae6fd;
}

.swarm-tm-footer {
  margin-top: 1.15rem;
  padding: 0.9rem 1rem;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 0.85rem;
  font-size: 0.8rem;
  color: #334155;
  display: grid;
  gap: 0.45rem;
}

.swarm-tm-footer strong {
  color: #0f172a;
}
