.notif-dropdown {
    width: 360px;
    max-width: calc(100vw - 1rem);
}

.notif-scroll {
    max-height: 360px;
    overflow-y: auto;
}

.notif-item {
    display: flex;
    text-decoration: none;
    color: inherit;
    border-radius: 0.42rem;
    transition: background-color 0.15s ease;
    margin: 0 0.5rem;
}

.notif-item:hover {
    text-decoration: none;
    color: inherit;
}

.notif-item + .notif-item {
    margin-top: 1px;
}

/* Unread rows: a barely-there gray (lighter than gray-100 #F3F6F9, per design
   request); turns white once read. No colored tint, no corner dot. */
.notif-item--unread {
    background-color: #f7f9fb;
}

.notif-item--unread .notif-message {
    color: var(--dark);
    font-weight: 600;
}

.notif-message {
    line-height: 1.35;
    word-break: break-word;
}

.notif-unread-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background-color: var(--primary);
}

/* Skeleton loading rows (shown while the dropdown fetches its first batch). */
.notif-skel {
    animation: notif-skel-pulse 1.2s ease-in-out infinite;
}

.notif-skel-avatar {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    flex-shrink: 0;
    display: block;
}

.notif-skel-line {
    height: 10px;
    border-radius: 4px;
    display: block;
    margin-bottom: 7px;
}

.notif-skel-line:last-child {
    margin-bottom: 0;
}

@keyframes notif-skel-pulse {
    0%, 100% { opacity: 0.45; }
    50% { opacity: 0.9; }
}

/* Live Facebook-style toast (independent of the shared global toastr). */
.notif-toast-container {
    position: fixed;
    bottom: 20px;
    right: 20px;
    /* Max z-index so the toast is never hidden (e.g. by django-debug-toolbar). */
    z-index: 2147483647;
    display: flex;
    flex-direction: column;
    gap: 10px;
    width: 350px;
    max-width: calc(100vw - 40px);
}

.notif-toast {
    position: relative;
    /* !important overrides Metronic's `.card.card-custom { border: 0 }`. */
    border: 1px solid var(--primary) !important;
    box-shadow: 0 10px 30px rgba(24, 28, 50, 0.18);
    animation: notif-toast-in 0.3s cubic-bezier(0.21, 1.02, 0.73, 1);
    overflow: hidden;
}

/* Full border matching the notification level. */
.notif-toast--primary { border-color: var(--primary) !important; }
.notif-toast--info { border-color: var(--info) !important; }
.notif-toast--success { border-color: var(--success) !important; }
.notif-toast--warning { border-color: var(--warning) !important; }
.notif-toast--danger { border-color: var(--danger) !important; }

.notif-toast--out {
    animation: notif-toast-out 0.3s ease forwards;
    pointer-events: none;
}

.notif-toast .notif-item {
    margin: 0;
    border-radius: 0;
    padding-right: 1.75rem;
}

.notif-toast-close {
    position: absolute;
    top: 4px;
    right: 8px;
    z-index: 2;
    border: 0;
    background: transparent;
    font-size: 1.25rem;
    line-height: 1;
    cursor: pointer;
    padding: 0 4px;
}

.notif-toast-close:hover {
    color: var(--dark);
}

@keyframes notif-toast-in {
    from { transform: translateX(115%); opacity: 0; }
    to { transform: none; opacity: 1; }
}

@keyframes notif-toast-out {
    from { transform: none; opacity: 1; }
    to { transform: translateX(115%); opacity: 0; }
}
