:root {
    // --bs-body-bg: #161f2a;
    --bs-body-bg: #0d1b2a;
}

.img-sprite {
    position: absolute;
    pointer-events: none;
}

#dropZone {
    // display: inline-block;
    position: relative;
    overflow: hidden;
    // width: 1024px;
    // height: 1024px;
    // background-image: linear-gradient(
    //     45deg, #00000047 25%, transparent 25%, transparent 75%, #00000047 75%, #00000047), linear-gradient(
    //     45deg, #00000047 25%, transparent 25%, transparent 75%, #00000047 75%, #00000047);
    // background-size: 32px 32px;
    // background-position: 0 0, 16px 16px;
}

.table>:not(caption)>*>* {
    border-bottom-width: 0;
}

.container-cols {
    display: flex;
    flex-direction: row;
    gap: 1em;
    max-height: 100vh;
    .col-left, .col-right {
        flex: 1;
        display: flex;
        flex-direction: column;
    }
    .col-left {
        max-width: 300px;
    }
    .col-right {
        overflow: auto;
    }
    #form-switchs {
        display: flex;
        flex-direction: column;
        .form-check.form-switch {
            display: inline-flex;
            gap: .5em;
            width: fit-content;
            cursor: pointer !important;
            align-items: center;
            * {
                cursor: pointer !important;
            }
            &:hover {
                color: #0078e7;
                .form-check-input {
                    border-color: #0078e7 !important;
                }
            }
        }
    }
    .where-can-craft {
        gap: 0 0.55em !important;
        display: inline-flex;
        flex-wrap: wrap;
        .where-can-craft-item {
            background: #ffffff11;
            padding: 0.15em 0.75em .35em 0.75em;
            display: inline-flex;
            align-items: center;
            justify-content: center;
            line-height: 1.2em;
            border-radius: .5em 0 .5em 0;
        }
    }
}

.grid-container {
    // display: grid;
    // // grid-template-columns: repeat(10, 1fr); /* Создаем 10 столбцов */
    // grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    // gap: 8px; /* Расстояние между элементами */

    tbody {
        tr {
            border-top: 1px solid #ffffff33;
            td {
                padding: 0;
                background-color: #00000022;
            }
        }
    }

    .block-id, .block-name, .block-icon {
        text-align: center;
        padding: .5em;
        width: 100%;
        &.block-name {
            text-align: left;
            margin-top: .5em;
        }
        &.block-id {
            margin-top: .5em;
        }
        &.block-icon {
            width: 110px;
            height: 110px;
            // .icon {
            // }
        }
    }

    .col-thin {
        width: 110px;
    }

    .grid-item {
        // background-color: #ddd; /* Цвет фона элементов */
        // padding: 10px 0; /* Отступы внутри элементов */
        // text-align: center; /* Выравнивание текста */
        // position: relative;
        canvas {
            width: 50;
            height: 50;
        }
        .recipes {
            width: 100%;
            display: flex;
            gap: .5em;
            padding: .5em;
            // background-color: #00000022;
            // padding-left: .5em;
            // padding-bottom: .5em;
            overflow: hidden;
            .recipe {
                background: #ffffff11;
                border-radius: 0.5em;
                width: auto;
                display: inline-flex;
                flex-direction: column;
                .pattern-ingridients, .pattern-shaped {
                    padding: .5em;
                    padding-top: 0;
                }
                .badge-prop {
                    background: transparent !important;
                    cursor: default;
                    padding: 0;
                }
            }
            & > div {
                width: 100%;
                display: flex;
                // shaped
                .pattern3x3 {
                    display: grid;
                    grid-template-columns: repeat(3, 1fr);
                    grid-auto-rows: 50px;
                    grid-gap: 4px;
                    width: 154px;
                    background: #ffffff11;
                    padding: 5px;
                    & > div {
                        border: 1px dashed #ffffff44;
                        overflow: hidden;
                        .icon {
                            transform: scale(0.5) translate(-50%, -50%);
                        }
                    }
                    .cycle_slots {
                        background-color: #44cc0011;
                    }
                }
                // shapeless
                .pattern-ingridients {
                    // margin: 1em 0;
                    display: flex;
                    flex-direction: column;
                    .slots-group {
                        display: flex;
                        flex-direction: row;
                        .slots {
                            display: flex;
                            border: 1px dashed #ffffff44;
                            align-items: center;
                            justify-content: center;
                            flex-wrap: wrap;
                            .ingridient-block {
                                width: 50px;
                                height: 50px;
                                .icon {
                                    transform: scale(0.5) translate(-50%, -50%);
                                }
                            }
                            .badge {
                                zoom: .75;
                                pointer-events: none;
                            }
                        }
                        .slot-plus {
                            align-items: center;
                            display: flex;
                            justify-content: center;
                            padding: .5em;
                            margin-left: .5em;
                        }
                    }
                }
            }
        }
        // .badge {
        //     position: absolute;
        //     left: 50%;
        //     transform: translateX(-50%);
        //     font-size: 9px;
        //     bottom: 2px;
        //     max-width: 18em;
        //     overflow: hidden;
        //     text-overflow: ellipsis;
        // }
    }
}

textarea {
    font-family: monospace;
}

.sprite-item {
    cursor: pointer;
    margin-bottom: .5em;
    padding: 0.25em 0.5em;
    border-radius: 4px;
    display: flex;
    justify-content: space-between;
    &:hover {
        color: white;
        background-color: #0078e7;
    }
}

#hover {
    position: absolute;
    width: 32px;
    left: 32px;
    top: 32px;
    height: 32px;
    outline: rgb(63, 81, 181) solid 2px;
    background: rgba(63, 81, 181, 0.44);
    pointer-events: none;
}

.badge {
    font-size: 1em;
    margin: 0 .25em .25em 0;
    cursor: pointer;
    font-weight: normal;
}

.used_slot {
    position: absolute;
    background-color: #ff0000aa;
    z-index: 2;
    width: 32px;
    height: 32px;
}

#focuser {
    position: absolute;
    width: 32px;
    left: 32px;
    top: 32px;
    height: 32px;
    background-color: #ffffff44;
    outline: 2px solid #ffffff88;
    pointer-events: none;
}