/**
 * 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/>.
 */

#project-sidebar-linked-projects-popover,
#project-sidebar-project-flags-popover,
#project-sidebar-nav-title-popover,
#current-project-nav-title-popover {
    > .tlp-popover-arrow {
        &::before {
            background: none;
        }

        &::after {
            background: var(--tlp-dark-color-darker-20);
        }

        + .tlp-popover-body {
            border-radius: var(--tlp-large-radius);
        }
    }

    > .tlp-popover-header {
        border-bottom-color: var(--tlp-dark-color-lighter-10);
        background: var(--tlp-dark-color-darker-20);

        > .tlp-popover-title {
            color: var(--tlp-white-color);
            font-size: 1rem;
            line-height: 1.5rem;
        }
    }

    > .tlp-popover-body {
        background: var(--tlp-dark-color-darker-20);
        color: var(--tlp-dimmed-color-on-dark-background);
        font-size: 0.875rem;

        > .current-project-nav-flag-popover-separator {
            margin: var(--tlp-medium-spacing) calc(-1 * var(--tlp-medium-spacing));
            border-top: 1px solid var(--tlp-dark-color-lighter-10);
        }

        .current-project-nav-flag-popover-content-title {
            margin: 0 0 4px;
            color: var(--tlp-neutral-light-color);
            font-size: 1rem;
            font-weight: 600;
            line-height: 1.5rem;

            &:last-child {
                margin: 0;
            }
        }

        > .current-project-nav-flag-popover-flag {
            position: relative;
            margin: 0 0 var(--tlp-medium-spacing);
            padding: 0 0 0 20px; // magic value independant of density so that it looks nice with svg flag

            &:last-child {
                margin: 0;
            }

            > .fas,
            > .fa,
            > .tuleap-svg-project-shield {
                position: absolute;
                left: 0;
            }

            > .fas,
            > .fa {
                top: 6px;
                color: var(--tlp-neutral-light-color);
                font-size: 0.75rem;
            }

            > .tuleap-svg-project-shield {
                top: 3px;
                width: 12px;

                > path {
                    fill: var(--tlp-neutral-light-color);
                }
            }
        }
    }
}

#project-sidebar-linked-projects-popover,
#project-sidebar-project-flags-popover {
    margin-left: 4px !important; // override inset popers
}

#project-sidebar-nav-title-popover {
    margin-left: -12px !important; // override inset popers
}
