button[popovertarget="project-notifications-popover"] .alert-badge {
    top: 0.125em;
    left: 1em;
}

#project-notifications-popover {
    max-height: 50%;
}

.project-notifications-container {
    display: flex;
    flex-direction: column;
    position: relative;
    overflow: hidden;
}

.project-notifications-wrapper {
    width: 100%;
    height: 100%;
    overflow: auto;
}

/* ************************************************** */
/* #region EMPTY STATE                                */
/* ************************************************** */

#no-notifications-message {
    padding: 0.5em;
}

/* Hide "no notifications" message then there's a notification */
#project-notifications-popover:has(.project-notification) #no-notifications-message {
    display: none;
}

/* #endregion */

/* ************************************************** */
/* #region NOTIFICATION ITEM                          */
/* ************************************************** */

.project-notification {
    display: grid;
    grid-template-areas: "project-notification";
    position: relative;
    padding-inline: 0.25em;
    padding-block: 0.25em;
    border-bottom: var(--border-width) solid var(--border-color);
    cursor: default;
}

.project-notification:last-child {
    border-bottom: none;
}

.notification-item {
    grid-area: project-notification;
    display: flex;
    align-items: flex-start;
    padding-inline: 0 1.5em;
    padding-block: 0.125em;
    border-radius: var(--border-radius);
}

.notification-details {
    display: flex;
    flex-direction: column;
    gap: 0.25em;
}

.notifications-details-header {
    display: flex;
    align-items: center;
    gap: 1ch;
    height: 1.5em;
}

.notification-sender-container {
    display: flex;
    align-items: center;
    gap: 0.25em;
}

.notification-sender {
    display: block;
    align-content: center;
    text-transform: uppercase;
}

.notification-timestamp {
    display: block;
    align-content: center;
}

.notification-message {
    align-content: center;
    max-width: 32ch;
    min-height: 1.5em;
    padding-inline: 0.25em;
    overflow-wrap: anywhere;
    white-space: normal;
}

/* #endregion */

/* ************************************************** */
/* #region CLEAR ALL BUTTON                           */
/* ************************************************** */

#project-notifications-popover [data-action="clear-all-notifications"]:hover {
    background-color: var(--bg-color-hover);
    color: var(--text-color-hover);
}

#project-notifications-popover:not(:has(.project-notification)) [data-id="clear-all-notifications-container"] {
    display: none;
}

/* #endregion */

/* ************************************************** */
/* #region TOOLS                                      */
/* ************************************************** */

.project-notification-tools {
    grid-area: project-notification;
    justify-self: flex-end;
    align-self: flex-start;
    display: flex;
    align-items: center;
    gap: 0.25em;
    width: fit-content;
    height: fit-content;
    opacity: 0;
    transform: translate(-0.25em, 0.125em);
    z-index: 1;
}

.project-notification:hover .project-notification-tools {
    opacity: 1;
}

.project-notification-tool:hover {
    background-color: var(--bg-color-hover);
    color: var(--text-color-hover);
}

/* #endregion */

/* ************************************************** */
/* #region ICON                                       */
/* ************************************************** */

@keyframes bellToll {
    0% { transform: rotate(0); }
    25% { transform: rotate(-8deg); }
    50% { transform: rotate(0); }
    75% { transform: rotate(8deg); }
    100% { transform: rotate(0); }
}

control-bar:has(.notification-item) .bell-icon-bell {
    transform-origin: 12px 6px;
    animation: bellToll 3s infinite linear;
}

/* #endregion */