/*
 * SPDX-FileCopyrightText: 2025 XWiki CryptPad Team <contact@cryptpad.org> and contributors
 *
 * SPDX-License-Identifier: AGPL-3.0-or-later
 */

@import (reference) "./colortheme-all.less";
@import (reference) "./variables.less";
.badges_vars(
    @width: 30px
) {
    @badges-width: @width;
}
.badges_main(@width: 30px) {
    --LessLoader_require: LessLoader_currentFile();
    .badges_vars(@width);
    --badges-width: @badges-width;
    --badges-font: ceil(@badges-width*2/3);
}
.badges_include() {
    --LessLoader_require: LessLoader_currentFile();
}

& {
    i.cp-badge {
        width: var(--badges-width);
        height: var(--badges-width);
        box-sizing: content-box;
        border-radius: 50%;
        display: inline-flex;
        justify-content: center;
        align-items: center;
        font-size: var(--badges-font);
        color: @cp_badges-color;
        background-color: @cryptpad_color_link;
        z-index: 10;
        &.cp-selected {
            outline-offset: 3px;
            outline: 2px solid @cryptpad_text_col;
        }
        each(@cp_badges-bg, {
            &[data-badge="@{key}"] {
                background-color: @value;
            }
        });

    }
}

