/**
 * React threat visuals styles
 * @countermeasure/web-components/react/threat-visuals
 */

.cmm-react-stat-card,
.cmm-react-metric-tile,
.cmm-react-flow-node-card {
  background: rgba(255, 255, 255, 0.96);
  border: 1px solid rgba(226, 232, 240, 0.95);
  box-shadow: 0 10px 26px -20px rgba(15, 23, 42, 0.55);
  color: #0f172a;
}

.dark .cmm-react-stat-card,
.dark .cmm-react-metric-tile,
.dark .cmm-react-flow-node-card {
  background: rgba(15, 23, 42, 0.9);
  border-color: rgba(71, 85, 105, 0.72);
  box-shadow: 0 14px 36px -26px rgba(2, 6, 23, 0.9);
  color: #f8fafc;
}

.cmm-react-stat-card {
  border-radius: 1rem;
  padding: 0.875rem 1rem;
}

.cmm-react-stat-card__label {
  color: #64748b;
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.dark .cmm-react-stat-card__label {
  color: #94a3b8;
}

.cmm-react-stat-card__value {
  margin-top: 0.125rem;
  font-size: 1.25rem;
  font-weight: 700;
  line-height: 1.2;
  font-variant-numeric: tabular-nums;
}

.cmm-react-stat-card__value--cyan {
  color: #0891b2;
}

.cmm-react-stat-card__value--rose {
  color: #dc2626;
}

.cmm-react-stat-card__value--amber {
  color: #d97706;
}

.cmm-react-stat-card__value--violet {
  color: #7c3aed;
}

.cmm-react-stat-card__value--orange {
  color: #ea580c;
}

.cmm-react-stat-card__value--emerald {
  color: #059669;
}

.dark .cmm-react-stat-card__value--cyan {
  color: #22d3ee;
}

.dark .cmm-react-stat-card__value--rose {
  color: #f87171;
}

.dark .cmm-react-stat-card__value--amber {
  color: #fbbf24;
}

.dark .cmm-react-stat-card__value--violet {
  color: #a78bfa;
}

.dark .cmm-react-stat-card__value--orange {
  color: #fb923c;
}

.dark .cmm-react-stat-card__value--emerald {
  color: #34d399;
}

.cmm-react-stat-card__detail {
  margin-top: 0.125rem;
  color: #64748b;
  font-size: 0.625rem;
}

.dark .cmm-react-stat-card__detail {
  color: #94a3b8;
}

.cmm-react-stat-card__children {
  margin-top: 0.375rem;
}

.cmm-react-stat-card__trend {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  margin-top: 0.375rem;
  padding: 0.125rem 0.5rem;
  border-radius: 0.5rem;
  font-size: 0.625rem;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  background: rgba(148, 163, 184, 0.16);
}

.dark .cmm-react-stat-card__trend {
  background: rgba(51, 65, 85, 0.85);
}

.cmm-react-stat-card__trend--up {
  color: #059669;
}

.cmm-react-stat-card__trend--down {
  color: #dc2626;
}

.cmm-react-stat-card__trend--neutral {
  color: #64748b;
}

.dark .cmm-react-stat-card__trend--up {
  color: #34d399;
}

.dark .cmm-react-stat-card__trend--down {
  color: #f87171;
}

.dark .cmm-react-stat-card__trend--neutral {
  color: #94a3b8;
}

.cmm-react-uptime-bar {
  display: flex;
  align-items: stretch;
  gap: 2px;
}

.cmm-react-uptime-bar__segment {
  flex: 1;
  height: 0.75rem;
  border-radius: 0.1875rem;
  opacity: 0.2;
}

.cmm-react-uptime-bar__segment--active {
  opacity: 0.8;
}

.cmm-react-uptime-bar__segment--highlight {
  background: #fbbf24;
}

.cmm-react-uptime-bar__segment--default {
  background: #34d399;
}

.cmm-react-metric-tile {
  display: flex;
  align-items: center;
  gap: 0.625rem;
  border-radius: 0.75rem;
  padding: 0.625rem 0.75rem;
}

.cmm-react-metric-tile--slate {
  background: #f8fafc;
}

.cmm-react-metric-tile--blue {
  background: rgba(239, 246, 255, 0.9);
}

.cmm-react-metric-tile--violet {
  background: rgba(245, 243, 255, 0.9);
}

.cmm-react-metric-tile--amber {
  background: rgba(255, 251, 235, 0.92);
}

.cmm-react-metric-tile--emerald {
  background: rgba(236, 253, 245, 0.92);
}

.cmm-react-metric-tile--orange {
  background: rgba(255, 247, 237, 0.94);
}

.dark .cmm-react-metric-tile--slate {
  background: rgba(30, 41, 59, 0.78);
}

.dark .cmm-react-metric-tile--blue {
  background: rgba(59, 130, 246, 0.08);
}

.dark .cmm-react-metric-tile--violet {
  background: rgba(139, 92, 246, 0.08);
}

.dark .cmm-react-metric-tile--amber {
  background: rgba(245, 158, 11, 0.08);
}

.dark .cmm-react-metric-tile--emerald {
  background: rgba(16, 185, 129, 0.08);
}

.dark .cmm-react-metric-tile--orange {
  background: rgba(249, 115, 22, 0.08);
}

.cmm-react-metric-tile__icon {
  display: flex;
  width: 1.75rem;
  height: 1.75rem;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
  border-radius: 0.625rem;
}

.cmm-react-metric-tile__icon--slate {
  color: #64748b;
  background: rgba(226, 232, 240, 0.9);
}

.cmm-react-metric-tile__icon--blue {
  color: #2563eb;
  background: rgba(219, 234, 254, 0.95);
}

.cmm-react-metric-tile__icon--violet {
  color: #7c3aed;
  background: rgba(237, 233, 254, 0.95);
}

.cmm-react-metric-tile__icon--amber {
  color: #d97706;
  background: rgba(254, 243, 199, 0.95);
}

.cmm-react-metric-tile__icon--emerald {
  color: #059669;
  background: rgba(209, 250, 229, 0.95);
}

.cmm-react-metric-tile__icon--orange {
  color: #ea580c;
  background: rgba(255, 237, 213, 0.96);
}

.dark .cmm-react-metric-tile__icon--slate {
  color: #94a3b8;
  background: rgba(30, 41, 59, 0.92);
}

.dark .cmm-react-metric-tile__icon--blue {
  color: #60a5fa;
  background: rgba(37, 99, 235, 0.18);
}

.dark .cmm-react-metric-tile__icon--violet {
  color: #a78bfa;
  background: rgba(124, 58, 237, 0.18);
}

.dark .cmm-react-metric-tile__icon--amber {
  color: #fbbf24;
  background: rgba(217, 119, 6, 0.18);
}

.dark .cmm-react-metric-tile__icon--emerald {
  color: #34d399;
  background: rgba(5, 150, 105, 0.18);
}

.dark .cmm-react-metric-tile__icon--orange {
  color: #fb923c;
  background: rgba(234, 88, 12, 0.18);
}

.cmm-react-metric-tile__body {
  min-width: 0;
}

.cmm-react-metric-tile__value {
  color: #1e293b;
  font-size: 0.875rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.dark .cmm-react-metric-tile__value {
  color: #f8fafc;
}

.cmm-react-metric-tile__label {
  color: #94a3b8;
  font-size: 0.5625rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.dark .cmm-react-metric-tile__label {
  color: #64748b;
}

.cmm-react-flow-node-card {
  position: relative;
  overflow: hidden;
  border-radius: 0.875rem;
  transition: box-shadow 160ms ease, transform 160ms ease;
}

.cmm-react-flow-node-card:hover {
  transform: translateY(-1px);
  box-shadow: 0 16px 32px -24px rgba(15, 23, 42, 0.55);
}

.dark .cmm-react-flow-node-card:hover {
  box-shadow: 0 18px 36px -26px rgba(2, 6, 23, 0.92);
}

.cmm-react-flow-node-card--stripe::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 3px;
  background: var(--cmm-flow-node-accent, #94a3b8);
}

.cmm-react-flow-node-card--compact {
  width: 9.6875rem;
  padding: 0.5rem 0.625rem;
}

.cmm-react-flow-node-card--regular {
  width: 11.625rem;
  padding: 0.625rem 0.75rem;
}

.cmm-react-flow-node-card--outline {
  border-width: 2px;
  background: linear-gradient(135deg, var(--cmm-flow-node-soft, rgba(255, 247, 237, 0.95)), rgba(255, 255, 255, 0.98));
}

.dark .cmm-react-flow-node-card--outline {
  background: linear-gradient(135deg, var(--cmm-flow-node-dark-soft, rgba(249, 115, 22, 0.08)), rgba(15, 23, 42, 0.92));
}

.cmm-react-flow-node-card--subtle {
  background: rgba(248, 250, 252, 0.95);
}

.dark .cmm-react-flow-node-card--subtle {
  background: rgba(30, 41, 59, 0.78);
}

.cmm-react-flow-node-card--slate {
  --cmm-flow-node-accent: #94a3b8;
  --cmm-flow-node-soft: rgba(248, 250, 252, 0.95);
  --cmm-flow-node-dark-soft: rgba(51, 65, 85, 0.18);
}

.cmm-react-flow-node-card--blue {
  --cmm-flow-node-accent: #60a5fa;
  --cmm-flow-node-soft: rgba(239, 246, 255, 0.95);
  --cmm-flow-node-dark-soft: rgba(59, 130, 246, 0.1);
}

.cmm-react-flow-node-card--cyan {
  --cmm-flow-node-accent: #22d3ee;
  --cmm-flow-node-soft: rgba(236, 254, 255, 0.95);
  --cmm-flow-node-dark-soft: rgba(8, 145, 178, 0.1);
}

.cmm-react-flow-node-card--violet {
  --cmm-flow-node-accent: #a78bfa;
  --cmm-flow-node-soft: rgba(245, 243, 255, 0.95);
  --cmm-flow-node-dark-soft: rgba(139, 92, 246, 0.1);
}

.cmm-react-flow-node-card--amber {
  --cmm-flow-node-accent: #fbbf24;
  --cmm-flow-node-soft: rgba(255, 251, 235, 0.95);
  --cmm-flow-node-dark-soft: rgba(245, 158, 11, 0.1);
}

.cmm-react-flow-node-card--emerald {
  --cmm-flow-node-accent: #34d399;
  --cmm-flow-node-soft: rgba(236, 253, 245, 0.95);
  --cmm-flow-node-dark-soft: rgba(16, 185, 129, 0.1);
}

.cmm-react-flow-node-card--orange {
  --cmm-flow-node-accent: #fb923c;
  --cmm-flow-node-soft: rgba(255, 247, 237, 0.98);
  --cmm-flow-node-dark-soft: rgba(249, 115, 22, 0.12);
}

.cmm-react-flow-node-card--rose {
  --cmm-flow-node-accent: #fb7185;
  --cmm-flow-node-soft: rgba(255, 241, 242, 0.95);
  --cmm-flow-node-dark-soft: rgba(244, 63, 94, 0.1);
}

.cmm-react-flow-node-card__header {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.cmm-react-flow-node-card__icon {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
  border-radius: 0.625rem;
}

.cmm-react-flow-node-card--compact .cmm-react-flow-node-card__icon {
  width: 1.5rem;
  height: 1.5rem;
}

.cmm-react-flow-node-card--regular .cmm-react-flow-node-card__icon {
  width: 1.75rem;
  height: 1.75rem;
}

.cmm-react-flow-node-card__icon--slate {
  color: #64748b;
  background: rgba(241, 245, 249, 0.95);
}

.cmm-react-flow-node-card__icon--blue {
  color: #2563eb;
  background: rgba(219, 234, 254, 0.95);
}

.cmm-react-flow-node-card__icon--violet {
  color: #7c3aed;
  background: rgba(237, 233, 254, 0.95);
}

.cmm-react-flow-node-card__icon--amber {
  color: #d97706;
  background: rgba(254, 243, 199, 0.95);
}

.cmm-react-flow-node-card__icon--emerald {
  color: #059669;
  background: rgba(209, 250, 229, 0.95);
}

.cmm-react-flow-node-card__icon--orange {
  color: #ea580c;
  background: rgba(255, 237, 213, 0.96);
}

.cmm-react-flow-node-card__icon--rose {
  color: #e11d48;
  background: rgba(255, 228, 230, 0.96);
}

.dark .cmm-react-flow-node-card__icon--slate {
  color: #94a3b8;
  background: rgba(30, 41, 59, 0.92);
}

.dark .cmm-react-flow-node-card__icon--blue {
  color: #60a5fa;
  background: rgba(37, 99, 235, 0.18);
}

.dark .cmm-react-flow-node-card__icon--violet {
  color: #a78bfa;
  background: rgba(124, 58, 237, 0.18);
}

.dark .cmm-react-flow-node-card__icon--amber {
  color: #fbbf24;
  background: rgba(217, 119, 6, 0.18);
}

.dark .cmm-react-flow-node-card__icon--emerald {
  color: #34d399;
  background: rgba(5, 150, 105, 0.18);
}

.dark .cmm-react-flow-node-card__icon--orange {
  color: #fb923c;
  background: rgba(234, 88, 12, 0.18);
}

.dark .cmm-react-flow-node-card__icon--rose {
  color: #fb7185;
  background: rgba(225, 29, 72, 0.18);
}

.cmm-react-flow-node-card__body {
  min-width: 0;
  flex: 1 1 auto;
}

.cmm-react-flow-node-card__title {
  color: #1e293b;
  font-weight: 700;
  line-height: 1.2;
}

.cmm-react-flow-node-card--compact .cmm-react-flow-node-card__title {
  font-size: 0.625rem;
}

.cmm-react-flow-node-card--regular .cmm-react-flow-node-card__title {
  font-size: 0.6875rem;
}

.dark .cmm-react-flow-node-card__title {
  color: #f8fafc;
}

.cmm-react-flow-node-card__eyebrow {
  margin-top: 0.0625rem;
  font-size: 0.5rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--cmm-flow-node-accent, #94a3b8);
}

.cmm-react-flow-node-card__meta {
  margin-top: 0.375rem;
  color: #64748b;
  font-size: 0.5625rem;
  line-height: 1.4;
}

.dark .cmm-react-flow-node-card__meta {
  color: #94a3b8;
}

.cmm-react-flow-node-card__content {
  margin-top: 0.375rem;
}
