/*
 * Notification Center — topbar bell + dropdown styles.
 * (c) Adrian Ranta. All rights reserved. Unauthorised use, reproduction and or distribution is strictly prohibited.
 * Mirrors .user-avatar (bell), .unread-badge (badge) and .user-dropdown (panel)
 * from css/main.css so the header stays visually consistent.
 */

.notif-bell-wrap {
    position: relative;
    flex: 0 0 auto;
}

/* Bell button — mirrors .user-avatar's circular header control */
.notif-bell-btn {
    width: 36px;
    height: 36px;
    background: rgba(255, 255, 255, 0.2);
    border: none;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background 0.3s ease;
    position: relative;
    padding: 0;
}
.notif-bell-btn:hover { background: rgba(255, 255, 255, 0.3); }
.notif-bell-btn svg { color: #fff; }

/* Unread badge — mirrors .unread-badge */
.notif-bell-badge {
    position: absolute;
    top: -4px;
    right: -4px;
    background: #e74c3c;
    color: #fff;
    font-size: 10px;
    font-weight: 700;
    min-width: 16px;
    height: 16px;
    line-height: 16px;
    text-align: center;
    border-radius: 50%;
    padding: 0 4px;
    pointer-events: none;
}

/* Dropdown panel — mirrors .user-dropdown */
.notif-panel {
    position: absolute;
    top: 100%;
    right: 0;
    margin-top: 10px;
    width: 360px;
    max-width: 90vw;
    background: #fff;
    border-radius: 10px;
    box-shadow: 0 8px 28px rgba(0, 0, 0, 0.18);
    display: none;
    z-index: 1001;
    overflow: hidden;
}
.notif-panel.is-open { display: block; }

.notif-panel-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 14px;
    border-bottom: 1px solid #eef2f7;
}
.notif-panel-title {
    font-size: 14px;
    font-weight: 700;
    color: #0f172a;
}
.notif-mark-all {
    background: none;
    border: none;
    color: #2563eb;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    padding: 2px 4px;
}
.notif-mark-all:hover { text-decoration: underline; }

.notif-list {
    max-height: 420px;
    overflow-y: auto;
}
.notif-loading,
.notif-empty {
    padding: 22px 16px;
    text-align: center;
    color: #64748b;
    font-size: 13px;
}

/* Notification item — full-width button so the whole row is clickable */
.notif-item {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    width: 100%;
    text-align: left;
    background: none;
    border: none;
    border-bottom: 1px solid #f1f5f9;
    padding: 11px 14px;
    cursor: pointer;
    transition: background 0.15s ease;
}
.notif-item:hover { background: #f8fafc; }
.notif-item.is-unread { background: #eff6ff; }
.notif-item.is-unread:hover { background: #e0edff; }

.notif-item-dot {
    flex: none;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #2563eb;
    margin-top: 5px;
}
.notif-item-main {
    flex: 1 1 auto;
    min-width: 0;
}
.notif-item-title {
    display: block;
    font-size: 13.5px;
    font-weight: 600;
    color: #0f172a;
}
.notif-item-body {
    margin-top: 2px;
    font-size: 12.5px;
    color: #475569;
    line-height: 1.35;
    overflow-wrap: anywhere;
}
.notif-item-when {
    display: block;
    margin-top: 4px;
    font-size: 11px;
    color: #94a3b8;
}

/* --- Dark mode --- */
body.dark-mode .notif-panel { background: #1e293b; box-shadow: 0 8px 28px rgba(0, 0, 0, 0.5); }
body.dark-mode .notif-panel-head { border-bottom-color: #334155; }
body.dark-mode .notif-panel-title { color: #e2e8f0; }
body.dark-mode .notif-item { border-bottom-color: #334155; }
body.dark-mode .notif-item:hover { background: #273449; }
body.dark-mode .notif-item.is-unread { background: #1d2b44; }
body.dark-mode .notif-item.is-unread:hover { background: #24365a; }
body.dark-mode .notif-item-title { color: #e2e8f0; }
body.dark-mode .notif-item-body { color: #cbd5e1; }
body.dark-mode .notif-loading,
body.dark-mode .notif-empty { color: #94a3b8; }
