/* ─── notification.css ─── */
/* Uses CSS variables from app.css (--primary, --bg, --text, etc.) */

/* ── Backdrop ── */
.notif-popup-backdrop {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 1049;
    background: transparent;
}
.notif-popup-backdrop.active {
    display: block;
}

/* ── Popup shell ── */
.notif-popup {
    position: fixed;
    top: 64px;          /* adjust to your header height */
    right: 16px;
    z-index: 1050;
    width: 380px;
    max-height: 520px;
    display: flex;
    flex-direction: column;
    background: var(--bg-dark, #fff);
    border: 0.5px solid var(--border, rgba(180,100,20,.18));
    border-radius: var(--radius, 16px);
    box-shadow: var(--shadow-lg, 0 14px 48px rgba(0,0,0,.15));
    overflow: hidden;

    /* hidden state */
    opacity: 0;
    pointer-events: none;
    transform: translateY(-10px) scale(0.97);
    transform-origin: top right;
    transition: opacity .2s var(--ease, cubic-bezier(.4,0,.2,1)),
                transform .2s var(--ease, cubic-bezier(.4,0,.2,1));
}
.notif-popup.open {
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0) scale(1);
}

/* ── Header ── */
.notif-popup-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 16px;
    background: var(--primary, #dc7228);
    flex-shrink: 0;
}
.notif-popup-header-left {
    display: flex;
    align-items: center;
    gap: 9px;
}
.notif-popup-icon {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: rgba(255,255,255,.18);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 15px;
    flex-shrink: 0;
}
.notif-popup-title {
    font-size: 15px;
    font-weight: 500;
    color: #fff;
    margin: 0;
}
.notif-new-badge {
    background: rgba(255,255,255,.25);
    color: #fff;
    font-size: 11px;
    font-weight: 500;
    padding: 2px 9px;
    border-radius: 20px;
    font-family: 'Poppins', sans-serif;
}
.notif-popup-header-actions {
    display: flex;
    align-items: center;
    gap: 6px;
}
.notif-mark-all-btn,
.notif-close-btn {
    width: 28px;
    height: 28px;
    border: none;
    background: rgba(255,255,255,.15);
    border-radius: 50%;
    color: #fff;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 15px;
    transition: background var(--transition, .22s);
}
.notif-mark-all-btn:hover,
.notif-close-btn:hover {
    background: rgba(255,255,255,.3);
}

/* ── Filter row ── */
.notif-filters {
    display: flex;
    gap: 5px;
    padding: 10px 13px 7px;
    border-bottom: 0.5px solid var(--border, rgba(180,100,20,.18));
    flex-shrink: 0;
}
.notif-filter-btn {
    border: none;
    background: none;
    cursor: pointer;
    font-size: 12px;
    color: var(--text-muted, #6b7280);
    padding: 4px 12px;
    border-radius: 20px;
    transition: all var(--transition, .22s);
    font-family: 'Poppins', sans-serif;
    font-weight: 400;
}
.notif-filter-btn.active {
    background: var(--primary, #dc7228);
    color: #fff;
}
.notif-filter-btn:hover:not(.active) {
    background: var(--border-soft, rgba(220,114,40,.1));
    color: var(--text, #1a1a1a);
}

/* ── Section label ── */
.notif-section-label {
    font-size: 11px;
    color: var(--text-muted, #6b7280);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-weight: 500;
    padding: 9px 14px 4px;
    font-family: 'Poppins', sans-serif;
}

/* ── Scrollable list ── */
.notif-list {
    overflow-y: auto;
    flex: 1;
    min-height: 0;
}
.notif-list::-webkit-scrollbar { width: 4px; }
.notif-list::-webkit-scrollbar-track { background: transparent; }
.notif-list::-webkit-scrollbar-thumb {
    background: var(--border, rgba(180,100,20,.18));
    border-radius: 4px;
}

/* ── Notification item ── */
.notif-item {
    display: flex;
    flex-direction: column;
    padding: 11px 14px;
    border-bottom: 0.5px solid var(--border, rgba(180,100,20,.12));
    cursor: pointer;
    transition: background var(--dur, .22s);
    position: relative;
}
.notif-item:hover {
    background: var(--border-soft, rgba(220,114,40,.06));
}
.notif-item.unread {
    background: rgba(220,114,40,.05);
}
.notif-item.unread::before {
    content: '';
    position: absolute;
    left: 0; top: 0; bottom: 0;
    width: 3px;
    background: var(--primary, #dc7228);
    border-radius: 0 2px 2px 0;
}
.notif-item.hidden { display: none; }

/* ── Item inner ── */
.notif-item-inner {
    display: flex;
    gap: 10px;
    align-items: flex-start;
}

/* ── Avatars ── */
.notif-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 13px;
    position: relative;
    font-family: 'Poppins', sans-serif;
}
.notif-avatar--brand  { background: rgba(220,114,40,.15); color: var(--primary, #dc7228); }
.notif-avatar--blue   { background: #e8f4ff; color: #1a5fb4; }
.notif-avatar--green  { background: #eefdf5; color: #1a7a40; }
.notif-avatar--purple { background: #f5e8ff; color: #6b21a8; }

.notif-online-dot {
    position: absolute;
    bottom: 1px; right: 1px;
    width: 10px; height: 10px;
    background: var(--green, #18b26a);
    border: 2px solid var(--bg-dark, #fff);
    border-radius: 50%;
}

/* ── Content ── */
.notif-content {
    flex: 1;
    min-width: 0;
}
.notif-name {
    font-size: 13px;
    font-weight: 500;
    color: var(--text, #1a1a1a);
    margin-bottom: 2px;
    font-family: 'Poppins', sans-serif;
}
.notif-connections-pill {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    background: var(--border-soft, rgba(220,114,40,.1));
    border-radius: 10px;
    padding: 2px 8px;
    font-size: 11px;
    color: var(--text-muted, #6b7280);
    margin-bottom: 3px;
    font-family: 'Poppins', sans-serif;
}
.notif-connections-pill i { font-size: 10px; }
.notif-msg {
    font-size: 12.5px;
    color: var(--text-muted, #6b7280);
    line-height: 1.45;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    font-family: 'Poppins', sans-serif;
}

/* ── Tags ── */
.notif-tag {
    font-size: 10px;
    padding: 3px 8px;
    border-radius: 10px;
    display: inline-flex;
    align-items: center;
    gap: 3px;
    white-space: nowrap;
    flex-shrink: 0;
    font-family: 'Poppins', sans-serif;
    font-weight: 500;
}
.notif-tag--post { background: rgba(220,114,40,.12); color: var(--primary-hover, #b85a1a); }
.notif-tag--blog { background: #e8f4ff; color: #1a5fb4; }
.notif-tag--job  { background: #eefdf5; color: #1a7a40; }

/* ── Footer row ── */
.notif-item-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 7px;
}
.notif-time {
    font-size: 11px;
    color: var(--text-muted, #9ca3af);
    display: flex;
    align-items: center;
    gap: 4px;
    font-family: 'Poppins', sans-serif;
}
.notif-time i { font-size: 11px; vertical-align: -1px; }

/* ── Hover actions ── */
.notif-item-actions {
    display: flex;
    gap: 3px;
    opacity: 0;
    transition: opacity var(--dur, .22s);
}
.notif-item:hover .notif-item-actions { opacity: 1; }
.notif-act-btn {
    border: none;
    background: none;
    cursor: pointer;
    font-size: 11px;
    color: var(--text-muted, #6b7280);
    padding: 3px 8px;
    border-radius: 6px;
    font-family: 'Poppins', sans-serif;
    display: flex;
    align-items: center;
    gap: 4px;
    transition: all var(--dur, .22s);
}
.notif-act-btn:hover {
    background: var(--border-soft, rgba(220,114,40,.1));
    color: var(--primary, #dc7228);
}

/* ── View all link ── */
.notif-view-all {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 12px;
    text-align: center;
    color: var(--primary, #dc7228);
    font-size: 13px;
    font-weight: 500;
    text-decoration: none;
    border-top: 0.5px solid var(--border, rgba(180,100,20,.18));
    transition: background var(--dur, .22s);
    font-family: 'Poppins', sans-serif;
    flex-shrink: 0;
}
.notif-view-all:hover { background: var(--border-soft, rgba(220,114,40,.06)); }
.notif-view-all i { font-size: 13px; }

/* ── Dark mode overrides ── */
[data-theme="dark"] .notif-item.unread {
    background: rgba(245,137,52,.06);
}
[data-theme="dark"] .notif-avatar--blue   { background: rgba(26,95,180,.18); }
[data-theme="dark"] .notif-avatar--green  { background: rgba(26,122,64,.18); }
[data-theme="dark"] .notif-avatar--purple { background: rgba(107,33,168,.18); }
[data-theme="dark"] .notif-tag--blog { background: rgba(26,95,180,.18); color: #6aabff; }
[data-theme="dark"] .notif-tag--job  { background: rgba(26,122,64,.18); color: #4dd68a; }
[data-theme="dark"] .notif-online-dot { border-color: var(--bg-dark, #171717); }

/* ── Responsive ── */
@media (max-width: 480px) {
    .notif-popup {
        right: 8px;
        left: 8px;
        width: auto;
        top: 58px;
    }
}
