/* ════════════════════════════════════════
   NOTIFICATION BELL & DROPDOWN
   ════════════════════════════════════════ */

.nav-notif-wrap {
    position: relative;
    display: flex;
    align-items: center;
}

.nav-notif-btn {
    position: relative;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: none;
    border: none;
    cursor: pointer;
    color: #292929;
    border-radius: 50%;
    transition: background 0.15s;
    flex-shrink: 0;
}

.nav-notif-btn:hover {
    background: #f2f2f2;
}

html.dark .nav-notif-btn {
    color: #ccc8be;
}

html.dark .nav-notif-btn:hover {
    background: #2a2822;
}

/* Unread count badge */
.notif-badge {
    position: absolute;
    top: 3px;
    right: 3px;
    min-width: 15px;
    height: 15px;
    background: #e5371e;
    color: #fff;
    font-size: 9px;
    font-weight: 700;
    font-family: 'Inter', sans-serif;
    border-radius: 8px;
    padding: 0 3px;
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: none;
    line-height: 1;
}

/* Dropdown panel — desktop */
.nav-notif-dropdown {
    display: none;
    position: absolute;
    top: calc(100% + 10px);
    right: 0;
    width: 320px;
    background: #fff;
    border: 1px solid #e4e0d8;
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, .12);
    z-index: 9999;
    overflow: hidden;
    animation: dropdownFadeIn .15s ease;
}

.nav-notif-dropdown.open {
    display: block;
}

/* Mobile — use fixed positioning so it's always fully visible */
@media (max-width: 576px) {
    .nav-notif-dropdown {
        position: fixed;
        top: 64px;
        /* below the header */
        left: 12px;
        right: 12px;
        width: auto;
        /* stretch between left and right */
        border-radius: 12px;
    }
}

.nav-notif-header {
    padding: 12px 16px 10px;
    border-bottom: 1px solid #e4e0d8;
}

.nav-notif-title {
    font-size: 14px;
    font-weight: 600;
    color: #1c1a14;
    font-family: 'Inter', sans-serif;
}

/* Scrollable list */
.nav-notif-list {
    max-height: 380px;
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: #e0e0e0 transparent;
}

.nav-notif-list::-webkit-scrollbar {
    width: 4px;
}

.nav-notif-list::-webkit-scrollbar-thumb {
    background: #e0e0e0;
    border-radius: 4px;
}

/* Empty / loading / error state */
.nav-notif-empty {
    padding: 28px 16px;
    text-align: center;
    font-size: 13px;
    color: #857f76;
    font-family: 'Inter', sans-serif;
}

/* Individual notification row */
.nav-notif-item {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 12px 16px;
    text-decoration: none;
    color: #3d3a33;
    border-bottom: 1px solid #f0ede7;
    transition: background .15s;
    position: relative;
}

.nav-notif-item:last-child {
    border-bottom: none;
}

.nav-notif-item:hover {
    background: #f7f5f0;
    color: #1c1a14;
    text-decoration: none;
}

.nav-notif-item--unread {
    background: #fdf8f0;
}

.nav-notif-item--unread:hover {
    background: #f7f0e4;
}

.nav-notif-avatar {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
    margin-top: 1px;
}

.nav-notif-body {
    flex: 1;
    min-width: 0;
}

.nav-notif-msg {
    font-size: 13px;
    line-height: 1.45;
    color: #3d3a33;
    margin: 0 0 3px;
    font-family: 'Inter', sans-serif;
    word-break: break-word;
}

.nav-notif-time {
    font-size: 11px;
    color: #857f76;
    font-family: 'Inter', sans-serif;
}

/* Green dot for unread */
.nav-notif-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #1a8917;
    flex-shrink: 0;
    margin-top: 5px;
}

/* ── Dark mode ── */
html.dark .nav-notif-dropdown {
    background: #211f1b;
    border-color: #2c2a25;
    box-shadow: 0 8px 32px rgba(0, 0, 0, .5);
}

html.dark .nav-notif-header {
    border-bottom-color: #2c2a25;
}

html.dark .nav-notif-title {
    color: #e6e2d8;
}

html.dark .nav-notif-item {
    color: #ccc8be;
    border-bottom-color: #2c2a25;
}

html.dark .nav-notif-item:hover {
    background: #2a2822;
    color: #e6e2d8;
}

html.dark .nav-notif-item--unread {
    background: #221e16;
}

html.dark .nav-notif-item--unread:hover {
    background: #2a2418;
}

html.dark .nav-notif-msg {
    color: #ccc8be;
}

html.dark .nav-notif-time {
    color: #58554f;
}

html.dark .nav-notif-empty {
    color: #58554f;
}
