/**
 * 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 "pkg:@tuleap/tlp/src/scss/components/skeleton";
@use "../../../common/css/utils/switch-to";

#switch-to-modal {
    top: 5vh;
    right: 0;
    left: 0;
    box-sizing: border-box;
    margin: 0 auto;
    border: 0;
    background: none;
    font-size: 1rem;
    line-height: 1;

    > .modal-body {
        $modal-header-height: 64px;

        max-height: calc(70vh - #{$modal-header-height});
    }
}

.switch-to-modal-header.modal-header {
    box-sizing: border-box;
    padding: calc(var(--tlp-medium-spacing) + 1px) var(--tlp-medium-spacing)
        calc(var(--tlp-medium-spacing) + 1px) var(--tlp-large-spacing);
    border-bottom: 1px solid rgb(104 122 124 / 20%);
    border-top-left-radius: var(--tlp-x-large-radius);
    border-top-right-radius: var(--tlp-x-large-radius);
    background: linear-gradient(0deg, rgb(0 0 0 / 7%), rgb(0 0 0 / 7%)), var(--tlp-dark-color);
    background-blend-mode: overlay;
}

.modal-header .switch-to-modal-header-icon {
    padding: 0;
}

#switch-to-filter {
    margin: 0;
    box-shadow: none;

    &::placeholder {
        color: var(--tlp-dimmed-color);
    }
}

.switch-to-modal-body-title {
    border: 0; // overrides phpwiki style
}

.switch-to-projects-softwaremap-empty-state {
    height: auto;
    padding: 0 var(--tlp-medium-spacing);
    border-radius: var(--tlp-large-radius);
    background: var(--tlp-background-color);
    color: var(--tlp-dark-color);
    font-size: 0.875rem;
    font-weight: 500;
    line-height: 38px;
    text-align: center;

    &:hover,
    &:focus {
        background: var(--tlp-neutral-light-color);
        text-decoration: none;
    }
}
