:root {
    /* --color_cell_size: 75px; */
    --color_cell_size: 60px;
    --color_cell_border: 1px;
}

.mask {
    width: 100%;
    height: 100%;
    display: none;
    justify-content: center;
    align-items: center;
    overflow: auto;
    position: absolute;
    z-index: 100;
    top: 0;
    left: 0;
}

#colors_mask {
    background-color: rgba(0, 0, 0, 0.613);
}

.flex {
    display: flex !important;
}

#colors {
    width: fit-content;
    max-width: 100%;
    height: fit-content;
    max-height: 100%;
    background-color: black;
    display: flex;
    flex-direction: column;
    border: var(--color_cell_border) solid black;
    padding: 8px;
}

#color_grid_container {
    max-width: 100%;
    max-height: fit-content;
    background-color: black;
    display: block;
    overflow: scroll;
}

#color_grid {
    width: fit-content;
    margin: 0px auto;
}

.color_grid_row {
    width: fit-content;
    height: var(--color_cell_size);
    display: flex;
    flex-direction: row-reverse;
    justify-content: center;
    gap: 0px;
    flex-wrap: nowrap;
    border-left: var(--color_cell_border) solid black;
    perspective: 500px;
}

.color {
    width: var(--color_cell_size);
    aspect-ratio: 1/1;
    flex: none;
    border: var(--color_cell_border) solid black;
}

#color_header {
    min-width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
}

#close_colors, #recent_colors_container {
    border: none;
    border-top: 5px solid black;
    flex: none;
}

#recent_colors_container {
    width: 100%;
    display: block;
    padding: 10px;
    overflow-x: auto;
    background-color: white;
}

#recent_colors {
    width: fit-content;
    display: flex;
    flex-direction: row-reverse;
    gap: 15px;
    justify-content: center;
    align-items: center;
}

.recent_color {
    width: var(--color_cell_size);
    aspect-ratio: 1/1;
    border: 2px solid black;
    border-radius: 5px;
    background-color: white;
    flex: none;
    float: left;
}

#close_colors {
    width: 100%;
    padding: 15px;
    font-size: 25pt;
    color: black;
}

.selected {
    transform: scale(0.9);
    transition: transform 0.1s;
    box-shadow: 0 10px 20px rgba(0,0,0,0.2);
}

.hidden {
    opacity: 0;
    visibility: hidden;
}