/**
 * File: notification.css
 * Description: ULTIMATE NOTIFICATION ENGINE - Complete UI Design
 * Version: 1.0.0 (COMPLETE REWRITE - Scoped, Dopamine-Driven, Responsive)
 *
 * ═══════════════════════════════════════════════════════════
 * DESIGN PHILOSOPHY
 * ═══════════════════════════════════════════════════════════
 * 
 * - Scoped CSS (no global pollution)
 * - Dopamine-driven design (gradients, glows, animations)
 * - Mobile-first responsive
 * - Dark mode support (auto + manual)
 * - RTL support
 * - Accessibility (focus states, high contrast, reduced motion)
 * - Micro-interactions (hover, active, focus)
 * - Smooth animations (60fps, GPU accelerated)
 * - Zero conflicts with Bell module (njn- prefix)
 * 
 * ═══════════════════════════════════════════════════════════
 * ARCHITECTURE
 * ═══════════════════════════════════════════════════════════
 * 
 * 1.  CSS Variables (scoped under .njn-bell-wrapper)
 * 2.  Reset & Base
 * 3.  Bell Trigger
 * 4.  Bell Badge
 * 5.  Bell Popup
 * 6.  Popup Header
 * 7.  Filters
 * 8.  Popup Body
 * 9.  Notification Items
 * 10. List Wrapper (inline)
 * 11. Preferences Wrapper
 * 12. Skeleton Loader
 * 13. Empty/Error States
 * 14. Toast Notifications
 * 15. Animations
 * 16. Responsive
 * 17. Dark Mode
 * 18. RTL
 * 19. Accessibility
 * 20. Print
 * 
 * ═══════════════════════════════════════════════════════════
 * PREFIX
 * ═══════════════════════════════════════════════════════════
 * 
 * - Bell module:       nfs-*
 * - Notification module: njn-*  (this file)
 * 
 * ═══════════════════════════════════════════════════════════
 * 
 * @package NajibulNotification
 * @version 1.0.0
 * @author Najibul
 */

/* ============================================
   1. CSS VARIABLES (Scoped)
   ============================================ */

.njn-bell-wrapper,
.njn-list-wrapper,
.njn-prefs-wrapper {
    /* ─────────────────────────────────────────
       Colors - Primary
       ───────────────────────────────────────── */
    --njn-primary: #6366f1;
    --njn-primary-hover: #4f46e5;
    --njn-primary-light: #818cf8;
    --njn-primary-gradient: linear-gradient(135deg, #6366f1 0%, #8b5cf6 50%, #a855f7 100%);

    /* ─────────────────────────────────────────
       Colors - State
       ───────────────────────────────────────── */
    --njn-secondary: #f43f5e;
    --njn-secondary-hover: #e11d48;
    --njn-success: #22c55e;
    --njn-success-hover: #16a34a;
    --njn-warning: #f59e0b;
    --njn-error: #ef4444;
    --njn-info: #3b82f6;

    /* ─────────────────────────────────────────
       Colors - Neutral (Light)
       ───────────────────────────────────────── */
    --njn-text: #0f0f0f;
    --njn-text-secondary: #6b7280;
    --njn-text-light: #9ca3af;
    --njn-text-inverse: #ffffff;

    --njn-bg: #ffffff;
    --njn-bg-secondary: #f8fafc;
    --njn-bg-hover: #f1f5f9;
    --njn-bg-active: #e2e8f0;

    --njn-border: #e5e7eb;
    --njn-border-hover: #d1d5db;
    --njn-border-active: #9ca3af;

    /* ─────────────────────────────────────────
       Shadows
       ───────────────────────────────────────── */
    --njn-shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
    --njn-shadow-md: 0 4px 12px rgba(0, 0, 0, 0.08);
    --njn-shadow-lg: 0 10px 40px rgba(0, 0, 0, 0.12);
    --njn-shadow-xl: 0 20px 60px rgba(0, 0, 0, 0.15);
    --njn-shadow-glow: 0 0 20px rgba(99, 102, 241, 0.3);
    --njn-shadow-glow-strong: 0 0 40px rgba(99, 102, 241, 0.5);

    /* ─────────────────────────────────────────
       Spacing
       ───────────────────────────────────────── */
    --njn-space-xs: 4px;
    --njn-space-sm: 8px;
    --njn-space-md: 12px;
    --njn-space-lg: 16px;
    --njn-space-xl: 20px;
    --njn-space-2xl: 24px;
    --njn-space-3xl: 32px;

    /* ─────────────────────────────────────────
       Radius
       ───────────────────────────────────────── */
    --njn-radius-xs: 6px;
    --njn-radius-sm: 10px;
    --njn-radius-md: 14px;
    --njn-radius-lg: 16px;
    --njn-radius-xl: 20px;
    --njn-radius-full: 9999px;

    /* ─────────────────────────────────────────
       Typography
       ───────────────────────────────────────── */
    --njn-font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
                       "Helvetica Neue", Arial, "Noto Sans", "Noto Sans Bengali",
                       "Noto Sans Devanagari", sans-serif;
    --njn-font-size-xs: 10px;
    --njn-font-size-sm: 12px;
    --njn-font-size-md: 13px;
    --njn-font-size-lg: 14px;
    --njn-font-size-xl: 16px;
    --njn-font-size-2xl: 17px;
    --njn-font-size-3xl: 20px;

    --njn-line-height-tight: 1.25;
    --njn-line-height-normal: 1.5;
    --njn-line-height-relaxed: 1.75;

    /* ─────────────────────────────────────────
       Transitions
       ───────────────────────────────────────── */
    --njn-transition-fast: 150ms ease;
    --njn-transition-normal: 250ms cubic-bezier(0.4, 0, 0.2, 1);
    --njn-transition-slow: 350ms cubic-bezier(0.4, 0, 0.2, 1);
    --njn-transition-bounce: 400ms cubic-bezier(0.34, 1.56, 0.64, 1);
    --njn-transition-spring: 500ms cubic-bezier(0.175, 0.885, 0.32, 1.275);

    /* ─────────────────────────────────────────
       Sizing
       ───────────────────────────────────────── */
    --njn-bell-size: 48px;
    --njn-bell-icon-size: 26px;
    --njn-badge-min-size: 22px;
    --njn-popup-width: 460px;
    --njn-popup-max-height: 600px;
    --njn-avatar-size: 48px;

    /* ─────────────────────────────────────────
       Z-Index
       ───────────────────────────────────────── */
    --njn-z-wrapper: 9998;
    --njn-z-fixed: 999998;
    --njn-z-popup: 9999998;
    --njn-z-toast: 2147483647;
    --njn-z-confetti: 2147483647;
}

/* ============================================
   2. RESET & BASE (Scoped)
   ============================================ */

.njn-bell-wrapper,
.njn-bell-wrapper *,
.njn-bell-wrapper *::before,
.njn-bell-wrapper *::after,
.njn-list-wrapper,
.njn-list-wrapper *,
.njn-list-wrapper *::before,
.njn-list-wrapper *::after,
.njn-prefs-wrapper,
.njn-prefs-wrapper *,
.njn-prefs-wrapper *::before,
.njn-prefs-wrapper *::after {
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
}

.njn-bell-wrapper,
.njn-list-wrapper,
.njn-prefs-wrapper {
    font-family: var(--njn-font-family);
    font-size: var(--njn-font-size-lg);
    line-height: var(--njn-line-height-normal);
    color: var(--njn-text);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

.njn-bell-wrapper {
    display: inline-block;
    position: relative;
    vertical-align: middle;
    margin: 0;
    padding: 0;
    background: transparent;
    z-index: var(--njn-z-wrapper);
}

.njn-bell-wrapper.njn-bell-fixed {
    position: fixed;
    bottom: 30px;
    right: 30px;
    z-index: var(--njn-z-fixed);
}

.njn-bell-wrapper [hidden] {
    display: none !important;
}

.njn-bell-wrapper button,
.njn-list-wrapper button,
.njn-prefs-wrapper button {
    font-family: inherit;
    font-size: inherit;
    line-height: inherit;
    color: inherit;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
    margin: 0;
    outline: none;
}

.njn-bell-wrapper a,
.njn-list-wrapper a,
.njn-prefs-wrapper a {
    color: inherit;
    text-decoration: none;
}

/* ============================================
   3. BELL TRIGGER
   ============================================ */

.njn-bell-trigger {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--njn-space-sm);
    position: relative;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0;
    outline: none;
    transition: transform var(--njn-transition-normal);
    will-change: transform;
}

.njn-bell-trigger:active {
    transform: scale(0.94);
}

.njn-bell-trigger:focus-visible .njn-bell-icon-wrapper {
    outline: 3px solid var(--njn-primary);
    outline-offset: 4px;
}

/* ─────────────────────────────────────────
   Icon Wrapper (Circle)
   ───────────────────────────────────────── */

.njn-bell-icon-wrapper {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    width: var(--njn-bell-size);
    height: var(--njn-bell-size);
    border-radius: 50%;
    background: var(--njn-bg);
    border: 1.5px solid var(--njn-border);
    box-shadow: var(--njn-shadow-md);
    transition: all var(--njn-transition-normal);
    overflow: visible;
}

.njn-bell-trigger:hover .njn-bell-icon-wrapper {
    transform: scale(1.06);
    border-color: var(--njn-primary);
    box-shadow: var(--njn-shadow-glow), var(--njn-shadow-lg);
}

.njn-bell-trigger:active .njn-bell-icon-wrapper {
    transform: scale(0.94);
    box-shadow: var(--njn-shadow-sm);
}

/* ─────────────────────────────────────────
   Bell Icon (SVG)
   ───────────────────────────────────────── */

.njn-bell-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: var(--njn-bell-icon-size);
    height: var(--njn-bell-icon-size);
    color: var(--njn-text);
    transition: color var(--njn-transition-normal);
    position: relative;
}

.njn-bell-icon svg {
    width: 100%;
    height: 100%;
    stroke: currentColor;
    transition: color var(--njn-transition-normal), transform var(--njn-transition-normal);
}

.njn-bell-trigger:hover .njn-bell-icon {
    color: var(--njn-primary);
}

.njn-bell-trigger:hover .njn-bell-icon svg {
    transform: rotate(-10deg);
}

/* ─────────────────────────────────────────
   Bell Ripple (when notifications exist)
   ───────────────────────────────────────── */

.njn-bell-ripple {
    position: absolute;
    top: -4px;
    right: -4px;
    bottom: -4px;
    left: -4px;
    border-radius: 50%;
    border: 2px solid var(--njn-secondary);
    opacity: 0;
    pointer-events: none;
    animation: njn-ripple 2s ease-out infinite;
}

.njn-bell-icon.has-notifications .njn-bell-ripple {
    opacity: 1;
}

.njn-bell-icon.has-notifications svg {
    animation: njn-bell-ring 2s ease-in-out infinite;
}

/* ─────────────────────────────────────────
   Bell Label (optional)
   ───────────────────────────────────────── */

.njn-bell-label {
    display: none;
    font-size: var(--njn-font-size-lg);
    font-weight: 600;
    color: var(--njn-text);
    white-space: nowrap;
}

/* ============================================
   4. BELL BADGE
   ============================================ */

.njn-bell-badge {
    position: absolute;
    top: -3px;
    right: -3px;
    min-width: var(--njn-badge-min-size);
    height: var(--njn-badge-min-size);
    padding: 0 6px;
    display: inline-flex;
    align-items: center;
    justify-content: center;

    font-size: var(--njn-font-size-sm);
    font-weight: 700;
    color: var(--njn-text-inverse);
    line-height: 1;
    letter-spacing: 0.02em;

    background: linear-gradient(135deg, var(--njn-secondary), #dc2626);
    border: 2px solid var(--njn-bg);
    border-radius: var(--njn-radius-full);
    box-shadow: 0 2px 8px rgba(244, 63, 94, 0.5);

    transform: scale(0);
    opacity: 0;
    transition: all var(--njn-transition-bounce);
    pointer-events: none;
    z-index: 2;
    font-variant-numeric: tabular-nums;
}

.njn-bell-badge.active {
    transform: scale(1);
    opacity: 1;
    animation: njn-badge-pop 600ms var(--njn-transition-bounce);
}

/* ============================================
   5. BELL POPUP
   ============================================ */

.njn-bell-popup {
    position: absolute;
    top: calc(100% + 12px);
    right: 0;
    width: var(--njn-popup-width);
    max-width: 92vw;
    max-height: var(--njn-popup-max-height);

    display: flex;
    flex-direction: column;

    background: var(--njn-bg);
    border: 1px solid var(--njn-border);
    border-radius: var(--njn-radius-xl);
    box-shadow: var(--njn-shadow-xl);

    overflow: hidden;
    z-index: var(--njn-z-popup);

    opacity: 0;
    transform: translateY(-10px) scale(0.95);
    transform-origin: top right;
    pointer-events: none;

    transition: opacity var(--njn-transition-normal),
                transform var(--njn-transition-normal);
}

.njn-bell-popup.active {
    opacity: 1;
    transform: translateY(0) scale(1);
    pointer-events: auto;
}

/* ============================================
   6. POPUP HEADER
   ============================================ */

.njn-popup-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--njn-space-md);

    padding: 16px 20px 14px;

    background: var(--njn-bg-secondary);
    border-bottom: 1px solid var(--njn-border);
    flex-shrink: 0;
}

.njn-popup-title-section {
    display: flex;
    align-items: center;
    gap: var(--njn-space-md);
    min-width: 0;
}

.njn-popup-title {
    font-size: var(--njn-font-size-2xl);
    font-weight: 700;
    color: var(--njn-text);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin: 0;
}

.njn-popup-count {
    display: inline-flex;
    align-items: center;
    justify-content: center;

    min-width: 24px;
    height: 22px;
    padding: 0 10px;

    font-size: var(--njn-font-size-sm);
    font-weight: 700;
    color: var(--njn-text-secondary);

    background: var(--njn-bg);
    border: 1px solid var(--njn-border);
    border-radius: var(--njn-radius-full);

    font-variant-numeric: tabular-nums;
}

.njn-popup-actions {
    display: flex;
    align-items: center;
    gap: var(--njn-space-xs);
    flex-shrink: 0;
}

.njn-mark-all-read,
.njn-popup-close {
    display: flex;
    align-items: center;
    justify-content: center;

    width: 34px;
    height: 34px;

    background: transparent;
    color: var(--njn-text-secondary);

    border: none;
    border-radius: var(--njn-radius-sm);
    cursor: pointer;

    transition: all var(--njn-transition-fast);
}

.njn-mark-all-read:hover,
.njn-popup-close:hover {
    background: var(--njn-bg-hover);
    color: var(--njn-primary);
    transform: scale(1.05);
}

.njn-mark-all-read:active,
.njn-popup-close:active {
    transform: scale(0.95);
}

.njn-mark-all-read:focus-visible,
.njn-popup-close:focus-visible {
    outline: 2px solid var(--njn-primary);
    outline-offset: 2px;
}

.njn-mark-all-read svg,
.njn-popup-close svg {
    width: 20px;
    height: 20px;
}

/* ============================================
   7. POPUP FILTERS
   ============================================ */

.njn-popup-filters {
    display: flex;
    align-items: center;
    gap: var(--njn-space-xs);

    padding: 10px 16px;

    background: var(--njn-bg-secondary);
    border-bottom: 1px solid var(--njn-border);

    overflow-x: auto;
    overflow-y: hidden;
    flex-shrink: 0;

    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
}

.njn-popup-filters::-webkit-scrollbar {
    display: none;
}

.njn-filter-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;

    padding: 6px 16px;

    font-size: var(--njn-font-size-md);
    font-weight: 500;
    color: var(--njn-text-secondary);
    white-space: nowrap;

    background: transparent;
    border: none;
    border-radius: var(--njn-radius-full);
    cursor: pointer;

    transition: all var(--njn-transition-fast);
}

.njn-filter-btn:hover {
    background: var(--njn-bg-hover);
    color: var(--njn-text);
}

.njn-filter-btn:active {
    transform: scale(0.96);
}

.njn-filter-btn:focus-visible {
    outline: 2px solid var(--njn-primary);
    outline-offset: 2px;
}

.njn-filter-btn.active {
    color: var(--njn-text-inverse);
    background: var(--njn-primary-gradient);
    box-shadow: 0 2px 8px rgba(99, 102, 241, 0.35);
    font-weight: 600;
}

.njn-filter-btn.active:hover {
    transform: scale(1.02);
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.45);
}

/* ============================================
   8. POPUP BODY
   ============================================ */

.njn-popup-body {
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;

    padding: 4px 0;

    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;

    min-height: 100px;
}

.njn-popup-body::-webkit-scrollbar {
    width: 6px;
}

.njn-popup-body::-webkit-scrollbar-track {
    background: transparent;
}

.njn-popup-body::-webkit-scrollbar-thumb {
    background: var(--njn-border);
    border-radius: 3px;
}

.njn-popup-body::-webkit-scrollbar-thumb:hover {
    background: var(--njn-border-hover);
}

/* ============================================
   9. NOTIFICATION ITEMS
   ============================================ */

.nj-notification-item {
    display: flex;
    align-items: flex-start;
    gap: 14px;

    padding: 14px 18px;

    background: transparent;
    border-bottom: 1px solid var(--njn-border);

    cursor: pointer;
    text-decoration: none;
    color: inherit;

    transition: background var(--njn-transition-fast);
    position: relative;
    overflow: hidden;
}

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

.nj-notification-item:hover {
    background: var(--njn-bg-hover);
}

.nj-notification-item:active {
    background: var(--njn-bg-active);
}

.nj-notification-item:focus-visible {
    outline: 2px solid var(--njn-primary);
    outline-offset: -2px;
}

/* ─────────────────────────────────────────
   Unread State
   ───────────────────────────────────────── */

.nj-notification-item.unread {
    background: rgba(99, 102, 241, 0.04);
}

.nj-notification-item.unread::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    bottom: 0;
    width: 3px;
    background: var(--njn-primary-gradient);
    border-radius: 0 3px 3px 0;
}

.nj-notification-item.unread:hover {
    background: rgba(99, 102, 241, 0.08);
}

/* ─────────────────────────────────────────
   Important State
   ───────────────────────────────────────── */

.nj-notification-item.important {
    background: rgba(244, 63, 94, 0.04);
}

.nj-notification-item.important::before {
    background: linear-gradient(135deg, var(--njn-secondary), #dc2626);
}

.nj-notification-item.important:hover {
    background: rgba(244, 63, 94, 0.08);
}

/* ─────────────────────────────────────────
   Saved State
   ───────────────────────────────────────── */

.nj-notification-item.saved {
    background: rgba(245, 158, 11, 0.04);
}

.nj-notification-item.saved:hover {
    background: rgba(245, 158, 11, 0.08);
}

/* ─────────────────────────────────────────
   New State (Pulse)
   ───────────────────────────────────────── */

.nj-notification-item.is-new {
    animation: njn-new-pulse 3s ease-in-out;
}

/* ─────────────────────────────────────────
   Recommendation State
   ───────────────────────────────────────── */

.nj-notification-item.nj-recommendation {
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.03), rgba(139, 92, 246, 0.03));
    border-left: 3px solid var(--njn-primary);
}

.nj-notification-item.nj-recommendation:hover {
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.06), rgba(139, 92, 246, 0.06));
}

.njn-recommendations-divider {
    padding: 12px 18px 8px;
    font-size: var(--njn-font-size-sm);
    font-weight: 700;
    color: var(--njn-primary);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    background: var(--njn-bg-secondary);
    border-top: 1px solid var(--njn-border);
    border-bottom: 1px solid var(--njn-border);
}

/* ─────────────────────────────────────────
   Avatar
   ───────────────────────────────────────── */

.nj-notif-avatar {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;

    width: var(--njn-avatar-size);
    height: var(--njn-avatar-size);

    background: var(--njn-bg-secondary);
    border-radius: 50%;
    overflow: hidden;

    position: relative;
    margin-top: 2px;
}

.nj-notif-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.nj-notif-avatar .nj-notif-icon {
    font-size: 22px;
    line-height: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    background: var(--njn-bg-secondary);
}

/* ─────────────────────────────────────────
   Content
   ───────────────────────────────────────── */

.nj-notif-content {
    flex: 1;
    min-width: 0;
    padding-right: 32px;
}

.nj-notif-header {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 4px;
}

.nj-notif-header .nj-notif-icon {
    font-size: 16px;
    line-height: 1;
    flex-shrink: 0;
}

.nj-notif-title {
    font-size: var(--njn-font-size-lg);
    font-weight: 600;
    color: var(--njn-text);
    line-height: var(--njn-line-height-tight);
    word-break: break-word;
}

.nj-notif-body {
    font-size: var(--njn-font-size-md);
    color: var(--njn-text-secondary);
    line-height: var(--njn-line-height-normal);
    margin-bottom: 4px;
    word-break: break-word;
}

.nj-notif-body a {
    color: inherit;
    text-decoration: none;
}

.nj-notif-body a:hover {
    color: var(--njn-primary);
    text-decoration: underline;
}

.nj-notif-excerpt {
    font-size: var(--njn-font-size-sm);
    color: var(--njn-text-light);
    line-height: var(--njn-line-height-normal);
    margin-top: 4px;

    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
}

.nj-notif-meta {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;

    font-size: var(--njn-font-size-sm);
    color: var(--njn-text-light);
    margin-top: 6px;
}

.nj-author-name {
    font-weight: 500;
    color: var(--njn-text-secondary);
}

.nj-time-ago {
    color: var(--njn-text-light);
    font-style: normal;
}

/* ─────────────────────────────────────────
   Badges
   ───────────────────────────────────────── */

.nj-notif-badge-important,
.nj-notif-badge-saved,
.njn-badge-recommended {
    display: inline-flex;
    align-items: center;

    padding: 2px 10px;

    font-size: var(--njn-font-size-xs);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    line-height: 1.4;

    border-radius: var(--njn-radius-full);
    white-space: nowrap;
}

.nj-notif-badge-important {
    background: rgba(244, 63, 94, 0.12);
    color: var(--njn-secondary);
}

.nj-notif-badge-saved {
    background: rgba(245, 158, 11, 0.12);
    color: var(--njn-warning);
}

.njn-badge-recommended {
    background: rgba(99, 102, 241, 0.12);
    color: var(--njn-primary);
}

/* ─────────────────────────────────────────
   Actions
   ───────────────────────────────────────── */

.nj-notif-actions {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 8px;
}

.nj-notif-actions .btn-primary,
.nj-notif-actions .btn-secondary {
    display: inline-flex;
    align-items: center;
    justify-content: center;

    padding: 5px 14px;

    font-size: var(--njn-font-size-sm);
    font-weight: 600;
    line-height: 1;

    border: none;
    border-radius: var(--njn-radius-full);
    cursor: pointer;
    text-decoration: none;

    transition: all var(--njn-transition-fast);
    white-space: nowrap;
}

.nj-notif-actions .btn-primary {
    color: var(--njn-text-inverse);
    background: var(--njn-primary-gradient);
    box-shadow: 0 2px 6px rgba(99, 102, 241, 0.3);
}

.nj-notif-actions .btn-primary:hover {
    transform: translateY(-1px) scale(1.02);
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.45);
}

.nj-notif-actions .btn-secondary {
    color: var(--njn-text-secondary);
    background: var(--njn-bg-secondary);
    border: 1px solid var(--njn-border);
}

.nj-notif-actions .btn-secondary:hover {
    color: var(--njn-text);
    background: var(--njn-bg-hover);
    border-color: var(--njn-border-hover);
}

/* ─────────────────────────────────────────
   Action Buttons (Save/Hide)
   ───────────────────────────────────────── */

.nj-notif-actions-buttons {
    display: flex;
    flex-direction: column;
    gap: 4px;
    flex-shrink: 0;
    margin-left: auto;
}

.njn-btn-save,
.njn-btn-hide {
    display: inline-flex;
    align-items: center;
    justify-content: center;

    width: 30px;
    height: 30px;

    font-size: 14px;
    line-height: 1;

    background: transparent;
    color: var(--njn-text-light);

    border: none;
    border-radius: 50%;
    cursor: pointer;

    transition: all var(--njn-transition-fast);
}

.njn-btn-save:hover,
.njn-btn-hide:hover {
    background: var(--njn-bg-active);
    color: var(--njn-text);
    transform: scale(1.1);
}

.njn-btn-save:active,
.njn-btn-hide:active {
    transform: scale(0.9);
}

.njn-btn-save:focus-visible,
.njn-btn-hide:focus-visible {
    outline: 2px solid var(--njn-primary);
    outline-offset: 2px;
}

.njn-btn-save.saved {
    color: var(--njn-warning);
    background: rgba(245, 158, 11, 0.12);
    animation: njn-save-bounce 400ms var(--njn-transition-bounce);
}

.njn-btn-hide:hover {
    color: var(--njn-error);
    background: rgba(239, 68, 68, 0.1);
}

/* ============================================
   10. LIST WRAPPER (Inline)
   ============================================ */

.njn-list-wrapper {
    display: block;
    position: relative;
    background: var(--njn-bg);
    border: 1px solid var(--njn-border);
    border-radius: var(--njn-radius-lg);
    box-shadow: var(--njn-shadow-md);
    overflow: hidden;
    margin: var(--njn-space-lg) 0;
}

.njn-list-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--njn-space-md);

    padding: 14px 18px;

    background: var(--njn-bg-secondary);
    border-bottom: 1px solid var(--njn-border);
}

.njn-list-title {
    font-size: var(--njn-font-size-2xl);
    font-weight: 700;
    color: var(--njn-text);
}

.njn-list-unread-count {
    display: inline-flex;
    align-items: center;
    padding: 2px 12px;

    font-size: var(--njn-font-size-sm);
    font-weight: 700;
    color: var(--njn-text-inverse);

    background: var(--njn-primary-gradient);
    border-radius: var(--njn-radius-full);
    box-shadow: 0 2px 8px rgba(99, 102, 241, 0.3);
}

.njn-list-body {
    display: flex;
    flex-direction: column;
    max-height: 600px;
    overflow-y: auto;
}

.njn-list-body::-webkit-scrollbar {
    width: 6px;
}

.njn-list-body::-webkit-scrollbar-track {
    background: transparent;
}

.njn-list-body::-webkit-scrollbar-thumb {
    background: var(--njn-border);
    border-radius: 3px;
}

.njn-list-footer {
    display: flex;
    align-items: center;
    justify-content: center;

    padding: 12px;

    background: var(--njn-bg-secondary);
    border-top: 1px solid var(--njn-border);
}

.njn-load-more-btn {
    padding: 8px 24px;

    font-size: var(--njn-font-size-lg);
    font-weight: 600;
    color: var(--njn-text-inverse);

    background: var(--njn-primary-gradient);
    border: none;
    border-radius: var(--njn-radius-full);
    cursor: pointer;

    box-shadow: 0 2px 8px rgba(99, 102, 241, 0.3);

    transition: all var(--njn-transition-fast);
}

.njn-load-more-btn:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(99, 102, 241, 0.4);
}

.njn-load-more-btn:disabled {
    opacity: 0.6;
    cursor: wait;
}

/* ============================================
   11. PREFERENCES WRAPPER
   ============================================ */

.njn-prefs-wrapper {
    display: block;
    background: var(--njn-bg);
    border: 1px solid var(--njn-border);
    border-radius: var(--njn-radius-lg);
    padding: 24px;
    margin: var(--njn-space-lg) 0;
    box-shadow: var(--njn-shadow-md);
}

.njn-prefs-title {
    margin: 0 0 20px 0;
    font-size: var(--njn-font-size-3xl);
    font-weight: 700;
    color: var(--njn-text);
    padding-bottom: 12px;
    border-bottom: 1px solid var(--njn-border);
}

.njn-prefs-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 20px;
}

.njn-prefs-item {
    display: flex;
    align-items: center;
    gap: 12px;

    padding: 12px 16px;

    background: var(--njn-bg-secondary);
    border: 1px solid var(--njn-border);
    border-radius: var(--njn-radius-md);
    cursor: pointer;

    transition: all var(--njn-transition-fast);
}

.njn-prefs-item:hover {
    background: var(--njn-bg-hover);
    border-color: var(--njn-border-hover);
    transform: translateX(4px);
}

.njn-pref-checkbox {
    width: 20px;
    height: 20px;
    cursor: pointer;
    accent-color: var(--njn-primary);
    flex-shrink: 0;
}

.njn-prefs-label {
    font-size: var(--njn-font-size-lg);
    font-weight: 500;
    color: var(--njn-text);
    cursor: pointer;
    user-select: none;
}

.njn-prefs-actions {
    display: flex;
    align-items: center;
    gap: 16px;
    padding-top: 8px;
}

.njn-prefs-save {
    padding: 10px 24px;

    font-size: var(--njn-font-size-lg);
    font-weight: 600;
    color: var(--njn-text-inverse);

    background: var(--njn-primary-gradient);
    border: none;
    border-radius: var(--njn-radius-full);
    cursor: pointer;

    box-shadow: 0 2px 8px rgba(99, 102, 241, 0.3);

    transition: all var(--njn-transition-fast);
}

.njn-prefs-save:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(99, 102, 241, 0.4);
}

.njn-prefs-save:disabled {
    opacity: 0.6;
    cursor: wait;
}

.njn-prefs-status {
    font-size: var(--njn-font-size-lg);
    font-weight: 500;
    transition: color var(--njn-transition-fast);
}

.njn-prefs-status.njn-status-success {
    color: var(--njn-success);
}

.njn-prefs-status.njn-status-error {
    color: var(--njn-error);
}

/* ============================================
   12. SKELETON LOADER
   ============================================ */

.njn-skeleton-list {
    padding: 0;
}

.njn-skeleton-item {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    padding: 14px 18px;
    border-bottom: 1px solid var(--njn-border);
}

.njn-skeleton-item:last-child {
    border-bottom: none;
}

.njn-skeleton-avatar {
    flex-shrink: 0;
    width: var(--njn-avatar-size);
    height: var(--njn-avatar-size);
    background: linear-gradient(
        90deg,
        var(--njn-bg-secondary) 0%,
        var(--njn-bg-hover) 50%,
        var(--njn-bg-secondary) 100%
    );
    background-size: 200% 100%;
    border-radius: 50%;
    animation: njn-skeleton-shimmer 1.5s ease-in-out infinite;
}

.njn-skeleton-content {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding-top: 4px;
}

.njn-skeleton-line {
    height: 12px;
    background: linear-gradient(
        90deg,
        var(--njn-bg-secondary) 0%,
        var(--njn-bg-hover) 50%,
        var(--njn-bg-secondary) 100%
    );
    background-size: 200% 100%;
    border-radius: 6px;
    animation: njn-skeleton-shimmer 1.5s ease-in-out infinite;
}

.njn-skeleton-line-1 {
    width: 60%;
    height: 14px;
}

.njn-skeleton-line-2 {
    width: 100%;
}

.njn-skeleton-line-3 {
    width: 80%;
}

/* ============================================
   13. EMPTY / ERROR STATES
   ============================================ */

.njn-notif-empty,
.njn-notif-error {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 60px 20px;
    text-align: center;
}

.njn-notif-empty-icon,
.njn-notif-error-icon {
    font-size: 56px;
    line-height: 1;
    opacity: 0.6;
    animation: njn-float 3s ease-in-out infinite;
}

.njn-notif-empty-title,
.njn-notif-error-title {
    font-size: var(--njn-font-size-2xl);
    font-weight: 700;
    color: var(--njn-text);
    margin: 0;
}

.njn-notif-empty-text,
.njn-notif-error-text {
    font-size: var(--njn-font-size-lg);
    color: var(--njn-text-secondary);
    max-width: 280px;
    line-height: var(--njn-line-height-relaxed);
    margin: 0;
}

.njn-retry-btn {
    margin-top: 8px;
    padding: 8px 20px;
    font-size: var(--njn-font-size-lg);
    font-weight: 600;
    color: var(--njn-text-inverse);
    background: var(--njn-primary-gradient);
    border: none;
    border-radius: var(--njn-radius-full);
    cursor: pointer;
    transition: all var(--njn-transition-fast);
}

.njn-retry-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(99, 102, 241, 0.4);
}

/* ============================================
   14. TOAST NOTIFICATIONS
   ============================================ */

.njn-toast-container {
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    z-index: var(--njn-z-toast);

    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;

    pointer-events: none;
    width: auto;
    max-width: 90vw;
}

.njn-toast {
    padding: 12px 24px;
    font-size: var(--njn-font-size-lg);
    font-weight: 500;
    color: var(--njn-text-inverse);
    background: #323232;
    border-radius: var(--njn-radius-md);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.25);

    max-width: 320px;
    text-align: center;
    word-break: break-word;
    pointer-events: auto;
}

.njn-toast-success { background: var(--njn-success); }
.njn-toast-error   { background: var(--njn-error); }
.njn-toast-warning { background: var(--njn-warning); }
.njn-toast-info    { background: var(--njn-info); }

/* ============================================
   15. ANIMATIONS
   ============================================ */

/* ─────────────────────────────────────────
   Ripple
   ───────────────────────────────────────── */

@keyframes njn-ripple {
    0% {
        transform: scale(1);
        opacity: 1;
    }
    100% {
        transform: scale(1.4);
        opacity: 0;
    }
}

/* ─────────────────────────────────────────
   Bell Ring
   ───────────────────────────────────────── */

@keyframes njn-bell-ring {
    0%, 100% { transform: rotate(0); }
    5%       { transform: rotate(12deg); }
    10%      { transform: rotate(-12deg); }
    15%      { transform: rotate(8deg); }
    20%      { transform: rotate(-8deg); }
    25%      { transform: rotate(4deg); }
    30%      { transform: rotate(-4deg); }
    35%      { transform: rotate(0); }
}

/* ─────────────────────────────────────────
   Badge Pop
   ───────────────────────────────────────── */

@keyframes njn-badge-pop {
    0%   { transform: scale(0); opacity: 0; }
    60%  { transform: scale(1.25); opacity: 1; }
    100% { transform: scale(1); opacity: 1; }
}

/* ─────────────────────────────────────────
   Shake
   ───────────────────────────────────────── */

@keyframes njn-shake {
    0%, 100% { transform: translateX(0) rotate(0); }
    10%      { transform: translateX(-4px) rotate(-3deg); }
    20%      { transform: translateX(4px) rotate(3deg); }
    30%      { transform: translateX(-4px) rotate(-3deg); }
    40%      { transform: translateX(4px) rotate(3deg); }
    50%      { transform: translateX(-2px) rotate(-2deg); }
    60%      { transform: translateX(2px) rotate(2deg); }
    70%      { transform: translateX(-1px) rotate(-1deg); }
    80%      { transform: translateX(1px) rotate(1deg); }
    90%      { transform: translateX(0) rotate(0); }
}

.njn-shake {
    animation: njn-shake 600ms ease-in-out;
}

/* ─────────────────────────────────────────
   Save Bounce
   ───────────────────────────────────────── */

@keyframes njn-save-bounce {
    0%   { transform: scale(1); }
    50%  { transform: scale(1.3) rotate(-10deg); }
    100% { transform: scale(1); }
}

/* ─────────────────────────────────────────
   New Pulse
   ───────────────────────────────────────── */

@keyframes njn-new-pulse {
    0%   { box-shadow: inset 0 0 0 0 rgba(99, 102, 241, 0.3); }
    50%  { box-shadow: inset 0 0 20px 4px rgba(99, 102, 241, 0.15); }
    100% { box-shadow: inset 0 0 0 0 rgba(99, 102, 241, 0); }
}

/* ─────────────────────────────────────────
   Skeleton Shimmer
   ───────────────────────────────────────── */

@keyframes njn-skeleton-shimmer {
    0%   { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

/* ─────────────────────────────────────────
   Float (icon animation)
   ───────────────────────────────────────── */

@keyframes njn-float {
    0%, 100% { transform: translateY(0); }
    50%      { transform: translateY(-6px); }
}

/* ============================================
   16. RESPONSIVE
   ============================================ */

@media (max-width: 640px) {
    .njn-bell-wrapper {
        --njn-popup-width: 100vw;
        --njn-popup-max-height: 78vh;
        --njn-bell-size: 44px;
        --njn-bell-icon-size: 24px;
    }

    .njn-bell-popup {
        position: fixed;
        top: auto;
        bottom: 0;
        left: 0;
        right: 0;

        width: 100%;
        max-width: 100%;
        border-radius: var(--njn-radius-xl) var(--njn-radius-xl) 0 0;

        transform: translateY(100%);
        transform-origin: bottom center;

        border-bottom: none;
        box-shadow: 0 -10px 40px rgba(0, 0, 0, 0.2);
    }

    .njn-bell-popup.active {
        transform: translateY(0);
    }

    /* Drag handle indicator */
    .njn-bell-popup::before {
        content: '';
        position: absolute;
        top: 8px;
        left: 50%;
        transform: translateX(-50%);
        width: 40px;
        height: 4px;
        background: var(--njn-border);
        border-radius: 2px;
    }

    .njn-popup-header {
        padding: 20px 20px 14px;
    }

    .njn-popup-body {
        max-height: 55vh;
    }

    .nj-notification-item {
        padding: 12px 16px;
        gap: 12px;
    }

    .nj-notif-avatar {
        --njn-avatar-size: 42px;
        width: 42px;
        height: 42px;
    }

    .nj-notif-title {
        font-size: var(--njn-font-size-md);
    }

    .nj-notif-body {
        font-size: var(--njn-font-size-sm);
    }

    .njn-bell-wrapper.njn-bell-fixed {
        bottom: 20px;
        right: 20px;
    }

    .njn-toast-container {
        bottom: 90px;
    }

    .njn-list-wrapper {
        border-radius: var(--njn-radius-md);
        margin: var(--njn-space-md) 0;
    }

    .njn-list-body {
        max-height: 400px;
    }

    .njn-prefs-wrapper {
        padding: 16px;
    }

    .njn-prefs-title {
        font-size: var(--njn-font-size-2xl);
    }

    .njn-prefs-item {
        padding: 10px 14px;
    }
}

@media (max-width: 380px) {
    .njn-popup-title {
        font-size: var(--njn-font-size-xl);
    }

    .njn-popup-title-section {
        gap: 8px;
    }

    .njn-filter-btn {
        padding: 5px 12px;
        font-size: var(--njn-font-size-sm);
    }

    .nj-notif-actions .btn-primary,
    .nj-notif-actions .btn-secondary {
        font-size: 11px;
        padding: 4px 10px;
    }
}

/* ============================================
   17. DARK MODE
   ============================================ */

@media (prefers-color-scheme: dark) {
    .njn-bell-wrapper,
    .njn-list-wrapper,
    .njn-prefs-wrapper {
        --njn-text: #e8e8e8;
        --njn-text-secondary: #9ca3af;
        --njn-text-light: #6b7280;
        --njn-text-inverse: #0f0f0f;

        --njn-bg: #1a1a2e;
        --njn-bg-secondary: #14142a;
        --njn-bg-hover: #1f1f3a;
        --njn-bg-active: #262640;

        --njn-border: rgba(255, 255, 255, 0.06);
        --njn-border-hover: rgba(255, 255, 255, 0.1);
        --njn-border-active: rgba(255, 255, 255, 0.15);

        --njn-shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.3);
        --njn-shadow-md: 0 4px 12px rgba(0, 0, 0, 0.4);
        --njn-shadow-lg: 0 10px 40px rgba(0, 0, 0, 0.5);
        --njn-shadow-xl: 0 20px 60px rgba(0, 0, 0, 0.6);
    }

    .njn-bell-badge {
        border-color: var(--njn-bg);
    }

    .nj-notification-item.unread {
        background: rgba(99, 102, 241, 0.08);
    }

    .nj-notification-item.unread:hover {
        background: rgba(99, 102, 241, 0.12);
    }

    .nj-notification-item.important {
        background: rgba(244, 63, 94, 0.08);
    }

    .nj-notification-item.important:hover {
        background: rgba(244, 63, 94, 0.12);
    }

    .nj-notification-item.saved {
        background: rgba(245, 158, 11, 0.08);
    }

    .njn-skeleton-avatar,
    .njn-skeleton-line {
        background: linear-gradient(
            90deg,
            rgba(255, 255, 255, 0.03) 0%,
            rgba(255, 255, 255, 0.08) 50%,
            rgba(255, 255, 255, 0.03) 100%
        );
        background-size: 200% 100%;
    }

    .njn-toast {
        background: #2d2d3f;
    }

    .njn-prefs-item {
        background: #14142a;
    }

    .njn-prefs-item:hover {
        background: #1f1f3a;
    }
}

/* Manual dark mode (via wrapper class) */
.njn-theme-dark {
    --njn-text: #e8e8e8;
    --njn-text-secondary: #9ca3af;
    --njn-text-light: #6b7280;
    --njn-text-inverse: #0f0f0f;
    --njn-bg: #1a1a2e;
    --njn-bg-secondary: #14142a;
    --njn-bg-hover: #1f1f3a;
    --njn-bg-active: #262640;
    --njn-border: rgba(255, 255, 255, 0.06);
    --njn-border-hover: rgba(255, 255, 255, 0.1);
}

/* Manual light mode (via wrapper class) */
.njn-theme-light {
    --njn-text: #0f0f0f;
    --njn-text-secondary: #6b7280;
    --njn-text-light: #9ca3af;
    --njn-text-inverse: #ffffff;
    --njn-bg: #ffffff;
    --njn-bg-secondary: #f8fafc;
    --njn-bg-hover: #f1f5f9;
    --njn-bg-active: #e2e8f0;
    --njn-border: #e5e7eb;
    --njn-border-hover: #d1d5db;
}

/* ============================================
   18. RTL SUPPORT
   ============================================ */

[dir="rtl"] .njn-bell-wrapper,
.njn-bell-wrapper[dir="rtl"] {
    direction: rtl;
}

[dir="rtl"] .nj-notification-item.unread::before {
    left: auto;
    right: 0;
    border-radius: 3px 0 0 3px;
}

[dir="rtl"] .nj-notif-content {
    padding-right: 0;
    padding-left: 32px;
}

[dir="rtl"] .njn-bell-badge {
    right: auto;
    left: -3px;
}

[dir="rtl"] .njn-bell-popup {
    right: auto;
    left: 0;
    transform-origin: top left;
}

[dir="rtl"] .nj-notif-actions-buttons {
    margin-left: 0;
    margin-right: auto;
}

[dir="rtl"] .njn-bell-wrapper.njn-bell-fixed {
    right: auto;
    left: 30px;
}

[dir="rtl"] .njn-prefs-item:hover {
    transform: translateX(-4px);
}

/* ============================================
   19. ACCESSIBILITY
   ============================================ */

.njn-bell-wrapper *:focus-visible,
.njn-list-wrapper *:focus-visible,
.njn-prefs-wrapper *:focus-visible {
    outline: 3px solid var(--njn-primary);
    outline-offset: 2px;
    border-radius: var(--njn-radius-xs);
}

/* High contrast mode */
@media (prefers-contrast: high) {
    .njn-bell-wrapper,
    .njn-list-wrapper,
    .njn-prefs-wrapper {
        --njn-border: #000000;
        --njn-text: #000000;
    }

    .nj-notification-item {
        border-bottom-width: 2px;
    }

    .njn-filter-btn.active {
        border: 2px solid var(--njn-text);
    }
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
    .njn-bell-wrapper *,
    .njn-bell-wrapper *::before,
    .njn-bell-wrapper *::after,
    .njn-list-wrapper *,
    .njn-list-wrapper *::before,
    .njn-list-wrapper *::after,
    .njn-prefs-wrapper *,
    .njn-prefs-wrapper *::before,
    .njn-prefs-wrapper *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }

    .njn-bell-icon svg {
        animation: none !important;
    }

    .njn-bell-ripple {
        display: none !important;
    }

    .njn-bell-popup {
        transition: none !important;
    }

    .njn-bell-popup.active {
        transform: none !important;
    }

    .njn-prefs-item:hover {
        transform: none !important;
    }
}

/* ============================================
   20. PRINT
   ============================================ */

@media print {
    .njn-bell-wrapper,
    .njn-toast-container,
    .njn-bell-popup,
    .njn-bell-trigger,
    .njn-list-wrapper,
    .njn-prefs-wrapper {
        display: none !important;
    }
}

/* ============================================
   END OF FILE
   ============================================ */