@import url('https://fonts.googleapis.com/css2?family=Material+Symbols+Outlined:opsz,wght,FILL,GRAD@20..48,100..700,0..1,-50..200');
@import url('https://fonts.googleapis.com/css2?family=Ubuntu:wght@300&display=swap');


::-webkit-scrollbar
{
    width: 10px;
    height: 5px;
    background-color: #00000010;
}

::-webkit-scrollbar-thumb
{
    background: #00000050;
}

:root
{
    --background: #00000000;
    --color: #FFFFFF50;
    --border-color: #FFFFFF90;
    --video-width: 20vw;
}

div[data-imageprocessing]
{
    display: flex;
    flex-wrap: wrap;
    height: 100vh;
    width: 100vw;
    /*height: 80vh;*/
    /*width: 80vw;*/
    /*margin-top: 10vh;*/
    /*margin-left: 10vw;*/
    font-family: monospace;
    user-select: none;
}

div[data-imageprocessing] input
{
    font-family: monospace;
}

div[data-imageprocessing] input:focus-visible
{
    border: none;
    outline: none;
}

div[data-imageprocessing] > video
{
    display: block;
    position: fixed;
    bottom: 0;
    right: 0;
    width: var(--video-width);
    display: none;
}

div[data-imageprocessing] > div
{
    width: 100%;
    flex: 33.33%;
    /*background: var(--background);*/
    outline: 1px solid var(--border-color);
    display: flex;
    
    flex-wrap: nowrap;
    justify-content: space-evenly;
    flex-direction: column;
    align-content: stretch;
    align-items: center;
    position: relative;
}

div[data-imageprocessing] > div > div.debug
{
    top: 0;
    right: 0;
    display: flex;
    background: #FFFFFF50;
    outline: 2px solid #FFFFFF90;
    color: #00000090;
    position: absolute;
    z-index: 3;
    align-content: center;
    justify-content: center;
    flex-wrap: wrap;
    overflow: hidden;
    font-size: 1em;
    padding: 1em;
    display: none;
}

div[data-imageprocessing] > div.hide > [data-select],
div[data-imageprocessing] > div.hide > [data-rect],
div[data-imageprocessing] > div.hide > canvas
{
    opacity: 0;
}

div[data-imageprocessing] > div > [data-select]
{
    top: 20vh;
    left: 30vw;
    display: flex;
    /*background: #00FF0050;*/
    outline: 2px solid #00FF00;
    width: 40vw;
    height: 60vh;
    position: absolute;
    z-index: 2;
    align-content: center;
    justify-content: center;
    flex-wrap: wrap;
    overflow: hidden;
    visibility: hidden;
}

div[data-imageprocessing] > div > [data-select].active
{
    visibility: visible;
}

div[data-imageprocessing] > div > [data-select].detection
{
    top: 0vh;
    left: 0vw;
    /*background: #00FF0050;*/
    outline: 2px solid #00FF00;
    width: 0vw;
    height: 0vh;
}

div[data-imageprocessing] > div > [data-rect]
{
    top: 0;
    left: 0;
    display: flex;
    background: #FF000050;
    /*outline: 1em solid #FF000050;*/
    width: 0;
    height: 0;
    position: absolute;
    z-index: 1;
    align-content: center;
    justify-content: center;
    flex-wrap: wrap;
    overflow: hidden;
}

div[data-imageprocessing] > div > [data-rect] > div
{
    top: calc(50% - 0.5em);
    left: calc(50% - 0.5em);
    background: #00FF00;
    width: 1em;
    height: 1em;
    position: absolute;
    border-radius: 100%;
}

div[data-imageprocessing] > div > [data-rect].difference
{
    background: #00FF0050;
}

div[data-imageprocessing] > div > [data-rect].difference > div
{
    background: #FF0000;
}

div[data-imageprocessing] > div > canvas
{
    /*transform: scale(-1,1);*/
    width: 100%;
}

div[data-imageprocessing] > div > canvas.select
{
    cursor: crosshair;
}

div[data-imageprocessing] > div.hide > canvas
{
    opacity: 0;
}

div[data-imageprocessing] > div > div.mini
{
    /*transform: scale(-1,1);*/
    position: absolute;
    top: 5px;
    left: 5px;
    width: 33.33%;
    height: 33.33%;
    display: none;
    z-index: 99;
    background: no-repeat;
    background-size: cover;
    cursor: pointer;
    outline: 1px solid var(--border-color);
}

div[data-imageprocessing] > div > div.mini.show
{
    display: block;
}

div[data-imageprocessing] > div > div.tune,
div[data-imageprocessing] > div > div.settings
{
    position: absolute;
    bottom: 27px;
    left: 0;
    display: flex;
    z-index: 9999;
    cursor: pointer;
    /*outline: 1px solid var(--border-color);*/
    background: #00000090;
    color: #FFFFFF90;
    flex-direction: column;
    font-size: 0.8em;
    width: 15.4em;
    display: none;
    padding-bottom: 1em;
}

div[data-imageprocessing] > div > div.tune > div,
div[data-imageprocessing] > div > div.settings > div
{
    display: block;
    padding: 0.5em;
    position: relative;
}

div[data-imageprocessing] > div > div.tune > div > input,
div[data-imageprocessing] > div > div.settings > div > input
{
    background: none;
    border: none;
    padding: 0;
    margin: 0 0 0 1em;
    color: #FFFFFF90;
    width: 1.5em;
    height: 1.5em;
    display: inline-block;
    vertical-align: middle;
    cursor: pointer;
    position: absolute;
    left: 5em;
    top: 0.1em;
}

div[data-imageprocessing] > div > div.tune > div > input[type="color"]
{
    position: absolute;
    left: 9em;
    top: 0.1em;
}

div[data-imageprocessing] > div > div.tune > div > input[type="number"],
div[data-imageprocessing] > div > div.settings > div > input[type="number"]
{
    position: absolute;
    left: 10.5em;
    top: 0.3em;
    font-size: 1em;
    width: 3.5em;
    /*height: 2em;*/
    /*display: none;*/
}

div[data-imageprocessing] > div > div.tune > div > input[type="number"]
{
    left: 10em;
}

div[data-imageprocessing] > div > div.tune > div:hover,
div[data-imageprocessing] > div > div.settings > div:hover
{
    background: #FFFFFF10;
}

div[data-imageprocessing] > div > div.tune.show,
div[data-imageprocessing] > div > div.settings.show
{
    display: flex;
}

@keyframes blink-animation
{
    to {
        opacity: 0;
    }
}

div[data-imageprocessing] > div > div.actions
{
    position: absolute;
    bottom: 0px;
    left: 0;
    width: 100%;
    z-index: 99;
    display: flex;
    justify-content: left;
}

div[data-imageprocessing] > div > div.actions > button
{
    cursor: pointer;
    border: none;
    color: #FFFFFF90;
    background: #00000090;
    width: 2em;
    height: 2em;
    padding: 0;
    margin: 0;
    display: flex;
    justify-content: center;
    align-items: center;
}

div[data-imageprocessing] > div > div.actions > button > span
{
    font-size: 1em;
    padding: 0;
    margin: 0;
}

div[data-imageprocessing] > div > div.actions > button.active,
div[data-imageprocessing] > div > div.actions > button:hover
{
    background: #FFFFFF50;
    color: #00000050;
}

div[data-imageprocessing] > div > div.actions > button.hidden
{
    display: none;
}

div[data-imageprocessing] > span.fullscreen
{
    /*transform: scale(-1,1);*/
    position: fixed;
    top: 0px;
    left: 0px;
    width: 100vw;
    height: 100vh;
    display: none;
    z-index: 9999;
    background:  #000000 no-repeat center center;
    background-size: 90%;
    cursor: pointer;
}

div[data-imageprocessing] > span.fullscreen.show
{
    display: block;
}

div[data-imageprocessing] > span.fullscreen > img
{
    width: 100vw;
}

div[data-imageprocessing] > div.zoom
{
    position: fixed;
    top: 0px;
    left: 0px;
    width: 100vw;
    height: 100vh;
    display: none;
    z-index: 9999;
    background: #000000;
}

div[data-imageprocessing] > div.zoom > div[data-imageprocessing] 
{
    width: 100vw;
    height: 100vh;
    margin: 0;
}

div[data-imageprocessing] > div.zoom.show
{
    display: block;
}

#canvases
{
    position: fixed;
    right: 0;
    bottom: 0;
    z-index: 999999;
}

#canvases > div
{
    /*height: 20vh;*/
    width: 30vw;
    height: 30vh;
}