:root {
    --products-height: 26px;
}

html[color-preferences="light"] {
    body {
        .products {
            > .content {
                > div {
                    border: 2px solid #a0a0a0;
                }
            }
        }

        .summary i, .summary-mobile i, .summary s, .summary-mobile s {
            color: #4e4e4e;
        }

        #submit-order, #submit-order-mobile {
            background-color: var(--main-color-light);
        }

        input:not([type="submit"], [type="radio"]) {
            border: 2px solid #a0a0a0;
            color: #000;
        }

        input:focus {
            background-color: rgb(240, 240, 240);
        }

        .data {
            .select-paczkomat {
                background-color: var(--main-color-light);
            }

            .invalid {
                color: #df0000;
            }

            .regulations a {
                color: var(--main-text-color-light);
            }
        }
    }
}

html[color-preferences="dark"] {
    body {
        .products {
            > .content {
                > div {
                    border: 2px solid #313131;
                }
            }
        }

        .summary i, .summary-mobile i, .summary s, .summary-mobile s {
            color: #b6b6b6;
        }

        #submit-order, #submit-order-mobile {
            background-color: var(--main-color-dark);
        }

        input:not([type="submit"], [type="radio"]) {
            border: 2px solid #313131;
            color: #fff;
        }

        input:focus {
            background-color: rgb(32, 32, 32);
        }

        .data {
            .select-paczkomat {
                background-color: var(--main-color-dark);
            }

            .invalid {
                color: #ff4040;
            }

            .regulations a {
                color: var(--main-text-color-dark);
            }
        }
    }
}

section {
    margin-top: 100px;
    display: flex;
    flex-direction: row;
    gap: 50px;

    .left {
        display: flex;
        flex-direction: column;
        gap: 40px;
        width: 60%;
    }

    .right {
        display: flex;
        flex-direction: column;
        gap: 40px;
        width: 40%;
    }
}

.products {
    display: flex;
    flex-direction: column;
    gap: 10px;
    width: 100%;
    overflow: hidden;
    transition: all 400ms;

    .header {
        display: flex;
        align-items: center;
        gap: 10px;
        margin-bottom: 10px;

        h3 {
            margin: 0;
        }

        .show-hide {
            display: none;
            cursor: pointer;
            user-select: none;
        }
    }

    > .content {
        gap: 15px;
        display: grid;
        grid-template-columns: 1fr 1fr;

        > div {
            display: flex;
            gap: 10px;
            padding: 13px;
            flex-direction: row;
    
            img {
                width: 100%;
                transition: all 200ms;
            }
        
            > a {
                position: relative;
                display: block;
                width: calc(50% - 5px);
                aspect-ratio: 3 / 4;
                overflow: hidden;
                border-radius: 8px;
            }

            .content {
                display: flex;
                flex-direction: column;
                justify-content: space-between;
                width: calc(50% - 5px);

                a {
                    display: flex;
                    justify-content: center;
                    font-size: 23px;
                }

                .down {
                    display: flex;
                    flex-direction: row;
                    justify-content: center;
                    align-items: center;
                    gap: 10px;
                    margin-left: 10px;

                    .remove-from-cart {
                        height: 20px;
                        width: 20px;
                        padding: 5px;
                        border-radius: 5px;
                        transition: all 200ms;

                        img {
                            width: 20px;
                            height: 20px;
                        }
                    }
                }
            }

            .down {
                font-size: 20px;
            }
        }
    }
}

.summary, .summary-mobile {
    .content {
        display: flex;
        flex-direction: column;
        gap: 10px;
        font-size: 19px;

        input {
            margin-left: 10px;
        }

        input:not([type="submit"], [type="radio"]) {
            outline: none;
            background-color: transparent;
            border-radius: 2px;
            padding: 5px;
        }
    }
}

h3 {
    margin-top: 0;
    margin-bottom: 10px;
}

#submit-order, #submit-order-mobile {
    border-radius: 5px;
    cursor: pointer;
    border: 0;
    font-size: 18px;
    padding: 5px;
    width: min-content;
    text-wrap: nowrap;
    user-select: none;
}
.data {
    display: flex;
    flex-direction: column;
    gap: 15px;

    > div {
        display: flex;
        gap: 3px;
        flex-direction: column;
        
        div {
            display: flex;
            gap: 10px;
        }

        .invalid {
            font-size: 14px;
        }
    }
/* 
    input:-webkit-autofill,
    input:-webkit-autofill:hover, 
    input:-webkit-autofill:focus {
        -webkit-text-fill-color: #ffffff;
        -webkit-background-color: rgb(32, 32, 32);
    } */

    .delivery {
        flex-direction: column;

        label {
            display: flex;
            gap: 8px;

            > div {
                display: flex;
                flex-direction: column;
                gap: 8px;

                .select-paczkomat {
                    padding: 5px;
                    border-radius: 5px;
                    font-size: 16px;
                    text-wrap: nowrap;
                    width: min-content;
                    cursor: pointer;
                }
            }
        }
    }

    .regulations {
        label {
            width: 100%;
        }
    }

    div:not(.regulations, .delivery) {
        label {
            text-wrap: nowrap;
        }
    }

    .regulations {
        label {
            text-wrap: wrap !important;
        }
    }

    input {
        margin: 0;
    }

    input:not([type="submit"], [type="radio"]) {
        outline: none;
        background-color: transparent;
        border-radius: 2px;
        padding: 5px;
        width: 100%;
    }

    input[type="checkbox"], input[type="radio"] {
        background-color: rgb(0, 131, 0);
        border: 2px solid #313131;
        border-radius: 5px;
        cursor: pointer;
        border: 0;
        width: 16px;
        height: 16px;
        padding: 5px;
        margin-top: 3px;
        color: #fff;
    }
}

.inpost-map::before {
    content: "";
    position: absolute;
    background-color: rgba(0, 0, 0, 0.5);
    left: 0;
    top: 0;
    right: 0;
    bottom: 0;
}

.inpost-map {
    position: fixed;
    z-index: 10;
    left: 0;
    top: 0;
    right: 0;
    bottom: 0;

    inpost-geowidget {
        position: absolute;
        left: 10%;
        right: 10%;
        top: 10%;
        bottom: 10%;
    }

    .close-button {
        position: absolute;
        right: 10px;
        top: 10px;
        padding: 5px;
    }
}

@media (min-width: 1200px) and (max-width: 1400px) {
    .products {
        > .content {
            > div {
                > a {
                    width: calc(50% - 5px);
                }

                .content {
                    width: calc(50% - 5px);
                }
            }
        }
    }
}

@media (max-width: 1200px) {
    .summary {
        display: none !important;
    }

    .summary-mobile {
        display: block !important;
    }
}

@media (min-width: 900px) and (max-width: 1200px) {
    section {
        .left {
            width: 50%;
        }

        .right {
            width: 50%;
        }
    }

    .products {
        > .content {
            grid-template-columns: 1fr;

            > div {
                > a {
                    width: calc(50% - 5px);
                }

                .content {
                    width: calc(50% - 5px);
                }
            }
        }
    }
}

@media (min-width: 700px) and (max-width: 900px) {
    section {
        .left {
            width: 50%;
        }

        .right {
            width: 50%;
        }
    }

    .products {
        > .content {
            grid-template-columns: 1fr;

            > div {
                > a {
                    width: calc(50% - 5px);
                }

                .content {
                    width: calc(50% - 5px);
                }
            }
        }
    }
}

@media (min-width: 600px) and (max-width: 700px) {
    section {
        flex-direction: column;

        .left {
            width: 100%;
        }

        .right {
            width: 100%;
        }
    }

    .products {
        > .content {
            > div {
                > a {
                    width: calc(50% - 5px);
                }

                .content {
                    width: calc(50% - 5px);
                }
            }
        }
    }

    .left {
        display: flex;
    }
}

@media (max-width: 600px) {
    section {
        flex-direction: column;

        .left {
            width: 100%;
        }

        .right {
            width: 100%;
        }
    }

    .products {
        height: 26px;

        .header {
            .show-hide {
                display: block;
            }
        }

        > .content {
            grid-template-columns: 1fr;

            > div {
                > a {
                    width: calc(50% - 5px);
                }

                .content {
                    width: calc(50% - 5px);
                }
            }
        }
    }

    .active {
        height: var(--products-height);
    }

    .left {
        display: flex;
    }
}

@media (max-width: 550px) {
    header {
        .menu-shop {
            .language-container {
                display: none;
            }
        }
    }
}

@media (max-width: 500px) and (min-width: 400px) {
    header {
        .menu-shop {
            .light-dark-container {
                display: flex;
            }
        }
    }
}

@media (max-width: 380px) {
    #menu-mobile {
        width: 100%;
    }

    #menu-shopping-cart {
        width: 100%;
    }
}

@media (max-width: 340px) {
    header {
        .menu .menu-button {
            margin: 0;
        }
    }
}