/*!
 *       __ _____                     ________                              __
 *      / // _  /__ __ _____ ___ __ _/__  ___/__ ___ ______ __ __  __ ___  / /
 *  __ / // // // // // _  // _// // / / // _  // _//     // //  \/ // _ \/ /
 * /  / // // // // // ___// / / // / / // ___// / / / / // // /\  // // / /__
 * \___//____ \\___//____//_/ _\_  / /_//____//_/ /_/ /_//_//_/ /_/ \__\_\___/
 *           \/              /____/                              version DEV
 * http://terminal.jcubic.pl
 *
 * This file is part of jQuery Terminal.
 *
 * Copyright (c) 2011-2017 Jakub Jankiewicz <http://jcubic.pl>
 * Released under the MIT license
 *
 * Date: Sun, 09 Apr 2017 08:41:52 +0000
 */
.terminal .terminal-output .format, .cmd .format,
.cmd .prompt, .cmd .prompt div, .terminal .terminal-output div div{
    display: inline-block;
}
.terminal h1, .terminal h2, .terminal h3, .terminal h4, .terminal h5, .terminal h6, .terminal pre, .cmd {
    margin: 0;
}
.terminal h1, .terminal h2, .terminal h3, .terminal h4, .terminal h5, .terminal h6 {
    line-height: 1.2em;
}
/*
.cmd .mask {
    width: 10px;
    height: 11px;
    background: black;
    z-index: 100;
}
*/
.cmd .clipboard {
    position: absolute;
    left: -16px;
    top: 0;
    width: 20px;
    height: 16px;
    /* this seems to work after all on Android */
    /*left: -99999px;
    clip: rect(1px,1px,1px,1px);
    /* on desktop textarea appear when paste */
    /*
    opacity: 0.01;
    filter: alpha(opacity = 0.01);
    filter: progid:DXImageTransform.Microsoft.Alpha(opacity=0.01);
    */
    background: transparent;
    border: none;
    color: transparent;
    outline: none;
    padding: 0;
    resize: none;
    z-index: 0;
    overflow: hidden;
}
.terminal .error {
    color: #f00;
}
.terminal {
    position: relative;
    /*overflow: hidden;*/
    overflow-y: auto;
    overflow-x: hidden;
}
.terminal > div {
    height: 100%;
}
.cmd {
    padding: 0;
    height: 1.3em;
    position: relative;
    /*margin-top: 3px; */
}
.terminal .inverted, .cmd .inverted {
    background-color: #aaa;
    color: #000;
}
.cmd .cursor {
    border-bottom: 3px solid transparent;
    margin-bottom: -3px;
    background-clip: content-box;
}
.cmd .cursor.blink {
    -webkit-animation: terminal-blink 1s infinite steps(1, start);
       -moz-animation: terminal-blink 1s infinite steps(1, start);
        -ms-animation: terminal-blink 1s infinite steps(1, start);
            animation: terminal-blink 1s infinite steps(1, start);
    border-left: 1px solid transparent;
    margin-left: -1px;
}
.bar.terminal .inverted, .bar.cmd .inverted {
    border-left-color: #aaa;
}
@-webkit-keyframes terminal-blink {
  0%, 100% {
      background-color: #000;
      color: #aaa;
  }
  50% {
      background-color: #bbb;
      color: #000;
  }
}

@-ms-keyframes terminal-blink {
  0%, 100% {
      background-color: #000;
      color: #aaa;
  }
  50% {
      background-color: #bbb;
      color: #000;
  }
}

@-moz-keyframes terminal-blink {
  0%, 100% {
      background-color: #000;
      color: #aaa;
  }
  50% {
      background-color: #bbb;
      color: #000;
  }
}
@keyframes terminal-blink {
  0%, 100% {
      background-color: #000;
      color: #aaa;
  }
  50% {
      background-color: #bbb; /* not #aaa because it's seems there is Google Chrome bug */
      color: #000;
  }
}
@-webkit-keyframes terminal-bar {
  0%, 100% {
      border-left-color: #aaa;
  }
  50% {
      border-left-color: #000;
  }
}
@-ms-keyframes terminal-bar {
  0%, 100% {
      border-left-color: #aaa;
  }
  50% {
      border-left-color: #000;
  }
}
@-moz-keyframes terminal-bar {
  0%, 100% {
      border-left-color: #aaa;
  }
  50% {
      border-left-color: #000;
  }
}
@keyframes terminal-bar {
  0%, 100% {
      border-left-color: #aaa;
  }
  50% {
      border-left-color: #000;
  }
}
@-webkit-keyframes terminal-underline {
  0%, 100% {
      border-bottom-color: #aaa;
      position: relative;
      top: 2px;
      line-height: 11px;
      border-left: none;
      margin: 0;
  }
  50% {
      border-bottom-color: #000;
      position: relative;
      top: 2px;
      line-height: 11px;
      border-left: none;
      margin: 0;
  }
}
@-ms-keyframes terminal-underline {
  0%, 100% {
      border-bottom-color: #aaa;
      position: relative;
      top: 2px;
      line-height: 11px;
      border-left: none;
      margin: 0;
  }
  50% {
      border-bottom-color: #000;
      position: relative;
      top: 2px;
      line-height: 11px;
      border-left: none;
      margin: 0;
  }
}
@-moz-keyframes terminal-underline {
  0%, 100% {
      border-bottom-color: #aaa;
      position: relative;
      top: 2px;
      line-height: 11px;
      border-left: none;
      margin: 0;
  }
  50% {
      border-bottom-color: #000;
      position: relative;
      top: 2px;
      line-height: 11px;
      border-left: none;
      margin: 0;
  }
}
@keyframes terminal-underline {
  0%, 100% {
      border-bottom-color: #aaa;
      position: relative;
      top: 2px;
      line-height: 11px;
      border-left: none;
      margin: 0;
  }
  50% {
      border-bottom-color: #000;
      position: relative;
      top: 2px;
      line-height: 11px;
      border-left: none;
      margin: 0;
  }
}
.terminal .terminal-output div div, .cmd .prompt {
    display: block;
    line-height: 14px;
    height: auto;
}
.cmd .prompt {
    float: left;
}
.terminal, .cmd {
    font-family: monospace;
    /*font-family: FreeMono, monospace; this don't work on Android */
    color: #aaa;
    background-color: #000;
    font-size: 12px;
    line-height: 14px;
    box-sizing: border-box;
}
.cmd div {
    float: left;
    clear: both;
}
.cmd div + span {
    clear: both;
}
.cmd .prompt + div {
    clear: right;
}
.terminal-output > div {
    /*padding-top: 3px;*/
    min-height: 14px;
}
.terminal-output > div > div * {
    overflow-wrap: break-word; /* when echo html */
    word-wrap: break-word;
}
.terminal .terminal-output div span {
    display: inline-block;
}
.cmd span {
    float: left;
}
/* fix double style of selecting text in terminal */
.terminal-output span, .terminal-output a, .cmd div, .cmd span, .terminal td,
.terminal pre, .terminal h1, .terminal h2, .terminal h3, .terminal h4,
.terminal h5, .terminal h6 {
    -webkit-touch-callout: initial;
    -webkit-user-select: text;
    -khtml-user-select: text;
    -moz-user-select: text;
    -ms-user-select: text;
    user-select: text;
}
.terminal, .terminal-output, .terminal-output div {
    -webkit-touch-callout: none;
    -webkit-user-select: none;
    -khtml-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
}
/* firefox hack */
@-moz-document url-prefix() {
    .terminal, .terminal-output, .terminal-output div {
        -webkit-touch-callout: initial;
        -webkit-user-select: initial;
        -khtml-user-select: initial;
        -moz-user-select: initial;
        -ms-user-select: initial;
        user-select: initial;
    }
}
.terminal table {
    border-collapse: collapse;
}
.terminal td {
    border: 1px solid #aaa;
}
.terminal h1::-moz-selection,
.terminal h2::-moz-selection,
.terminal h3::-moz-selection,
.terminal h4::-moz-selection,
.terminal h5::-moz-selection,
.terminal h6::-moz-selection,
.terminal pre::-moz-selection,
.terminal td::-moz-selection,
.terminal .terminal-output div div::-moz-selection,
.terminal .terminal-output div span::-moz-selection,
.terminal .terminal-output div div a::-moz-selection,
.cmd div::-moz-selection,
.cmd > span::-moz-selection,
.cmd > span span::-moz-selection,
.cmd > div::-moz-selection,
.cmd > div span::-moz-selection,
.cmd .prompt span::-moz-selection {
    background-color: #aaa;
    color: #000;
}
/* this don't work in Chrome
.terminal tr td::-moz-selection {
    border-color: #000;
}
.terminal tr td::selection {
    border-color: #000;
}
*/
.terminal h1::selection,
.terminal h2::selection,
.terminal h3::selection,
.terminal h4::selection,
.terminal h5::selection,
.terminal h6::selection,
.terminal pre::selection,
.terminal td::selection,
.terminal .terminal-output div div::selection,
.terminal .terminal-output div div a::selection,
.terminal .terminal-output div span::selection,
.cmd div::selection,
.cmd > span::selection,
.cmd > span span::selection,
.cmd > div::selection,
.cmd > div span::selection,
.cmd .prompt span::selection {
    /*
     * use rgba to fix transparent selection in chrome
     * http://stackoverflow.com/questions/7224445/css3-selection-behaves-differently-in-ff-chrome
     */
    background-color: rgba(170, 170, 170, 0.99);
    color: #000;
}
.terminal .terminal-output div.error, .terminal .terminal-output div.error div {
    color: red;
}
.tilda {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1100;
}
.clear {
    clear: both;
}
.terminal a {
    color: #0F60FF;
}
.terminal a:hover {
    color: red;
}
.terminal iframe {
    position: absolute;
    left: 0;
    top: -100%;
    width: 100%;
    height: 100%;
    margin: 1px 0 0;
    border: none;
    opacity: 0;
    pointer-events: none;
    box-sizing: border-box;
}
.terminal, .terminal iframe {
    padding: 10px; /* we get width of the terminal from iframe so it need to have the same padding */
}
@supports (--css: variables) {
    .terminal, .cmd {
        color: var(--color, #aaa);
        background-color: var(--background, #000);
    }
    .terminal, .cmd, .terminal .terminal-output div div, .cmd .prompt {
        font-size: calc(var(--size, 1) * 12px);
        line-height: calc(var(--size, 1) * 14px);
    }
    .terminal .inverted, .cmd .inverted {
        background-color: var(--color, #aaa);
        color: var(--background, #000);
    }
    .cmd .cursor.blink {
        -webkit-animation: var(--animation, terminal-blink) 1s infinite steps(1, start);
           -moz-animation: var(--animation, terminal-blink) 1s infinite steps(1, start);
            -ms-animation: var(--animation, terminal-blink) 1s infinite steps(1, start);
                animation: var(--animation, terminal-blink) 1s infinite steps(1, start);
        color: var(--color, #aaa);
        background-color: var(--background, #000);
        margin-bottom: -3px;
    }
    .terminal h1::-moz-selection,
    .terminal h2::-moz-selection,
    .terminal h3::-moz-selection,
    .terminal h4::-moz-selection,
    .terminal h5::-moz-selection,
    .terminal h6::-moz-selection,
    .terminal pre::-moz-selection,
    .terminal td::-moz-selection,
    .terminal .terminal-output div div::-moz-selection,
    .terminal .terminal-output div span::-moz-selection,
    .terminal .terminal-output div div a::-moz-selection,
    .cmd div::-moz-selection,
    .cmd > span::-moz-selection,
    .cmd > span span::-moz-selection,
    .cmd > div::-moz-selection,
    .cmd > div span::-moz-selection,
    .cmd .prompt span::-moz-selection {
        background-color: var(--color, #aaa);
        color: var(--background, #000);
    }
    .terminal h1::selection,
    .terminal h2::selection,
    .terminal h3::selection,
    .terminal h4::selection,
    .terminal h5::selection,
    .terminal h6::selection,
    .terminal pre::selection,
    .terminal td::selection,
    .terminal .terminal-output div div::selection,
    .terminal .terminal-output div div a::selection,
    .terminal .terminal-output div span::selection,
    .cmd div::selection,
    .cmd > span::selection,
    .cmd > span span::selection,
    .cmd > div::selection,
    .cmd > div span::selection,
    .cmd .prompt span::selection {
        background-color: var(--color, rgba(170, 170, 170, 0.99));
        color: var(--background, #000);
    }
    @-webkit-keyframes terminal-blink {
      0%, 100% {
          background-color: var(--background, #000);
          color: var(--color, #aaa);
      }
      50% {
          background-color: var(--color, #aaa);
          color: var(--background, #000);
      }
    }

    @-ms-keyframes terminal-blink {
      0%, 100% {
          background-color: var(--background, #000);
          color: var(--color, #aaa);
      }
      50% {
          background-color: var(--color, #aaa);
          color: var(--background, #000);
      }
    }
    @-moz-keyframes terminal-blink {
      0%, 100% {
          background-color: var(--background, #000);
          color: var(--color, #aaa);
      }
      50% {
          background-color: var(--color, #aaa);
          color: var(--background, #000);
      }
    }
    @keyframes terminal-blink {
      0%, 100% {
          background-color: var(--background, #000);
          color: var(--color, #aaa);
      }
      50% {
          background-color: var(--color, #aaa);
          color: var(--background, #000);
      }
    }
    @-webkit-keyframes terminal-bar {
      0%, 100% {
          border-left-color: var(--background, #000);
      }
      50% {
          border-left-color: var(--color, #aaa);
      }
    }
    @-ms-keyframes terminal-bar {
      0%, 100% {
          border-left-color: var(--background, #000);
      }
      50% {
          border-left-color: var(--color, #aaa);
      }
    }
    @-moz-keyframes terminal-bar {
      0%, 100% {
          border-left-color: var(--background, #000);
      }
      50% {
          border-left-color: var(--color, #aaa);
      }
    }
    @keyframes terminal-bar {
      0%, 100% {
          border-left-color: var(--background, #000);
      }
      50% {
          border-left-color: var(--color, #aaa);
      }
    }
    @-webkit-keyframes terminal-underline {
      0%, 100% {
          border-bottom-color: var(--color, #aaa);
          position: relative;
          top: 2px;
          line-height: 11px;
          border-left: none;
          margin: 0;
      }
      50% {
          border-bottom-color: var(--background, #000);
          position: relative;
          top: 2px;
          line-height: 11px;
          border-left: none;
          margin: 0;
      }
    }
    @-ms-keyframes terminal-underline {
      0%, 100% {
          border-bottom-color: var(--background, #000);
          position: relative;
          top: 2px;
          line-height: 11px;
          border-left: none;
          margin: 0;
      }
      50% {
          border-bottom-color: var(--color, #aaa);
          position: relative;
          top: 2px;
          line-height: 11px;
          border-left: none;
          margin: 0;
      }
    }
    @-moz-keyframes terminal-underline {
      0%, 100% {
          border-bottom-color: var(--background, #000);
          position: relative;
          top: 2px;
          line-height: 11px;
          border-left: none;
          margin: 0;
      }
      50% {
          border-bottom-color: var(--color, #aaa);
          position: relative;
          top: 2px;
          line-height: 11px;
          border-left: none;
          margin: 0;
      }
    }
    @keyframes terminal-underline {
      0%, 100% {
          border-bottom-color: var(--background, #000);
          position: relative;
          top: 2px;
          line-height: 11px;
          border-left: none;
          margin: 0;
      }
      50% {
          border-bottom-color: var(--color, #aaa);
          position: relative;
          top: 2px;
          line-height: 11px;
          border-left: none;
          margin: 0;
      }
    }
}