248 lines
4.7 KiB
CSS
248 lines
4.7 KiB
CSS
/* ==========================================
|
|
Notifications (v0.20.0)
|
|
========================================== */
|
|
|
|
/* ── Bell + Badge ──────────────────────────── */
|
|
|
|
.notif-wrap {
|
|
position: relative;
|
|
display: flex;
|
|
align-items: center;
|
|
}
|
|
|
|
.notif-bell {
|
|
background: none;
|
|
border: none;
|
|
cursor: pointer;
|
|
padding: 5px;
|
|
border-radius: 7px;
|
|
color: var(--text-3);
|
|
display: flex;
|
|
align-items: center;
|
|
position: relative;
|
|
transition: background 0.15s, color 0.15s;
|
|
}
|
|
|
|
.notif-bell:hover {
|
|
background: var(--bg-hover);
|
|
color: var(--text);
|
|
}
|
|
|
|
.notif-badge {
|
|
position: absolute;
|
|
top: 0;
|
|
right: 0;
|
|
min-width: 16px;
|
|
height: 16px;
|
|
line-height: 16px;
|
|
font-size: 10px;
|
|
font-weight: 700;
|
|
text-align: center;
|
|
border-radius: 8px;
|
|
background: var(--danger);
|
|
color: #fff;
|
|
padding: 0 4px;
|
|
pointer-events: none;
|
|
}
|
|
|
|
/* ── Dropdown ──────────────────────────────── */
|
|
|
|
.notif-dropdown {
|
|
display: none;
|
|
position: absolute;
|
|
top: 100%;
|
|
right: 0;
|
|
width: 360px;
|
|
max-height: 480px;
|
|
background: var(--bg-surface);
|
|
border: 1px solid var(--border);
|
|
border-radius: 8px;
|
|
box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
|
|
z-index: 1000;
|
|
overflow: hidden;
|
|
}
|
|
|
|
.notif-dd-header {
|
|
display: flex;
|
|
justify-content: space-between;
|
|
align-items: center;
|
|
padding: 10px 14px;
|
|
border-bottom: 1px solid var(--border);
|
|
font-weight: 600;
|
|
font-size: 13px;
|
|
}
|
|
|
|
.notif-mark-all {
|
|
background: none;
|
|
border: none;
|
|
color: var(--accent);
|
|
cursor: pointer;
|
|
font-size: 12px;
|
|
padding: 2px 6px;
|
|
border-radius: 4px;
|
|
}
|
|
|
|
.notif-mark-all:hover {
|
|
background: var(--bg-hover);
|
|
}
|
|
|
|
.notif-dd-list {
|
|
overflow-y: auto;
|
|
max-height: 380px;
|
|
}
|
|
|
|
.notif-dd-footer {
|
|
padding: 8px 14px;
|
|
border-top: 1px solid var(--border);
|
|
text-align: center;
|
|
}
|
|
|
|
.notif-view-all {
|
|
background: none;
|
|
border: none;
|
|
color: var(--accent);
|
|
cursor: pointer;
|
|
font-size: 12px;
|
|
}
|
|
|
|
.notif-view-all:hover {
|
|
text-decoration: underline;
|
|
}
|
|
|
|
/* ── Notification Item ─────────────────────── */
|
|
|
|
.notif-item,
|
|
.notif-panel-item {
|
|
display: flex;
|
|
align-items: flex-start;
|
|
padding: 10px 14px;
|
|
cursor: pointer;
|
|
transition: background 0.15s;
|
|
border-bottom: 1px solid var(--border);
|
|
}
|
|
|
|
.notif-item:hover,
|
|
.notif-panel-item:hover {
|
|
background: var(--bg-hover);
|
|
}
|
|
|
|
.notif-item.notif-unread,
|
|
.notif-panel-item.notif-unread {
|
|
background: var(--accent-dim);
|
|
}
|
|
|
|
.notif-dot {
|
|
flex-shrink: 0;
|
|
width: 18px;
|
|
font-size: 10px;
|
|
margin-top: 3px;
|
|
color: var(--accent);
|
|
}
|
|
|
|
.notif-item:not(.notif-unread) .notif-dot,
|
|
.notif-panel-item:not(.notif-unread) .notif-dot {
|
|
color: var(--text-tertiary, #555);
|
|
}
|
|
|
|
.notif-body {
|
|
flex: 1;
|
|
min-width: 0;
|
|
}
|
|
|
|
.notif-title {
|
|
font-size: 13px;
|
|
line-height: 1.4;
|
|
color: var(--text);
|
|
}
|
|
|
|
.notif-detail {
|
|
font-size: 12px;
|
|
color: var(--text-2);
|
|
margin-top: 2px;
|
|
line-height: 1.3;
|
|
overflow: hidden;
|
|
text-overflow: ellipsis;
|
|
white-space: nowrap;
|
|
}
|
|
|
|
.notif-time {
|
|
font-size: 11px;
|
|
color: var(--text-tertiary, #666);
|
|
margin-top: 3px;
|
|
}
|
|
|
|
.notif-empty {
|
|
padding: 32px 14px;
|
|
text-align: center;
|
|
color: var(--text-2);
|
|
font-size: 13px;
|
|
}
|
|
|
|
/* ── Panel ─────────────────────────────────── */
|
|
|
|
.notif-panel {
|
|
height: 100%;
|
|
display: flex;
|
|
flex-direction: column;
|
|
}
|
|
|
|
.notif-panel-toolbar {
|
|
display: flex;
|
|
gap: 6px;
|
|
padding: 8px 12px;
|
|
border-bottom: 1px solid var(--border);
|
|
}
|
|
|
|
.notif-panel-list {
|
|
flex: 1;
|
|
overflow-y: auto;
|
|
min-height: 0;
|
|
}
|
|
|
|
.notif-panel-row {
|
|
display: flex;
|
|
align-items: flex-start;
|
|
width: 100%;
|
|
}
|
|
|
|
.notif-delete {
|
|
flex-shrink: 0;
|
|
background: none;
|
|
border: none;
|
|
color: var(--text-tertiary, #555);
|
|
cursor: pointer;
|
|
padding: 2px 6px;
|
|
font-size: 12px;
|
|
border-radius: 4px;
|
|
opacity: 0;
|
|
transition: opacity 0.15s;
|
|
}
|
|
|
|
.notif-panel-item:hover .notif-delete {
|
|
opacity: 1;
|
|
}
|
|
|
|
.notif-delete:hover {
|
|
color: var(--danger);
|
|
background: var(--bg-hover);
|
|
}
|
|
|
|
.notif-panel-more {
|
|
padding: 8px 12px;
|
|
text-align: center;
|
|
border-top: 1px solid var(--border);
|
|
}
|
|
|
|
/* ── Mobile ────────────────────────────────── */
|
|
|
|
@media (max-width: 768px) {
|
|
.notif-dropdown {
|
|
position: fixed;
|
|
top: 48px;
|
|
left: 8px;
|
|
right: 8px;
|
|
width: auto;
|
|
max-height: calc(100vh - 96px);
|
|
}
|
|
}
|