/* Follows the look of the Tier website: plain, light, Arial, blue links. */

body {
  margin: 0;
  background: #fff;
  color: #222;
  font-family: Arial, Helvetica, sans-serif;
  font-size: 15px;
  line-height: 1.5;
}

.page {
  width: 92%;
  max-width: 1100px;
  margin: 0 auto;
}

a {
  color: #0645ad;
  text-decoration: none;
}

a:hover {
  color: #033b8a;
  text-decoration: underline;
  text-underline-offset: 3px;
}

a:focus-visible,
button:focus-visible,
input:focus-visible {
  outline: 2px solid #0645ad;
  outline-offset: 2px;
}

h1 {
  font-size: 20px;
  margin: 8px 0 16px;
}

h2 {
  font-size: 17px;
  margin: 28px 0 10px;
  padding-bottom: 4px;
  border-bottom: 1px solid #eee;
}

.muted {
  color: #6e7781;
}

.mono {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 13px;
}

/* Header and footer */

.site-header {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px 16px;
  padding: 16px 0;
  border-bottom: 1px solid #ddd;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: #222;
  font-size: 20px;
  font-weight: bold;
}

.brand:hover {
  color: #0645ad;
  text-decoration: none;
}

.brand img {
  border-radius: 4px;
}

.network {
  padding: 1px 8px;
  border: 1px solid #d1d9e0;
  border-radius: 10px;
  color: #444;
  font-size: 13px;
}

.links {
  display: flex;
  gap: 16px;
  margin-left: auto;
}

.site-footer {
  margin-top: 40px;
  padding: 14px 0 28px;
  border-top: 1px solid #ddd;
  color: #6e7781;
  font-size: 13px;
}

/* Summary cards */

.cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 12px;
  margin-top: 20px;
}

.card {
  padding: 12px 14px;
  border: 1px solid #e1e4e8;
  border-radius: 6px;
}

.card-value {
  font-size: 26px;
  font-weight: bold;
}

.card-label {
  color: #6e7781;
  font-size: 13px;
}

/* Witnesses */

.witness-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 12px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.witness {
  padding: 10px 14px;
  border: 1px solid #e1e4e8;
  border-radius: 6px;
  font-size: 14px;
}

.witness .muted {
  font-size: 13px;
}

.dot {
  display: inline-block;
  width: 9px;
  height: 9px;
  margin-right: 7px;
  border-radius: 50%;
  vertical-align: 1px;
}

.dot-ok {
  background: #1a7f37;
}

.dot-warn {
  background: #bf8700;
}

.dot-bad {
  background: #cf222e;
}

/* Node table */

.search {
  box-sizing: border-box;
  width: 100%;
  max-width: 420px;
  margin-bottom: 10px;
  padding: 7px 10px;
  border: 1px solid #d1d9e0;
  border-radius: 6px;
  font: inherit;
}

.table-wrap {
  overflow-x: auto;
}

table {
  width: 100%;
  border-collapse: collapse;
}

th,
td {
  padding: 7px 10px;
  border-bottom: 1px solid #eee;
  text-align: left;
  vertical-align: top;
  white-space: nowrap;
}

th {
  color: #444;
  font-size: 13px;
  font-weight: bold;
}

.nodes tbody tr.row {
  cursor: pointer;
}

.nodes tbody tr.row:hover {
  background: #f6f8fa;
}

.num {
  text-align: right;
}

.roles {
  color: #444;
  font-size: 13px;
}

.sort {
  padding: 0;
  border: 0;
  background: none;
  color: #444;
  font: inherit;
  font-weight: bold;
  cursor: pointer;
}

.sort-active {
  color: #0645ad;
}

.tag {
  margin-left: 8px;
  padding: 0 6px;
  border: 1px solid #d1d9e0;
  border-radius: 8px;
  color: #6e7781;
  font-family: Arial, Helvetica, sans-serif;
  font-size: 11px;
}

/* Status and reachability */

.status {
  display: inline-block;
  padding: 0 8px;
  border-radius: 10px;
  font-size: 13px;
  font-weight: bold;
}

.status-up {
  background: #dafbe1;
  color: #1a7f37;
}

.status-degraded {
  background: #fff8c5;
  color: #9a6700;
}

.status-down {
  background: #ffebe9;
  color: #cf222e;
}

.status-pending,
.status-missing {
  background: #f0f2f4;
  color: #57606a;
}

.fam {
  font-weight: bold;
}

.fam-ok {
  color: #1a7f37;
}

.fam-warn {
  color: #9a6700;
}

.fam-bad {
  color: #cf222e;
}

/* Node page */

.id-full {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  font-size: 15px;
  word-break: break-all;
}

.copy {
  padding: 2px 8px;
  border: 1px solid #d1d9e0;
  border-radius: 6px;
  background: #f6f8fa;
  color: #1f2328;
  font-family: Arial, Helvetica, sans-serif;
  font-size: 12px;
  cursor: pointer;
}

.copy:hover {
  border-color: #b0bec8;
}

.facts {
  width: auto;
}

.facts th {
  width: 120px;
  font-weight: normal;
  color: #6e7781;
}

.facts td {
  white-space: normal;
}

.probes td {
  font-size: 13px;
}

.probe-ok > div:first-child {
  color: #1a7f37;
  font-weight: bold;
}

.probe-bad > div:first-child {
  color: #cf222e;
  font-weight: bold;
}

@media (max-width: 600px) {
  .links {
    margin-left: 0;
  }

  th,
  td {
    padding: 6px 7px;
  }
}
