/* LHLWebApp — notification center (bell, dropdown, badge, pages) */

/* ── Bell / dropdown (header) ──────────────────────────────────────────── */
.notification-center { position: relative; }

#ntfBellBtn {
    position: relative;
    padding: 0.25rem 0.5rem;
    font-size: 1.15rem;
    line-height: 1;
}

.ntf-badge {
    position: absolute;
    top: -2px;
    right: -4px;
    min-width: 1.1rem;
    height: 1.1rem;
    padding: 0 4px;
    border-radius: 999px;
    background: #dc3545;
    color: #fff;
    font-size: 0.7rem;
    font-weight: 700;
    line-height: 1.1rem;
    text-align: center;
    box-shadow: 0 0 0 2px #fff;
}

.ntf-dropdown {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    width: 360px;
    max-width: calc(100vw - 24px);
    background: #fff;
    border: 1px solid rgba(0,0,0,.125);
    border-radius: .5rem;
    box-shadow: 0 .5rem 1rem rgba(0,0,0,.15);
    z-index: 1080;
    display: flex;
    flex-direction: column;
    max-height: 480px;
}

.ntf-dropdown-header {
    display: flex;
    align-items: center;
    gap: .5rem;
    padding: .6rem .9rem;
    border-bottom: 1px solid #e9ecef;
}

.ntf-dropdown-list {
    list-style: none;
    margin: 0;
    padding: 0;
    overflow-y: auto;
    flex: 1 1 auto;
}

.ntf-dropdown-list li { border-bottom: 1px solid #f1f3f5; }

.ntf-item {
    display: flex;
    gap: .6rem;
    padding: .6rem .9rem;
    text-decoration: none;
    color: inherit;
}

.ntf-item:hover { background: #f8f9fa; }

.ntf-item.unread { background: #f0f7ff; }

.ntf-item.unread:hover { background: #e7f2ff; }

.ntf-dot {
    width: 8px;
    height: 8px;
    min-width: 8px;
    border-radius: 50%;
    background: #0d6efd;
    margin-top: 6px;
}

.ntf-item.read .ntf-dot { background: #adb5bd; }

.ntf-item-body { min-width: 0; }

.ntf-item-title {
    font-weight: 600;
    font-size: .85rem;
    color: #212529;
}

.ntf-item-msg {
    font-size: .78rem;
    color: #6c757d;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.ntf-item-meta {
    font-size: .72rem;
    color: #adb5bd;
}

.ntf-dropdown-empty {
    padding: 1.5rem;
    text-align: center;
    color: #adb5bd;
}

.ntf-dropdown-footer {
    display: flex;
    align-items: center;
    gap: .5rem;
    padding: .55rem .9rem;
    border-top: 1px solid #e9ecef;
}

/* ── Full list page ────────────────────────────────────────────────────── */
.ntf-item.big { border-radius: .5rem; }

.ntf-list .ntf-item:hover { border-color: rgba(13,110,253,.35); }

/* Badge on the "All" tab count etc. */
.ntf-page-badge {
    background: #dc3545;
    color: #fff;
    border-radius: 999px;
    font-size: .72rem;
    padding: .08rem .45rem;
}

/* ── Settings page ─────────────────────────────────────────────────────── */
.ntf-setting-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: .75rem;
    padding: .55rem .9rem;
}

.ntf-setting-row.disabled {
    opacity: .55;
    pointer-events: none;
}

/* ── Badge specificity override (site.css .lhl-topbar-btn .ntf-badge is more
     specific than .ntf-badge and forces an 8×8 dot. This restores the count.) */
#ntfBellBtn .ntf-badge {
    position: absolute;
    top: -2px;
    right: -4px;
    width: auto;
    min-width: 1.1rem;
    height: 1.1rem;
    padding: 0 4px;
    border-radius: 999px;
    background: #dc3545;
    color: #fff;
    font-size: 0.7rem;
    font-weight: 700;
    line-height: 1.1rem;
    text-align: center;
    box-shadow: 0 0 0 2px #fff;
}

/* ── Unread bell highlight ──────────────────────────────────────────────── */
#ntfBellBtn.has-unread {
    color: var(--sidebar-active-indicator, #6366f1);
    animation: ntfBellPulse 3s ease-in-out infinite;
}

#ntfBellBtn.has-unread:hover {
    filter: brightness(1.15);
}

#ntfBellBtn.has-unread .ntf-badge {
    box-shadow: 0 0 0 2px #fff, 0 0 8px rgba(99, 102, 241, 0.45);
}

@keyframes ntfBellPulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.12); }
}

@media (prefers-reduced-motion: reduce) {
    #ntfBellBtn.has-unread {
        animation: none;
    }
}

/* Top-right fixed bell (browser corner) — stays put across pages */
.notification-center { position: fixed; top: 10px; right: 14px; z-index: 1080; }
.notification-center .ntf-dropdown { right: 0; left: auto; }
@media (max-width: 575.98px) { .notification-center { top: 8px; right: 8px; } }
