/* Small additions on top of Pico. */

gh-app {
  display: block;
}

.error {
  color: var(--pico-del-color);
}

.muted {
  color: var(--pico-muted-color);
}

.mono {
  font-family: var(--pico-font-family-monospace);
  font-size: 0.9em;
  word-break: break-all;
}

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

/* Tables scroll sideways on narrow screens rather than squeezing ids and buttons. */
.table-scroll td.mono,
.table-scroll td button {
  white-space: nowrap;
  word-break: normal;
}

td .actions,
.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.actions button,
.actions [role="button"] {
  margin-bottom: 0;
}

button.small,
.actions button.small {
  padding: 0.25rem 0.6rem;
  font-size: 0.85em;
  width: auto;
}

.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}

.section-header h2,
.section-header h3 {
  margin-bottom: 0;
}

.status-running {
  color: var(--pico-ins-color);
}

.permission-row {
  display: grid;
  grid-template-columns: 0.8fr 1fr 1.2fr 1.1fr 1.1fr auto;
  gap: 0.5rem;
  align-items: start;
}

.permission-fixed {
  align-self: center;
  margin-bottom: 0.5rem;
}

pre.json {
  max-height: 24rem;
  overflow: auto;
  padding: 0.75rem;
  font-size: 0.85em;
}

td.preview {
  max-width: 24rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

tr.clickable {
  cursor: pointer;
}

.permission-row select,
.permission-row input {
  margin-bottom: 0.5rem;
}

@media (max-width: 640px) {
  .permission-row {
    grid-template-columns: 1fr 1fr;
  }
}

.token-secret {
  padding: 0.75rem;
  border-radius: var(--pico-border-radius);
  background: var(--pico-code-background-color);
}

nav .token-name {
  max-width: 14rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

@media (max-width: 640px) {
  header nav {
    flex-wrap: wrap;
  }

  nav .token-name {
    display: none;
  }
}

.killswitch {
  border: 2px solid var(--pico-del-color);
}

.killswitch header {
  color: var(--pico-del-color);
}

pre.logs {
  max-height: 24rem;
  overflow: auto;
  padding: 0.75rem;
  font-size: 0.8em;
  white-space: pre-wrap;
  word-break: break-word;
}

td.sparkline {
  min-width: 9rem;
}

td.sparkline span {
  display: inline-block;
  width: 2rem;
  vertical-align: middle;
}

td.sparkline gh-chart {
  display: inline-block;
  width: 6rem;
  vertical-align: middle;
}

gh-chart {
  display: block;
}
