/* The Explore page's model of the dashboard. Colors follow testudo/tui/theme.py. */

/* This page is the dashboard: the side menus slowly glide outwards to make room. */
.md-main__inner,
.md-sidebar {
  transition: max-width 2400ms cubic-bezier(0.45, 0, 0.2, 1), width 2400ms cubic-bezier(0.45, 0, 0.2, 1);
}
body.tx-explore-page .md-main__inner {
  max-width: max(61rem, min(92%, 72rem));
}
/* Slimmer menus leave the room to the dashboard, without pushing them far from it. */
@media (min-width: 76.25em) {
  body.tx-explore-page .md-sidebar {
    width: 9.6rem;
  }
}
@media (prefers-reduced-motion: reduce) {
  .md-main__inner,
  .md-sidebar {
    transition: none;
  }
}
.md-content:has(#tx-explorer) {
  container-type: inline-size;
}
/* One size for the terminal and what sits under it, so all of it fits on one screen. */
.md-content__inner:has(#tx-explorer) {
  --tx-font: max(10px, min(16px, calc((100cqw - 2.4rem) / 75), calc((100vh - 18rem) / 45)));
  margin-top: 0.4rem;
  padding-top: 0;
}
.md-content__inner:has(#tx-explorer) > .md-content__button,
.md-container:has(#tx-explorer) .md-path {
  display: none;
}
.md-content__inner:has(#tx-explorer) > h1 {
  font-size: 1.25rem;
  margin: 0 auto 0.1rem;
  width: min(100%, calc(var(--tx-font) * 75));
}
.md-content__inner:has(#tx-explorer) > h1 + p {
  font-size: 0.72rem;
  margin: 0 auto 0.45rem;
  width: min(100%, calc(var(--tx-font) * 75));
}
.md-content__inner:has(#tx-explorer) > h2 {
  border: 0;
  font-size: 0.78rem;
  margin: 0.55rem auto 0.25rem;
  padding: 0;
  width: min(100%, calc(var(--tx-font) * 75));
}
.md-content__inner:has(#tx-explorer) > h2::after {
  display: none;
}
.md-typeset .tx-tries {
  margin: 0 auto;
  width: min(100%, calc(var(--tx-font) * 75));
}
.md-typeset .tx-tries ul {
  display: grid;
  gap: 0.2rem 1rem;
  grid-template-columns: repeat(auto-fit, minmax(10rem, 1fr));
  list-style: none;
  margin: 0;
  padding: 0;
}
.md-typeset .tx-tries li {
  font-size: 0.66rem;
  line-height: 1.5;
  margin: 0;
}
.md-typeset .tx-explore-note {
  color: var(--md-default-fg-color--light);
  font-size: 0.64rem;
  margin: 0.8rem auto 0;
  width: min(100%, calc(var(--tx-font) * 75));
}

#tx-explorer {
  position: relative;
}
.tx-term {
  background: #14161c;
  border: 1px solid #4b556366;
  border-radius: 0.45rem;
  box-shadow: 0 0.4rem 1.4rem #0000002e;
  box-sizing: border-box;
  color: #e5e7eb;
  cursor: default;
  display: flex;
  flex-direction: column;
  font-family: "DejaVu Sans Mono", "Noto Sans Mono", Menlo, Consolas, monospace;
  font-size: var(--tx-font);
  height: 45em;
  line-height: 1.25;
  margin: 0 auto;
  max-width: 100%;
  overflow: hidden;
  position: relative;
  white-space: pre;
  width: 75em;
}
/* The window the dashboard runs in. */
.tx-term::before {
  background:
    radial-gradient(circle, #971b2f 0 0.32em, transparent 0.36em) 0.9em 50% / 1em 1em no-repeat,
    radial-gradient(circle, #ffb500 0 0.32em, transparent 0.36em) 2.3em 50% / 1em 1em no-repeat,
    radial-gradient(circle, #6b7280 0 0.32em, transparent 0.36em) 3.7em 50% / 1em 1em no-repeat,
    #2b2f3a;
  border-bottom: 1px solid #0b0c10;
  box-sizing: border-box;
  color: #aeb4bf;
  content: "testudo watch" / "";
  flex: none;
  height: 2em;
  line-height: 2em;
  text-align: center;
}
.tx-term:focus {
  outline: none;
}
.tx-term--tabbed:focus {
  outline: 2px solid #ffb500;
  outline-offset: 2px;
}
.tx-term i {
  color: #9ca3af;
  font-style: normal;
}
.tx-term span[style*="width"] {
  display: inline-block;
  overflow: hidden;
  vertical-align: top;
}
.tx-term [data-tip]:hover {
  background: #f5ead626;
  box-shadow: inset 0 0 0 1px #f5ead6;
}
.tx-bar {
  background: #971b2f;
  display: flex;
  flex: none;
  justify-content: space-between;
  padding: 0 1ch;
}
.tx-bar i {
  color: #e8c3c9;
}
.tx-chip { padding: 0; }
.tx-chip-0 { background: #22c55e; color: #000; }
.tx-chip-1 { background: #facc15; color: #000; }
.tx-chip-2 { background: #ff1a1a; color: #fff; }
.tx-chip-3 { background: #d946ef; color: #000; }
.tx-paused { background: #e5e7eb; color: #14161c; }
.tx-panes {
  display: flex;
  flex: 1 1 auto;
  min-height: 0;
}
.tx-left {
  background: #262a33;
  flex: none;
  overflow: hidden;
  width: 34ch;
}
.tx-right {
  background: #1b1d24;
  flex: 1 1 auto;
  min-width: 0;
  overflow: hidden;
}
.tx-head {
  background: #4b5563;
  font-weight: 700;
}
.tx-row {
  cursor: pointer;
  min-height: 1.25em;
}
.tx-row:hover {
  background: #ffffff0f;
}
.tx-on-cat, .tx-on-cat:hover {
  background: #971b2f;
  font-weight: 700;
}
.tx-on-topic, .tx-on-topic:hover {
  background: #ffb500;
  color: #1b1b1b;
  font-weight: 700;
}
.tx-on-topic span, .tx-on-topic i { color: #1b1b1b !important; }
.tx-on-cat span, .tx-on-cat i { color: #fff !important; }
.tx-on-topic.tx-dim-sel { background: #c98f00; }
.tx-on-cat.tx-dim-sel { background: #6d1422; }
.tx-faded { color: #6b7280; }
.tx-faded span, .tx-faded b { color: #6b7280; }
.tx-mute { color: #9ca3af; }
.tx-s0 { color: #84cc16; }
.tx-s1 { color: #f59e0b; }
.tx-s2 { color: #ff2d55; font-weight: 700; }
.tx-s3 { color: #e879f9; font-weight: 700; }
.tx-detail {
  border-top: 1px solid #ffb500;
  flex: 0 0 11.4em;
  overflow: hidden;
  padding: 0 1ch;
}
.tx-values {
  column-count: 2;
  column-gap: 2ch;
}
.tx-values .tx-row {
  break-inside: avoid;
  overflow: hidden;
}
.tx-detail .tx-row { cursor: default; }
.tx-hint, .tx-search, .tx-actions {
  flex: none;
  padding: 0 1ch;
}
.tx-hint { background: #ffb500; color: #5a3f06; }
.tx-search { background: #262a33; }
.tx-actions { background: #971b2f; }
.tx-caret { animation: tx-blink 1s steps(2) infinite; }
@keyframes tx-blink { 50% { opacity: 0; } }
.tx-help {
  background: #14161c;
  border: 1px solid #971b2f;
  border-radius: 0.3rem;
  left: 50%;
  padding: 1em 2ch;
  position: absolute;
  top: 50%;
  transform: translate(-50%, -50%);
}
.tx-float {
  background: #971b2f;
  border: 1px solid #ffb500;
  border-radius: 0.2rem;
  color: #f9fafb;
  font-size: 0.62rem;
  padding: 0.1rem 0.4rem;
  pointer-events: none;
  position: absolute;
  z-index: 3;
}
.tx-inspect {
  background: var(--md-code-bg-color);
  border-left: 3px solid #971b2f;
  border-radius: 0 0.25rem 0.25rem 0;
  box-sizing: border-box;
  font-size: 0.66rem;
  line-height: 1.4;
  margin: 0.4rem auto 0;
  max-width: 100%;
  min-height: 2.5rem;
  padding: 0.3rem 0.7rem;
  width: calc(var(--tx-font) * 75);
}
