/* Header bell — js/shared/notification-bell.js */

.nb-wrap {
    position: relative;
}

.nb-count {
    position: absolute;
    top: 2px;
    right: 0;
    min-width: 16px;
    height: 16px;
    padding: 0 4px;
    border-radius: 8px;
    background: var(--color-danger);
    color: var(--color-text-white);
    font-size: 10px;
    font-weight: 700;
    line-height: 16px;
    text-align: center;
    pointer-events: none;
}

.nb-count[hidden] {
    display: none;
}

.nb-panel {
    position: absolute;
    top: calc(100% + 6px);
    right: 0;
    width: 360px;
    max-width: calc(100vw - 16px);
    background: var(--color-bg-white);
    border: 1px solid var(--color-border);
    border-radius: 12px;
    box-shadow: var(--shadow-lg);
    z-index: 1100;
    overflow: hidden;
}

.nb-panel[hidden] {
    display: none;
}

.nb-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 14px;
    border-bottom: 1px solid var(--color-border);
}

.nb-head-title {
    font-size: 14px;
    font-weight: 600;
    color: var(--color-text-primary);
}

.nb-link {
    background: none;
    border: none;
    padding: 0;
    font-size: 12px;
    color: var(--color-primary);
    cursor: pointer;
    text-decoration: none;
}

.nb-link:hover {
    text-decoration: underline;
}

.nb-list {
    max-height: 420px;
    overflow-y: auto;
}

.nb-item {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    width: 100%;
    padding: 10px 14px;
    background: none;
    border: none;
    border-bottom: 1px solid var(--color-border-light, var(--color-border));
    text-align: left;
    cursor: pointer;
    transition: background-color 0.2s;
}

.nb-item:hover {
    background: var(--color-gray-50);
}

.nb-item:last-child {
    border-bottom: none;
}

.nb-item-icon {
    flex: 0 0 28px;
    width: 28px;
    height: 28px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    background: var(--color-warning-bg);
    color: var(--color-warning);
}

.nb-item-icon.nb-kind-dashboard_report {
    background: var(--color-primary-lighter);
    color: var(--color-primary);
}

.nb-item-icon.nb-kind-metric_alert_recovered {
    background: var(--color-success-bg);
    color: var(--color-success);
}

.nb-item-main {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.nb-item-title {
    font-size: 13px;
    color: var(--color-text-primary);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.nb-unread .nb-item-title {
    font-weight: 600;
}

.nb-item-preview {
    font-size: 12px;
    color: var(--color-text-secondary);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.nb-item-time {
    font-size: 11px;
    color: var(--color-text-muted);
}

.nb-dot {
    flex: 0 0 8px;
    width: 8px;
    height: 8px;
    margin-top: 6px;
    border-radius: 50%;
    background: var(--color-primary);
}

.nb-state {
    padding: 28px 14px;
    text-align: center;
    font-size: 13px;
    color: var(--color-text-secondary);
}

.nb-foot {
    padding: 10px 14px;
    text-align: center;
    border-top: 1px solid var(--color-border);
}

@media (max-width: 576px) {
    .nb-panel {
        position: fixed;
        top: 50px;
        left: 8px;
        right: 8px;
        width: auto;
    }
}
