@font-face {
    font-family: "trouble";
    src: url(../font/TroubleBeneathTheDome.ttf);
}

*{
    margin: 0%;
    padding: 0%;
}

::selection{
    background-color: black;
    color: white;
}

body{
    background-color: rgb(212, 212, 212);
    padding: 0%;
    margin: 0%;
    overflow: hidden;
}


.conteneur{
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    align-items: center;
    width: 100vw;
    height: 100vh;
    margin: 0%;
    padding: 0%;
}

h1{
    font-family: "trouble";
    font-size: clamp(1em, 2vw, 3em);
    font-weight: normal;
}

.controls{
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
    width: 100vw;
    height: fit-content;
    padding: 20px 50px 20px 50px;
    box-sizing: border-box;
    background-color: rgb(255, 255, 255);
    position: relative;
    z-index: 100;
    flex-wrap: wrap;
    border-bottom: 4px dashed rgb(212, 212, 212);
    box-sizing: border-box;
}

.conteneur_controls{
    display: flex;
    flex-direction: row;
    justify-content: center;
    align-items: center;
    height: 100%;
    width: fit-content;
}

.controls em{
    font-style: normal;
    font-family: "trouble";
    margin-left: 10px;
}

.controls input, .controls button, .controls p, .controls select, .controls em{
    font-size: clamp(1em, 1.05vw, 3em);
    font-family: "trouble";
}

select{
    cursor: pointer;
    font-family: "trouble" !important;
}

option{
    font-family: "trouble" !important;
}

.controls input, .controls select, .controls option, #custom_color p{
    border: 2px dashed black;
    background-color: rgb(255, 255, 255);
    border-radius: 0;
    padding: 5px 10px;
    margin-left: 7px;
    /* border-radius: 100px; */
    height: fit-content;
    outline: none;
}

#custom_color p{
    cursor: pointer;
}

.controls input:hover, .controls select:hover, #custom_color p:hover, #download_input:hover, #conteneur_image_file:hover #upload_button{
    background-color: rgb(235, 235, 235);
}

#image_input{
    border: 0px solid black;
    padding: 0%;
    border-radius: 0;
}

#list_color{
    display: flex;
    flex-direction: row;
    align-items: center;
}

.controls button{
    padding: 5px 15px;
    border: 2px dashed black;
    background-color: white;
    cursor: pointer;
    height: fit-content;
}

.contener_image{
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    width: 100%;
    height: 100%;
}

#output_dither{
    width: 100vw;
    height: 100%;
}

.dithered-image {
    visibility: visible;
    margin: 0%;
    padding: 0%;
    position: absolute;
    width: 3000px;
    height: auto;
    display: block;
    transform: scale(0.5, 0.5);
}

#upload_button{
    position: relative;
    z-index: 1;
}

input[type="file"]{
    width: 100px !important;
    position: absolute;
    z-index: 2;
    height: fit-content !important;
    opacity: 0;
    cursor: pointer;
}

.input_custom_color{
    height: 100% !important;
    cursor: pointer;
    padding: 0% !important;
    border-radius: 0px !important;
    outline: 0px solid transparent !important;
    border: 2px dashed black !important;
    border-color: transparent;
    box-shadow: 0px 0px 0px 0px transparent !important;
    background-color: transparent !important;
    appearance: none !important;
    -webkit-appearance: none !important;
    -moz-appearance: none !important;
}
input:focus {
    outline: none !important;
}

#custom_color{
    display: none;
}

#add_color, #remove_color{
    width: 15px;
    text-align: center;
}

/* MOBILE --------------------------------------------------------------------------------------------------------*/
@media screen and (max-width: 700px){
    .controls{
        flex-direction: column;
        align-items: flex-start;
        height: fit-content;
        padding: 20px 20px 20px 20px;
    }

    .controls div{
        margin-bottom: 10px;
        height: fit-content;
    }

    #contener_input_color{
        margin-bottom: 0% !important;
        height: fit-content !important;
    }

    #conteneur_color{
        flex-direction: column;
        align-items: flex-start;
        flex-wrap: wrap;
    }

    #list_color{
        display: flex;
        flex-direction: row;
        justify-content: flex-start;
    }

    .input_custom_color{
        margin-left: 0% !important;
        margin-right: 7px;
        height: 30px !important;
        margin-bottom: 7px;
    }

    #custom_color, #contener_input_color{
        flex-wrap: wrap;
    }

    #custom_color, #list_color{
        margin-bottom: 0% !important;
    }

    .dithered-image {
        width: 90vw;
        height: auto;
    }

    .conteneur_controls:last-of-type{
        margin-bottom: 0%;
    }
}



/* CUSTOM RANGE INPUT --------------------------------------------------------------------------------------------------------*/
input[type=range] {
    height: auto;
    -webkit-appearance: none;
    margin: 10px 0;
    width: 100%;
    border: none !important;
}
input[type=range]:hover{
    background-color: white;
}
input[type=range]:focus {
    outline: none;
}

input[type=range]::-webkit-slider-runnable-track {
    width: 100%;
    height: 3px;
    cursor: pointer;
    animate: 0.2s;
    background: #000000;
    border-radius: 0px;
  }
  input[type=range]::-webkit-slider-thumb {
    height: 20px;
    width: 20px;
    border-radius: 0px;
    background: #ffffff;
    border: 2px dashed black;
    cursor: pointer;
    -webkit-appearance: none;
    margin-top: -9px;
  }
  input[type=range]:focus::-webkit-slider-runnable-track {
    background: #000000;
  }


  input[type=range]::-moz-range-track {
    width: 100%;
    height: 3px;
    cursor: pointer;
    animate: 0.2s;
    background: #000000;
    border-radius: 0px;
  }
input[type=range]::-moz-range-thumb {
    height: 20px;
    width: 20px;
    border-radius: 0px;
    background: rgb(255, 255, 255);
    border: 2px dashed black;
    cursor: pointer;
  }


  input[type=range]::-ms-track {
    width: 100%;
    height: 3px;
    cursor: pointer;
    animate: 0.2s;
    background: transparent;
    border-color: transparent;
    color: transparent;
  }
  input[type=range]::-ms-fill-lower {
    background: #000000;
    border: 0px solid #000000;
    border-radius: 0px;
    box-shadow: 0px 0px 0px #000000;
  }
  input[type=range]::-ms-fill-upper {
    background: #000000;
    border: 0px solid #000000;
    border-radius: 0px;
    box-shadow: 0px 0px 0px #000000;
  }
  input[type=range]::-ms-thumb {
    margin-top: 0px;
    box-shadow: 0px 0px 0px #000000;
    border: 2px dashed #000000;
    height: 20px;
    width: 20px;
    border-radius: 0px;
    background: #ffffff;
    cursor: pointer;
  }
  input[type=range]:focus::-ms-fill-lower {
    background: #ffffff;
  }
  input[type=range]:focus::-ms-fill-upper {
    background: #ffffff;
  }