/* =============================
   Terminal CSS — hermesrm.com
   ============================= */

/* Reset mínimo */
* {
  box-sizing: border-box;
}

html, body {
  margin: 0;
  padding: 0;
  height: 100%;
  overflow: hidden; /* scroll controlado por el contenedor */
}

/* Base visual */
body {
  background-color: #0d1117; /* negro técnico */
  color: #c9d1d9;
  font-family: "Cascadia Code", ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;
  font-size: clamp(14px, 2.5vw, 16px);
  line-height: 1.45;
}

/* Contenedor principal de la terminal */
#terminal {
  height: 100%;
  padding: 16px;
  padding-left: 10px;
  overflow-y: auto;
  overflow-x: hidden;
  scroll-behavior: smooth;

  /* Safe areas (iOS / móviles modernos) */
  padding-top: env(safe-area-inset-top);
  padding-right: env(safe-area-inset-right);
  padding-bottom: env(safe-area-inset-bottom);
  padding-left: max(10px, env(safe-area-inset-left));
}

/* Salida de la terminal */
#output {
  white-space: pre-wrap;      /* mantiene saltos de línea */
  word-break: break-word;    /* rompe palabras largas */
  overflow-wrap: anywhere;   /* última defensa contra overflow */
}

/* Línea de input */
.input-line {
  display: flex;
  flex-direction: column;
  margin-top: 0;
}

/* Prompt - ahora puede ser multilínea */
.prompt {
  color: #03C04A;            /* verde vibrante */
  margin-bottom: 0;
  white-space: pre-wrap;     /* preserva saltos de línea */
  word-break: break-word;
  font-weight: normal;
}

/* Parte oro del prompt (ruta y símbolo) */
.prompt-path {
  color: #FFD700;            /* color oro/amarillo gitbash */
}

/* Contenedor del símbolo del prompt y input */
.prompt-line {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: nowrap;
  width: 100%;
}

/* Símbolo $ */
.prompt-symbol {
  color: #ffffff;            /* blanco */
  flex-shrink: 0;
}
#command {
  flex: 1;
  min-width: 0;              /* evita overflow en pantallas pequeñas */
  background: transparent;
  border: none;
  outline: none;
  color: inherit;
  font: inherit;

  /* Caret estilo terminal */
  caret-color: #ffffff;      /* blanco */
  caret-shape: block; /* navegadores que lo soporten */
}

/* Refuerzo visual del caret (fallback seguro) */
#command:focus {
  text-shadow: 0 0 0 #ffffff;
}

/* Comentarios tipo shell (ej. tips) */
.comment {
  color: #8b949e;
}

/* Errores */
.error {
  color: #f85149;
}

/* Selección de texto */
::selection {
  background: #005f87;
}