* {
    outline: none;
    box-sizing: border-box;
}

html {
    padding: 0;
}
html, body {
    height: 100%;
    width: 100%;
    margin: 0;
}

body {
    background: #1e282d;
    color: #a9a5a5;
    font-family: Consolas, monospace;

    padding: 0.5em;
    tab-size: 4;
}

.highlight {
    height: 100%;
    padding: 1em 0.6em 1em 0;
    background: transparent !important;
    font-family: Consolas, monospace;
    font-size: 1em;
    border-spacing: 0;
    border-collapse: separate;
    display: flex;
    overflow-x: scroll;
}

.highlight tr, td {
    vertical-align: baseline;
    white-space: pre;
}

.line-content {
    padding: 0 0 0 0.5em;
}

.line-content.selected {
    background-color: rgba(240, 200, 100, 0.1);
}

.line-number {
    width: 1%;
    min-width: 1em;
    padding: 0 0.5em;
    text-align: right;
    font-family: Consolas, monospace;
    cursor: pointer;
    user-select: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    -webkit-tap-highlight-color: transparent;
}

.line-number::before {
    content: attr(value);
}

#post-snippet {
    padding: 0.3em 0 0.3em 0.6em;
    width: 100%;
    height: 100%;
}

#post-snippet textarea {
    background-color: transparent;
    border: none;
    resize: none;

    width: 100%;
    height: 100%;

    font-family: Consolas, monospace;
    font-size: 1em;
    color: #a9a5a5;
}

.controls {
    position: fixed;
    bottom: 0;
    right: 0;
    padding: 0.7em;
    pointer-events: none;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    flex-wrap: wrap-reverse;
}

.control {
    pointer-events: all;
    margin: 0.5em;
    background-color: #1d2529;
    box-shadow: 0 0 3px 0 rgba(43, 43, 43, 0.2);
    border: none;
}

.controls select, .controls input {
    border-radius: 1em;
    padding: 0.8em 1em;
    color: #ffffff;
}

.controls input::-webkit-outer-spin-button, .controls input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    appearance: none;
}

input[type="number"] {
    -moz-appearance: textfield;
}

.controls button, .controls a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    background-color: #5cbbf7;
    cursor: pointer;
    border-radius: 50%;
    height: 4em;
    width: 4em;
    font: caption;
    font-size: 0.85em;

    transition: background-color 0.2s ease;
}

.controls button svg, .controls a svg {
    fill: #ffffff;
    height: 1.75em;
    width: 1.75em;
    transition: background-color 0.2s ease;
}

#post-snippet:invalid .controls button {
    background-color: #1d2529;
    cursor: default;
}

#post-snippet:invalid .controls button svg {
    fill: #707070;
}
