@font-face {
	font-family: "Geist";
	src: url("/font/geist.ttf");
}

@font-face {
	font-family: "Geist Mono";
	src: url("/font/geist-mono.ttf");
}

:root {
    --bg--1: #000000;
    --bg-0: #080808;
    --bg-1: #222222;
    --bg-2: rgb(83, 103, 112);
    --fg-0: #cccccc;
    --fl: #999999;
    --fg-1: #cccccc;
    --fg-2: #b1b1b1;

    --extra-dark: var(--bg--1);
    --background: var(--bg-0);
    --border: var(--bg-1);
    --title: var(--fg-0);
    --text: var(--fg-1);
    --link: var(--fl);
    --link-hover: #FFF;
}

body {
    margin: 0;
    height: 100vh;
    background-color: var(--background);
    color: var(--text);
    display: grid;
    grid-template-columns: auto;
    grid-template-rows: 4rem 2.5rem 1fr;
    font-family: 'Geist', sans-serif;
    font-weight: 500;
    font-size: medium;
}

a:link, a:visited {
    color: var(--link);
	text-decoration: underline 1px var(--border);
}

a:hover, a:active {
	color: var(--link-hover);
	text-decoration: underline;
}


body > header, body > label, body > #content {
    display: flex;
}

header {
    border-bottom: 1px solid var(--border);
    align-items: center;
}

#title {
	font-family: "Geist Mono";
    color: var(--title);
	font-weight: 600;
	font-size: x-large;
	text-align: center;
    overflow: hidden;
    margin: auto 25px;
}

#search-box {
    width: 100%;
    border: 0;
    border-bottom: 1px solid var(--border);
    background-color: var(--background);
    color: var(--text);
    outline: none;
    font-size: medium;
    text-indent: 25px;
    font-family: "Geist Mono";
}

#search-box:focus {
    background-color: var(--extra-dark);
}

#content {
    flex-direction: row;
    overflow-y: auto;
}

#last-container {
    border-right: 0;
}

#editor-opener {
    width: 50px;
    height: 50px;
    margin-left: auto;
    margin-right: 10px;
    background-color: transparent;
    border: 0;
    cursor: pointer;
}

#editor-opener > img {
    color: var(--border);
    filter: brightness(18%);
}

/* EDITOR */

.hide-editor {
    display: none !important;
}

#editor {
    background-color: var(--extra-dark);
    min-width: calc(200% / 3 - 1px);
    grid-template-rows: max-content auto;
    padding: 0;
    display: flex;
    flex-direction: column;
    height: 100%;
}

#ide-container {
    height: 100%;
}

#editor > div {
    display: flex;
    gap: 10px;
    align-items: center;
    padding: 10px 10px 0 10px;
}

#editor > div > button {
    background-color: var(--background);
    color: var(--link);
    border: solid 1px var(--text);
    font-family: 'Geist', sans-serif;
    padding: 5px;
    cursor: pointer;
}

#editor > div > button:disabled {
    border: dashed 1px var(--text);
    color: var(--text);
    cursor: not-allowed;
}

#editor > div > button:hover {
    border: solid 1px var(--link);
}

#editor > div > button:disabled:hover {
    border: dashed 1px var(--text);
}

#editor > div > #mode {
    margin-left: auto;
}

#editor textarea {
    width: calc(100% - 26px);
    height: calc(100% - 26px);
    margin: 10px;
    outline: none;
    resize: none;
    background-color: transparent;
    border: 1px solid var(--border);
    font-family: 'Geist Mono', monospace;
    font-size: 13px;
    color: var(--text);
}

.hidden {
    display: none !important;
}

#editor input {
    width: calc(100% - 26px);
    margin: 10px;
    outline: none;
    resize: none;
    background-color: transparent;
    border: 1px solid var(--border);
    font-family: 'Geist Mono', monospace;
    font-size: 13px;
    color: var(--text);
}

/* CONTAINER */

.container {
    box-sizing: border-box;
    height: 100%;
    min-width: calc(100% / 3 - 1px);
    width: calc(100% / 3 - 1px);
    border-right: 1px solid var(--border);
    overflow-y: auto;
    padding: 0 20px;
}

.container > h2 {
	font-family: "Geist Mono";
	color: var(--fg-0);
	font-weight: 700;
	font-size: larger;
	margin: 0;
    margin: 16px 0;
}

.container > ul {
    margin: 0;
}

.container > ul > li {
	margin-bottom: 4px;
	list-style: disc;
}

.container > ul > li > p {
    margin: 0;
}

/* MEDIA */

@media screen and (max-width: 600px) {
    #content {
        flex-direction: column;
        height: max-content;
        overflow-y: auto;
    }

    .container {
        height: max-content;
        width: 100%;
        border-right: 0;
        border-bottom: solid 1px var(--border);
        padding-bottom: 20px;
        overflow-y: unset;
    }

    #editor {
        height: 50vh;
    }

    #editor textarea {
        overflow: auto;
        overflow-wrap: normal;
        white-space: pre;
    }
}