/**
 * Copyright (c) Enalean, 2024-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/plugin-tracker-tql-codemirror";

.tracker-report-expert-content {
    display: flex;
    margin: 10px 0 6px;
    padding: 0;
    clear: both;
}

/* stylelint-disable-next-line selector-no-qualifying-type */
select.tracker-report-expert-allowed-fields {
    height: 100px;
    margin: 0;
}

.tracker-report-expert-content-query {
    flex: 1 1 auto;
    margin: 0 25px 0 0;
}

#tracker-report-expert-query-textarea {
    display: none;
}

.cm-editor {
    height: 100px;
    transition:
        border linear 0.2s,
        box-shadow linear 0.2s;
    border: 1px solid #cccccc;
    border-radius: var(--tlp-medium-radius);
    background: var(--tlp-white-color);

    &.cm-focused {
        border-color: rgb(82 168 236 / 80%);
        outline: 0;
        box-shadow: var(--tlp-shadow-focus);
    }

    .cm-placeholder {
        color: #999999;
    }
}

.tracker-report-expert-content-query-readonly > .cm-editor {
    background: #eeeeee;
    cursor: not-allowed;

    .cm-content {
        cursor: not-allowed;
    }
}
