/* Deckard — relay interactive terminal (§ terminal). A clean full-screen xterm surface + the
   modal launch button. Kept self-contained so it does not depend on token names in theme.css. */

.dk-term {
  position: fixed;
  inset: 0;
  z-index: 1000; /* above the relay modal + reauth modal so a shell is never occluded */
  display: flex;
  flex-direction: column;
  background: #0b0e14;
  color: #d7dae0;
  font-family: ui-monospace, "SFMono-Regular", "JetBrains Mono", Menlo, Consolas, monospace;
}

.dk-term-head {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.5rem 0.9rem;
  background: #0f1320;
  border-bottom: 1px solid #1c2436;
  flex: 0 0 auto;
  user-select: none;
}

.dk-term-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: #f0a020; /* connecting */
  box-shadow: 0 0 6px currentColor;
  flex: 0 0 auto;
}
.dk-term-dot[data-state="ok"] { background: #3ecf8e; }
.dk-term-dot[data-state="error"] { background: #e5484d; }
.dk-term-dot[data-state="connecting"] { background: #f0a020; }

.dk-term-title {
  font-weight: 600;
  color: #eaecf2;
  letter-spacing: 0.01em;
}
.dk-term-status {
  font-size: 0.8rem;
  color: #8b93a7;
}
.dk-term-spacer { flex: 1 1 auto; }

.dk-term-close {
  appearance: none;
  border: 0;
  background: transparent;
  color: #8b93a7;
  font-size: 1.4rem;
  line-height: 1;
  cursor: pointer;
  padding: 0 0.3rem;
  border-radius: 6px;
}
.dk-term-close:hover { color: #eaecf2; background: #1c2436; }

.dk-term-body {
  flex: 1 1 auto;
  min-height: 0; /* critical: lets the xterm viewport size to the flex box */
  padding: 0.5rem 0.6rem;
  overflow: hidden;
}
.dk-term-body .xterm { height: 100%; }

/* Launch button inside the relay modal. */
.dk-relay-termrow {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  margin: 0.5rem 0 0.25rem;
  flex-wrap: wrap;
}
.dk-relay-termbtn {
  border-color: #2d3550 !important;
  background: #182036 !important;
  color: #cdd6f4 !important;
}
.dk-relay-termbtn:hover:not(:disabled) {
  background: #212b47 !important;
  border-color: #3a476a !important;
}
.dk-relay-termbtn:disabled { opacity: 0.5; cursor: not-allowed; }
