/**
 * Copyright (c) Enalean, 2020-Present. All Rights Reserved.
 *
 * This file is a part of Tuleap.
 *
 * Tuleap is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation; either version 2 of the License, or
 * (at your option) any later version.
 *
 * Tuleap 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 General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with Tuleap. If not, see <http://www.gnu.org/licenses/>.
 */

@use "./selection";
@use "./dropdown";
@use "./common";

tuleap-lazybox {
    display: inline-block;
    width: 100%;
}

.lazybox-autocompleter {
    display: flex;
    flex-direction: column;

    > tuleap-lazybox-search {
        display: flex;
        padding: 0;
    }
}

.lazybox-placeholder {
    @include common.placeholder;

    color: var(--tlp-form-element-placeholder-color);
}

.lazybox-single-search-section {
    padding: 4px;

    &::part(input) {
        height: var(--tlp-form-element-small-height);
        padding: 0 4px;
        transition: border-color var(--tlp-form-element-border-transition-duration) linear;
        border: 1px solid var(--tlp-form-element-border-color);
        border-radius: var(--tlp-form-element-border-radius);
        font-size: var(--tlp-form-element-small-font-size);

        &:focus {
            transition:
                border-color var(--tlp-form-element-border-transition-duration) linear,
                box-shadow 350ms;
            border-color: var(--tlp-main-color);
            box-shadow: var(--tlp-shadow-focus);
        }
    }
}

.lazybox-multiple-search-section {
    flex: 1;

    &::part(input) {
        min-width: 100px;
        height: 100%;
        margin: 5px 0 0;
        padding: 0;
        border: 0;
        line-height: 1.5rem;
        cursor: pointer;

        &:focus {
            box-shadow: none;
        }
    }
}
