/* Gloal */
* {
  font-family: Arial, sans-serif;
  font-size: 14px;
  box-sizing: border-box;
}


:root {
  /* Default Theme */
  --text: #ffffff;
  --muted: #595959;
  --background: #2f2f2f;
  --highlight: #584355;
  --text-hightlight: #ffaff3;

  /* General */
  --unnamed-blue: #a6f0fc;
  --meter-bar: #ffaff3;
}

@media (prefers-color-scheme: light) {
  :root {
    --text: #2f2f2f;
    --muted: #d2d2d2;
    --background: #ffffff;
    --highlight: #fffbe8;
    --text-hightlight: rgb(171, 98, 160);
  }
}

@media (prefers-color-scheme: dark) {
  :root {
    --text: #ffffff;
    --muted: #595959;
    --background: #2f2f2f;
    --highlight: #584355;
    --text-hightlight: #ffaff3;
  }
}

*::selection {
  background: var(--text);
  color: var(--background);
}

*::-moz-selection {
  background: var(--text);
  color: var(--background);
}

input:focus{
  outline: none;
}

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

body {
  overflow-y: scroll;
}

dl {
  margin: 5px;
}

dt {
  font-weight: bold;
  margin-bottom: 5px;
}

button,
.button {
  background: var(--background);
  border: 1px solid var(--text);
  color: var(--text);
  padding: 1px 4px;
  text-decoration: none;
}

button:hover,
.button:hover {
  background: var(--text);
  color: var(--background);
}

.interactive-primitive {
  cursor: pointer;
  background: unset;
  color: var(--text);
  text-decoration: underline;
  border: 0;
  padding: 0;
}

.interactive-primitive:hover {
  background: var(--text);
  color: var(--background);
}

.interactive-primitive.block {
  display: block;
}

.interactive-primitive.tagged {
  color: var(--text-hightlight);
}

.interactive-primitive.tagged:hover {
  color: var(--background);
  background: var(--text-hightlight);
}

/* Top Navigational Bar  */
.topbar {
  display: flex;
  font-weight: 100;
  align-items: flex-end;
  justify-content: space-between;
  user-select: none;
}

.lucy-icon {
  width: 3em;
}

.logo {
  font-size: 28px;
  display: flex;
  align-items: center;
  padding: 5px 2.5px;
  border-bottom: 1px solid var(--text);
}

.filler {
  height: 100%;
  flex-grow: 2;
  border-bottom: 1px solid var(--text);
}

.separator {
  height: 100%;
  width: 5px;
  border-bottom: 1px solid var(--text);
}

.tabs {
  display: flex;
  align-items: end;
}

.tab {
  display: flex;
  align-items: center;
  border: 1px solid var(--text);
  padding: 10px;
  border-top-right-radius: 10px;
  border-top-left-radius: 10px;
  user-select: none;
  cursor: pointer;
  text-decoration: none;
  color: var(--text);
}

.tab.disabled {
  cursor: not-allowed;
}

.tab.active {
  border-bottom: 1px solid var(--background);
}

.tab>svg,
.tab>div {
  height: 3em;
}

.connection-status {
  border-bottom: 1px solid var(--text);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

/* Table View */
table {
  width: 100%;
  min-height: 100vh;
  border-spacing: 0;
}

thead {
  position: sticky;
  top: 0;
  left: 0;
  z-index: 1;
  background: var(--background);
  user-select: none;
}

tbody {
  user-select: none;
}

thead th {
  border-bottom: 1px solid var(--text);
}

th:hover {
  background: var(--highlight);
}

th div {
  display: flex;
  align-items: center;
}

th div svg {
  margin-right: 5px;
}

tfoot {
  position: sticky;
  bottom: 0;
  left: 0;
  background: var(--background);
}

tfoot td {
  border-top: 1px solid var(--text);
}

th:first-child {
  border-left: 0;
}

.buffer-row {
  pointer-events: none;
  height: auto;
}

.buffer-row>td {
  height: auto;
}

th,
td {
  text-align: left;
  padding: 2.5px;
  border: 0;
  max-width: 20vw;
  height: 1.6em;
  text-overflow: ellipsis;
  overflow: hidden;
}

td.link-cell {
  padding: 0;
}

td.link-cell>a {
  display: block;
  padding: 2.5px;
}

td.cell-right,
th.cell-right {
  text-align: right;
}

td>a {
  text-decoration: none;
  color: var(--text);
  display: block;
}

tbody td:first-of-type,
thead th:first-of-type {
  padding-left: 5px;
}

tbody td:last-of-type,
thead th:last-of-type {
  padding-right: 5px;
}


tfoot th,
tfoot td {
  padding: 0;
}

tbody tr:hover {
  background: var(--highlight)
}

tbody tr.selected {
  background: var(--text);
  color: var(--background);
}

tbody tr.selected .interactive-primitive {
  color: var(--background);
}

tbody tr.tagged {
  color: var(--text-hightlight);
}

.spectator-tagged {
  opacity: 0.5;
}

tbody tr.tagged.selected {
  background: var(--text-hightlight);
  color: var(--background);
}

.component-error {
  width: 100%;
  height: 50vh;
  display: flex;
  justify-content: center;
  align-items: center;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

/* Process Details View */
.details {
  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-template-rows: auto 1fr;
  width: 100vw;
  overflow: hidden;
}

.details>div {
  height: 250px;
  overflow: auto;
  overscroll-behavior: none;
}

.panel-heading {
  padding: 5px;
  border-bottom: 1px solid var(--text);
  position: sticky;
  top: 0;
  left: 0;
  background: var(--background);
  box-sizing: content-box;
  height: 1.2em;
  display: flex;
  align-items: center;
  grid-column: span 2;
}

.panel-content {
  padding: 5px;
  overflow: auto;
}

.details .general {
  border-right: 1px solid var(--text);
}

.footer-placeholder {
  padding: 2px;
  text-align: right;
}

.panel-action {
  margin-left: auto;
  cursor: pointer;
}

/* ETS */

table.ets-data td {
  border-bottom: 1px solid var(--muted);
  user-select: text;
}

table.ets-data tbody tr:hover {
  background: var(--background);
}

/* Ports */

.details.compact {
  display: flex;
}

.details.compact>dl {
  flex-basis: 33%;
}

.details.compact dt {
  text-align: left;
}

.details.compact dd {
  margin-left: 0;
}

/* Dashboard */

.dashboard {
  padding: 10px;
}

.split {
  display: flex;
  gap: 100px;
  width: 100%;
}

.split>div {
  flex-basis: 50%;
}

.info-container {
  border: 1px solid var(--text);
}

.info-item {
  display: flex;
}

.info-item {
  border-bottom: 1px solid var(--text);
}

.info-item:last-child {
  border-bottom: 0;
}

.info-item>* {
  flex-basis: 50%;
  padding: 5px;
  border: 0;
  background: var(--background);
  color: var(--text);
}

.info-item>a {
  text-align: center;
  user-select: none;
}

.info-item>a:first-child {
  border-right: 1px solid var(--text);
}

.info-label {
  border-right: 1px solid var(--text);
  text-align: right;
}

.column-chart,
.meter-chart {
  padding: 2px;
  border: 1px solid var(--text);
}

.memory-breakdown {
  display: flex;
  gap: 10px
}

.limit-item {
  margin-bottom: 10px;
}

.legend-item {
  display: flex
}

.legend-colour {
  width: 2em;
  height: 2em;
  margin-right: 10px;
  padding: 2px;
  border: 1px solid var(--text);
  display: flex;
}

.legend-colour>div {
  flex-grow: 1;
}