/* Swarm Supremacy - tokens and shared controls.
   Operations software: neutral greys, colour only for state, no decoration. */

@font-face {
  font-family: "IBM Plex Sans";
  src: url("../fonts/ibm-plex-sans-latin.woff2") format("woff2");
  font-weight: 100 700;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "IBM Plex Mono";
  src: url("../fonts/ibm-plex-mono-400-latin.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "IBM Plex Mono";
  src: url("../fonts/ibm-plex-mono-500-latin.woff2") format("woff2");
  font-weight: 500 700;
  font-style: normal;
  font-display: swap;
}

:root {
  --bg: #0b0d10;
  --panel: #111418;
  --panel-2: #161a1f;
  --hover: #1a1f25;
  --select: #20262e;
  --line: #20252b;
  --line-2: #2b3138;
  --line-3: #3b424b;

  --text: #e6edf3;
  --text-2: #a8b1bb;
  --text-3: #788390;
  --text-4: #545e69;

  --red: #e63946;
  --red-hover: #ee4753;
  --red-press: #9f1d28;
  --red-text: #f26b74;
  --red-bg: rgba(230, 57, 70, 0.1);
  --amber: #d29922;
  --amber-bg: rgba(210, 153, 34, 0.1);
  --green: #3fb950;

  --sans: "IBM Plex Sans", system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

html,
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
}

body {
  font-family: var(--sans);
  font-size: 13px;
  line-height: 1.45;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

.mono {
  font-family: var(--mono);
  font-variant-numeric: tabular-nums;
}

button,
input {
  font: inherit;
  color: inherit;
}

::selection {
  background: rgba(230, 237, 243, 0.22);
}

:focus-visible {
  outline: 2px solid rgba(230, 237, 243, 0.5);
  outline-offset: 1px;
}

/* ---------------------------------------------------------------- buttons */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  height: 30px;
  padding: 0 12px;
  border: 1px solid var(--line-3);
  border-radius: 4px;
  background: var(--panel-2);
  color: var(--text);
  font-size: 13px;
  font-weight: 500;
  line-height: 1;
  white-space: nowrap;
  cursor: pointer;
}

.btn:hover {
  background: #1d2228;
  border-color: #4a525c;
}

.btn:disabled {
  cursor: not-allowed;
  color: var(--text-4);
  background: var(--panel);
  border-color: var(--line-2);
}

.btn--primary {
  background: var(--text);
  border-color: var(--text);
  color: var(--bg);
  font-weight: 600;
}

.btn--primary:hover {
  background: #ffffff;
  border-color: #ffffff;
}

.btn--primary:disabled {
  background: #8b949e;
  border-color: #8b949e;
  color: var(--bg);
}

.btn--danger {
  background: var(--red);
  border-color: var(--red);
  color: #ffffff;
  font-weight: 600;
}

.btn--danger:hover {
  background: var(--red-hover);
  border-color: var(--red-hover);
}

.btn--sm {
  height: 26px;
  padding: 0 10px;
  font-size: 12px;
}

.link {
  padding: 0;
  border: 0;
  background: none;
  color: var(--text-2);
  cursor: pointer;
}

.link:hover {
  color: var(--text);
  text-decoration: underline;
  text-underline-offset: 2px;
}

/* ---------------------------------------------------------------- inputs */

.input {
  width: 100%;
  height: 36px;
  padding: 0 10px;
  border: 1px solid var(--line-2);
  border-radius: 4px;
  background: var(--bg);
  color: var(--text);
  font-size: 14px;
  outline: none;
}

.input::placeholder {
  color: var(--text-4);
}

.input:focus {
  border-color: var(--text-3);
  box-shadow: 0 0 0 3px rgba(230, 237, 243, 0.07);
}

.input--sm {
  height: 28px;
  padding: 0 8px;
  font-size: 12px;
}

/* ---------------------------------------------------------------- status */

.pill {
  display: inline-flex;
  align-items: center;
  height: 20px;
  padding: 0 7px;
  border: 1px solid var(--line-3);
  border-radius: 3px;
  color: var(--text-2);
  font-size: 11px;
  font-weight: 500;
  white-space: nowrap;
}

.pill--strong {
  border-color: #5a636e;
  color: var(--text);
}

.dot {
  display: inline-block;
  flex: none;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--text-3);
}

.dot--ok { background: #8b949e; }
.dot--warn { background: var(--amber); }
.dot--crit { background: var(--red); }
.dot--silent { background: transparent; box-shadow: inset 0 0 0 1.5px var(--red); }
.dot--ground { background: transparent; box-shadow: inset 0 0 0 1.5px var(--text-4); }
.dot--live { background: var(--green); }
.dot--sim { background: var(--text-3); }

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0s !important;
    transition-duration: 0s !important;
  }
}
