/**
 * Copyright (c) Enalean, 2016 - 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/>.
 */

.tlp-pane {
    display: flex;
    margin: 0 0 var(--tlp-medium-spacing);
    border: 1px solid var(--tlp-neutral-normal-color);
    border-radius: var(--tlp-large-radius);
    background: var(--tlp-white-color);
    box-shadow: var(--tlp-pane-shadow);

    &.tlp-pane-collapsable > .tlp-pane-container > .tlp-pane-header {
        cursor: pointer;
    }

    &.tlp-pane-collapsed > .tlp-pane-container > .tlp-pane-section {
        display: none;
    }

    &.tlp-pane-hidden {
        display: none;
    }
}

.tlp-pane-container {
    display: flex;
    flex: 1 1 auto;
    flex-direction: column;
    border-right: 1px solid var(--tlp-neutral-light-color);

    &:first-child {
        width: 100%;
    }

    &:last-child {
        border-right: 0;
    }
}

.tlp-pane-header {
    padding: var(--tlp-medium-spacing);
}

%-tlp-pane-title {
    font-size: 0.8125rem;
    font-weight: 600;
    line-height: 1rem;
    text-transform: uppercase;
}

.tlp-pane-title {
    @extend %-tlp-pane-title;

    margin: 0;
    color: var(--tlp-dimmed-color);
}

.tlp-pane-subtitle {
    @extend %-tlp-pane-title;

    margin: 0 0 var(--tlp-medium-spacing);
    color: var(--tlp-main-color);
}

.tlp-pane-title-icon {
    margin: 0 4px 0 0;
    font-size: 0.75rem;
    line-height: 1rem;
}

.tlp-pane-section {
    padding: var(--tlp-medium-spacing);
    border-bottom: 1px solid var(--tlp-neutral-light-color);

    &:last-child {
        border-bottom: 0;
    }
}

.tlp-pane-spacer {
    flex: 1 1 auto;
}

.tlp-pane-section-submit {
    display: flex;
    justify-content: center;

    &:not(.tlp-pane-section) {
        margin: var(--tlp-large-spacing) 0 0;
    }

    > [class*="tlp-button"] {
        margin: 0 calc(var(--tlp-small-spacing) / 2);
    }
}
