.output {
  color: #9b9b9b;
}

.input {
  position: inherit;
  color: #ffffff;
  z-index: 1;
}

.hint {
  position: absolute;
  z-index: 1;
  color: #7b7b7b;
}

.type {
  width: 0;
  height: 0;
  opacity: 0;
}

.cursor {
  display: inline-block;
  /*font-size: 14px;*/
  position: inherit;
  z-index: 1;
  color: white;
  animation: blink 1s step-end infinite;
}

.shake {
  animation: shake 0.5s cubic-bezier(.36,.07,.19,.97) both;
  transform: translate3d(0, 0, 0);
  backface-visibility: hidden;
  perspective: 1000px;
}

@keyframes shake {
  10% {
    transform: translate3d(-3px, 0, 0);
  }
  30% {
    transform: translate3d(3px, 0, 0);
  }
  50%, 90% {
    transform: translate3d(-3px, 0, 0);
  }
  70% {
    transform: translate3d(3px, 0, 0);
  }
}

.command {
  color: #ffffff;
}

.command a:hover {
  color: #ffffff;
  text-decoration: underline;
}

.command a:visited {
  color: #ffffff;
}

.link {
  color: yellow;
}

.minimize-icon {
  background-color: #ffbd2e;
  margin-left: 28px;
  margin-top: 3px;
}

.close-icon {
  background-color: #ff5f56;
  margin-left: 8px;
  margin-top: 3px;
}

.fullscreen-icon {
  background-color: #27c93f;
  margin-left: 49px;
  margin-top: 3px;
}

.icon {
  border: 1px solid rgba(0, 0, 0, .2);
  border-radius: 50%;
  display: block;
  width: 12px;
  height: 12px;
  position: absolute;
}

.wrap {
  max-width: 700px;
  margin: auto;
}

.terminal .header {
  width: 100%;
  min-height: 450px;
  margin: 0 auto 30px;
  padding: 10px 0;
  background: url(../img/header-bg.jpg) top center no-repeat fixed;
  background-size: 100%;
}

@media screen and (max-width: 1500px) {
  .header {
    background-size: auto;
  }
}

.header .h1 {
  margin: 10px 0 20px;
  font-size: 2.5em;
  text-align: center;
  color: #fff;
  text-shadow: #000 0px 2px 4px;
}

.head-wrap {
  margin: 30px auto 30px;
  -webkit-transition: all 0.5s ease-out;
  -moz-transition: all 0.5s ease-out;
  -ms-transition: all 0.5s ease-out;
  -o-transition: all 0.5s ease-out;
  transition: all 0.5s ease-out;
  text-align: center;
}

.shift-text {
  margin: 80px auto 110px;
}

.shift-text .text-body {
  height: 120px;
}

.shift-text .tagline {
  opacity: 0.9;
}

.text-editor-wrap {
  display: block;
  margin: auto;
  width: 90%;
  max-width: 900px;
  border-radius: 10px;
  box-shadow: rgba(0, 0, 0, 0.8) 0px 20px 50px;
  clear: both;
  overflow: hidden;
  -webkit-transition: all 0.5s ease-out;
  -moz-transition: all 0.5s ease-out;
  -ms-transition: all 0.5s ease-out;
  -o-transition: all 0.5s ease-out;
  transition: all 0.5s ease-out;
}

.title-bar {
  padding: 5px 0;
  font-size: 13px;
  font-family: Roboto, sans-serif;
  text-align: center;
  font-weight: bold;
  text-shadow: rgba(255, 255, 255, 0.8) 0px 1px 0px;
  background-color: #f8f8f8;
  background-image: -webkit-linear-gradient(top, #e8e8e8, #bcbbbc);
  background-image: -moz-linear-gradient(top, #e8e8e8, #bcbbbc);
  background-image: linear-gradient(top, #e8e8e8, #bcbbbc);
  box-shadow: inset rgba(255, 255, 255, 0.7) 0px 1px 1px;
  border-bottom: #6a6a6a 1px solid;
}

/* Invisible Popper reference: geometric center of the terminal body */
.terminal-tooltip-anchor {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 0;
  height: 0;
  margin: 0;
  padding: 0;
  border: none;
  pointer-events: none;
  z-index: 3;
}

.text-body {
  position: relative;
  height: 450px;
  background-color: #2c2c2c;
  padding: 10px 0px 10px 10px;
  color: #ffffff;
  text-shadow: #000 0px 1px 0px;
  font-family: "Courier New", "Courier";
  font-size: 18px;
  line-height: 1.40em;
  font-weight: bold;
  text-align: left;
  overflow: auto;
  -webkit-transition: all 0.5s ease-out;
  -moz-transition: all 0.5s ease-out;
  -ms-transition: all 0.5s ease-out;
  -o-transition: all 0.5s ease-out;
  transition: all 0.5s ease-out;
}

.text-body .animation {
  transition: all 0.5s ease-out;
}

.text-body .highlight {
  color: black;
  background-color: #BCBBAB;
  text-shadow: rgba(255, 255, 255, 0.8) 0px 1px 0px;
  box-shadow: inset rgba(255, 255, 255, 0.7) 0px 1px 1px;
  border-bottom: #6a6a6a 1px solid;
  border-top: #ffffff 1px solid;
  padding-left: 8px;
  padding-right: 10px;
  border-radius: 5px;
  padding-top: 3px;
  padding-bottom: 4px;
}

.note {
  text-align: center;
}

.inline-code {
  padding: 2px 5px;
  background: #fff;
  border: #CCC 1px solid;
  border-radius: 4px;
}

hr {
  margin: 20px 0;
  border: 0;
  border-bottom: #fff 1px solid;
  border-top: #f0f0f0 1px solid;
}

code {
  margin: 0 auto 20px;
  padding: 10px 20px !important;
  color: #444;
  font-family: "Consolas", "Courier New", "Courier";
  font-weight: 500;
  background: #fff !important;
  border: #EEE 1px solid;
  border-radius: 10px;
  overflow: auto;
}

.typed-cursor {
  opacity: 1;
  font-weight: 100;
  -webkit-animation: blink 0.7s infinite;
  -moz-animation: blink 0.7s infinite;
  -ms-animation: blink 0.7s infinite;
  -o-animation: blink 0.7s infinite;
  animation: blink 0.7s infinite;
  color: white;
}

@keyframes blink {
  50% {
    visibility: hidden;
  }
}

.btn-wrap {
  display: block;
  margin: 0 auto 1em;
  clear: both;
  text-align: center;
}

.btn {
  display: inline-block;
  position: relative;
  margin: 0 10px 5px;
  text-align: left;
  vertical-align: top;
}

@media screen and (max-width: 500px) {
  .btn {
    display: block;
  }
}

.btn > a {
  display: block;
  position: relative;
  padding: 0.8em 1.75em 0.7em;
  color: #fff;
  text-shadow: rgba(0, 0, 0, 0.3) 0px -1px 0px;
  font-size: 1.5em;
  font-weight: 400;
  line-height: 1em;
  text-align: center;
  background-color: #3479b4;
  border-radius: 4px;
  z-index: 0;
  -webkit-transition: all 0.1s ease-in-out;
  -moz-transition: all 0.1s ease-in-out;
  -ms-transition: all 0.1s ease-in-out;
  -o-transition: all 0.1s ease-in-out;
  transition: all 0.1s ease-in-out;
}

.btn > a:hover {
  background-color: #4f92cc;
}

.btn p {
  line-height: 1em;
}

.btn p a {
  color: #333;
}

.btn p a:hover {
  color: #CCC;
}

/* Portrait / narrow screens: compact, fixed-feel height; Enter bar sits outside the window */
@media (max-width: 767.98px) {
  #terminal {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    width: 100%;
    max-width: 100%;
  }

  .text-editor-wrap {
    display: flex;
    flex-direction: column;
    width: 100%;
    max-width: 100%;
    margin-left: 0;
    margin-right: 0;
    margin-bottom: 0;
    position: relative;
    z-index: 0;
    overflow: hidden;
  }

  /* Larger, stable chrome — matches “full” demo view; scrolls inside when output grows */
  .text-body {
    flex: 0 0 auto;
    min-height: 200px;
    height: min(48vh, 420px);
    max-height: min(48vh, 420px);
    font-size: 14px;
    line-height: 1.35em;
    -webkit-overflow-scrolling: touch;
  }

  /* Guided-demo hidden field: no tap target, no IME */
  .text-body input.type {
    position: absolute;
    width: 1px;
    height: 1px;
    margin: 0;
    padding: 0;
    opacity: 0;
    pointer-events: none;
    border: 0;
    left: 0;
    top: 0;
  }

  /* Sibling below .text-editor-wrap — no dark strip; only the button is chrome */
  #terminal > .terminal-touch-bar {
    display: flex;
    flex-direction: column;
    flex-shrink: 0;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 10px 0 4px;
    margin: 10px 0 0;
    background: transparent;
    border: none;
    box-shadow: none;
    border-radius: 0;
    position: relative;
    z-index: 2;
  }

  .terminal-touch-btn {
    touch-action: manipulation;
    min-width: 44px;
    min-height: 44px;
    padding: 6px 10px;
    font-size: 14px;
    font-weight: bold;
    font-family: Roboto, system-ui, sans-serif;
    color: #f5f5f5;
    background: #404040;
    border: 1px solid #5a5a5a;
    border-radius: 8px;
    cursor: pointer;
    opacity: 1;
    -webkit-tap-highlight-color: transparent;
  }

  .terminal-touch-btn-enter {
    min-width: 132px;
    padding: 11px 24px;
    font-size: 15px;
    background: #4a4a4a;
  }

  .terminal-touch-btn-subscribe {
    min-width: 132px;
    padding: 9px 20px;
    font-size: 14px;
    background: #2d86bb;
    border-color: #3b95ca;
  }

  .terminal-subscribe-wrap {
    margin-top: 88px;
    width: min(92vw, 360px);
    text-align: left;
  }

  .terminal-subscribe-note {
    margin: 0 0 6px;
    font-size: 13px;
    line-height: 1.35;
    color: #3b3b3b;
    font-family: Roboto, system-ui, sans-serif;
  }

  .terminal-subscribe-form {
    display: flex;
    flex-direction: column;
    gap: 8px;
    width: 100%;
  }

  .terminal-subscribe-email {
    width: 100%;
    min-height: 42px;
    padding: 9px 12px;
    border-radius: 8px;
    border: 1px solid #6a6a6a;
    background: #2f2f2f;
    color: #f5f5f5;
    font-size: 14px;
    font-family: Roboto, system-ui, sans-serif;
    outline: none;
  }

  .terminal-subscribe-email::placeholder {
    color: #b4b4b4;
  }

  .terminal-subscribe-email:focus {
    border-color: #7bb8de;
    box-shadow: 0 0 0 2px rgba(45, 134, 187, 0.25);
  }

  .terminal-subscribe-form .terminal-touch-btn-subscribe {
    width: 100%;
  }

  .terminal-touch-btn:active {
    background: #555;
  }

  /* Keep guided tooltips above terminal body but below fixed app chrome if needed */
  .text-editor-wrap [data-tippy-root],
  .text-editor-wrap .tippy-popper {
    z-index: 5 !important;
  }
}

@media (min-width: 768px) {
  #terminal > .terminal-touch-bar {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin: 52px auto 0;
    padding: 0;
    background: transparent;
    border: none;
    box-shadow: none;
  }

  .terminal-touch-btn-enter {
    display: none;
  }

  .terminal-subscribe-wrap {
    width: min(92vw, 520px);
    text-align: left;
    margin-top: 24px;
  }

  .terminal-subscribe-note {
    margin: 0 0 8px;
    font-size: 14px;
    line-height: 1.35;
    color: #3b3b3b;
    font-family: Roboto, system-ui, sans-serif;
  }

  .terminal-subscribe-form {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 10px;
    width: 100%;
  }

  .terminal-subscribe-email {
    flex: 1 1 auto;
    min-height: 42px;
    padding: 9px 12px;
    border-radius: 8px;
    border: 1px solid #6a6a6a;
    background: #2f2f2f;
    color: #f5f5f5;
    font-size: 14px;
    font-family: Roboto, system-ui, sans-serif;
    outline: none;
  }

  .terminal-subscribe-email::placeholder {
    color: #b4b4b4;
  }

  .terminal-subscribe-email:focus {
    border-color: #7bb8de;
    box-shadow: 0 0 0 2px rgba(45, 134, 187, 0.25);
  }

  .terminal-touch-btn-subscribe {
    min-width: 150px;
    min-height: 42px;
    padding: 9px 20px;
    font-size: 14px;
    font-weight: bold;
    font-family: Roboto, system-ui, sans-serif;
    color: #f5f5f5;
    background: #2d86bb;
    border: 1px solid #3b95ca;
    border-radius: 8px;
    cursor: pointer;
  }

  .terminal-touch-btn-subscribe:active {
    background: #327fb1;
  }
}

