/* WP Terminal Core frontend runtime skin.
 * These rules are generic enough for any terminal app using .wp-terminal-* legacy classes
 * or future .wp-terminal-* aliases. App plugins may override variables only.
 */
@font-face {
  font-family: "Web437 IBM VGA 8x16";
  src: url("../fonts/Web437_IBM_VGA_8x16.woff") format("woff");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Web437 IBM VGA 8x16 2x";
  src: url("../fonts/Web437_IBM_VGA_8x16-2x.woff") format("woff");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

.wp-terminal-wrap {
  --wp-terminal-scale: 1;
  --wp-terminal-cell-w: calc(8px * var(--wp-terminal-scale));
  --wp-terminal-cell-h: calc(16px * var(--wp-terminal-scale));
  --wp-terminal-pad-left: 0px;
  --wp-terminal-pad-top: 0px;
  --wp-terminal-screen-w: calc((640px * var(--wp-terminal-scale)) + var(--wp-terminal-pad-left));
  --wp-terminal-screen-h: calc((400px * var(--wp-terminal-scale)) + var(--wp-terminal-pad-top));
  --wp-terminal-border: 0px;
  width: 100%;
  max-width: 100%;
  min-height: min(100vh, calc(var(--wp-terminal-screen-h) + (var(--wp-terminal-border) * 2)));
  display: flex;
  justify-content: center;
  align-items: flex-start;
  margin: 0;
  padding: 0;
  overflow: hidden;
  box-sizing: border-box;
}

.wp-terminal-screen {
  background: #000;
  color: #c0c0c0;
  width: var(--wp-terminal-screen-w);
  max-width: 100%;
  height: var(--wp-terminal-screen-h);
  overflow: hidden;
  padding: 0 !important;
  margin: 0 !important;
  box-sizing: border-box;
  font-family: "Web437 IBM VGA 8x16", monospace;
  font-size: var(--wp-terminal-cell-h);
  line-height: var(--wp-terminal-cell-h);
  letter-spacing: 0;
  outline: none;
  border: 0;
  box-shadow: none;
  cursor: text;
  user-select: none;
  -webkit-font-smoothing: none;
  font-smooth: never;
  text-rendering: geometricPrecision;
}

.wp-terminal-screen:focus {
  box-shadow: none;
}

.wp-terminal-output {
  display: block;
  width: 100%;
  height: 100%;
  margin: 0 !important;
  padding: var(--wp-terminal-pad-top) 0 0 var(--wp-terminal-pad-left) !important;
  box-sizing: border-box;
  /*
   * A real 80-column terminal advances to the next physical row when column
   * 80 is exceeded, even without an explicit newline. Keep that behavior in
   * the browser so the visible screen agrees with the pager's row accounting.
   */
  white-space: pre-wrap;
  word-break: break-all;
  tab-size: 8;
  -moz-tab-size: 8;
  overflow-wrap: anywhere;
  overflow: hidden;
  font: inherit;
}

.wp-terminal-cursor {
  /*
   * Editor/main prompt cursor.
   *
   * The cursor is rendered as an inline marker inside the text stream.
   * It must not consume a character cell; otherwise moving left/right in the
   * full-screen editor pushes the surrounding text one column sideways.
   */
  display: inline-block;
  width: 0;
  height: auto;
  overflow: visible;
  background: transparent;
  color: #c0c0c0;
  animation: wp-terminal-blink 1s steps(1) infinite;
  vertical-align: baseline;
  transform: none;
  line-height: inherit;
}

.wp-terminal-busy .wp-terminal-cursor { animation: none; opacity: .35; }
@keyframes wp-terminal-blink { 50% { opacity: 0; } }

@media (max-width: 700px) {
  .wp-terminal-wrap {
    justify-content: center;
    overflow-x: hidden;
  }
}

/* Keep WordPress themes (Astra, etc.) from bleeding typography/colors into the terminal. */
.wp-terminal-wrap,
.wp-terminal-wrap *,
.wp-terminal-screen,
.wp-terminal-screen * {
  box-sizing: border-box;
  font-family: "Web437 IBM VGA 8x16", monospace !important;
  text-transform: none !important;
  text-decoration: none !important;
  text-shadow: none !important;
}

.wp-terminal-wrap {
  background: transparent !important;
  color: #c0c0c0 !important;
}

.wp-terminal-screen,
.wp-terminal-output,
.wp-terminal-output div,
.wp-terminal-cursor {
  background-color: #000 !important;
  color: inherit;
}

.wp-terminal-output span {
  color: inherit;
}

.wp-terminal-screen {
  background-image: none !important;
  border-radius: 0 !important;
}


.wp-terminal-blink-attr {
  animation: wp-terminal-blink 1s steps(1) infinite;
}

/* Active line-input field.  The field is a generic terminal concept; apps choose
 * when to request it.  Keep the background on the whole cell run, including
 * empty space before the user types. */
.wp-terminal-output .wp-terminal-line-field {
  display: inline;
  white-space: pre;
}
