/* Meyrio font comes with Windows since Windows 7, and cannot be redistributed */

@font-face {
    font-family: "Motiva Sans";
    src: url(../fonts/MotivaSansRegular.woff) format("woff");
}
@font-face {
    font-family: "Noto Sans";
    src: url(../fonts/NotoSans-Regular.woff) format("woff");
}

:root {
    --Blue: #1A9FFF;
    --BlueHi: #00BBFF;
    --GreenLow: #536904;
    --Green: #799905;
    --GreenHi: #a4d007;
    --Orange: #E35E1C;
    --Red: #D94126;
    --RedHi: #EE563B;
    --DustyBlue: #417a9b;
    --LightBlue: #B3DFFF;
    --Yellow: #FFC82C;
    --ChalkyBlue: #66C0F4;

    --hatched-glossy: (linear-gradient(to bottom, rgba(255, 255, 255, 0.05), rgba(255, 255, 255, 0) 20%),
            linear-gradient(to bottom, rgba(0, 0, 0, 0) 20%, rgba(0, 0, 0, 0.35)),

            repeating-linear-gradient(-45deg,
                rgba(0, 0, 0, 0.15) 0px,
                rgba(0, 0, 0, 0.15) 2px,
                transparent 2px,
                transparent 4px);
        )
}

html {
    font-family: "Motiva Sans", Meiryo, "Noto Sans", "Microsoft Sans Serif" !important;
    font-size: 20px;
    height: 100%;
    width: 100%;
    margin: 0;
    padding: 0;
    background-color: #1b2838;
    color: #fff;
}

p.version {
    all: unset;
    color: #b4b4b4;
}

p.width-error {
    all: unset;
    color: red;
}

body {
    margin: 0;
    padding: 0;
    height: 100%;
}

footer {
    z-index: 11;
    border-width: 1px 0 0 0;
    border-style: solid solid solid solid;
    border-color: #535353;
    background-color: #1b2838;
    background-image:
        linear-gradient(to bottom, rgba(255, 255, 255, 0.05), rgba(255, 255, 255, 0) 20%),
        linear-gradient(to bottom, rgba(0, 0, 0, 0) 20%, rgba(0, 0, 0, 0.35)),

        repeating-linear-gradient(-45deg,
            rgba(0, 0, 0, 0.15) 0px,
            rgba(0, 0, 0, 0.15) 2px,
            transparent 2px,
            transparent 4px);
    position: relative;
    height: fit-content;
    color: #fff;
    font-size: 0.8rem;
    padding: 15px;
    text-align: left;
    bottom: 0;
    height: 210px;
}

table, th, td {
    border-collapse: collapse;
    padding: 5px;
    border: 1px solid #686868;
}

#line-numbers {
    top: 0;
    left: 0;
    width: 40px;
    height: 100%;
    background-color: #121820;
    color: #fff;
    font-size: small;
    padding-right: 5px;
    padding-top: 5px;
    text-align: right;
    border-right: solid 1px #686868;
    z-index: 1;
}

#line-numbers>span {
    display: block;
    font-size: 0.6rem;
}

#editor-wrapper {
    display: flex;
    height: 100%;
}

#editor {
    padding-left: 40px;
    white-space: pre;
    font-size: 0.6rem;
}

.untrusted-domain {
    all: unset;
    font-size: 10px;
    color: #7e8391;
    padding: 4px;
}

#infobar {
    /* background: linear-gradient(to bottom, var(--Green), var(--GreenLow)); */
    background: var(--Green);
    background-image:
        linear-gradient(to bottom, rgba(255, 255, 255, 0.05), rgba(255, 255, 255, 0) 20%),
        linear-gradient(to bottom, rgba(0, 0, 0, 0) 20%, rgba(0, 0, 0, 0.35)),

        repeating-linear-gradient(-45deg,
            rgba(0, 0, 0, 0.15) 0px,
            rgba(0, 0, 0, 0.15) 2px,
            transparent 2px,
            transparent 4px);
    border-top: solid 1px var(--GreenHi);
    border-radius: 5px 5px 1px 1px;
    color: #fff;
    font-size: medium;
    padding-left: 10px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

#debugbar {
    background: var(--DustyBlue);
    background-image:
        linear-gradient(to bottom, rgba(255, 255, 255, 0.05), rgba(255, 255, 255, 0) 20%),
        linear-gradient(to bottom, rgba(0, 0, 0, 0) 20%, rgba(0, 0, 0, 0.35)),

        repeating-linear-gradient(-45deg,
            rgba(0, 0, 0, 0.15) 0px,
            rgba(0, 0, 0, 0.15) 2px,
            transparent 2px,
            transparent 4px);
    border-top: solid 0px var(--ChalkyBlue);
    border-radius: 0px 0px 0px 0px;
    color: #fff;
    font-size: medium;
    padding-left: 10px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.panel-header {
    font-size: large;
    border-bottom: 1px solid #686868;
    margin-bottom: 20px;
    align-self: center;
}

.no-select {
    -webkit-touch-callout: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
}

#app {
    z-index: 0;
    display: flex;
    flex-direction: row;
    height: calc(100vh - 10px - 19px);
    margin-top: 10px;
}

#markdown {
    display: flex;
    flex-direction: column;
    width: 100%;
    min-width: 300px;
}

.editor-settings {
    display: flex;
    align-items: center;
    gap: 5px;
    color: #969696;
    font-size: small;
    border-bottom: 1px solid #969696;

    cursor:help;
}

.is-disabled {
    cursor:help;
}

textarea#editor {
    min-width: 250px;
    width: 100%;
    height: 100%;
    padding: 5px;
    background-color: #121820;
    color: #fff;
    border: none;
    resize: none;
}

textarea#editor:active,
textarea#editor:focus {
    outline: none;
    border: none;
}

#preview {
    /* Steam uses a constant 638px width */
    max-width:  638px;
    min-width:  638px;
    width:      638px;

    display: flex;
    flex-direction: column;
    margin-left: 10px;
    padding-left: 10px;
    margin-right: 10px;
    border-left: solid 1px #686868;

    text-decoration-color: rgb(94, 151, 201);
}

::selection,
::-moz-selection{
    background:#54a5d4;
    text-shadow:1px 1px 2px #000000aa;
    color:#fff;
}

#preview-container {
    /* Steam's font color */
    font-size: 14px;
    word-wrap: break-word;
    margin-top:10px;
    line-height: 20px;
    padding-bottom: 16px;
    padding-right: 8px;
    color: #acb2b8;
    text-align: left;

    background: url('../images/content_footer_fade.png') bottom right no-repeat, url('../images/group_content_topbackground.png') 0px 8px no-repeat, url('../images/content_header_rule.png') -4px 0px no-repeat;
    padding-bottom: 8px;
    margin-bottom: 16px;
}

#preview-container .header {
    color: #66C0F4;
}

#preview-container a {
    text-decoration: none;
    color: #fff;
}

#preview-container a:hover {
    text-decoration: none;
    color: #66C0F4;
}

#preview-container code{
    border: 1px solid #535354;
    border-radius: 3px;
    padding: 12px;
    margin: 8px;
    font-size: 11px;
    font-family: Consolas, "Menlo", "Lucida Console", "Lucida Sans Typewriter", monospace;
    white-space: pre;
    white-space: pre-wrap;
    overflow-x: auto;
}

h1.preview-header {
    font-size: 20px;
    line-height: 23px;
    color: #5aa9d6;
    font-weight: normal;
    margin: 0;
    padding: 0;
    margin-bottom: 10px;
    clear: both;
}

h2.preview-header {
    color: #5aa9d6;
    margin-bottom: 6px;
    margin-top: 8px;
    font-size: 18px;
    line-height: 21px;
    font-weight: 400;
    clear: both;
}

h3.preview-header {
    color: #5aa9d6;
    margin-bottom: 6px;
    margin-top: 8px;
    font-size: 16px;
    line-height: 19px;
    font-weight: 300;
    clear: both;
}

span.preview-spoiler {
    background-color: #000;
    color: #000;
    padding: 0 8px;
}

span.preview-spoiler:hover {
    color: #fff;
}
