/*!
 * ---------------------------------------------------------------------
 *
 * GLPI - Gestionnaire Libre de Parc Informatique
 *
 * http://glpi-project.org
 *
 * @copyright 2015-2025 Teclib' and contributors.
 * @copyright 2003-2014 by the INDEPNET Development Team.
 * @licence   https://www.gnu.org/licenses/gpl-3.0.html
 *
 * ---------------------------------------------------------------------
 *
 * LICENSE
 *
 * This file is part of GLPI.
 *
 * This program 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 3 of the License, or
 * (at your option) any later version.
 *
 * This program 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 this program.  If not, see <https://www.gnu.org/licenses/>.
 *
 * ---------------------------------------------------------------------
 */

body.mce-content-body {
    margin: 15px 10px;

    @if not $is-dark {
        background: transparent;
    }

    [data-user-mention="true"] {
        cursor: default !important; // Overrides "not-allowed" cursor on noneditable content
    }
}

#page .tox .tox-statusbar {
    border-top: transparent;
    justify-content: flex-end;
}

.tox.tox-tinymce {
    border: $input-border-width solid $input-border-color;

    @include border-radius($input-border-radius, 0);
}

.rich_text_container {
    white-space: initial;
    max-width: 100%;

    thead,
    tbody,
    tfoot,
    tr,
    td,
    th {
        border-width: inherit; // Prevent removal of borders from reboot CSS
    }

    img {
        max-width: 100%;
    }

    table {
        overflow: auto;
        max-width: 100%;
        word-break: normal;
    }

    a[target="_blank"]::before {
        font-family: tabler-icons;
        content: "\ea99";
        padding-right: 4px;
    }

    .long_text {
        max-height: 350px;
        position: relative;
        overflow: hidden;

        .read_more {
            @if not $is_dark {
                background: linear-gradient(to bottom, rgba(255, 255, 255, 0%) 0%, #f1f4e3 100%);
            } @else {
                background: linear-gradient(to bottom, rgba(255, 255, 255, 0%) 0%, $dark 100%);
            }
        }
    }
}

.user-mention,
[data-user-mention="true"] {
    background: rgba(0, 0, 0, 20%);
    border-radius: 3px;
    padding: 5px;
}
