/**
 * termynal.css
 *
 * @author Ines Montani <ines@ines.io>
 * @version 0.0.1
 * @license MIT
 */

:root {
    --color-bg: #252a33;
    --color-text: #eee;
    --color-text-subtle: #a2a2a2;
    --color-text-output: #aeb5c0;
}

.termy {
    direction: ltr;
}

[data-termynal] {
    white-space: pre-wrap;
}

.termy .linenos {
    display: none;
}

.termynal-comment {
    color: #4a968f;
    font-style: italic;
    display: block;
}

[data-termynal] {
    width: 750px;
    max-width: 100%;
    background: var(--color-bg);
    color: var(--color-text);
    font-size: 15px;
    font-family: var(--md-code-font-family), "Roboto Mono", "Fira Mono", Consolas, Menlo, Monaco, "Courier New", Courier, monospace;
    border-radius: 4px;
    padding: 75px 45px 35px;
    position: relative;
    box-sizing: border-box;
    line-height: 1.2;
}

[data-termynal]:before {
    content: "";
    position: absolute;
    top: 15px;
    left: 15px;
    display: inline-block;
    width: 15px;
    height: 15px;
    border-radius: 50%;
    background: #d9515d;
    box-shadow: 25px 0 0 #f4c025, 50px 0 0 #3ec930;
}

[data-termynal]:after {
    content: "bash";
    position: absolute;
    color: var(--color-text-subtle);
    top: 5px;
    left: 0;
    width: 100%;
    text-align: center;
}

a[data-terminal-control] {
    display: none !important;
}

[data-ty] {
    display: block;
    line-height: 2;
}

[data-termynal] span[data-ty="input"] {
    color: var(--color-text);
}

[data-termynal] span:not([data-ty="input"]):not(.termynal-comment) {
    color: var(--color-text-output);
}

[data-ty]:before {
    content: "";
    display: inline-block;
    vertical-align: middle;
}

[data-ty="input"]:before,
[data-ty-prompt]:before {
    margin-right: 0.75em;
    color: var(--color-text-subtle);
}

[data-ty="input"]:before {
    content: "$";
}

[data-ty][data-ty-prompt]:before {
    content: attr(data-ty-prompt);
}

[data-ty-cursor]:after {
    content: attr(data-ty-cursor);
    font-family: monospace;
    margin-left: 0.5em;
    animation: blink 1s infinite;
}

@keyframes blink {
    50% {
        opacity: 0;
    }
}
