table {
  white-space: nowrap;
  border: 1px solid black;
  border-collapse: separate;
  table-layout: fixed;
  margin: 0;
  width: max-content;
  border-spacing: 0;
}

table td,
table th {
  border: 1px solid black;
  padding: 0.5rem 1rem;
  text-align: center;
  vertical-align: middle;
  background-color: white;
  background-clip: padding-box;
}

table thead tr:nth-of-type(2) th {
  position: sticky;
  top: 0;
  z-index: 3;
  background-color: #039be5;
  color: white;
  font-weight: bold;
  border: 1px solid black;
}

table thead tr:nth-of-type(2) th:first-child {
  left: 0;
  z-index: 5;
}

table thead tr:nth-child(3) th {
  position: sticky;
  top: 0;
  z-index: 3;
  background-color: #039be5;
  color: white;
  font-weight: bold;
  border: 1px solid black;
}

table thead tr:nth-of-type(2) th:first-child,
table thead tr:nth-of-type(3) th:first-child {
  text-align: center !important;
  vertical-align: middle !important;
}

table thead tr:first-of-type th:not(:first-child) {
  position: static !important;
  top: auto !important;
  z-index: auto !important;
}

table th:first-child,
table td:first-child {
  position: sticky;
  left: 0;
  z-index: 3;
  background: #039be5;
  color: white;
  font-weight: bold;
  border: 1px solid black;
}
table th:first-child {
  border-right: 1px solid black !important;
}

/* Row hover effect */
table tbody tr:nth-of-type(even) td {
  background-color: #e3e3e3;
}
table tbody tr:hover td {
  background-color: grey;
  color: white;
}

/* Tooltip */
.tooltip {
  position: relative;
  display: inline-block;
}
.tooltiptext {
  display: block;
}
.tooltip .tooltiptext {
  visibility: hidden;
  width: auto;
  background-color: #333;
  color: #fff;
  text-align: left;
  border-radius: 5px;
  padding: 5px;
  position: absolute;
  z-index: 1;
  bottom: 125%;
  left: 50%;
  margin-left: -60px;
  opacity: 0;
  transition: opacity 0.3s;
}
.tooltip .tooltiptext::after {
  content: "";
  position: absolute;
  top: 100%;
  left: 50%;
  margin-left: -5px;
  border-width: 5px;
  border-style: solid;
  border-color: black transparent transparent transparent;
}
.tooltip:hover .tooltiptext {
  visibility: visible;
  opacity: 1;
}

.error {
  color: white;
  background-color: red !important;
  font-weight: bold;
}
.warning {
  color: white;
  background-color: orange !important;
  font-weight: bold;
}

.production {
  background: #03254c !important;
  color: white !important;
}
.staging {
  background: #1167b1 !important;
  color: white !important;
}
.dev {
  background: #5fa8d3 !important;
  color: white !important;
}
