* {
    z-index: 0;
    box-sizing: border-box;
    /* margin: 0;
    padding: 0; */
    color: #949495;
    outline: none;
    font-family: "Roboto", sans-serif;
}

::-webkit-scrollbar {
    width: 4px;
    background-color: transparent;
}

::-webkit-scrollbar-thumb {
    border-radius: 4px;
    background-color: #303233;
}

::-webkit-scrollbar-thumb:hover {
    background-color: #3d3d3d;
}

/* Selected text is an eyesore,
   let's make it match the theme */
*::selection {
    color: #d4d4d5;
    background-color: #6a9fb580;
}

/* For accessibility, we need to
   guarantee that this is visible */
*:focus-visible {
    border-color: #6a9fb580 !important;
    outline: 2px solid #6a9fb540 !important;
    transition: border-color 0.15s;
}

body {
    background-color: #1d1f21;
    overflow: clip;
}

#content {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-flow: row nowrap;
    width: 100vw;
    height: 100vh;
}

#welcome,
#loading,
#share {
    z-index: 99;
    display: flex;
    flex-flow: column nowrap;
    align-items: center;
    position: absolute;
    border: 2px solid #303233;
    background-color: #1d1f21;
    padding: 16px;
    border-radius: 16px;
}

#welcome img {
    user-select: none;
    width: 500px;
}

#welcome div {
    display: flex;
    flex-flow: row wrap;
    justify-content: center;
}

#welcome button {
    width: 140px;
}

#loading {
    min-width: 200px;
    font-weight: 500;
    font-size: 18px;
}

#share p {
    font-weight: 500;
    width: 100%;
    text-align: center;
    color: #949495e0;
    font-size: 18px;
    margin: 0;
    margin-bottom: 8px;
}

#share > div {
    display: flex;
    flex-flow: column nowrap;
    align-items: center;
    padding: 8px;
}

#share span {
    margin-bottom: 8px;
    opacity: 0.5;
    /* font-style: italic; */
}

#share-copy {
    width: 32px;
    height: 32px;
    border-radius: 6px;
}

#share-url {
    height: 32px;
    padding-left: 8px;
    border: 1px solid #3d3d3d;
    border-radius: 6px;
    background-color: #303233;
    box-shadow: inset 2px 2px 4px #00000040;
    font-weight: 400;
    font-size: 15px;
    margin-right: 8px;
    width: 360px;
    text-align: center;
}

#share-close {
    position: absolute;
    top: 8px;
    right: 8px;
    width: 28px;
}

#canvas {
    position: relative;
    width: 100%;
    height: 100%;
    box-shadow: inset -4px 0 16px #00000040;
    /* border: 4px solid #303233; */
    /* border-bottom-left-radius: 8px; */
}

#canvas-grid {
    z-index: -1;
    position: absolute;
    pointer-events: none;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

#output {
    /* height: 100%; */
    position: relative;
    width: 20vw;
    height: 100vh;
    min-width: 400px;
    max-width: 50vw;
    padding: 12px;
    /* overflow: hidden; */
    border: none;
    border-left: 2px solid #303233;
    background-color: #1d1f21;
    /* box-shadow: -4px 0 16px #00000040; */
    flex-shrink: 0;
    transition:
        width 0.25s,
        min-width 0.25s;
}

#output.hide {
    width: 20px !important;
    min-width: 20px;
    transition:
        width 0.25s,
        min-width 0.25s;
}

/* #editor div {
    width: 100%;
    height: 100%;
    border: none;
    background-color: transparent;
    font-family: monospace;
    font-size: 15px;
    resize: none;
} */

#output-resize {
    position: absolute;
    top: 0;
    left: -5px;
    height: 100%;
    width: 8px;
    background-color: transparent;
    transition: 0.15s;
}

#output-resize:hover {
    cursor: ew-resize;
    background-color: color-mix(in srgb, #303233, transparent 40%);
    transition: background-color 0.15s;
}

#output-code * {
    font-family: monospace;
    font-size: 16px;
    tab-size: 4;
}

#output-code pre span {
    /* padding: 0 2px; */
    transition: 0.25s;
}

#output-code span:hover {
    border-radius: 4px;
    background-color: #303233;
    transition: 0.15s;
    cursor: pointer;
}

#select {
    z-index: 2;
    width: 20px;
    height: 20px;
    position: absolute;
    pointer-events: none;
    border-radius: 6px;
    border: 2px dotted #6a9fb5;
    background-color: #6a9fb520;
}

#toolbar {
    display: flex;
    /* max-width: 800px; */
    margin: auto;
    padding: 8px;
    flex-flow: row nowrap;
    justify-content: space-between;
}

#toolbar div {
    z-index: 9;
    display: flex;
    align-items: center;
}

.tool {
    min-width: 36px;
    height: 32px;
    margin: 4px;
    padding: 0px 12px;
    border: 1px solid #303233;
    border-radius: 8px;
    background: linear-gradient(180deg, #3d3d3d, #303233 80%);
    box-shadow: 2px 2px 4px #00000040;
    font-size: 15px;
    transition: 0.15s;
}

.tool:hover {
    opacity: 0.8;
    transition: 0.15s;
}

.tool:active {
    opacity: 1;
    background: #303233;
    background-color: #303233;
    box-shadow: inset 1px 1px 3px #00000040;
    transition: 0.1s;
}

.tool + select {
    padding: 0px 4px;
    text-align-last: center;
}

button,
select {
    user-select: none;
    cursor: pointer;
}

button span {
    display: block;
    transform: rotate(0deg);
    transition: 0.25s;
}

button.rotate span {
    transform: rotate(-180deg);
    transition: 0.25s;
}

.left {
    margin-right: 0 !important;
    border-top-right-radius: 0 !important;
    border-bottom-right-radius: 0 !important;
}

.center {
    margin: 0 !important;
    border-left: none !important;
    border-radius: 0 !important;
}

.right {
    margin-left: 0 !important;
    border-left: none !important;
    border-top-left-radius: 0 !important;
    border-bottom-left-radius: 0 !important;
}

i {
    width: 16px;
}

#help {
    display: flex;
    flex-flow: row nowrap;
    position: absolute;
    bottom: 8px;
    left: 8px;
    opacity: 0.5;
    font-size: 12px;
    /* font-style: italic; */
    user-select: none;
    pointer-events: none;
}

#help ul {
    padding: 4px;
    margin: 0;
    list-style: none;
}
