*,
*::before,
*::after {
    padding: 0;
    margin: 0;
    box-sizing: border-box;
    user-select: none;
}

/* HTML */
html {
    background-color: #303030;
}

/* IMG */
img {
    width: 85%;
    filter: invert(1);
}

/* H1 */
h1{
    color: white;
    font-family: Arial, Helvetica, sans-serif;
    padding-right: 20px;
}

/* HEADER */
.header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 106px;
    display: flex;
    align-items: center;
    gap: 10px;
    overflow-x: auto;
    overflow-y: hidden;
    white-space: nowrap;
    background-color: #212121;
    padding: 8px 15px;
    scrollbar-gutter: stable;
}

.header > * {
    flex-shrink: 0;
}

.container {
    display: flex;
    gap: 10px;
    align-items: center;
    padding-left: 10px;
    border-left: 2px solid grey;
    width: max-content;
    flex-shrink: 0;
    min-height: 74px;
}

.color-selector {
    width: 50px;
    height: 50px;
    border: 2px solid white;
    border-radius: 50%;
    overflow: hidden;
}

input[type="color"] {
    width: 100%;
    height: 100%;
    padding: 0;
    border: none;
    background: none;
    cursor: pointer;
}

input[type="color"]::-webkit-color-swatch-wrapper {
    padding: 0;
}

input[type="color"]::-webkit-color-swatch {
    border: none;
    border-radius: 50%;
}

input[type="color"]::-moz-color-swatch {
    border: none;
    border-radius: 50%;
}

.pallete {
    display: flex;
    gap: 10px;
    max-width: 150px;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
}

.color {
    height: 25px;
    width: 25px;
    border-radius: 100%;
    border: 1px solid white;
    transition: all .05s;
}

.color-selected{
    -webkit-box-shadow: 0px 0px 4px 2px #C2FFFD;
    box-shadow: 0px 0px 4px 2px #C2FFFD;
}

.color:hover{
    -webkit-box-shadow: 0px 0px 4px 2px #C2FFFD;
    box-shadow: 0px 0px 4px 2px #C2FFFD;
    cursor: pointer;
}

.color:active,
.brush:active,
.func:active,
.fill-item:active{
    transform: scale(0.9);
}

.black {
    background-color: black;
}

.white {
    background-color: white;
}

.red {
    background-color: red;
}

.green {
    background-color: green;
}

.blue {
    background-color: blue;
}

.yellow {
    background-color: yellow;
}

.orange {
    background-color: orange;
}

.pink {
    background-color: pink;
}

.brushes{
    display: flex;
    gap: 10px;
    max-width: 120px;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
}

.brush{
    display: flex;
    justify-content: center;
    align-items: center;
    border-radius: 100%;
    width: 32px;
    height: 32px;
    padding: 5px;
    transition: all .05s;
}

.brush:hover,
.fill-selected:hover{
    background-color: #7986cb;
    cursor: pointer;
}

.brush-selected,
.fill-selected {
    background-color: #7986cb;
}

.eraser > img,
.bucket > img{
    width: 100%;
}
.weight-selector{
    color: white;
    font-family: Arial, Helvetica, sans-serif;
    width: 90px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

select[name="line-weight"] {
    background-color: #212121;
    width: 85px;
    height: 30px;
    border-radius: 6px;
    color: white;
    cursor: pointer;
    text-align: center;
    font-size: large;
}

.funcs{
    display: flex;
    gap: 10px;
    max-width: 120px;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
}

.container.funcs-container{
    width: 140px;
}

.func,
.fill-item {
    display: flex;
    justify-content: center;
    align-items: center;
    border-radius: 100%;
    width: 32px;
    height: 32px;
    padding: 5px;
    transition: all .1s ease-in-out;
    position: relative;
    transition: all .05s;
}

.func:hover,
.fill-item:hover{
    background-color: #7986cb;
    cursor: pointer;
}

.func::after {
    content: attr(data-tooltip);
    font-family: Arial, Helvetica, sans-serif;
    position: absolute;
    left: 180%;
    transform: translateX(-50%) translateY(-5px);
    background: black;
    color: white;
    padding: 6px 10px;
    border-radius: 5px;
    font-size: 13px;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    z-index: 100;
}

.fill{
    display: flex;
    gap: 10px;
}

.fill-container {
    display: flex;
    flex-direction: column;
    border-left: 2px solid grey;
    color: white;
    font-family: Arial, Helvetica, sans-serif;
    padding-left: 10px;
    justify-content: center;
    align-items: center;
    min-height: 74px;
    gap: 10px;
}


/* Mostrar al pasar el mouse */
.func:hover::after {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

/* BOARD */
.canvas{
    position: absolute;
    top: 106px;
    left: 0px;
    background-color: white;
    cursor: crosshair;
    touch-action: none;
    z-index: 1;
}

.preview-canvas{
    position: absolute;
    top: 106px;
    left: 0px;
    background-color: transparent;
    cursor: crosshair;
    z-index: 2;
    touch-action: none;
    pointer-events: none;
}

/* FOOTER */
.footer {
    position: fixed;
    bottom: 0;
    left: 0;
    height: 30px;
    width: 100vw;
    background-color: #212121;
    box-shadow: 0px -12px 32px 1px rgba(0, 0, 0, 0.65);
    display: flex;
    justify-content: start;
    align-items: center;
    padding-left: 10px;
    gap: 10px;
}

.pointer {
    filter: invert(1);
    width: 20px;
    height: 20px;
}

.position {
    color: white;
    font-family: "Arial";
    font-size: 15px;
}

.noevent{
    pointer-events: none;
}

/* MEDIA QUERY */
@media (max-width: 768px) {
    h1 {
        font-size: 15px;
    }
}