.notification-dropdown .dropdown-menu {
    width: min(22rem, calc(100vw - 2rem));
    max-height: min(31.25rem, calc(100vh - 5rem));
    overflow-y: auto;
    animation: notification-menu-enter 0.2s ease-out;
}

@media (max-width: 991.98px) {
    /* Anchor the panel to the viewport so it stays fully visible on narrow screens. */
    .notification-dropdown .dropdown-menu {
        position: fixed !important;
        top: calc(env(safe-area-inset-top, 0px) + 3.25rem) !important;
        right: 1rem !important;
        left: auto !important;
        width: min(22rem, calc(100vw - 2rem));
        max-height: min(31.25rem, calc(100dvh - 4.25rem));
        transform: none !important;
    }
}

.notification-dropdown-toggle {
    padding: 0.45rem;
    color: var(--color-primary-dark);
    font-size: 1.35rem;
    line-height: 1;
}

.notification-dropdown-toggle::after {
    display: none;
}

.notification-dropdown-toggle svg {
    display: block;
}

.notification-dropdown-toggle .badge {
    font-size: 0.65rem;
}

.notification-dropdown-item {
    color: inherit;
    text-decoration: none;
    white-space: normal;
}

.notification-dropdown-item:hover {
    background-color: var(--color-surface-soft);
    text-decoration: none;
}

.notification-dropdown-row + .notification-dropdown-row {
    border-top: 1px solid var(--bs-border-color-translucent);
}

.notification-item {
    border-left: 4px solid transparent;
    transition: box-shadow 0.2s ease;
}

.notification-item.bg-light {
    border-left-color: var(--bs-primary);
}

.notification-item:hover {
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.notification-empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.75rem;
    padding: 2rem;
}

.notification-empty-state-icon {
    font-size: 2rem;
}

@keyframes notification-menu-enter {
    from {
        opacity: 0;
        transform: translateY(-0.5rem);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@media (prefers-reduced-motion: reduce) {
    .notification-dropdown .dropdown-menu {
        animation: none;
    }
}
