/* SaveBite – Notification Bell & List Styles */

/* ─── Bell wrapper (relative container for dropdown) ─────── */
.notif-bell-wrapper {
    position: relative;
}

/* ─── Notification Dropdown ───────────────────────────────── */
.notif-dropdown {
    position: absolute;
    top: calc(100% + 0.75rem);
    right: -0.5rem;
    width: 320px;
    background: #FAF9F6;
    border: 1px solid rgba(14,14,16,.1);
    border-radius: var(--radius-md);
    box-shadow: 0 12px 32px rgba(14,14,16,.12);
    z-index: 1100;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-8px) scale(0.97);
    transform-origin: top right;
    transition: opacity 0.2s, visibility 0.2s, transform 0.2s;
    overflow: hidden;
}
.notif-dropdown.open {
    opacity: 1;
    visibility: visible;
    transform: translateY(0) scale(1);
}

.notif-dropdown-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.85rem 1rem 0.65rem;
    border-bottom: 1px solid rgba(14,14,16,.08);
    font-size: 0.9rem;
    font-weight: 700;
    color: #0E0E10;
}

.notif-mark-read-btn {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 0.75rem;
    color: var(--primary);
    font-family: inherit;
    padding: 0;
}
.notif-mark-read-btn:hover { text-decoration: underline; }

.notif-preview-list {
    max-height: 280px;
    overflow-y: auto;
}

.notif-dropdown-footer {
    padding: 0.5rem 1rem;
    border-top: 1px solid rgba(14,14,16,.08);
    text-align: center;
}
.notif-dropdown-footer button {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 0.82rem;
    color: var(--primary);
    font-family: inherit;
    padding: 0.25rem 0;
    width: 100%;
}
.notif-dropdown-footer button:hover { text-decoration: underline; }

/* ─── Notification items ──────────────────────────────────── */
.notif-item {
    display: flex;
    align-items: flex-start;
    gap: 0.65rem;
    padding: 0.75rem 1rem;
    border-bottom: 1px solid rgba(14,14,16,.07);
    cursor: pointer;
    transition: background 0.15s;
    position: relative;
}
.notif-item:last-child { border-bottom: none; }
.notif-item:hover { background: rgba(14,14,16,.04); }
.notif-item.unread { background: rgba(52,168,83,.04); }
.notif-item.unread:hover { background: rgba(52,168,83,.08); }

.notif-item--full {
    border-radius: var(--radius-sm);
    margin-bottom: 0.4rem;
    border: 1px solid var(--border-color);
}

.notif-item-icon {
    font-size: 1.1rem;
    flex-shrink: 0;
    margin-top: 0.1rem;
}

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

.notif-item-title {
    font-size: 0.85rem;
    font-weight: 700;
    color: #0E0E10;
    line-height: 1.3;
}

.notif-item-msg {
    font-size: 0.79rem;
    color: #6B6B72;
    line-height: 1.45;
    margin-top: 0.2rem;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.notif-item-time {
    font-size: 0.72rem;
    color: #6B6B72;
    margin-top: 0.3rem;
}

.notif-unread-dot {
    position: absolute;
    top: 0.85rem;
    right: 0.75rem;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--primary);
    flex-shrink: 0;
}

.notif-empty {
    padding: 1.5rem 1rem;
    text-align: center;
    font-size: 0.85rem;
    color: var(--text-muted);
}
.notif-loading {
    padding: 1.5rem;
    text-align: center;
    font-size: 0.85rem;
    color: var(--text-muted);
}

/* ─── Full Notifications Page ─────────────────────────────── */
.notifications-page {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 900;
    background: var(--surface, #0b0f19);
    overflow-y: auto;
    padding-bottom: 3rem;
}

.notif-page-header {
    position: sticky;
    top: 0;
    background: var(--surface, #0b0f19);
    border-bottom: 1px solid var(--border-color);
    padding: 1rem 1.5rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    z-index: 10;
}

.notif-back-btn {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    background: none;
    border: none;
    cursor: pointer;
    color: var(--primary);
    font-size: 0.875rem;
    font-family: inherit;
    padding: 0.35rem 0.6rem;
    border-radius: var(--radius-sm);
    transition: background 0.15s;
}
.notif-back-btn:hover { background: rgba(16,185,129,0.1); }

.notif-page-title {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text-main);
    margin: 0;
}

.notif-page-list {
    padding: 1rem 1.5rem;
    max-width: 680px;
    margin: 0 auto;
}

/* ── Dark Mode Notification Overrides ── */
[data-theme="dark"] .notif-dropdown {
    background: #1a2540;
    border-color: rgba(255,255,255,0.1);
    box-shadow: 0 12px 32px rgba(0,0,0,0.4);
}
[data-theme="dark"] .notif-dropdown-header {
    color: #f8fafc;
    border-bottom-color: rgba(255,255,255,0.08);
}
[data-theme="dark"] .notif-dropdown-footer { border-top-color: rgba(255,255,255,0.08); }
[data-theme="dark"] .notif-item { border-bottom-color: rgba(255,255,255,0.06); }
[data-theme="dark"] .notif-item:hover { background: rgba(255,255,255,0.06); }
[data-theme="dark"] .notif-item.unread { background: rgba(16,185,129,0.07); }
[data-theme="dark"] .notif-item-title { color: #f8fafc; }

/* ─── Responsive ──────────────────────────────────────────── */
@media (max-width: 768px) {
    .notif-dropdown { width: 290px; right: -1rem; }
    .notif-page-list { padding: 0.75rem 1rem; }
    .notif-page-header { padding: 0.85rem 1rem; }
}
