body {
    margin: 0;
    padding: 0;
    width: 100vw;
    height: 100vh;
    height: -webkit-fill-available;
    overflow: hidden;
    background-color: #242424;
    display: flex;
}

* {
    box-sizing: border-box;
}

p,input,label,button,select {
    font-family: 'Roboto';
}

.main {
    height: 100%;
    height: -webkit-fill-available;
    width: calc(100% - max(300px, 20%));
    display: flex;
    flex-direction: column;
}

#sidebar {
    min-width: 300px;
    width: 20%;
    display: flex;
    gap: 20px;
    flex-direction: column;
    overflow-y: auto;
}

#sidebar p {
    color: white;
    margin: 0;
}

.slider-wrapper {
    position: relative;
    user-select: none;
    padding: 10px;
}

.slider-wrapper > p {
    font-size: 22px;
    width: calc(100% - 50px);
    overflow: hidden;
}

.slider-wrapper div {
    display: flex;
    width: 100%;
    gap: 5px;
    margin-top: 12px;
}

.slider-wrapper input {
    width: 25%;
}

.slider-wrapper input[type="range"] {
    width: 75%;
}

.slider-wrapper button {
    position: absolute;
    top: 10px;
    right: 10px;
    height: 30px;
    width: 30px;
    border: none;
    background-color: transparent;
}

.slider-wrapper img {
    height: 100%;
    width: 100%;
}

#sliderButton {
    margin: 10px 25% -10px 25%;
    height: 40px;
    flex-shrink: 0;
    width: 50%;
    background-color: #0075FF;
    color: white;
    top: 10px;
    z-index: 1;
    position: sticky;
    font-size: 20px;
}

#sidebar > button.disabled {
    background-color: #002F66;
    color: #666666;
    cursor: default;
}

#canvas {
    margin: 0;
    width: 100%;
    height: 100%;
}

.canvas-wrapper {
    width: 100%;
    overflow: hidden;
    flex-basis: 0;
    flex-grow: 1;
    flex-shrink: 1;
}

.info-wrapper {
    padding: 0 10px 0 10px;
}

.button-wrapper {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin: 0;
    height: 50px;
    max-width: 100%;
}

button {
    height: 80%;
    aspect-ratio: 1;
    padding: 0;
    margin-left: 5px;
    background-color: #111111;
    border: none;
    cursor: pointer;
}

.mq-inner {
    height: fit-content;
    width: fit-content;
    max-width: 75vw;
    display: flex;
    gap: 2.5px;
    justify-content: center;
    padding: 0 10px 0 10px;
}

#mqInput {
    max-width: 100%;
    overflow: unset;
    overflow-x: auto;
}

#mqInput span {
    overflow: unset;
}

.mq-inner button {
    height: 70px;
    width: 70px;
    flex-grow: 0;
    flex-shrink: 0;
}

.button-wrapper img {
    width: 100%;
    height: 100%;
}

#coordDisplay {
    color: white;
    white-space: pre-line;
    max-width: 50%;
}

.input-wrapper {
    width: 100%;
    height: fit-content;
    margin: 10px 0 30px 0;
    display: grid;
    grid-template-columns: 320px 1fr 400px;
    grid-template-rows: 1fr;
    justify-items: center;
    flex-grow: 0;
    flex-shrink: 0;
    padding: 0 10px 0 10px;
} 

.input-correction {
    grid-template-rows: 1fr 1fr;
}

.input-correction .mq-wrapper {
    grid-column: 1/4;
}

.input-correction .settings-wrapper {
    grid-row: 2;
}

.input-correction .render-wrapper {
    grid-row: 2;
    grid-column: 3;
}

.input-wrapper label {
    color: white;
}

.input-wrapper select {
    background-color: #111111;
    color: #ffffff;
    caret-color: #ffffff;
    border: none;
}

.input-box {
    background-color: #111111;
    color: #ffffff;
    caret-color: #ffffff;
    border: none;
    width: 100px;
}

input[disabled] {
    color: #646464;
}

.mq-wrapper {
    display: flex;
    width: fit-content;
    flex-direction: column;
    align-items: center;
    gap: 10px;
}

#mqInput {
    width: fit-content;
    height: fit-content;
    font-size: 45px;
    border: 2px solid black;
    background-color: #111111;
    color: #ffffff;
    caret-color: #ffffff;
}

#errorBox {
    color: red;
    background-color: #111111;
    font-size: 20px;
    padding: 10px;
}

.render-wrapper,.settings-wrapper {
    height: 100%;
    gap: 5px;
    display: grid;
    align-items: center;
    grid-template-rows: 1fr 1fr 1fr 1fr;
}

.settings-wrapper {
    grid-template-columns: 80px 1fr 1fr;
}

.render-wrapper {
    text-align: end;
    grid-template-columns: 170px 1fr 1fr;
}

.render-wrapper input, .settings-wrapper input {
    width: 100%;
}

#biasLabel {
    grid-column: 1/1;
}

#coloringDropdown {
    grid-column: 2/4;
}

.share-wrapper {
    position: relative;
}

#sharePopup {
    position: absolute;
    align-items: center;
    justify-content: space-between;
    gap: 5px;
    left: 95px;
    top: -40px;
    height: 32px;
    padding: 5px 2px 5px 2px;
    transform: translate(-100%, 0);
    background-color: #111111;
}

#sharePopup input {
    height: 100%;
    width: 200px;
}

#sharePopup button {
    background-color: transparent;
    margin: 0;
    height: 28px;
    width: 28px;
}

#smoothToggle, #juliaToggle, #antiAliasToggle, #domainLightnessToggle {
    justify-self: start;
    width: auto;
    grid-column: 2/4;
}

.hidden {
    display: none !important;
}

:root {
    height: 100%;
}

@media (max-width: 1000px) {
    .main {
        width: 100%;
    }

    #sidebar {
        width: 100%;
        height: 200px;
        margin: 10px 0 10px 0;
    }

    .input-wrapper {
        margin: 10px 0 10px 0;
    }
}

@media (max-width: 800px) {
    #sharePopup {
        left: 65px;
    }

    .input-wrapper {
        grid-template-columns: 100%;
        grid-template-rows: 1fr 1fr 1fr;
        overflow-y: scroll;
        max-height: 200px;
    } 

    .mq-wrapper {
        grid-column: 1 !important;
        grid-row: 1 !important;
    }

    .settings-wrapper {
        grid-column: 1 !important;
        grid-row: 2 !important;
    }

    .render-wrapper {
        grid-column: 1 !important;
        grid-row: 3 !important;
    }

    #coordDisplay {
        font-size: 10px;
    }

    button {
        height: 50%;
    }
}