/* ============================================
   NOTIFICATIONS PANEL — Glassmorphism Dark
   ============================================ */

/* ── BELL CONTAINER (fixed top-right) ── */
.notif-bell-container {
    position: fixed;
    top: 18px;
    right: 24px;
    z-index: 9990;
    display: flex;
    align-items: center;
    gap: 8px;
}

.notif-bell-btn {
    position: relative;
    width: 42px;
    height: 42px;
    border-radius: 50%;
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(15, 23, 42, 0.6);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #94a3b8;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.25);
}

.notif-bell-btn:hover {
    color: #e2e8f0;
    background: rgba(30, 41, 59, 0.8);
    border-color: rgba(99, 102, 241, 0.3);
    box-shadow: 0 4px 20px rgba(99, 102, 241, 0.15);
    transform: scale(1.05);
}

.notif-bell-btn.has-unread {
    color: #c7d2fe;
    border-color: rgba(99, 102, 241, 0.25);
}

.notif-bell-btn .bell-icon {
    font-size: 22px;
    transition: transform 0.3s ease;
}

.notif-bell-btn.has-unread .bell-icon {
    animation: notifBellRing 0.6s ease;
}

@keyframes notifBellRing {

    0%,
    100% {
        transform: rotate(0deg);
    }

    15% {
        transform: rotate(14deg);
    }

    30% {
        transform: rotate(-12deg);
    }

    45% {
        transform: rotate(8deg);
    }

    60% {
        transform: rotate(-6deg);
    }

    75% {
        transform: rotate(3deg);
    }
}

/* ── BADGE ── */
.notif-badge {
    position: absolute;
    top: -2px;
    right: -2px;
    min-width: 18px;
    height: 18px;
    background: linear-gradient(135deg, #6366f1, #818cf8);
    border-radius: 9px;
    font-size: 10px;
    font-weight: 700;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 5px;
    box-shadow: 0 2px 8px rgba(99, 102, 241, 0.5);
    pointer-events: none;
    opacity: 0;
    transform: scale(0.5);
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.notif-badge.visible {
    opacity: 1;
    transform: scale(1);
}

.notif-badge.pulse {
    animation: notifBadgePulse 0.5s ease;
}

@keyframes notifBadgePulse {
    0% {
        transform: scale(1);
        box-shadow: 0 2px 8px rgba(99, 102, 241, 0.5);
    }

    50% {
        transform: scale(1.3);
        box-shadow: 0 4px 16px rgba(99, 102, 241, 0.8);
    }

    100% {
        transform: scale(1);
        box-shadow: 0 2px 8px rgba(99, 102, 241, 0.5);
    }
}

/* ── PANEL ── */
.notif-panel {
    position: fixed;
    top: 68px;
    right: 24px;
    width: 340px;
    max-height: 460px;
    background: rgba(15, 23, 42, 0.85);
    backdrop-filter: blur(24px) saturate(1.4);
    -webkit-backdrop-filter: blur(24px) saturate(1.4);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 16px;
    box-shadow:
        0 20px 60px rgba(0, 0, 0, 0.45),
        0 0 0 1px rgba(255, 255, 255, 0.03) inset;
    z-index: 9989;
    display: flex;
    flex-direction: column;
    overflow: hidden;

    /* Animation */
    opacity: 0;
    transform: translateY(-8px) scale(0.97);
    pointer-events: none;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.notif-panel.open {
    opacity: 1;
    transform: translateY(0) scale(1);
    pointer-events: auto;
}

/* ── PANEL HEADER ── */
.notif-panel-header {
    padding: 16px 18px 12px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    flex-shrink: 0;
}

.notif-panel-title {
    font-size: 14px;
    font-weight: 600;
    color: #e2e8f0;
    letter-spacing: -0.2px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.notif-panel-title .title-icon {
    font-size: 18px;
    color: #818cf8;
}

.notif-mark-all {
    font-size: 11px;
    color: #818cf8;
    background: none;
    border: none;
    cursor: pointer;
    font-weight: 500;
    padding: 4px 8px;
    border-radius: 6px;
    transition: all 0.2s;
    font-family: inherit;
}

.notif-mark-all:hover {
    background: rgba(99, 102, 241, 0.1);
    color: #a5b4fc;
}

/* ── ITEMS LIST ── */
.notif-list {
    flex: 1;
    overflow-y: auto;
    padding: 6px;
}

.notif-list::-webkit-scrollbar {
    width: 4px;
}

.notif-list::-webkit-scrollbar-track {
    background: transparent;
}

.notif-list::-webkit-scrollbar-thumb {
    background: rgba(148, 163, 184, 0.15);
    border-radius: 4px;
}

/* ── NOTIFICATION ITEM ── */
.notif-item {
    display: flex;
    gap: 12px;
    padding: 12px;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.2s ease;
    position: relative;
    border-left: 3px solid transparent;
}

.notif-item:hover {
    background: rgba(255, 255, 255, 0.04);
}

.notif-item.unread {
    border-left-color: #6366f1;
    background: rgba(99, 102, 241, 0.04);
}

.notif-item.unread:hover {
    background: rgba(99, 102, 241, 0.08);
}

.notif-item-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: linear-gradient(135deg, #334155, #475569);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 700;
    color: #cbd5e1;
    flex-shrink: 0;
    letter-spacing: -0.5px;
}

.notif-item.unread .notif-item-avatar {
    background: linear-gradient(135deg, #4338ca, #6366f1);
    color: #fff;
}

.notif-item-body {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.notif-item-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}

.notif-item-name {
    font-size: 13px;
    font-weight: 600;
    color: #e2e8f0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.notif-item.unread .notif-item-name {
    color: #c7d2fe;
}

.notif-item-time {
    font-size: 10px;
    color: #64748b;
    white-space: nowrap;
    flex-shrink: 0;
}

.notif-item.unread .notif-item-time {
    color: #818cf8;
}

.notif-item-preview {
    font-size: 12px;
    color: #64748b;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 1.4;
}

.notif-item.unread .notif-item-preview {
    color: #94a3b8;
}

.notif-item-dot {
    position: absolute;
    top: 50%;
    right: 10px;
    transform: translateY(-50%);
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #6366f1;
    opacity: 0;
    transition: opacity 0.2s;
}

.notif-item.unread .notif-item-dot {
    opacity: 1;
}

/* ── EMPTY STATE ── */
.notif-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 40px 20px;
    gap: 8px;
}

.notif-empty-icon {
    font-size: 40px;
    color: rgba(99, 102, 241, 0.2);
}

.notif-empty-text {
    font-size: 13px;
    color: #475569;
    font-weight: 500;
}

/* ── SLIDE-IN ANIMATION FOR NEW ITEMS ── */
.notif-item-enter {
    animation: notifItemSlideIn 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes notifItemSlideIn {
    from {
        opacity: 0;
        transform: translateX(20px);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* ── PANEL FOOTER ── */
.notif-panel-footer {
    padding: 10px 18px;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.notif-go-messenger {
    font-size: 12px;
    color: #818cf8;
    background: none;
    border: none;
    cursor: pointer;
    font-weight: 500;
    padding: 4px 8px;
    border-radius: 6px;
    transition: all 0.2s;
    font-family: inherit;
    display: flex;
    align-items: center;
    gap: 4px;
}

.notif-go-messenger:hover {
    background: rgba(99, 102, 241, 0.1);
    color: #a5b4fc;
}

/* ── OVERLAY (click-away) ── */
.notif-overlay {
    position: fixed;
    inset: 0;
    z-index: 9988;
    display: none;
}

.notif-overlay.open {
    display: block;
}