
.ub-search-block {
    background-color: var(--color-primary);
    padding: 2rem 0.5rem 3rem 0.5rem;
    text-align: center;
    position: relative;
    background-size: cover;

    &.light {
        background-color: #FFF;

        .title {
            color: var(--color-text-default);
        }

        .form {
            .box {
                input {
                    border-color: var(--color-primary);
                    outline: 1px solid var(--color-primary);
                }

                button {
                    background-color: var(--color-primary);
                    color: #FFF;
                }
            }
        }
    }

    .video-background {
        top: 0;
        left: 0;
        height: 100%;
        -o-object-fit: cover;
        object-fit: cover;
        background-color: var(--color-primary);
        vertical-align: top;
        position: absolute;
        width: 100%;
    }

    .content-container {
        position: relative;
    }

    .title {
        font-size: 1.5rem;
        padding: 0 0 0 0;
        color: #FFF;
    }

    .sub-title {
        font-size: var(--font-size-large, 1rem);
        color: #FFF;
    }

    .form {
        padding-top: 1rem;

        .tab {
            .tab-item {
                color: #FFF;
                display: inline-block;
                line-height: 1.8rem;
                padding: 0 1rem;
                border-radius: 0.5rem 0.5rem 0 0;

                &.active {
                    background-color: var(--color-content-bg);
                    color: var(--color-primary);
                }
            }
        }

        .keywords {
            line-height: 1.5rem;
            color: var(--color-content-bg);
            margin-top: 1.5rem;

            .keywords-label {
                display: inline-block;
                line-height: 1.5rem;
            }

            .keywords-item {
                display: inline-block;
                line-height: 1.5rem;
                background-color: rgba(0, 0, 0, 0.1);
                border-radius: 0.3rem;
                color: #FFF;
                padding: 0 0.5rem;

                &:hover {
                    background-color: var(--color-content-bg);
                    color: var(--color-text);
                }
            }
        }

        .box {
            max-width: 25rem;
            margin: 0 auto;
            position: relative;
            height: 2.5rem;

            &.rect {
                input {
                    border-radius: 0.5rem;
                }

                button {
                    border-radius: 0.5rem;
                }
            }

            &.captcha {
                img {
                    height: 2.4rem;
                    line-height: 2.4rem;
                    position: absolute;
                    right: 5rem;
                    top: 0.05rem;
                    border-radius: 0.25rem;
                    cursor: pointer;
                }
            }

            input {
                width: 100%;
                border-radius: 2.5rem;
                line-height: 2.5rem;
                height: 2.5rem;
                padding: 0 1rem;
                outline: none;
            }

            button {
                position: absolute;
                right: 0.05rem;
                top: 0.05rem;
                background-color: #FFF;
                border: none;
                border-radius: 1.25rem;
                color: var(--color-primary, #419488);
                height: 2.4rem;
                line-height: 2.4rem;
                padding: 0 1rem;
                margin: 0;
            }
        }
    }
}

@media (max-width: 40rem) {
    .ub-search-block {
        .title {
            font-size: 1rem;
        }
    }
}

.ub-search-mobile-bar {
    display: flex;
    height: 2rem;
    overflow: hidden;
    background-color: var(--color-content-bg);
    line-height: 2rem;
    padding: 0 0.5rem;

    &.page {
        background-color: var(--color-content-bg);
        height: 2.5rem;
        padding: 0.25rem 0;

        .center {
            .box {
                background-color: var(--color-input-bg);
            }
        }
    }

    .left, .center, .right {
        .item {
            display: inline-block;
            min-width: 2rem;
            line-height: 2rem;
            text-align: center;
            color: #666;

            .icon {
                display: inline-block;
                font-size: var(--font-size-large, 1rem);
            }
        }
    }

    .center {
        flex: 1;
        line-height: 1.4rem;

        .box {
            margin-top: 0.3rem;
            position: relative;
            height: 1.4rem;
            background-color: var(--color-input-bg);
            border-radius: 0.7rem;

            .icon {
                position: absolute;
                display: block;
                left: 0.5rem;
                top: 0.4rem;
                line-height: 1em;
                height: 1rem;
                width: 1rem;
                text-align: center;
                font-size: var(--font-size, 0.65rem);
            }

            .input {
                position: absolute;
                display: block;
                left: 1.6rem;
                top: 0.2rem;
                border: none;
                width: calc(100% - 2rem);
                height: 1rem;
                line-height: 1rem;
                background-color: transparent;
                outline: none;
                padding: 0;
            }
        }
    }
}

.ub-search-history {
    .item {
        display: flex;

        .time, .text, .remove {
            display: inline-block;
            min-width: 1.5rem;
            text-align: center;
            line-height: 1.5rem;
            color: #c4cfdb;
        }

        .text {
            flex: 1;
            text-align: left;
            color: #333;
        }
    }
}

.ub-search-result {
    background-color: #FFF;
    padding: var(--size-margin, 0.5rem);

    .keyword {
        color: var(--color-primary, #419488);
        font-weight: bold;
    }

    .count {
        color: var(--color-primary, #419488);
        font-weight: bold;
    }
}

.ub-search-block-a {
    --radius: 1rem;
    --height: 1.6rem;
    --font-size: 0.65rem;
    --font-size-btn: 0.8rem;
    --border-size: 0.05rem;

    position: relative;
    border: var(--border-size) solid var(--color-primary);
    border-radius: var(--radius);
    padding: 0;

    &.lg {
        --radius: 1.25rem;
        --height: 2.5rem;
        --font-size: 0.8rem;
        --font-size-btn: 1rem;
        --border-size: 0.1rem;
    }

    &.mini {
        .search-btn {
            padding: 0 0.5rem;
            font-size: 0.7rem;
        }
    }

    .input {
        outline: none;
        height: var(--height);
        width: 100%;
        line-height: var(--height);
        border: none;
        padding: 0 0.5rem;
        font-size: var(--font-size);
        box-sizing: border-box;
        border-radius: var(--radius);
    }

    .search-btn {
        display: block;
        height: var(--height);
        padding: 0 1rem;
        line-height: var(--height);
        background-color: var(--color-primary, #419488);
        color: #FFF;
        position: absolute;
        right: 0px;
        top: 0px;
        font-size: var(--font-size-btn);
        border-radius: calc(var(--radius) - 2px);

        &:hover {
            color: #FFF;
        }
    }
}


