/**
 * File: bell.css
 * Description: Ultimate Notification Bell UI - YouTube-এর চেয়েও উন্নত, Fully Responsive
 * Version: 15.0.0 (FINAL - YouTube-Inspired Premium UI, All Devices, Dark/Light)
 *
 * ═══════════════════════════════════════════════════════════
 * DESIGN PHILOSOPHY
 * ═══════════════════════════════════════════════════════════
 *
 * - YouTube-এর চেয়েও উন্নত ডিজাইন
 * - Scoped CSS (no global pollution)
 * - Mobile-first responsive (320px → 4K)
 * - Fluid typography (clamp)
 * - Dark mode + Light mode support
 * - RTL support (Bengali, Hindi, Arabic)
 * - Accessibility (ARIA, focus, contrast)
 * - Micro-interactions (hover, active, focus)
 * - Bottom-sheet on mobile (like YouTube)
 * - Dropdown on desktop (like YouTube)
 * - Skeleton loader
 * - Rich notification card (avatar, thumbnail, title, message, time)
 *
 * ═══════════════════════════════════════════════════════════
 * PREFIX: nfs-*
 * ═══════════════════════════════════════════════════════════
 *
 * @package NajibulBell
 * @version 15.0.0
 */

/* ============================================
   1. CSS VARIABLES (Light Mode Default)
   ============================================ */

.nfs-bell-wrapper {
    /* ─────────────────────────────────────────
       Brand Colors
       ───────────────────────────────────────── */
    --nfs-primary: #6366f1;
    --nfs-primary-hover: #4f46e5;
    --nfs-primary-light: #818cf8;
    --nfs-primary-gradient: linear-gradient(135deg, #6366f1 0%, #8b5cf6 50%, #a855f7 100%);
    --nfs-secondary: #f43f5e;
    --nfs-accent: #06b6d4;

    /* ─────────────────────────────────────────
       State Colors
       ───────────────────────────────────────── */
    --nfs-success: #22c55e;
    --nfs-warning: #f59e0b;
    --nfs-error: #ef4444;
    --nfs-info: #3b82f6;

    /* ─────────────────────────────────────────
       Neutral — Light Mode
       ───────────────────────────────────────── */
    --nfs-text-primary: #0f0f0f;
    --nfs-text-secondary: #606060;
    --nfs-text-tertiary: #909090;
    --nfs-text-inverse: #ffffff;

    --nfs-bg-primary: #ffffff;
    --nfs-bg-secondary: #f9f9f9;
    --nfs-bg-tertiary: #f2f2f2;
    --nfs-bg-hover: #f2f2f2;
    --nfs-bg-active: #e5e5e5;
    --nfs-bg-overlay: rgba(0, 0, 0, 0.5);
    --nfs-bg-skeleton: #e5e5e5;
    --nfs-bg-skeleton-shine: #f5f5f5;

    --nfs-border: #e5e5e5;
    --nfs-border-hover: #d1d1d1;
    --nfs-border-focus: var(--nfs-primary);

    /* ─────────────────────────────────────────
       Notification Specific
       ───────────────────────────────────────── */
    --nfs-unread-bg: #f0f4ff;
    --nfs-unread-border: #6366f1;
    --nfs-important-bg: #fef2f2;
    --nfs-saved-bg: #fffbeb;
    --nfs-badge-bg: #cc0000;
    --nfs-badge-text: #ffffff;

    /* ─────────────────────────────────────────
       Shadows
       ───────────────────────────────────────── */
    --nfs-shadow-xs: 0 1px 2px rgba(0, 0, 0, 0.06);
    --nfs-shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.1);
    --nfs-shadow-md: 0 4px 12px rgba(0, 0, 0, 0.1);
    --nfs-shadow-lg: 0 8px 24px rgba(0, 0, 0, 0.15);
    --nfs-shadow-xl: 0 20px 60px rgba(0, 0, 0, 0.2);
    --nfs-shadow-focus: 0 0 0 3px rgba(99, 102, 241, 0.3);

    /* ─────────────────────────────────────────
       Radius
       ───────────────────────────────────────── */
    --nfs-radius-xs: 4px;
    --nfs-radius-sm: 8px;
    --nfs-radius-md: 12px;
    --nfs-radius-lg: 16px;
    --nfs-radius-xl: 20px;
    --nfs-radius-full: 9999px;

    /* ─────────────────────────────────────────
       Fluid Typography
       ───────────────────────────────────────── */
    --nfs-font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
                       "Helvetica Neue", Arial, "Noto Sans", "Noto Sans Bengali",
                       "Noto Sans Devanagari", sans-serif;

    --nfs-font-xs: clamp(10px, 2.4vw, 11px);
    --nfs-font-sm: clamp(11px, 2.6vw, 12px);
    --nfs-font-md: clamp(12px, 2.8vw, 13px);
    --nfs-font-lg: clamp(13px, 3vw, 14px);
    --nfs-font-xl: clamp(15px, 3.4vw, 17px);
    --nfs-font-2xl: clamp(17px, 3.8vw, 19px);
    --nfs-font-3xl: clamp(19px, 4.2vw, 22px);

    /* ─────────────────────────────────────────
       Fluid Sizing
       ───────────────────────────────────────── */
    --nfs-bell-size: clamp(40px, 10vw, 44px);
    --nfs-icon-size: clamp(20px, 5vw, 24px);
    --nfs-badge-size: clamp(18px, 4.5vw, 20px);
    --nfs-avatar-size: clamp(40px, 10vw, 48px);
    --nfs-thumb-size: clamp(56px, 14vw, 72px);

    /* ─────────────────────────────────────────
       Transitions
       ───────────────────────────────────────── */
    --nfs-ease-fast: 120ms cubic-bezier(0.4, 0, 0.2, 1);
    --nfs-ease-normal: 200ms cubic-bezier(0.4, 0, 0.2, 1);
    --nfs-ease-slow: 320ms cubic-bezier(0.4, 0, 0.2, 1);
    --nfs-ease-bounce: 400ms cubic-bezier(0.34, 1.56, 0.64, 1);

    /* ─────────────────────────────────────────
       Z-Index
       ───────────────────────────────────────── */
    --nfs-z-wrapper: 9998;
    --nfs-z-popup: 9999;
    --nfs-z-toast: 2147483647;

    /* ─────────────────────────────────────────
       Safe Area
       ───────────────────────────────────────── */
    --nfs-safe-bottom: env(safe-area-inset-bottom, 0px);
    --nfs-safe-top: env(safe-area-inset-top, 0px);

    /* ─────────────────────────────────────────
       Base Styles
       ───────────────────────────────────────── */
    display: inline-block;
    position: relative;
    vertical-align: middle;
    font-family: var(--nfs-font-family);
    font-size: var(--nfs-font-lg);
    line-height: 1.5;
    color: var(--nfs-text-primary);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    z-index: var(--nfs-z-wrapper);
    contain: layout style;
}

/* Fixed position variant */
.nfs-bell-wrapper.nfs-bell-fixed {
    position: fixed;
    bottom: calc(24px + var(--nfs-safe-bottom));
    right: 24px;
    z-index: var(--nfs-z-popup);
}

/* ============================================
   2. DARK MODE (Auto)
   ============================================ */

@media (prefers-color-scheme: dark) {
    .nfs-bell-wrapper:not(.nfs-theme-light) {
        --nfs-text-primary: #f1f1f1;
        --nfs-text-secondary: #aaaaaa;
        --nfs-text-tertiary: #717171;
        --nfs-text-inverse: #0f0f0f;

        --nfs-bg-primary: #212121;
        --nfs-bg-secondary: #181818;
        --nfs-bg-tertiary: #2a2a2a;
        --nfs-bg-hover: #2f2f2f;
        --nfs-bg-active: #3a3a3a;
        --nfs-bg-overlay: rgba(0, 0, 0, 0.75);
        --nfs-bg-skeleton: #2a2a2a;
        --nfs-bg-skeleton-shine: #3a3a3a;

        --nfs-border: #303030;
        --nfs-border-hover: #404040;

        --nfs-unread-bg: #1a1f3a;
        --nfs-important-bg: #2a1515;
        --nfs-saved-bg: #2a2010;

        --nfs-shadow-xs: 0 1px 2px rgba(0, 0, 0, 0.3);
        --nfs-shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.4);
        --nfs-shadow-md: 0 4px 12px rgba(0, 0, 0, 0.5);
        --nfs-shadow-lg: 0 8px 24px rgba(0, 0, 0, 0.6);
        --nfs-shadow-xl: 0 20px 60px rgba(0, 0, 0, 0.7);
    }
}

/* Manual dark theme */
.nfs-bell-wrapper.nfs-theme-dark {
    --nfs-text-primary: #f1f1f1;
    --nfs-text-secondary: #aaaaaa;
    --nfs-text-tertiary: #717171;
    --nfs-text-inverse: #0f0f0f;
    --nfs-bg-primary: #212121;
    --nfs-bg-secondary: #181818;
    --nfs-bg-tertiary: #2a2a2a;
    --nfs-bg-hover: #2f2f2f;
    --nfs-bg-active: #3a3a3a;
    --nfs-bg-overlay: rgba(0, 0, 0, 0.75);
    --nfs-bg-skeleton: #2a2a2a;
    --nfs-bg-skeleton-shine: #3a3a3a;
    --nfs-border: #303030;
    --nfs-border-hover: #404040;
    --nfs-unread-bg: #1a1f3a;
    --nfs-important-bg: #2a1515;
    --nfs-saved-bg: #2a2010;
}

/* ============================================
   3. RESET
   ============================================ */

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

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

.nfs-bell-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;
    -webkit-appearance: none;
    appearance: none;
}

.nfs-bell-wrapper a {
    color: inherit;
    text-decoration: none;
}

.nfs-bell-wrapper svg {
    display: block;
    flex-shrink: 0;
}

/* ============================================
   4. BELL TRIGGER BUTTON
   ============================================ */

.nfs-bell-trigger {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    position: relative;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 4px;
    min-width: 44px;
    min-height: 44px;
    border-radius: var(--nfs-radius-full);
    transition: background var(--nfs-ease-fast);
}

.nfs-bell-trigger:hover {
    background: var(--nfs-bg-hover);
}

.nfs-bell-trigger:active {
    background: var(--nfs-bg-active);
    transform: scale(0.94);
}

.nfs-bell-trigger:focus-visible {
    outline: none;
    box-shadow: var(--nfs-shadow-focus);
}

/* ─────────────────────────────────────────
   Icon Container
   ───────────────────────────────────────── */

.nfs-bell-icon-wrapper {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    width: var(--nfs-bell-size);
    height: var(--nfs-bell-size);
    border-radius: 50%;
    background: var(--nfs-bg-secondary);
    transition: background var(--nfs-ease-fast);
}

.nfs-bell-trigger:hover .nfs-bell-icon-wrapper {
    background: var(--nfs-bg-tertiary);
}

.nfs-bell-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: var(--nfs-icon-size);
    height: var(--nfs-icon-size);
    color: var(--nfs-text-primary);
    transition: color var(--nfs-ease-fast), transform var(--nfs-ease-normal);
    position: relative;
}

.nfs-bell-icon svg {
    width: 100%;
    height: 100%;
    stroke: currentColor;
    fill: none;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

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

/* Bell with notifications — subtle ring animation */
.nfs-bell-icon.has-notifications svg {
    animation: nfs-bell-ring 3s ease-in-out infinite;
}

/* ─────────────────────────────────────────
   Badge Counter (YouTube-style)
   ───────────────────────────────────────── */

.nfs-bell-badge {
    position: absolute;
    top: -2px;
    right: -2px;
    min-width: var(--nfs-badge-size);
    height: var(--nfs-badge-size);
    padding: 0 5px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: var(--nfs-font-xs);
    font-weight: 700;
    line-height: 1;
    color: var(--nfs-badge-text);
    background: var(--nfs-badge-bg);
    border: 2px solid var(--nfs-bg-primary);
    border-radius: var(--nfs-radius-full);
    letter-spacing: -0.02em;
    font-variant-numeric: tabular-nums;
    transform: scale(0);
    opacity: 0;
    transition: transform var(--nfs-ease-bounce), opacity var(--nfs-ease-fast);
    pointer-events: none;
    z-index: 2;
}

.nfs-bell-badge.active {
    transform: scale(1);
    opacity: 1;
}

/* ============================================
   5. BELL LABEL (Optional)
   ============================================ */

.nfs-bell-label {
    display: none;
    font-size: var(--nfs-font-lg);
    font-weight: 500;
    color: var(--nfs-text-primary);
    white-space: nowrap;
    transition: color var(--nfs-ease-fast);
}

@media (min-width: 768px) {
    .nfs-bell-label {
        display: inline-block;
    }
}

/* ============================================
   6. POPUP PANEL (Common)
   ============================================ */

.nfs-bell-popup {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    width: min(420px, calc(100vw - 32px));
    max-height: min(640px, calc(100vh - 100px));
    display: flex;
    flex-direction: column;
    background: var(--nfs-bg-primary);
    border: 1px solid var(--nfs-border);
    border-radius: var(--nfs-radius-lg);
    box-shadow: var(--nfs-shadow-xl);
    overflow: hidden;
    z-index: var(--nfs-z-popup);
    opacity: 0;
    transform: translateY(-8px) scale(0.98);
    transform-origin: top right;
    pointer-events: none;
    transition: opacity var(--nfs-ease-normal), transform var(--nfs-ease-normal);
}

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

/* ============================================
   7. POPUP HEADER
   ============================================ */

.nfs-popup-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 16px 18px 12px;
    border-bottom: 1px solid var(--nfs-border);
    flex-shrink: 0;
    background: var(--nfs-bg-primary);
}

.nfs-popup-title-section {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
}

.nfs-popup-title {
    font-size: var(--nfs-font-3xl);
    font-weight: 600;
    color: var(--nfs-text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin: 0;
    line-height: 1.2;
}

.nfs-popup-count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 22px;
    height: 22px;
    padding: 0 8px;
    font-size: var(--nfs-font-sm);
    font-weight: 600;
    color: var(--nfs-text-inverse);
    background: var(--nfs-badge-bg);
    border-radius: var(--nfs-radius-full);
    font-variant-numeric: tabular-nums;
    line-height: 1;
}

.nfs-popup-actions {
    display: flex;
    align-items: center;
    gap: 4px;
    flex-shrink: 0;
}

.nfs-mark-all-read,
.nfs-popup-close {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    padding: 0;
    color: var(--nfs-text-secondary);
    background: transparent;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    transition: background var(--nfs-ease-fast), color var(--nfs-ease-fast);
}

.nfs-mark-all-read:hover,
.nfs-popup-close:hover {
    background: var(--nfs-bg-hover);
    color: var(--nfs-text-primary);
}

.nfs-mark-all-read:active,
.nfs-popup-close:active {
    background: var(--nfs-bg-active);
    transform: scale(0.94);
}

.nfs-mark-all-read:focus-visible,
.nfs-popup-close:focus-visible {
    outline: none;
    box-shadow: var(--nfs-shadow-focus);
}

.nfs-mark-all-read svg,
.nfs-popup-close svg {
    width: 20px;
    height: 20px;
    stroke: currentColor;
    fill: none;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

/* ============================================
   8. POPUP FILTERS (YouTube-style chips)
   ============================================ */

.nfs-popup-filters {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 16px;
    border-bottom: 1px solid var(--nfs-border);
    flex-shrink: 0;
    overflow-x: auto;
    overflow-y: hidden;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
    background: var(--nfs-bg-primary);
}

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

.nfs-filter-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 6px 14px;
    font-size: var(--nfs-font-md);
    font-weight: 500;
    color: var(--nfs-text-primary);
    background: var(--nfs-bg-tertiary);
    border: none;
    border-radius: var(--nfs-radius-full);
    cursor: pointer;
    white-space: nowrap;
    transition: background var(--nfs-ease-fast), color var(--nfs-ease-fast), transform var(--nfs-ease-fast);
    min-height: 32px;
    line-height: 1;
}

.nfs-filter-btn:hover {
    background: var(--nfs-bg-hover);
}

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

.nfs-filter-btn:focus-visible {
    outline: none;
    box-shadow: var(--nfs-shadow-focus);
}

.nfs-filter-btn.active {
    color: var(--nfs-text-inverse);
    background: var(--nfs-text-primary);
    font-weight: 600;
}

/* ============================================
   9. POPUP BODY
   ============================================ */

.nfs-popup-body {
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
    min-height: 120px;
    -webkit-overflow-scrolling: touch;
    scroll-behavior: smooth;
    background: var(--nfs-bg-primary);
}

.nfs-popup-body::-webkit-scrollbar {
    width: 8px;
}

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

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

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

/* ============================================
   10. POPUP FOOTER
   ============================================ */

.nfs-popup-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 10px 16px;
    border-top: 1px solid var(--nfs-border);
    flex-shrink: 0;
    font-size: var(--nfs-font-sm);
    background: var(--nfs-bg-primary);
}

.nfs-footer-status {
    flex: 1;
    min-width: 0;
    color: var(--nfs-text-secondary);
    font-weight: 500;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.nfs-load-more {
    padding: 6px 16px;
    font-size: var(--nfs-font-sm);
    font-weight: 600;
    color: var(--nfs-text-inverse);
    background: var(--nfs-text-primary);
    border: none;
    border-radius: var(--nfs-radius-full);
    cursor: pointer;
    white-space: nowrap;
    transition: background var(--nfs-ease-fast), transform var(--nfs-ease-fast);
}

.nfs-load-more:hover {
    background: var(--nfs-primary);
    transform: scale(1.02);
}

.nfs-load-more:active {
    transform: scale(0.96);
}

.nfs-load-more:focus-visible {
    outline: none;
    box-shadow: var(--nfs-shadow-focus);
}

/* ============================================
   11. NOTIFICATION ITEM (YouTube-style card)
   ============================================ */

.nfs-notification-item {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 12px 16px;
    background: transparent;
    border: none;
    border-bottom: 1px solid var(--nfs-border);
    cursor: pointer;
    text-decoration: none;
    color: inherit;
    transition: background var(--nfs-ease-fast);
    position: relative;
    overflow: hidden;
    text-align: left;
    width: 100%;
}

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

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

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

.nfs-notification-item:focus-visible {
    outline: none;
    background: var(--nfs-bg-hover);
    box-shadow: inset 0 0 0 2px var(--nfs-primary);
}

/* ─────────────────────────────────────────
   Unread State (Blue left border)
   ───────────────────────────────────────── */

.nfs-notification-item.unread {
    background: var(--nfs-unread-bg);
}

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

.nfs-notification-item.unread:hover {
    background: var(--nfs-bg-hover);
}

/* ─────────────────────────────────────────
   Important State (Red left border)
   ───────────────────────────────────────── */

.nfs-notification-item.important::before {
    background: var(--nfs-secondary);
    width: 3px;
}

.nfs-notification-item.important {
    background: var(--nfs-important-bg);
}

/* ─────────────────────────────────────────
   Saved State (Yellow left border)
   ───────────────────────────────────────── */

.nfs-notification-item.saved::before {
    background: var(--nfs-warning);
    width: 3px;
}

.nfs-notification-item.saved {
    background: var(--nfs-saved-bg);
}

/* ─────────────────────────────────────────
   New Item (Pulse animation)
   ───────────────────────────────────────── */

.nfs-notification-item.is-new {
    animation: nfs-item-pulse 2s ease-out;
}

/* ============================================
   12. AVATAR
   ============================================ */

.nfs-notif-avatar {
    flex-shrink: 0;
    width: var(--nfs-avatar-size);
    height: var(--nfs-avatar-size);
    border-radius: 50%;
    background: var(--nfs-bg-tertiary);
    overflow: hidden;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

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

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

/* ============================================
   13. NOTIFICATION CONTENT
   ============================================ */

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

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

.nfs-notif-header .nfs-notif-icon {
    width: auto;
    height: auto;
    font-size: 15px;
    background: none;
}

.nfs-notif-title {
    font-size: var(--nfs-font-lg);
    font-weight: 600;
    color: var(--nfs-text-primary);
    line-height: 1.35;
    word-break: break-word;
}

.nfs-notif-body {
    font-size: var(--nfs-font-md);
    color: var(--nfs-text-secondary);
    line-height: 1.5;
    margin-bottom: 4px;
    word-break: break-word;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.nfs-notif-excerpt {
    font-size: var(--nfs-font-sm);
    color: var(--nfs-text-tertiary);
    line-height: 1.45;
    margin-top: 4px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.nfs-notif-meta {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 6px;
    font-size: var(--nfs-font-sm);
    color: var(--nfs-text-tertiary);
}

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

.nfs-time-ago {
    color: var(--nfs-text-tertiary);
}

/* ============================================
   14. THUMBNAIL (YouTube-style)
   ============================================ */

.nfs-notif-thumbnail {
    flex-shrink: 0;
    width: var(--nfs-thumb-size);
    height: calc(var(--nfs-thumb-size) * 0.66);
    border-radius: var(--nfs-radius-sm);
    background: var(--nfs-bg-tertiary);
    overflow: hidden;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-left: 8px;
}

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

.nfs-notif-thumbnail .nfs-thumb-placeholder {
    font-size: 22px;
    color: var(--nfs-text-tertiary);
}

/* ============================================
   15. BADGES (Important / Saved / Recommended)
   ============================================ */

.nfs-badge-important,
.nfs-badge-saved,
.nfs-badge-recommended,
.nfs-badge-new {
    display: inline-flex;
    align-items: center;
    padding: 2px 8px;
    font-size: var(--nfs-font-xs);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    line-height: 1.4;
    border-radius: var(--nfs-radius-full);
    white-space: nowrap;
}

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

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

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

.nfs-badge-new {
    color: var(--nfs-success);
    background: rgba(34, 197, 94, 0.12);
}

/* ============================================
   16. ACTION BUTTONS (Save / Hide)
   ============================================ */

.nfs-notif-actions-buttons {
    position: absolute;
    top: 12px;
    right: 12px;
    display: flex;
    flex-direction: column;
    gap: 4px;
    z-index: 2;
}

.nfs-btn-save,
.nfs-btn-hide {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    padding: 0;
    font-size: 14px;
    line-height: 1;
    color: var(--nfs-text-tertiary);
    background: transparent;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    transition: background var(--nfs-ease-fast), color var(--nfs-ease-fast), transform var(--nfs-ease-fast);
}

.nfs-btn-save:hover,
.nfs-btn-hide:hover {
    background: var(--nfs-bg-active);
    color: var(--nfs-text-primary);
}

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

.nfs-btn-save:focus-visible,
.nfs-btn-hide:focus-visible {
    outline: none;
    box-shadow: var(--nfs-shadow-focus);
}

.nfs-btn-save.saved {
    color: var(--nfs-warning);
    background: rgba(245, 158, 11, 0.12);
}

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

/* ============================================
   17. RECOMMENDATIONS DIVIDER
   ============================================ */

.nfs-recommendations-divider {
    padding: 14px 16px 8px;
    font-size: var(--nfs-font-xs);
    font-weight: 700;
    color: var(--nfs-primary);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    background: var(--nfs-bg-secondary);
    border-top: 1px solid var(--nfs-border);
    border-bottom: 1px solid var(--nfs-border);
    display: flex;
    align-items: center;
    gap: 8px;
}

.nfs-recommendations-divider::before {
    content: '✨';
    font-size: 14px;
}

/* Recommendation item styling */
.nfs-notification-item.nfs-recommendation {
    background: linear-gradient(90deg, rgba(99, 102, 241, 0.04) 0%, transparent 100%);
    border-left: 3px solid var(--nfs-primary);
}

.nfs-notification-item.nfs-recommendation:hover {
    background: linear-gradient(90deg, rgba(99, 102, 241, 0.08) 0%, var(--nfs-bg-hover) 100%);
}

/* ============================================
   18. SKELETON LOADER
   ============================================ */

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

.nfs-skeleton-item {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 12px 16px;
    border-bottom: 1px solid var(--nfs-border);
}

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

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

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

.nfs-skeleton-line {
    height: 10px;
    border-radius: 6px;
    background: linear-gradient(
        90deg,
        var(--nfs-bg-skeleton) 0%,
        var(--nfs-bg-skeleton-shine) 50%,
        var(--nfs-bg-skeleton) 100%
    );
    background-size: 200% 100%;
    animation: nfs-shimmer 1.5s infinite;
}

.nfs-skeleton-line-1 {
    width: 50%;
    height: 12px;
}

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

.nfs-skeleton-line-3 {
    width: 75%;
}

/* ============================================
   19. EMPTY / ERROR STATES
   ============================================ */

.nfs-empty-state,
.nfs-error-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 60px 24px;
    text-align: center;
}

.nfs-empty-icon,
.nfs-error-icon {
    font-size: 48px;
    line-height: 1;
    opacity: 0.5;
    margin-bottom: 4px;
}

.nfs-empty-title,
.nfs-error-title {
    font-size: var(--nfs-font-xl);
    font-weight: 600;
    color: var(--nfs-text-primary);
    margin: 0;
}

.nfs-empty-text,
.nfs-error-text {
    font-size: var(--nfs-font-md);
    color: var(--nfs-text-secondary);
    max-width: 260px;
    line-height: 1.5;
    margin: 0;
}

.nfs-retry-btn {
    margin-top: 12px;
    padding: 8px 20px;
    font-size: var(--nfs-font-md);
    font-weight: 600;
    color: var(--nfs-text-inverse);
    background: var(--nfs-primary);
    border: none;
    border-radius: var(--nfs-radius-full);
    cursor: pointer;
    transition: background var(--nfs-ease-fast), transform var(--nfs-ease-fast);
}

.nfs-retry-btn:hover {
    background: var(--nfs-primary-hover);
    transform: translateY(-1px);
}

.nfs-retry-btn:active {
    transform: scale(0.96);
}

/* ============================================
   20. LOADING SPINNER
   ============================================ */

.nfs-loader {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 40px 20px;
    color: var(--nfs-text-secondary);
    font-size: var(--nfs-font-md);
}

.nfs-loader-spinner {
    width: 28px;
    height: 28px;
    border: 3px solid var(--nfs-border);
    border-top-color: var(--nfs-primary);
    border-radius: 50%;
    animation: nfs-spin 0.7s linear infinite;
}

/* ============================================
   21. TOAST NOTIFICATION
   ============================================ */

.nfs-toast-container {
    position: fixed;
    bottom: calc(24px + var(--nfs-safe-bottom));
    left: 50%;
    transform: translateX(-50%);
    z-index: var(--nfs-z-toast);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    pointer-events: none;
    max-width: calc(100vw - 32px);
}

.nfs-toast {
    padding: 10px 20px;
    font-size: var(--nfs-font-md);
    font-weight: 500;
    color: #ffffff;
    background: #323232;
    border-radius: var(--nfs-radius-sm);
    box-shadow: var(--nfs-shadow-lg);
    max-width: 320px;
    text-align: center;
    word-break: break-word;
    pointer-events: auto;
    animation: nfs-toast-in 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
}

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

/* ============================================
   22. MOBILE BOTTOM SHEET (YouTube-style)
   ============================================ */

@media (max-width: 640px) {
    .nfs-bell-wrapper {
        --nfs-popup-width: 100vw;
    }

    .nfs-bell-popup {
        position: fixed;
        top: auto;
        bottom: 0;
        left: 0;
        right: 0;
        width: 100%;
        max-width: 100%;
        max-height: 85vh;
        border-radius: var(--nfs-radius-xl) var(--nfs-radius-xl) 0 0;
        border-bottom: none;
        padding-bottom: var(--nfs-safe-bottom);
        transform: translateY(100%);
        transform-origin: bottom center;
        box-shadow: 0 -8px 40px rgba(0, 0, 0, 0.2);
    }

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

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

    .nfs-popup-header {
        padding: 24px 16px 12px;
        border-radius: var(--nfs-radius-xl) var(--nfs-radius-xl) 0 0;
    }

    .nfs-popup-title {
        font-size: var(--nfs-font-2xl);
    }

    .nfs-popup-body {
        max-height: 60vh;
    }

    .nfs-bell-wrapper.nfs-bell-fixed {
        bottom: calc(16px + var(--nfs-safe-bottom));
        right: 16px;
    }

    .nfs-toast-container {
        bottom: calc(80px + var(--nfs-safe-bottom));
    }
}

/* ============================================
   23. RESPONSIVE — ULTRA SMALL (≤ 360px)
   ============================================ */

@media (max-width: 360px) {
    .nfs-bell-wrapper {
        --nfs-bell-size: 36px;
        --nfs-icon-size: 18px;
        --nfs-avatar-size: 36px;
        --nfs-thumb-size: 48px;
    }

    .nfs-popup-header {
        padding: 20px 12px 10px;
    }

    .nfs-popup-title {
        font-size: var(--nfs-font-lg);
    }

    .nfs-notification-item {
        padding: 10px 12px;
        gap: 10px;
    }

    .nfs-notif-content {
        padding-right: 28px;
    }

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

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

    .nfs-notif-thumbnail {
        display: none;
    }

    .nfs-notif-actions-buttons {
        top: 8px;
        right: 8px;
    }

    .nfs-btn-save,
    .nfs-btn-hide {
        width: 24px;
        height: 24px;
        font-size: 12px;
    }
}

/* ============================================
   24. RESPONSIVE — TABLET (641px–1024px)
   ============================================ */

@media (min-width: 641px) and (max-width: 1024px) {
    .nfs-bell-popup {
        width: 400px;
    }
}

/* ============================================
   25. RESPONSIVE — DESKTOP (≥ 1025px)
   ============================================ */

@media (min-width: 1025px) {
    .nfs-bell-popup {
        width: 420px;
    }

    .nfs-notification-item {
        padding: 14px 18px;
    }
}

/* ============================================
   26. LANDSCAPE MOBILE
   ============================================ */

@media (max-height: 500px) and (orientation: landscape) {
    .nfs-bell-popup {
        max-height: 90vh;
    }

    .nfs-popup-body {
        max-height: 50vh;
    }
}

/* ============================================
   27. RTL SUPPORT
   ============================================ */

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

[dir="rtl"] .nfs-notification-item.unread::before,
[dir="rtl"] .nfs-notification-item.important::before,
[dir="rtl"] .nfs-notification-item.saved::before {
    left: auto;
    right: 0;
}

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

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

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

[dir="rtl"] .nfs-notif-actions-buttons {
    right: auto;
    left: 12px;
}

[dir="rtl"] .nfs-notif-thumbnail {
    margin-left: 0;
    margin-right: 8px;
}

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

/* ============================================
   28. ACCESSIBILITY
   ============================================ */

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

    .nfs-bell-icon.has-notifications svg {
        animation: none !important;
    }

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

@media (prefers-contrast: high) {
    .nfs-bell-wrapper {
        --nfs-border: #000000;
        --nfs-text-primary: #000000;
    }

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

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

/* ============================================
   29. PRINT
   ============================================ */

@media print {
    .nfs-bell-wrapper,
    .nfs-bell-popup,
    .nfs-toast-container {
        display: none !important;
    }
}

/* ============================================
   30. TOUCH DEVICES
   ============================================ */

@media (hover: none) and (pointer: coarse) {
    .nfs-bell-trigger {
        min-width: 48px;
        min-height: 48px;
    }

    .nfs-filter-btn {
        min-height: 36px;
    }

    .nfs-notification-item:hover {
        background: transparent;
    }

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

/* ============================================
   31. ANIMATIONS
   ============================================ */

@keyframes nfs-bell-ring {
    0%, 90%, 100% { transform: rotate(0); }
    92% { transform: rotate(10deg); }
    94% { transform: rotate(-10deg); }
    96% { transform: rotate(6deg); }
    98% { transform: rotate(-6deg); }
}

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

@keyframes nfs-spin {
    to { transform: rotate(360deg); }
}

@keyframes nfs-item-pulse {
    0% { box-shadow: inset 0 0 0 0 rgba(99, 102, 241, 0.4); }
    50% { box-shadow: inset 0 0 30px 0 rgba(99, 102, 241, 0.15); }
    100% { box-shadow: inset 0 0 0 0 rgba(99, 102, 241, 0); }
}

@keyframes nfs-toast-in {
    0% { opacity: 0; transform: translateY(12px) scale(0.95); }
    100% { opacity: 1; transform: translateY(0) scale(1); }
}

@keyframes nfs-shake {
    0%, 100% { transform: translateX(0) rotate(0); }
    15% { transform: translateX(-3px) rotate(-2deg); }
    30% { transform: translateX(3px) rotate(2deg); }
    45% { transform: translateX(-3px) rotate(-2deg); }
    60% { transform: translateX(3px) rotate(2deg); }
    75% { transform: translateX(-2px) rotate(-1deg); }
    90% { transform: translateX(2px) rotate(1deg); }
}

.nfs-shake {
    animation: nfs-shake 500ms ease-in-out;
}

/* ============================================
   32. UTILITY CLASSES
   ============================================ */

.nfs-hidden {
    display: none !important;
}

.nfs-fade-out {
    opacity: 0 !important;
    pointer-events: none !important;
}

/* ============================================
   END OF FILE — bell.css v15.0.0
   ============================================ */