/*
 * Copyright 2025 New Vector Ltd.
 *
 * SPDX-License-Identifier: AGPL-3.0-only OR GPL-3.0-only OR LicenseRef-Element-Commercial
 * Please see LICENSE files in the repository root for full details.
 */

.mx_RoomAvatarView {
    --room-avatar-size: 32px;

    position: relative;

    /* Keep the container to the same size than the avatar */
    inline-size: var(--room-avatar-size);
    block-size: var(--room-avatar-size);

    .mx_RoomAvatarView_RoomAvatar {
        mask-position: center;
        mask-size: contain;
        mask-repeat: no-repeat;
        pointer-events: none;
    }

    .mx_RoomAvatarView_RoomAvatar_icon {
        mask-image: url("/res/img/element-icons/roomlist/room-avatar-view-icon-mask.svg");
    }

    .mx_RoomAvatarView_RoomAvatar_presence {
        mask-image: url("/res/img/element-icons/roomlist/room-avatar-view-presence-mask.svg");
    }

    .mx_RoomAvatarView_icon {
        position: absolute;

        /* Place half the icon inside the avatar */
        /* Avatar size - (icon size (16px) / 2) */
        left: calc((var(--room-avatar-size) - 8px));
        bottom: var(--cpd-space-0-5x);
    }

    .mx_RoomAvatarView_PresenceDecoration {
        position: absolute;

        /* Place half the icon inside the avatar */
        /* Avatar size - (icon size (8px) / 2) */
        left: calc((var(--room-avatar-size) - 4px));
        bottom: var(--cpd-space-0-5x);
    }
}
