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

@import (reference) "./colortheme-all.less";
@import (reference) "./avatar.less";

.notifications_main() {
    --LessLoader_require: LessLoader_currentFile();
}
& {
    @notif-height: 50px;
    .cp-notifications-container {
        max-width: 300px;
        width: 300px;
        display: flex;
        flex-flow: column;
        padding-left: 0;
        & hr {
            margin: 0 !important;
        }
        .cp-notification {
            min-height: @notif-height;
            display: flex;
            .cp-broadcast {
                display: flex;
                font-size: 30px;
                align-items: center;
                padding: 0 5px;
                color: @cp_dropdown-fg;
                &.preview:not(.fa-calendar) {
                    color: @cryptpad_color_red;
                }
            }
            .cp-reminder, .cp-avatar {
                cursor: pointer;
            }
            .cp-avatar {
                .avatar_main(30px);
                padding: 0 5px;
            }
            .cp-avatar-image {
                display: inline-flex;
                align-items: center;
                justify-content: center;
                img {
                    height: 40px;
                }
            }
            .cp-notification-content {
                flex: 1;
                align-items: stretch;
                min-width: 0;
                p {
                    word-break: break-word;
                }
                &.cp-clickable {
                    cursor: pointer;
                }
            }
            .cp-notification-dismiss {
                color: @cp_dropdown-fg;
                width: 25px;
                display: flex;
                align-items: center;
                justify-content: center;
                cursor: pointer;
            }
        }
    }
    .cp-notifications-gotoapp {
        padding: 0 !important;
        justify-content: center !important;
        p {
            padding: 10px 0 !important;
            text-align: center !important;
            font-size: 14px !important;
            font-weight: bold !important;
            cursor: pointer;
            &:hover {
                background-color: @cp_dropdown-bg-hover;
            }
        }
    }
    .cp-notifications-requestedit-verified {
        display: flex;
        align-items: center;
        &> span.cp-avatar {
            .avatar_main(30px);
        }
        &> span {
            margin-right: 10px;
        }
        &> p {
            margin: 0;
        }
    }
    .cp-dropdown-container .cp-dropdown-content {
        li[role="menuitem"]{
            .cp-notification-dismiss:hover {
                border-radius: @variables_radius;
                background-color: @cp_dropdown-bg-hover;
            }
        }
        li[role="menuitem"].cp-notification-avatar {
            &:hover {
                background-color: transparent;
            }
            .cp-avatar:hover {
                background-color: @cp_dropdown-bg-hover;
            }
            .cp-notification-content:hover {
                border-radius: @variables_radius;
                background-color: @cp_dropdown-bg-hover;
            }
        }
    }
}


