/**
 * Copyright (c) Enalean, 2017-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 "./adapters/UI/comments/comments";
@use "./adapters/UI/footer/quota-display";
@use "pkg:@tuleap/plugin-tracker-link-field";
@use "./adapters/UI/fields/burndown-field/bundown-field";
@use "./adapters/UI/fields/file-field/file-field";
@use "./adapters/UI/fields/user-avatar-field/user-avatar-field";
@use "./adapters/UI/fields/select-box-field/select-box-field";
@use "./adapters/UI/fields/computed-field/computed-field";
@use "./fields/open-list-field/open-list-field";
@use "pkg:@tuleap/list-picker";
@use "pkg:@tuleap/mention";

.tuleap-artifact-modal-title {
    display: flex;
    align-items: center;
}

.tuleap-artifact-modal-title-badge {
    margin: 0 10px 0 0;
    padding: 8px 12px;
    border-radius: 24px;
    font-size: 20px;
    font-weight: 400;
    line-height: 20px;
}

.tuleap-artifact-modal-body {
    display: flex;
    padding: 0;
    overflow-y: hidden;
    background: var(--tlp-background-color);

    &.edition-mode .tuleap-artifact-modal-followups {
        display: none;
    }
}

.tuleap-artifact-modal-artifact {
    flex: 1 1 auto;
    width: 65%;
    padding: var(--tlp-medium-spacing);
    overflow-y: auto;

    .tlp-property:last-child,
    .tlp-form-element:last-child {
        margin: 0 0 var(--tlp-medium-spacing);
    }

    > .tuleap-artifact-modal-show-hide-fieldsets {
        display: flex;
        margin-bottom: 10px;

        /* stylelint-disable selector-no-qualifying-type */
        label.tlp-label {
            margin-right: 5px;
            line-height: 35px;
        }
        /* stylelint-enable */
    }
}

fieldset {
    margin: 0 0 var(--tlp-medium-spacing);
    border: 1px solid var(--tlp-neutral-normal-color);
    border-radius: var(--tlp-medium-radius);
    background: var(--tlp-white-color);
}

.artifact-modal-text-label-with-format {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin: 0 0 5px;
}

.artifact-modal-text-label-with-format-and-helper-container {
    display: flex;
    align-items: center;
}

.artifact-modal-preview-button,
.artifact-modal-helper-popover-button {
    margin: 0 0 0 5px;
}

.popover-code-block-indentation {
    white-space: pre-line;
}

.popover-h1-indentation,
.popover-h2-indentation,
.popover-blockquote-indentation {
    display: inline;
}

.popover-image-indentation {
    display: block;
}

.artifact-modal-text-label {
    margin: 0 5px 0 0;

    > .artifact-modal-text-asterisk {
        position: initial;
    }
}

.tuleap-artifact-modal-list-field-avatar {
    margin: 0 var(--tlp-small-spacing) 0 0;
    vertical-align: text-bottom;
}

.tuleap-artifact-modal-list-field-avatar-badge {
    margin: 0 5px 0 0;
}

.tuleap-artifact-modal-hidden {
    display: none;
}

.tuleap-artifact-modal-field-empty-value {
    color: var(--tlp-dimmed-color);
    font-style: italic;
}
