html {
    scroll-behavior: smooth;
}

:root {
    --one: 25, 25, 26;
    --two: 35, 36, 37;
    --three: 47, 49, 49;
    --four: 60, 60, 60;
    --five: 140, 143, 141;

    --highone: 4, 76, 117;
    --highlight: 165, 195, 249;
    --highlighttext: 15, 50, 110;

    --highdark: 15, 50, 110;
    --hightext: 191, 229, 254;

    --text: 240, 240, 240;
}

* {
    scrollbar-width: thin;
    scrollbar-color: rgb(var(--three)) transparent;
}

*::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

*::-webkit-scrollbar-thumb {
    background: rgb(var(--three));
    border-radius: 6px;
}

*::-webkit-scrollbar-track {
    background: transparent;
}

body {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    background-color: rgb(var(--one));
    color: rgb(var(--text));
    font-family: 'Courier New', Courier, monospace;
    height: 100vh;
    width: 100vw;
}

.flex {
    display: flex;

    &.y {
        flex-direction: column;
    }

    &.x {
        flex-direction: row;
    }

    &>.fill {
        flex: 1;
    }

    &>.fit {
        width: fit-content;
    }
}

.serverslist {
    background-color: rgb(var(--two));
    padding: .5em;
    border-right: 1px solid rgb(var(--three));
}

@font-face {
    font-family: 'Material Symbols Rounded';
    font-style: normal;
    src: url("assets/icons.woff2") format('woff2');
}

@font-face {
    font-family: "Google Sans";
    font-style: normal;
    src: url("assets/google_sans.ttf") format('truetype');
}

.icon {
    font-family: 'Material Symbols Rounded';
    font-variation-settings:
        'FILL' 1,
        'wght' 400,
        'GRAD' 0,
        'opsz' 24
}

textarea {
    resize: none;
    overflow-y: auto;
    max-height: 40vh;
}

.pane {
    min-width: 200px;
    box-shadow: 1px 0 0 rgb(var(--two));
    display: flex;
    flex-direction: column;
    overflow-y: auto;
    width: 0;
}

.msg {
    display: flex;
    flex-direction: column;
    gap: .5em;
    padding: .5em 1em;

    &:last-child {
        margin-bottom: 1em;
    }

    &:hover {
        background-color: rgb(var(--two));

        & .msg_actions {
            opacity: 1;
            display: flex;
            gap: .5em;
        }
    }

    & .msg_actions {
        opacity: 0;
        display: flex;
        gap: .5em;

        &>* {
            cursor: pointer;
            opacity: .8;

            &:hover {
                opacity: 1;
                text-decoration: underline;
            }
        }
    }

    &>.data {
        display: flex;
        flex-direction: row;
        gap: .7em;
        flex-wrap: wrap;

        &>.fill {
            flex: 1;
        }

        &>.pfp {
            width: 1em;
            height: 1em;
            border-radius: 2em;
        }


        &>.bold {
            opacity: .8;
            font-weight: bold;

            &:hover {
                opacity: 1;
                text-decoration: underline;
            }
        }
    }
}

.inputs {
    background: rgb(var(--two));
    display: flex;

    &>textarea {
        background-color: transparent;
        outline: 0;
        border: 0;
        color: inherit;
        min-height: 0;
        font: inherit;
        font-family: inherit;
        padding: 1em;
        flex: 1;
        min-width: 0;
        box-shadow: 0 -1px 0 rgb(var(--three));
    }
}

div#interactive_logs {
    overflow: hidden;
    overflow-y: auto;
}

.pane.interactive {
    flex-grow: 3;
    position: relative;
}

.pane.logs {
    flex-grow: 2;
}

@keyframes pop {
    0% {
        transform: translateY(10px);
    }
}

#logspane {
    flex: 1;
    overflow-y: auto;

    & .msg {
        display: flex;
        flex-direction: row;
        max-width: 100%;
        justify-content: space-between;
        animation: pop .5s cubic-bezier(0.075, 0.82, 0.165, 1);
        align-items: center;

        &>.icon {
            align-self: baseline;
        }

        &>.data {
            display: inline-flex;
            gap: 0;
            width: 0;
            flex: 1;
            align-items: flex-start;

            & .overflowable {
                overflow-x: auto;
                width: fit-content;
                &>* {
                    width: fit-content;
                }
            }

            &>* {
                display: inline;
                margin-right: 1ch;
            }

            &>.icon {
                transform: translateY(-2px);
            }
        }

        &>.time {
            display: inline-flex;
            opacity: .8;
        }
    }
}

a[href] {
    color: rgb(var(--highlight));
    text-decoration: underline;
}

pre {
    padding: 1em;
    background: rgb(var(--one));
}

strong,
.super {
    color: rgb(var(--highlight));
}

#fullloader {
    position: absolute;
    top: 0;
    right: 0;
    width: 100%;
    height: 100%;
    background-color: rgb(var(--one));
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 99;

    &>img {
        width: 6em;
        height: 6em;
    }

    &>h1 {
        opacity: .1;
        font-size: 3em;
        position: absolute;
        bottom: 0;

        &>i {
            display: inline-block;
            font-style: normal;
            font-size: 50%;
            transform: translateX(-.5em);
        }
    }
}

.loader {
    width: 20px;
    aspect-ratio: 1;
    animation: l13-0 2s linear infinite;
    position: absolute;
}

.loader::before,
.loader::after {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: 50%;
    background: white;
    box-shadow: 0 0 5em white, 0 0 1em white;
    animation: l13-1 .5s cubic-bezier(.5, -500, .5, 500) infinite;
}

.loader::after {
    animation-delay: -0.15s;
}

@keyframes l13-0 {
    100% {
        transform: rotate(360deg)
    }

    0% {
        z-index: -1;
    }
}

@keyframes l13-1 {
    100% {
        transform: translate(0.5px);
    }
}

ul {
    &>li {
        margin-top: .3em;
    }

    &>b {
        margin-top: .5em;
        display: block;
    }
}

img.pfp {
    width: 7em;
    height: 7em;
    border: 1px solid rgb(var(--three));
    position: relative;
}

.seebottom {
    padding: 6px 10px;
    background-color: rgb(var(--three));
    width: fit-content;
    right: 1em;
    top: 1em;
    position: absolute;
    justify-content: center;
    align-items: center;
    gap: .5em;
}

.emptyChannel {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100%;
}

#typing-indicator {
    padding: .3em 1em;
}

.reply-excerpt {
    display: flex;
    flex-direction: row;
    gap: .5em;
}

.rplarrow {
    width: 10px;
    height: 10px;
    border-radius: 3px;
    border-left: 1px solid;
    border-top: 1px solid;
    border-color: rgb(var(--five));
    transform: translate(7px, 6px);
    margin-right: 5px;
}

img.msg_img {
    max-height: 13em;
    max-width: 500px;
    margin: .5em 0;
    border: 1px solid rgb(var(--three));
}

.msg.connected .data {
    display: none;
}

.reply-preview {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}