/* Nano-style text editing inside the terminal pane. */
.nano-terminal {
  display: flex;
  flex: 1 1 auto;
  flex-direction: column;
  min-width: 0;
  min-height: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
  background: #0f1720;
  color: #dbe4ee;
  font: 13px/1.45 ui-monospace, SFMono-Regular, Menlo, Consolas, 'Liberation Mono', monospace;
}
.nano-terminal *, .nano-terminal *::before, .nano-terminal *::after { box-sizing: border-box; }
.nano-terminal .nano-header {
  display: flex;
  flex: none;
  align-items: baseline;
  gap: 1.5ch;
  padding: 1px 1ch;
  background: #dbe4ee;
  color: #0f1720;
  font: inherit;
}
.nano-title, .nano-state { flex: none; white-space: nowrap; }
.nano-path { flex: 1; min-width: 0; text-align: center; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.nano-help {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}
.nano-terminal .nano-buffer {
  display: block;
  flex: 1 1 auto;
  width: 100%;
  min-height: 80px;
  margin: 0;
  padding: 3px 1ch;
  border: 0;
  border-radius: 0;
  outline: none;
  resize: none;
  background: #0f1720;
  color: #dbe4ee;
  caret-color: #dbe4ee;
  box-shadow: none;
  overflow: auto;
  white-space: pre;
  tab-size: 4;
  font: inherit;
}
.nano-terminal .nano-buffer:disabled { opacity: 1; color: #dbe4ee; -webkit-text-fill-color: #dbe4ee; }
.nano-terminal .nano-buffer:focus-visible { outline: none; }
.nano-footer { flex: none; padding: 0 1ch; color: #9aaec1; text-align: right; font: inherit; }
.nano-terminal .nano-status { flex: none; min-height: 1.45em; margin: 0; padding: 0 1ch; color: #dbe4ee; font: inherit; overflow-wrap: anywhere; }
.nano-status[data-editor-error='true'] { color: #ffb5aa; }
.nano-controls, .nano-prompt-actions { display: flex; flex-wrap: wrap; align-items: baseline; gap: 0 3ch; }
.nano-controls { flex: none; padding: 1px 1ch 3px; }
.nano-controls[hidden] { display: none; }
.nano-terminal .nano-button {
  appearance: none;
  display: inline;
  padding: 0;
  margin: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: #dbe4ee;
  box-shadow: none;
  font: inherit;
  line-height: inherit;
  text-align: left;
  cursor: pointer;
}
.nano-terminal .nano-button:hover, .nano-terminal .nano-button:focus-visible { background: #dbe4ee; color: #0f1720; outline: none; }
.nano-terminal .nano-button:disabled { opacity: .45; cursor: default; }
.nano-prompt-host { flex: none; max-height: 45%; overflow-y: auto; }
.nano-prompt-host:empty { display: none; }
.nano-prompt { display: flex; flex-wrap: wrap; align-items: baseline; gap: 0 2ch; padding: 0 1ch 2px; }
.nano-prompt-question { white-space: nowrap; }
.nano-prompt .nano-overwrite-path { margin: 0; overflow-wrap: anywhere; font: inherit; }
.nano-filename-form { display: flex; width: 100%; flex-wrap: wrap; align-items: baseline; gap: 0 1ch; }
.nano-filename-form label { flex: none; color: inherit; font: inherit; }
.nano-terminal .nano-filename {
  flex: 1 1 12ch;
  min-width: 5ch;
  width: auto;
  margin: 0;
  padding: 0;
  border: 0;
  border-bottom: 1px solid #607890;
  border-radius: 0;
  background: #0f1720;
  color: #dbe4ee;
  caret-color: #dbe4ee;
  box-shadow: none;
  font: inherit;
}
.nano-terminal .nano-filename:focus-visible { outline: none; border-bottom-color: #dbe4ee; }
.nano-filename-form .nano-prompt-actions { flex-basis: 100%; }
@media (max-width: 600px) {
  .nano-terminal { font-size: 12px; }
  .nano-terminal .nano-header { gap: 1ch; }
  .nano-terminal .nano-buffer, .nano-terminal .nano-filename { font-size: 16px; }
  .nano-controls, .nano-prompt-actions { gap: 0 2ch; }
}
