/** Font **/
@font-face {
    font-family: 'JetbrainsMono';
    src: url('/css/fonts/jetbrainsmono-regular-webfont.woff2') format('woff2'),
         url('/css/fonts/jetbrainsmono-regular-webfont.woff') format('woff');
    font-weight: normal;
}
@font-face {
    font-family: 'JetbrainsMono';
    src: url('/css/fonts/jetbrainsmono-bold-webfont.woff2') format('woff2'),
         url('/css/fonts/jetbrainsmono-bold-webfont.woff') format('woff');
    font-weight: bold;
}
@font-face {
    font-family: 'JetbrainsMono';
    src: url('/css/fonts/jetbrainsmono-italic-webfont.woff2') format('woff2'),
         url('/css/fonts/jetbrainsmono-italic-webfont.woff') format('woff');
    font-style: italic;
}
@font-face {
    font-family: 'JetbrainsMono';
    src: url('/css/fonts/jetbrainsmono-bolditalic-webfont.woff2') format('woff2'),
        url('/css/fonts/jetbrainsmono-bolditalic-webfont.woff') format('woff');
    font-weight: bold;
    font-style: italic;
}


/** Core **/
*, *:before, *:after {
    box-sizing: border-box;
    /*-webkit-overflow-scrolling: auto;*/
}
html, body {
    font-family: 'JetbrainsMono', sans-serif;
    background-color: #181a1b;
    color: #d3cfca;
    margin: 0;
    padding: 0;
    height: 100%;

    /*touch-action:none;*/
    /*overscroll-behavior-y: none;*/
}
body {
    display: flex;
    flex-direction: column;
}

.content {
    width: 960px;
    margin: 0 auto;
    flex-grow: 1;
    min-height: 0;
}
.content::after {
    content: '';
    display: block;
    height: 30px;
}

h1 {
    margin-top: 0;
    margin-bottom: 10px;
}

.noselect {
  -webkit-touch-callout: none; /* iOS Safari */
    -webkit-user-select: none; /* Safari */
     -khtml-user-select: none; /* Konqueror HTML */
       -moz-user-select: none; /* Old versions of Firefox */
        -ms-user-select: none; /* Internet Explorer/Edge */
            user-select: none; /* Non-prefixed version, currently
                                  supported by Chrome, Edge, Opera and Firefox */
}

input, textarea, button, .title-button {
    background-color: #181a1b;
    color: #d3cfca;
    outline: none;
    border: 1px solid #3c3f41;
    border-radius: 3px;
    padding: 3px 6px;
    resize: none;
    font-size: 13pt;
}
textarea, pre {
    -moz-tab-size : 4;
      -o-tab-size : 4;
         tab-size : 4;
}
input:focus, textarea:focus {
    outline: none;
}
button, .title-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 20px;
    height: 30px;
    width: 30px;
    padding: 0;
    margin: 0;
}
.title-button {
    margin-right: 10px;
}
.title-button:first-child {
    margin-right: 0;
}
.title-button > img {
    display: block;
    width: 60%;
    height: 60%;
}

.noselect {
  -webkit-touch-callout: none; /* iOS Safari */
    -webkit-user-select: none; /* Safari */
     -khtml-user-select: none; /* Konqueror HTML */
       -moz-user-select: none; /* Old versions of Firefox */
        -ms-user-select: none; /* Internet Explorer/Edge */
            user-select: none; /* Non-prefixed version, currently
                                  supported by Chrome, Edge, Opera and Firefox */
}


/** Header **/
.header {
    background-color: #3c3f41;
    margin-bottom: 10px;
}
.header-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 960px;
    margin: 0 auto;
    height: 40px;
}
.header::after {
    clear: both;
}
.header .breadcrumbs {
    display: flex;
    min-width: 0;
    width: 90%;
}
.header .breadcrumbs div:first-child {
    flex-shrink: 0;
    flex-grow: 0;
}
.header .breadcrumbs div {
    overflow: hidden;
    min-width: 0px;

    text-overflow: ellipsis;
    white-space: nowrap;
    overflow: hidden;
}
.header .breadcrumbs a {
    color: #d3cfca;

    text-overflow: ellipsis;
    white-space: nowrap;
    overflow: hidden;
}
.header .breadcrumbs a:visited {
    color: #d3cfca;
}
.header .breadcrumbs div:not(:last-child) {
    margin-right: 10px;
}
.header .breadcrumbs div:not(:first-child)::before {
    /*content: "\00BB";*/
    content: " / ";
    margin-right: 10px;
}
.header .breadcrumbs-mobile {
    display: none;
}
.header .mode-buttons {
    background-color: #2b2b2b;
    padding: 3px 5px;
    border-radius: 3px;
    /*line-height: 20px;*/
    display: flex;
    align-items: center;
    height: 70%;
}
.header .mode-buttons img {
    width: auto;
    height: 100%;
}
.header .mode-buttons .split-mode-button {
    display: inline-block;
    text-align: center;
    box-shadow: none;
    width: 25px;
    height: 80%;
    line-height: 18px;
    color: #ccc;
    cursor: pointer;
    padding: 2px;
}
.header .mode-buttons .split-mode-button.selected {
    background-color: #5c6164;
    border-radius: 3px;
}


/** Cards **/
.card-container {
    display: grid;
    grid-template-columns: 33% 33% auto;
    grid-gap: 10px 10px;
}

.card {
    position: relative;
    display: flex;
    align-items: center;
    padding: 8px;
    border: 1px solid #ccc;
    border-radius: 3px;
    cursor: pointer;
    color: #d3cfca;
    text-decoration: none;
}
.card:visited {
    text-decoration: none;
    color: #d3cfca;
}
.card span {
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 1;
    -webkit-box-orient: vertical;
    white-space: initial;
    flex-grow: 1;
}
.card-actions {
    display: inline-flex;
    justify-content: flex-end;
    align-items: center;
    height: 10px;
}
.card-actions > img {
    min-height: 0;
    /*display: inline-block;*/
    height: 100%;
    width: auto;
    cursor: pointer;
    aspect-ratio: 1/1;
    background-size: contain;
    vertical-align: baseline;
}


/** Cards **/
.tag-edit-container {
    display: grid;
    grid-template-columns: 50% auto;
    grid-gap: 10px 10px;
}
.tag-full {
    padding: 8px;
    border: 1px solid #ccc;
    border-radius: 3px;
    color: #d3cfca;
    height: 35px;
    position: relative;
    display: flex;
    align-items: center;
}
.tag-full span {
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 1;
    -webkit-box-orient: vertical;
    white-space: initial;
    flex-grow: 1;
}
.tag-actions {
    display: inline-flex;
    justify-content: flex-end;
    align-items: center;
    height: 10px;
}
.tag-actions > img {
    min-height: 0;
    /*display: inline-block;*/
    height: 100%;
    width: auto;
    cursor: pointer;
    aspect-ratio: 1/1;
    background-size: contain;
    vertical-align: baseline;
}



/** Editor **/
.document-content {
    display: flex;
    flex-direction: column;
    /*height: 100%;*/
    /*padding-bottom: 10px;*/
}

.document-name-input {
    font-size: 25px;
    line-height: 35px;
    margin-bottom: 10px;
    display: inline-block;
    width: 100%;
    height: 40px;
}

.document-header {
    display: flex;
}
.document-header h1 {
    flex-grow: 1;
}
.document-header button {
    height: 30px;
}

.document-editor-container {
    width: 100%;
    display: flow-root;
    position: relative;
    /*background-color: #2b2b2b;*/
    background-color: #323232;
}
.document-editor-pretty, .document-editor-textarea {
    font: 15px 'JetbrainsMono', sans-serif;
    letter-spacing: 1px;
    left: 0;
    right: 0;
    top: 0;
    bottom: 0;
    margin: 0;
    padding: 7px;
}
.document-editor-textarea {
    width: 100%;
    margin: 0;
    border-radius: 0;
    background-color: transparent;
    color: transparent;
    /*color: #ff0000;*/
    caret-color: #ccc;
    z-index: 2;
    resize: none;
    border: 0;
    outline: 0;
    min-height: 100vh;
    display: inline-block;
}
.document-editor-pretty {
    white-space: pre-wrap;
    word-wrap: break-word;
    position: absolute;
    z-index: 1;
    pointer-events: none;
    /*color: #00ff00;*/
    /*overflow: auto;*/
    /*overflow-y: scroll;*/
    left: 0;
    right: 0;
    top: 0;
    bottom: 0;
    display: inline-block;
}
.mdp-h1, .mdp-h2, .mdp-h3, .mdp-h4, .mdp-h5, .mdp-h6 {
    color: #9876AA;
}
.mdp-blockquote, .mdp-code {
    color: #6A8759;
}

.document-preview-container {
    width: 100%;
    /*height: 100%;*/
    /*border: 1px solid #3c3f41;*/
    /*background-color: #2b2b2b;*/
    color: #A9B7C6;
    /*overflow:auto;*/
    padding: 6px;
    min-height: 300px;
    font-size: 15px;
}