.dropdown.notifications {
    z-index: 91;
    margin: 0;
    max-height: min(800px, calc(100vh - var(--navbar-height))) !important;
    display: grid;
    grid-template-rows: 1fr min-content;
    max-width: 500px;
    position: fixed;

    @media (max-width: 900px) {
        bottom: calc(env(safe-area-inset-bottom, 0) + var(--navbar-height)) !important;
    }

    @media (max-width: 500px) {
        width: 100%;
        max-height: initial !important;
        left: initial !important;
        right: initial !important;
        top: env(safe-area-inset-top, 0) !important;
    }

    .loading {
        justify-self: center;
    }

    section {
        padding: 16px 16px 0 16px;
        overflow: auto;
        scrollbar-width: thin;

        @media (max-width: 500px) {
            padding: 8px;
        }
    }

    footer {
        display: flex;
        gap: 4px;
        padding: 8px 16px 16px 16px;

        @media (max-width: 500px) {
            padding: 8px;
        }

        [class*='icon-'] {
            font-size: 20px;
        }

        .right {
            margin-left: auto;
        }
    }

    h3,
    h4 {
        margin: 0 0 4px 0;
    }

    .mark-read-button {
        padding: 4px;
    }

    .notification-list :not(.unread) .mark-read-button {
        display: none;
    }

    .notification {
        user-select: none;
        display: flex;
        gap: 8px;
        align-items: flex-start;
        padding: 4px 8px;
        border-bottom: 1px solid var(--h-ruler-color);

        &:last-of-type {
            margin-bottom: 0;
            border-bottom: 0;
        }

        &.unread {
            background-color: var(--c-pri);

            .notification-title {
                font-weight: 600;
            }
        }

        a {
            flex-grow: 1;
            display: grid;
            grid-template-columns: min-content 1fr auto;
            grid-template-rows: min-content min-content;
            align-items: first baseline;
            gap: 1px 8px;

            &::before {
                /*noinspection CssNoGenericFontName*/
                font-family: icons;
                font-size: 20px;
                grid-column: 1;
                grid-row: 1 / -1;
                align-self: center;
                content: "\e8aa";
            }
        }
        &.type-1 a::before {
            content: "\e69a";
        }

        &.type-2 a::before {
            content: "\e7e0";
        }

        &.type-3 a::before {
            content: "\e716";
        }

        &.type-4 a::before {
            content: "\e901";
        }

        &.type-5 a::before,
        &.type-8 a::before {
            content: "\e6dd";
        }

        &.type-6 a::before {
            content: "\e8aa";
        }

        &.type-7 a::before {
            content: "\e756";
        }

        &.type-9 a::before,
        &.type-10 a::before,
        &.type-11 a::before,
        &.type-16 a::before {
            content: "\e838";
        }

        &.type-12 a::before {
            content: "\e6e2";
        }

        &.type-13 a::before {
            content: "\e838";
        }

        &.type-14 a::before {
            content: "\e7ff";
        }

        &.type-17 a::before {
            content: "\e763";
        }

        &.expired a::before {
            content: "\e681";
        }

        time {
            display: inline-block;
            font-size: 0.7em;
            color: var(--meta-info-color);
            justify-self: right;
        }

        .meta {
            display: block;
            font-size: 0.85em;
            color: var(--meta-info-color);
            grid-column: 2 / -1;
        }
    }
}

@media (max-width: 500px) {
    body[data-opened-dropdown*="notifications"] {
        overflow: hidden;
    }
}