/* ============================================================
   Terminal (gnome-terminal, Yaru aubergine profile)
   ============================================================ */

.terminal-app {
  display: flex;
  flex-direction: column;
  flex: 1 1 auto;
  min-height: 0;
  background: #300A24;
  color: #F2F1F0;
}

.term-tabs {
  display: flex;
  align-items: stretch;
  gap: 2px;
  height: 34px;
  padding: 0 4px;
  background: #26071C;
  border-bottom: 1px solid rgba(0, 0, 0, .4);
  flex: 0 0 auto;
  overflow-x: auto;
  scrollbar-width: none;
}
.term-tabs::-webkit-scrollbar { display: none; }

.term-tab {
  display: flex;
  align-items: center;
  gap: 7px;
  max-width: 190px;
  padding: 0 8px 0 10px;
  border-radius: 8px 8px 0 0;
  background: #3A0E2B;
  color: rgba(242, 241, 240, .72);
  font-size: var(--fs-sm);
  cursor: pointer;
  flex: 0 0 auto;
  transition: background var(--dur-fast) ease, color var(--dur-fast) ease;
}
.term-tab:hover { background: #43102F; color: #F2F1F0; }
.term-tab.active {
  background: #300A24;
  color: #F2F1F0;
  box-shadow: inset 0 2px 0 var(--accent);
}
.term-tab-icon { display: flex; opacity: .8; }
.term-tab-icon svg { width: 14px; height: 14px; }
.term-tab-label { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.term-tab-close {
  width: 20px; height: 20px;
  border-radius: 50%;
  display: grid; place-items: center;
  color: currentColor;
  opacity: .5;
  flex: 0 0 auto;
}
.term-tab-close:hover { background: rgba(255, 255, 255, .16); opacity: 1; }
.term-tab-close svg { width: 9px; height: 9px; }
.term-new-tab {
  width: 28px;
  margin: 4px 2px;
  border-radius: 6px;
  display: grid; place-items: center;
  color: rgba(242, 241, 240, .7);
  flex: 0 0 auto;
}
.term-new-tab:hover { background: rgba(255, 255, 255, .12); color: #fff; }
.term-new-tab svg { width: 14px; height: 14px; }

.term-stack { position: relative; flex: 1 1 auto; min-height: 0; }
.term-view {
  position: absolute;
  inset: 0;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 10px 12px 14px;
  font-family: var(--font-mono);
  font-size: 13px;
  line-height: 1.45;
  cursor: text;
  white-space: pre-wrap;
  word-break: break-word;
  background: #300A24;
  background-image: radial-gradient(120% 90% at 50% 0%, rgba(233, 84, 32, .13), transparent 60%);
}
.term-row { min-height: 1.45em; }
.term-line { display: flex; align-items: baseline; }
.term-prompt { white-space: pre; }
.term-echo { display: block; }

.term-input {
  flex: 1 1 auto;
  min-width: 20px;
  background: none;
  border: 0;
  outline: none;
  color: #F2F1F0;
  font: inherit;
  caret-color: var(--accent);
  padding: 0;
  margin: 0;
}
.term-input::selection { background: color-mix(in srgb, var(--accent) 55%, transparent); }

/* text colours */
.t-err { color: #FF8177; }
.t-warn { color: #F5C24A; }
.t-ok { color: #6BE08D; }
.t-dim { color: #A79BA6; }
.t-cmd { color: #7FD88F; }
.t-dir { color: #6FA8DC; font-weight: 700; }
.t-exec { color: #57E08D; }
.t-img { color: #C78BE0; }
.t-perm { color: #A79BA6; }
.t-hl { background: rgba(233, 84, 32, .38); border-radius: 2px; }
.nf-logo { color: #E95420; font-weight: 700; }
.nf-key { color: #E95420; font-weight: 700; }
.nf-val { color: #F2F1F0; }
.nf-head { color: #E95420; font-weight: 700; }
.nf-swatch { display: inline-block; margin-top: 6px; }
.nf-swatch i { display: inline-block; width: 18px; height: 10px; margin-right: 2px; border-radius: 2px; }

.term-view b { color: #fff; }

@media (max-width: 640px) {
  .term-view { font-size: 12px; padding: 8px 9px 12px; }
  .term-tab { max-width: 120px; font-size: var(--fs-xs); }
}
