/* Global notifications bell */

.lh-notif {
    position: relative;
    display: inline-flex;
    flex-shrink: 0;
}

.lh-notif-bell {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border: 0;
    border-radius: 10px;
    background: transparent;
    color: #a1a1aa;
    cursor: pointer;
    transition: color .15s ease, background .15s ease;
}

.lh-notif-bell:hover,
.lh-notif-bell[aria-expanded="true"] {
    color: #fff;
    background: rgba(255, 255, 255, 0.05);
}

.lh-notif-bell .bi {
    font-size: 1.15rem;
    line-height: 1;
}

.lh-notif-badge {
    position: absolute;
    top: 4px;
    right: 4px;
    min-width: 16px;
    height: 16px;
    padding: 0 4px;
    border-radius: 999px;
    background: #ef4444;
    color: #fff;
    font-size: 10px;
    font-weight: 800;
    line-height: 16px;
    text-align: center;
    pointer-events: none;
}

.lh-notif-badge[hidden] {
    display: none !important;
}

.lh-notif-panel {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    z-index: 80;
    width: min(360px, calc(100vw - 24px));
    max-height: min(70vh, 480px);
    display: flex;
    flex-direction: column;
    border-radius: 14px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: #121216;
    box-shadow: 0 18px 50px rgba(0, 0, 0, 0.55);
    overflow: hidden;
}

/* Ancorato in fixed su body: resta nella viewport (sidebar / mobile / desktop) */
.lh-notif-panel.is-anchored {
    position: fixed;
    z-index: 1200;
    right: auto;
    bottom: auto;
    margin: 0;
}

.lh-notif-panel[hidden] {
    display: none !important;
}

.lh-notif-panel-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 12px 14px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.lh-notif-panel-head strong {
    font-size: 14px;
    color: #fafafa;
}

.lh-notif-list {
    overflow-y: auto;
    flex: 1;
}

.lh-notif-empty {
    margin: 0;
    padding: 28px 16px;
    text-align: center;
    color: #71717a;
    font-size: 13px;
}

.lh-notif-row {
    display: flex;
    align-items: stretch;
    gap: 2px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.04);
}

.lh-notif-row.is-unread {
    background: rgba(124, 58, 237, 0.08);
}

.lh-notif-delete {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    flex-shrink: 0;
    margin: 0;
    padding: 0;
    border: 0;
    background: transparent;
    color: #ef4444;
    cursor: pointer;
    transition: background .12s ease, color .12s ease;
}

.lh-notif-delete .bi {
    font-size: 14px;
    line-height: 1;
}

.lh-notif-delete:hover {
    color: #f87171;
    background: rgba(239, 68, 68, 0.12);
}

.lh-notif-item {
    display: flex;
    gap: 12px;
    align-items: flex-start;
    flex: 1;
    min-width: 0;
    padding: 12px 14px 12px 4px;
    text-decoration: none;
    color: inherit;
    border-bottom: 0;
    transition: background .12s ease;
}

.lh-notif-item:hover {
    background: rgba(255, 255, 255, 0.04);
}

.lh-notif-row.is-unread .lh-notif-item:hover {
    background: rgba(124, 58, 237, 0.12);
}

.lh-notif-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    overflow: hidden;
    flex-shrink: 0;
    display: grid;
    place-items: center;
    background: #27272a;
    color: #e4e4e7;
    font-size: 12px;
    font-weight: 700;
}

.lh-notif-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.lh-notif-avatar--icon {
    background: rgba(124, 58, 237, 0.2);
    color: #c4b5fd;
    font-size: 16px;
}

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

.lh-notif-title {
    margin: 0;
    font-size: 13px;
    font-weight: 600;
    color: #f4f4f5;
    line-height: 1.35;
}

.lh-notif-corpo {
    margin: 4px 0 0;
    font-size: 12px;
    color: #a1a1aa;
    line-height: 1.35;
}

.lh-notif-time {
    margin: 6px 0 0;
    font-size: 11px;
    color: #71717a;
}

.lh-acc-mobile-bar .lh-notif {
    margin-left: 0;
}

.lh-acc-user-card .lh-notif {
    margin-left: auto;
}

.lh-blog-topbar-actions .lh-notif-bell {
    width: 36px;
    height: 36px;
    border-radius: 999px;
    border: 1px solid #2a2a32;
    background: #141418;
}

.lh-pub-nav-links .lh-notif-bell,
.lh-landing-nav-links .lh-notif-bell {
    width: 36px;
    height: 36px;
}

@media (max-width: 640px) {
    .lh-notif-panel:not(.is-anchored) {
        position: fixed;
        top: 56px;
        left: 12px;
        right: 12px;
        width: auto;
    }
}
