@charset "UTF-8";

//-----------------------------------------------------
// search.scss
//-----------------------------------------------------

$searchRadius:               15px !default;

$searchBlockCenterSwitch:    true !default;
$searchBlockCancelSwitch:    true !default;


.search-block {
    background-color: $colorF;
    padding: 7px;
    position: relative;
    .search-ele-wrap {
        position: relative;
    }
    .search-text {
        border: 0 none;
        border-radius: $searchRadius;
        background-color: #fff;
        width: 100%;
        height: 30px;
        padding: 5px 30px;
    }
    .icon-search {
        position: absolute;
        top: 0;
        left: 0;
        color: #999;
        width: 30px;
        height: 30px;
    }
    .icon-loading {
        position: absolute;
        right: 5px;
        top: 7px;
    }
    .btn-voice{
        position: absolute;
        right: 0;
        width: 30px;
        height: 30px;
        padding-top: 7px;
        top: 0;
    }
}

@if $searchBlockCenterSwitch{
    .search-block--center{
        .search-ele-wrap{
            background: #fff;
            text-align: center;
            border-radius: $searchRadius;
            color: $colorPlaceholder;
        }
        .icon-search{
            position: relative;
            display: inline-block;
            vertical-align: middle;
            width: 20px;
            text-align: center;
        }
    }
}

@if $searchBlockCancelSwitch{
    .search-block--cancel {
        .search-ele-wrap {
            position: relative;
            margin-right: 40px;
        }
        .search-cancel {
            line-height: $barHeight;
            padding: 0 10px;
            color: $primary;
            position: absolute;
            right: 0;
            top: 0;
            cursor: pointer;
        }
    }
}