.notifications-slider {
    background-color: var(--background);
    border-left: var(--border);
    width: min(700px, 98vw);
    position: absolute;
    right: 0;
    box-sizing: border-box;
    padding: min(5vw, 40px) min(4vw, 40px);
    box-shadow: 0 0 100px rgb(0 0 0 / 4%);
    height: 100%;
    overflow-y: scroll;
    display: flex;
    flex-direction: column;
}

.notifications-mark-all-read,
.notifications-clear-all {
    cursor: pointer;
    -webkit-user-select: none;
    user-select: none;
    align-self: center;
    white-space: nowrap;
}

.notifications-slider-actions {
    display: flex;
    gap: 8px;
    justify-content: space-between;
    margin-bottom: 8px;
}

.notifications-slider-actions .notifications-mark-all-read {
    color: var(--boardPrimary);
    font-weight: 400;
}

/* The auto margin, not `justify-content`, is what keeps "Clear all" on the right. The bar's
   `space-between` only holds it there while "Mark all as read" is also rendered; the moment the
   unread count hits 0 that button is removed from the DOM and a single remaining child is placed
   at the START edge instead. An auto margin absorbs the free space before `justify-content` is
   applied, so it right-aligns the lone button without disturbing the two-button layout. */
.notifications-slider-actions .notifications-clear-all {
    color: var(--darkgrey);
    margin-left: auto;
}

.notification-item-container {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.notification-item {
    background-color: var(--white);
    border: var(--border);
    border-radius: var(--borderRadius);
    padding: min(4vw, 16px) min(5vw, 20px);
    cursor: pointer;
    display: flex;
    align-items: flex-start;
    gap: 12px;
}

.notification-unread-mark {
    width: 8px;
    height: 8px;
    border-radius: 100%;
    background-color: var(--red);
    flex-shrink: 0;
    margin-top: 16px;
}

.notification-item.read .notification-unread-mark {
    display: none;
}

.notification-icon {
    width: 40px;
    height: 40px;
    border-radius: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    border: var(--border);
}

.notification-item-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
    margin-top: 2px;
    height: 100%;
    justify-content: center;
}

.notification-title {
    font-weight: 600;
    line-height: 1.4;
}

.notification-item.read .notification-title {
    font-weight: 400;
}

.notification-entity {
    color: var(--darkgrey);
}

.notification-title-highlight {
    font-weight: 400;
    line-height: 1.4;
}

.notification-title-highlight strong {
    font-weight: 700;
}

.notification-item.read .notification-title-highlight strong {
    font-weight: 500;
}

.notification-meta {
    flex-shrink: 0;
    min-width: 72px;
    display: flex;
    justify-content: flex-end;
}

.notification-dismiss-button {
    display: none;
    cursor: pointer;
}

.notification-item:hover .notification-date {
    display: none;
}

.notification-item:hover .notification-dismiss-button {
    display: inline-flex;
    padding: 8px;
    margin-right: -8px;
    margin-top: 7px;
}

.notification-date {
    font-size: var(--text-s);
    color: var(--darkgrey);
    white-space: nowrap;
    margin-top: 12px;
}

.notifications-empty {
    color: var(--darkgrey);
    text-align: center;
    padding: 24px 0;
}

/* Below 500px there isn't room for icon + title + entity + date on one row without cramming or
   truncating, so the card splits into two rows instead: icon, date/dismiss and the unread mark on
   top, the title/entity content below spanning the full width. */
@media (max-width: 500px) {
    .notification-item {
        flex-wrap: wrap;
        align-items: center;
    }

    .notification-icon {
        order: 1;
        width: auto;
        height: auto;
        border: none;
    }

    .notification-meta {
        order: 2;
        margin-left: auto;
    }

    .notification-unread-mark {
        order: 3;
        margin-top: 0;
    }

    .notification-item-content {
        order: 4;
        flex-basis: 100%;
    }

    .notification-date {
        margin-top: 0;
    }

    .notification-item:hover .notification-dismiss-button {
        padding: 2px 8px;
        margin-top: 0px;
    }
}
