//@import url('https://fonts.googleapis.com/css?family=Niramit');
.bp-element-product-search {
    .title {
        margin: 2px;
    }
    .search-button {
        &::before{
            content: "\f4a4";
            font-family: Ionicons;
            font-size: 24px;
            font-weight: 600;
        }
    }
    .search-form {
        position: fixed;
        top: 0;
        right: 0;
        width: 100%;
        height: 100%;
        opacity: 0;
        visibility: hidden;
        transition: all 0.5s;
        z-index: 99;
        background: rgba(0, 0, 0, 0.8);
        display: flex;
        justify-content: center;
        align-items: center;
        flex-direction: column;
        &.open {
            opacity: 1;
            visibility: visible;
            .form-search .search-field {
                opacity: 1;
                visibility: visible;
                transform: scale3d(1, 1, 1);
                transition-duration: 1s;
            }
        }
        &.loading .form-search:after {
            content: "\f29a";
            font-family: Ionicons;
            font-size: 40px;
            position: absolute;
            right: 0;
            top: 20px;
            color: #fff;
            display: inline-block;
            width: 60px;
            height: 60px;
            line-height: 60px;
            animation: spin 2s linear infinite;
            transition: all 0.5s;
        }
    }
    .close-form {
        //font-size: 30px;
        position: absolute;
        right: 50px;
        top: 100px;
        color: #f0f0f0;
        cursor: pointer;
        transition: all 0.5s;
        &::before{
            content: "\f12a";
            font-size: 20px;
            font-family: Ionicons;
        }
        &:hover {
            color: red;
        }
    }
    .form-search {
        width: 80%;
        position: relative;
        &:after {
            display: none;
        }
        .search-field {
            width: 100%;
            height: 100px;
            padding: 20px 0;
            background: transparent;
            font-size: 60px;
            border: 0;
            visibility: hidden;
            opacity: 0;
            color: #fff;
            border-bottom: 4px solid #2575FC;
            transform: scale3d(0, 1, 1);
            transition: all 0.3s;
            transform-origin: 0 50% center;
        }
        .search-notice {
            display: inline-block;
            float: right;
            margin-top: 5px;
            color: #f0f0f0;
        }

    }
    .list-search {
        padding-left: 0;
        list-style: none;
        display: inline-block;
        width: 80%;
        margin: 0 auto;
        transition: all 0.5s;
        li {
            padding: 10px 0;
            border-bottom: 1px solid rgba(255, 255, 255, 0.1);
            font-size: 20px;
            display: block;
            letter-spacing: 0.05em;
            a {
                color: rgba(255, 255, 255, 0.8);
                transition: all 0.3s;
            }
        }
    }

    &.layout-2 {
        form {
            position: relative;
            .btn-live-search {
                position: absolute;
                right: 23px;
                height: calc(100% - 14px);
                top: 50%;
                transform: translate(0,-50%);
                padding-left: 22px;
                border-left: 1px solid #ccc;
                background: transparent;
                z-index: 1;
                i {
                    font-size: 22px;
                    font-weight: 400;
                    height: 100%;
                    line-height: 30px;
                    color: #333;
                    display: block;
                }
            }
        }

        .loading {
            .btn-live-search {
                i {
                    visibility: hidden;
                }
            }
        }

        .destop-search-form {
            width: 580px;
            @media (max-width: 1400px) {
                width: 290px;
            }
            @media (max-width: 1024px) {
                width: auto;
            }
            .form-destop-search {
                label {
                    width: 100%;
                    .search-field {
                         margin-bottom: 0;
                         padding-right: 62px;
                         font-size: 16px;
                         font-weight: 400;
                         color: #999;
                    }
                }

            }
            .list-search {
                width: 100%;
                background: #fff;
                position: absolute;
                z-index: 1;
                margin: 0;
                li {
                    border: 1px solid rgba(179,179,179,0.2);
                    padding: 10px 20px;
                    border-top: none;
                    margin-bottom: 0;
                    a {
                        color: #333;
                        font-size: 15px;
                        line-height: 1.333;
                        font-weight: 700;
                        &:hover {
                            color: #345d91;
                        }
                    }
                }

                &:last-child {
                    border-bottom: none;
                }
            }
            &.loading {
                .form-destop-search:after {
                    content: "\f29a";
                    font-family: Ionicons;
                    font-size: 18px;
                    position: absolute;
                    right: 22px;
                    top: 0;
                    color: #333;
                    display: inline-block;
                    line-height: 42px;
                    animation: fa-spin 1s infinite steps(8);
                    transition: all 2s;
                }
            }
        }

        .mobile-search-form {
            position: absolute;
            width: 100vw;
            top: -10px;
            transition: all .3s;
            visibility: hidden;
            opacity: 0;
            z-index: 1;
            .form-mobile-search {
                box-shadow: 0 1px 5px 0 rgba(0,0,0,.1);
                label {
                    width: 100%;
                    input {
                        margin-bottom: 0;
                        border: 0;
                        -webkit-border-radius: 0;
                        -moz-border-radius: 0;
                        border-radius: 0;
                    }
                }
                .btn-live-search {
                    border-left: 0;
                }
            }
            .list-search {
                width: 100%;
                background: #fff;
                position: absolute;
                z-index: 1;
                margin: 0;
                box-shadow: 0 1px 5px 0 rgba(0, 0, 0, 0.1);
                li {
                    border: 1px solid rgba(179,179,179,0.2);
                    padding: 10px 20px;
                    border-bottom:none;
                    margin-bottom: 0;
                    a {
                        color: #333;
                        font-size: 15px;
                        line-height: 1.333;
                        font-weight: 700;
                        &:hover {
                            color: #345d91;
                        }
                    }
                }
            }
            &.loading {
                .form-mobile-search:after {
                    content: "\f29a";
                    font-family: Ionicons;
                    font-size: 18px;
                    position: absolute;
                    right: 22px;
                    top: 0;
                    color: #333;
                    display: inline-block;
                    line-height: 42px;
                    animation: fa-spin 1s infinite steps(8);
                    transition: all 2s;
                }
            }
            &.active {
                top: 40px;
                visibility: visible;
                opacity: 1;
            }
        }

    }
}
// responsive
@media (max-width: 767px) {
    .bp-element-product-search {
        &.layout-2 {
            .destop-search-form {
                display: none;
            }
            .search-button::before {
                color: #333;
                font-size: 22px;
                font-weight: 400;
            }
        }
    }
}