/*
*
* @copyright Copyright (c) Open-Xchange GmbH, Germany <info@open-xchange.com>
* @license AGPL-3.0
*
* This code is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.

* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Affero General Public License for more details.

* You should have received a copy of the GNU Affero General Public License
* along with OX App Suite. If not, see <https://www.gnu.org/licenses/agpl-3.0.txt>.
*
* Any use of the work other than as authorized under this license or copyright law is prohibited.
*
*/

.search-view {

    position: relative;
    width: 100%;
    z-index: 2;

    .search-field {
        width: 100%;
        border: 0;
        padding: 0 40px 0 16px;
        line-height: 37px;
        border: 1px solid transparent;
        outline: 0;
    }

    .search-field:focus {
        border-color: #66afe9;
        box-shadow: inset 0 0 4px rgba(102, 175, 233, 0.6);
    }

    .dropdown-toggle {
        position: absolute;
        right: 0;
        border: 0;
        color: #707070;
        background-color: transparent;
        font-size: 14px;
        height: 100%;
        width: 40px;
        padding: 0;
    }

    .dropdown-toggle:focus {
        color: #fff;
        background-color: @toolbar-focus-color;
    }

    .dropdown, .autocomplete {
        display: none;
        position: absolute;
        top: 39px;
        left: 0;
        right: 0;
        border: 1px solid #ccc;
        background-color: white;
        border-radius: 3px;
        min-height: 200px;
        padding: 16px;
        box-shadow: 0 6px 12px rgba(0, 0, 0, 0.175);
    }

    &.open .dropdown {
        display: block;
    }

    .dropdown {
        .form-group {
            margin-bottom: 8px;
            label {
                padding-top: 0;
                margin-bottom: 0;
                display: block;
            }
        }
    }

    .progress {
        position: absolute;
        top: 37px;
        left: 0;
        width: 0;
        transition: width 0.3s;
        height: 2px;
        background-color: @brand-primary;
    }

    .autocomplete {
        display: block;
        max-height: 290px;
        min-height: 0;
        padding: 0;
        .list-item {
            padding: 8px 16px;
        }
        .list-item-checkmark {
            display: none;
        }
        .list-item.selected {
            background-color: #ddd;
        }
    }

    .autocomplete:empty {
        display: none;
    }
}
