@import url('https://fonts.googleapis.com/css2?family=Alata&display=swap');

body, html {
    margin: 0;
    padding: 0;
    height: 100%;
    overflow: hidden;
    font-family: 'Alata', sans-serif;
    color: red;
}

#toggleBtn {
    position: absolute;
    top: 10px;
    left: 10px;
    z-index: 100;
    padding: 5px 10px;
    cursor: pointer;
}

#app {
    display: flex;
    height: 100vh;
    width: 100vw;
}

#editorPane {
    display: flex;
    flex-direction: column;
    background: #f4f4f4;
    transition: padding 0.3s ease;
    box-sizing: border-box;
    min-width: 300px;

    &.collapsed {
        width: 0 !important;
        min-width: 0;
        padding: 0;
        overflow: hidden;
        border: none;
    }
}

.button-bar {
    display: flex;
    flex-direction: row;
    gap: 0.5em;
    padding: 0.5em;
}

#resizer {
    width: 5px;
    background: #3d719f;
    cursor: col-resize;
    
    &:hover {
        background: #ccc;
    }
}

#source {
    flex-grow: 1;
    width: 100%;
    resize: none;
    border: none;
    padding: 10px;
    font-family: monospace;
    font-size: 14px;
    outline: none;
    box-sizing: border-box;
}

#error {
    background: #ffdddd;
    color: #d8000c;
    padding: 10px;
    font-size: 12px;
    white-space: pre-wrap;
    border-top: 1px solid #d8000c;
    display: none;
    max-height: 150px;
    overflow-y: auto;
}

#previewPane {
    flex-grow: 1;
    overflow: auto;
    display: flex;
    background: #001426;
    position: relative;
}

#graphDiv {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 3vw;
    box-sizing: border-box;
    margin: auto;
    
    &.fit {
        height: 100%;
        width: 100%;

        & svg {
            max-width: 100%;
            max-height: 100%;
        }
    }

}

