//
//  Common
//  _____________________________________________

& when (@media-common = true) {
    .search-autocomplete {
        .livesearch.products-container {
            .product-result {
                padding-left: 10px;
            }
        }
        .view-all-footer {
            background-color: #0b56c2;
            color: #fff;
            text-transform: capitalize;
            &:hover {
                background-color: #0b56c2;
                color: #fff;
                text-decoration: underline;
            }
        }
    }
    body.wc-drcomfort-b2b {
        .search-autocomplete {
            .livesearch.products-container {
                .product-price {
                    visibility: hidden;
                }
            }
        }
    }

    #livesearch_root {
        .ds-sdk-no-results__page {
            width: 100%;
        }

        .lg\:max-w-7xl {
            max-width: 90rem !important;
        }

        .ds-widgets_actions_header {
            display: block !important;
            font-size: 24px;
            margin-bottom: 15px;
            + div:has(.ds-sdk-filter-button-desktop) {
                padding-bottom: 17px;
            }
            span {
                display: block;
            }
            span + span {
                font-size: 18px;
                font-style: italic;
            }
        }

        .ds-plp-facets__list {
            border-top-width: 0;

            > .ds-sdk-input {
                padding-top: 0;
            }
            > .ds-sdk-input:last-of-type {
                border-bottom: 1px solid #dbdfe1;
            }

            .ds-sdk-input__label {
                background-color: #f8f8f8;
                border: 1px solid #dbdfe1;
                cursor: pointer;
                display: block;
                font-weight: 600;
                margin: 0;
                overflow: hidden;
                padding: 14px;
                position: relative;
                text-decoration: none;
                text-transform: uppercase;
                word-break: break-all;
                z-index: 1;
            }

            .ds-sdk-input__label + fieldset {
                border: 1px solid #dbdfe1;
                border-width: 0 1px 0 1px;
                padding: 14px;
                margin: 0;
                margin: 0;
            }

            .ds-sdk-input__border {
                display: none;
            }

            .ds-sdk-labelled-input__label,
            .ds-sdk-labelled-input__label span {
                .lib-font-size(16);
                color: @text__color;
                font-weight: 400;
            }

            .ds-sdk-input__fieldset__show-more {
                button {
                    .lib-font-size(16);
                    color: @text__color;
                    font-weight: 400;
                    &:hover {
                        color: @text__color;
                    }
                }
            }
        }

        .ds-sdk-sort-dropdown,
        ds-sdk-per-page-picker {
            button {
                &:hover {
                    background-color: inherit;
                    color: inherit;
                }
            }
        }

        .ds-plp-pagination {
            font-size: 18px;
            svg {
                font-size: 50px;
            }
        }

        .ds-sdk-product-list {
            max-width: 90rem !important;
            padding-bottom: 30px;

            .ds-sdk-product-list__grid {
                column-gap: 1rem !important;

                .ds-sdk-product-item {
                    border: 1px solid #dbdfe1;
                    padding: 8px;
                    text-align: center;
                }

                .ds-sdk-product-item__product-name {
                    .lib-font-size(22);
                    margin-top: 2px;
                    padding-left: 12px;
                    font-weight: 700 !important;
                    letter-spacing: 2px;
                }

                .ds-sdk-product-price {
                    padding-left: 12px;

                    p {
                        .lib-font-size(20);
                        color: #0b56c2 !important;
                        font-weight: 700;

                        span:first-child {
                            display: none;
                        }
                        span + span {
                            display: inline !important;
                        }

                        span.text-secondary {
                            color: #0b56c2 !important;;
                        }

                        span.line-through {
                            color: #a5a5a5 !important;;
                        }
                    }
                }

                .ds-sdk-product-item__image {
                    img {
                        background: #fff;
                        object-fit: contain;
                    }
                    svg {
                        max-height: 200px;
                    }
                }

                .ds-sdk-product-item__product-swatch-group {
                    margin: 0 auto;
                }
            }
        }
    }
}


//
//  Mobile
//  _____________________________________________

.media-width(@extremum, @break) when (@extremum = 'max') and (@break = @screen__s) {
    #livesearch_root {
        .ds-sdk-product-list {
            + div.flex-row {
                flex-direction: column;
                text-align: center;

                > div {
                    margin-bottom: 20px;
                }
            }

            .ds-sdk-product-list__grid {

            }
        }
    }
}


//
//  Desktop
//  _____________________________________________

.media-width(@extremum, @break) when (@extremum = 'min') and (@break = @screen__s) {
    #livesearch_root {
        .ds-widgets-_actions {
            max-width: 32rem;
        }

        .ds-widgets_results {
            margin-left:10px;
        }
    }
}

.media-width(@extremum, @break) when (@extremum = 'min') and (@break = @screen__m) {
    #livesearch_root {
        .ds-sdk-product-list {
            .ds-sdk-product-list__grid {
                grid-template-columns: repeat(2,minmax(0,1fr)) !important;

                .ds-sdk-product-item {
                    max-width: 30rem !important;
                }
            }
        }
    }
}

.media-width(@extremum, @break) when (@extremum = 'min') and (@break = @screen__l) {
    #livesearch_root {
        .ds-sdk-product-list {
            .ds-sdk-product-list__grid {
                grid-template-columns: repeat(3,minmax(0,1fr)) !important;

                .ds-sdk-product-item {
                    max-width: 30rem !important;
                }
            }
        }
    }
}
