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

:root {
    --color-bg: var(--card);
    --color-text: var(--text-terminal-normal);
    --color-text-subtle: var(--text-termynal-light);
}

[data-termynal] {
    width: 750px;
    max-width: 100%;
    background: linear-gradient(
            20deg,
            var(--gradient-start-primary),
            var(--gradient-end-primary)
    );
    border-color: var(--border);
    border-width: 1px;
    font-weight: normal;
    color: var(--text-terminal-normal);
    font-size: 18px;
    font-family: 'Fira Mono', Consolas, Menlo, Monaco, 'Courier New', Courier, monospace;
    border-radius: 6px;
    padding: 48px 16px;
    position: relative;
    -webkit-box-sizing: border-box;
    box-sizing: border-box;
}

[data-termynal]:before {
    content: '';
    position: absolute;
    top: 15px;
    left: 15px;
    display: inline-block;
    width: 15px;
    height: 15px;
    border-radius: 50%;
    /* A little hack to display the window buttons in one pseudo element. */
    background: #d9515d;
    -webkit-box-shadow: 25px 0 0 #f4c025, 50px 0 0 #3ec930;
    box-shadow: 25px 0 0 #f4c025, 50px 0 0 #3ec930;
}

[data-termynal]:after {
    content: 'te.js';
    position: absolute;
    color: var(--text-termynal-dark);
    font-weight: bold;
    top: 5px;
    left: 0;
    width: 100%;
    text-align: center;
}

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

[data-ty]:before {
    /* Set up defaults and ensure empty lines are displayed. */
    content: '';
    display: inline-block;
    vertical-align: middle;
}

[data-ty="input"]:before,
[data-ty-prompt]:before {
    margin-right: 0.75em;
    font-size: small;
    font-weight: lighter;
    color: var(--text-muted);
}

[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;
    -webkit-animation: blink 1s infinite;
    animation: blink 1s infinite;
}

.data-ty-message {
    font-size: medium;
    font-weight: lighter;
    color: var(--text-muted);
}

.command {
    color: var(--text-termynal-command);
    font-weight: bold;
}

/* Cursor animation */

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

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