/* === MESSENGER STYLE NOTIFICATIONS (DARK MODE) === */
.notification-wrapper {
    position: relative;
    font-family: inherit;
}

/* Badge - Simple Red Dot with Number */
.notification-badge {
    position: absolute;
    top: -2px;
    right: -2px;
    background-color: #e41e3f;
    color: white;
    font-size: 11px;
    font-weight: 700;
    padding: 0 5px;
    height: 19px;
    min-width: 19px;
    border-radius: 9.5px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid #18191a;
    /* Matches header bg */
    z-index: 2;
}

/* Dropdown Container */
.notification-dropdown {
    position: absolute;
    top: 50px;
    right: -10px;
    width: 360px;
    background-color: #242526;
    border-radius: 8px;
    box-shadow: 0 12px 28px 0 rgba(0, 0, 0, 0.2), 0 2px 4px 0 rgba(0, 0, 0, 0.1);
    z-index: 1000;
    overflow: hidden;
    transform-origin: top right;
    animation: fadeIn 0.1s ease-out;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: scale(0.95);
    }

    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* Arrow (Top pointer) */
.notification-dropdown::before {
    content: '';
    position: absolute;
    top: -6px;
    right: 18px;
    width: 12px;
    height: 12px;
    background-color: #242526;
    transform: rotate(45deg);
    box-shadow: -1px -1px 1px rgba(0, 0, 0, 0.1);
    z-index: 1;
}

/* Header */
.notification-header {
    padding: 16px 16px 8px 16px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #242526;
    position: relative;
    z-index: 2;
}

.notification-header h4 {
    margin: 0;
    font-size: 24px;
    font-weight: 700;
    color: #e4e6eb;
}

.btn-text-small {
    background: none;
    border: none;
    color: #2e89ff;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    padding: 4px 8px;
    border-radius: 4px;
}

.btn-text-small:hover {
    background-color: rgba(46, 137, 255, 0.1);
    text-decoration: none;
}

/* List */
.notification-list {
    max-height: 480px;
    overflow-y: auto;
    padding: 8px;
}

/* Scrollbar styles (Chrome/Safari) */
.notification-list::-webkit-scrollbar {
    width: 8px;
}

.notification-list::-webkit-scrollbar-track {
    background: transparent;
}

.notification-list::-webkit-scrollbar-thumb {
    background: #3e4042;
    border-radius: 4px;
}

.notification-list::-webkit-scrollbar-thumb:hover {
    background: #505256;
}

/* Item */
.notif-item {
    display: flex;
    align-items: center;
    padding: 8px;
    border-radius: 8px;
    cursor: pointer;
    transition: background-color 0.1s;
    position: relative;
    gap: 12px;
}

.notif-item:hover {
    background-color: #3a3b3c;
}

/* Icons / Avatar */
.notif-icon {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    flex-shrink: 0;
    position: relative;
    color: white;
}

.notif-icon.info {
    background-color: #3e4042;
    color: #2e89ff;
}

/* Gray with Blue icon */
.notif-icon.success {
    background-color: #3e4042;
    color: #31a24c;
}

/* Gray with Green icon */
.notif-icon.warning {
    background-color: #3e4042;
    color: #f2c744;
}

/* Gray with Yellow icon */
.notif-icon.error {
    background-color: #3e4042;
    color: #f02849;
}

/* Gray with Red icon */

/* Special "System" Icon */
.notif-icon.system {
    background: linear-gradient(135deg, #2e89ff, #0064e0);
    color: white;
}

.notif-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-width: 0;
    /* Text truncation fix */
}

/* Text Styling */
.notif-message {
    font-size: 15px;
    color: #e4e6eb;
    line-height: 1.3333;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.notif-message strong {
    font-weight: 600;
}

.notif-time {
    font-size: 13px;
    color: #b0b3b8;
    margin-top: 3px;
    font-weight: 400;
}

/* Unread State */
.notif-item.unread .notif-time {
    color: #2e89ff;
    font-weight: 600;
}

.notif-item.unread .dot {
    width: 12px;
    height: 12px;
    background-color: #2e89ff;
    border-radius: 50%;
    margin-left: auto;
    flex-shrink: 0;
}

/* Toast Popup (Messenger Style) */
.notification-toast-container {
    position: fixed;
    bottom: 24px;
    left: 24px;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.notification-toast {
    display: flex;
    align-items: center;
    gap: 12px;
    background: #333333;
    /* Slightly lighter than pure black */
    color: white;
    padding: 12px 16px;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    min-width: 300px;
    max-width: 400px;
    animation: slideUp 0.3s cubic-bezier(0.18, 0.89, 0.32, 1.28);
    cursor: pointer;
    font-weight: 500;
}

@keyframes slideUp {
    from {
        transform: translateY(100%);
        opacity: 0;
    }

    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.notification-toast.exit {
    opacity: 0;
    transform: scale(0.9);
    transition: all 0.2s;
}

.toast-icon {
    font-size: 24px;
    color: #2e89ff;
}

.toast-content {
    flex: 1;
}

.toast-title {
    font-weight: 700;
    font-size: 14px;
    margin-bottom: 2px;
}

.toast-message {
    font-size: 13px;
    color: #b0b3b8;
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 40px 20px;
    color: #b0b3b8;
}

.empty-state i {
    font-size: 48px;
    margin-bottom: 12px;
    color: #3e4042;
}

.empty-state p {
    font-size: 15px;
}

/* === SYSTEM POPUP STYLES (PREMIUM GLASSMORPHISM) === */
.system-popup-overlay {
    position: fixed;
    inset: 0;
    background: rgba(2, 6, 23, 0.85);
    /* Darker, richer backdrop */
    backdrop-filter: blur(12px);
    z-index: 10001;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.system-popup-overlay.active {
    opacity: 1;
    pointer-events: auto;
}

.system-popup-box {
    background: linear-gradient(145deg, rgba(30, 41, 59, 0.9), rgba(15, 23, 42, 0.95));
    border: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow:
        0 25px 50px -12px rgba(0, 0, 0, 0.5),
        0 0 0 1px rgba(255, 255, 255, 0.05),
        0 0 40px rgba(99, 102, 241, 0.1);
    /* Subtle purple glow */
    border-radius: 24px;
    width: 90%;
    max-width: 600px;
    max-height: 80vh;
    display: flex;
    flex-direction: column;
    transform: scale(0.9) translateY(20px);
    transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
    overflow: hidden;
    position: relative;
}

/* Shine effect */
.system-popup-box::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
}

.system-popup-overlay.active .system-popup-box {
    transform: scale(1) translateY(0);
}

.system-popup-header {
    padding: 24px 32px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: transparent;
    border-bottom: 1px solid rgba(255, 255, 255, 0.03);
}

.system-popup-header h3 {
    font-size: 18px;
    font-weight: 600;
    letter-spacing: -0.01em;
    color: rgba(255, 255, 255, 0.9);
    margin: 0;
    font-family: 'Inter', sans-serif;
}

.system-popup-close-btn {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.05);
    color: #94a3b8;
    cursor: pointer;
    font-size: 18px;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.2s;
}

.system-popup-close-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    color: white;
    transform: rotate(90deg);
}

/* === FEATURED LAYOUT (Single Item) === */
.system-popup-box.featured {
    text-align: center;
    max-width: 480px;
}

.system-featured-layout {
    padding: 40px 32px 48px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
}

.system-featured-icon {
    width: 88px;
    height: 88px;
    border-radius: 50%;
    /* Gradient Backgrounds */
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.1), rgba(99, 102, 241, 0.05));
    border: 1px solid rgba(99, 102, 241, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 36px;
    color: #818cf8;
    margin-bottom: 12px;
    box-shadow:
        0 0 0 8px rgba(99, 102, 241, 0.05),
        0 0 30px rgba(99, 102, 241, 0.15);
    animation: pulse-soft 3s infinite;
}

@keyframes pulse-soft {
    0% {
        box-shadow: 0 0 0 0 rgba(99, 102, 241, 0.1), 0 0 30px rgba(99, 102, 241, 0.15);
    }

    70% {
        box-shadow: 0 0 0 15px rgba(99, 102, 241, 0), 0 0 30px rgba(99, 102, 241, 0.15);
    }

    100% {
        box-shadow: 0 0 0 0 rgba(99, 102, 241, 0), 0 0 30px rgba(99, 102, 241, 0.15);
    }
}

.system-featured-icon.success {
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.1), rgba(16, 185, 129, 0.05));
    border-color: rgba(16, 185, 129, 0.2);
    color: #34d399;
}

.system-featured-icon.error {
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.1), rgba(239, 68, 68, 0.05));
    border-color: rgba(239, 68, 68, 0.2);
    color: #f87171;
}

.system-featured-icon.warning {
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.1), rgba(245, 158, 11, 0.05));
    border-color: rgba(245, 158, 11, 0.2);
    color: #fbbf24;
}

.system-featured-icon.system {
    background: linear-gradient(135deg, rgba(217, 70, 239, 0.1), rgba(217, 70, 239, 0.05));
    border-color: rgba(217, 70, 239, 0.2);
    color: #e879f9;
}

.system-featured-date {
    font-size: 12px;
    font-weight: 500;
    color: #94a3b8;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.05);
    padding: 6px 16px;
    border-radius: 100px;
}

.system-featured-title {
    font-size: 26px;
    font-weight: 700;
    color: #ffffff;
    margin: 0;
    line-height: 1.25;
    letter-spacing: -0.02em;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.system-featured-message {
    font-size: 16px;
    color: #cbd5e1;
    line-height: 1.7;
    max-width: 100%;
    /* Handle long text better */
    text-align: left;
    /* Clean text layout without nested box */
    margin-top: 8px;
    width: 100%;
}



/* === LINK COLOR ENHANCEMENT === */
/* Bright Cyan links for readability */
.system-featured-message a,
.notif-card-message a,
.notif-message a,
.toast-message a {
    color: #a5f3fc !important;
    text-decoration: underline;
    font-weight: 600;
    text-shadow: 0 0 8px rgba(165, 243, 252, 0.25);
    transition: all 0.2s ease;
}

.system-featured-message a:hover,
.notif-card-message a:hover,
.notif-message a:hover,
.toast-message a:hover {
    color: #67e8f9 !important;
    text-shadow: 0 0 12px rgba(165, 243, 252, 0.5);
    transform: translateY(-1px);
}

.system-popup-footer {
    padding: 0 32px 32px;
    background: transparent;
    display: flex;
    justify-content: center;
}

.btn-primary-popup {
    background: #6366f1;
    background: linear-gradient(135deg, #6366f1 0%, #4f46e5 100%);
    color: white;
    border: none;
    padding: 14px 40px;
    border-radius: 14px;
    font-weight: 600;
    font-size: 15px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 6px -1px rgba(99, 102, 241, 0.2), 0 2px 4px -1px rgba(99, 102, 241, 0.1);
    width: 100%;
}

.btn-primary-popup:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 15px -3px rgba(99, 102, 241, 0.3), 0 4px 6px -2px rgba(99, 102, 241, 0.15);
    background: linear-gradient(135deg, #818cf8 0%, #6366f1 100%);
}

/* Custom Scrollbar for Popup */
.system-popup-body::-webkit-scrollbar {
    width: 6px;
}

.system-popup-body::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.02);
    border-radius: 10px;
}

.system-popup-body::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    transition: background 0.2s;
}

.system-popup-body::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.2);
}

/* === CARD LIST LAYOUT (Multiple Items) === */
.system-popup-body {
    padding: 24px;
    overflow-y: auto;
    overflow-x: hidden;
    /* Prevent horizontal scroll */
    flex: 1;
    /* For Firefox */
    scrollbar-width: thin;
    scrollbar-color: rgba(255, 255, 255, 0.1) rgba(255, 255, 255, 0.02);
}

.system-notif-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.system-notif-card {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 16px;
    padding: 20px;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.system-notif-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    background: #6366f1;
    opacity: 0.5;
    transition: opacity 0.2s;
}

.system-notif-card.success::before {
    background: #10b981;
}

.system-notif-card.error::before {
    background: #ef4444;
}

.system-notif-card.warning::before {
    background: #f59e0b;
}

.system-notif-card.system::before {
    background: #ea580c;
}

/* Should be d946ef but using orange to distinguish */

.system-notif-card:hover {
    background: rgba(255, 255, 255, 0.04);
    transform: translateY(-2px) scale(1.005);
    border-color: rgba(255, 255, 255, 0.1);
    box-shadow: 0 10px 20px -5px rgba(0, 0, 0, 0.3);
}

.notif-card-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 10px;
    align-items: center;
}

.system-notif-tag {
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.05em;
    padding: 4px 10px;
    border-radius: 6px;
    background: rgba(99, 102, 241, 0.15);
    color: #a5b4fc;
    text-transform: uppercase;
}

.notif-card-title {
    font-size: 17px;
    font-weight: 600;
    color: #f1f5f9;
    margin: 0 0 8px 0;
    line-height: 1.4;
}

.notif-card-message {
    font-size: 14px;
    color: #94a3b8;
    line-height: 1.6;
}