/* ===== Notification Bell Plugin ===== */

.nb-wrapper {
    position: relative;
    display: inline-block;
}

/* ---- Bell Button ---- */
.nb-bell-btn {
    position: relative !important;
    background: var(--nb-btn-bg, transparent) !important;
    border: var(--nb-btn-border-width, 0px) solid var(--nb-btn-border-color, transparent) !important;
    cursor: pointer !important;
    padding: var(--nb-btn-padding, 6px) !important;
    border-radius: var(--nb-btn-radius, 50%) !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    transition: background 0.2s ease, box-shadow 0.2s ease !important;
    color: var(--nb-bell-color, #333) !important;
    line-height: 1 !important;
    box-shadow: var(--nb-btn-shadow, none) !important;
    text-decoration: none !important;
    outline: none;
}

.nb-bell-btn:hover {
    background: var(--nb-btn-bg-hover, rgba(0,0,0,0.07)) !important;
    color: var(--nb-bell-color, #333) !important;
}

.nb-bell-btn:focus,
.nb-bell-btn:active {
    color: var(--nb-bell-color, #333) !important;
    background: var(--nb-btn-bg, transparent) !important;
    outline: 2px solid #4a90e2;
    outline-offset: 2px;
}

.nb-bell-icon {
    width: var(--nb-bell-size, 28px) !important;
    height: var(--nb-bell-size, 28px) !important;
    display: block !important;
    color: inherit !important;
    fill: currentColor !important;
    transition: transform 0.3s ease !important;
}

.nb-bell-btn:focus {
    outline: 2px solid #4a90e2;
    outline-offset: 2px;
}

.nb-bell-icon {
    width: var(--nb-bell-size, 28px);
    height: var(--nb-bell-size, 28px);
    display: block;
    color: inherit;
    transition: transform 0.3s ease;
}

.nb-bell-btn.nb-active .nb-bell-icon {
    animation: nb-ring 0.5s ease;
}

@keyframes nb-ring {
    0%   { transform: rotate(0deg); }
    20%  { transform: rotate(-18deg); }
    40%  { transform: rotate(18deg); }
    60%  { transform: rotate(-12deg); }
    80%  { transform: rotate(12deg); }
    100% { transform: rotate(0deg); }
}

/* ---- Badge ---- */
.nb-badge {
    position: absolute;
    top: 2px;
    right: 2px;
    min-width: 16px;
    height: 16px;
    padding: 0 4px;
    border-radius: 8px;
    background: var(--nb-badge-color, #e74c3c);
    color: #fff;
    font-size: 10px;
    font-weight: 700;
    line-height: 16px;
    text-align: center;
    pointer-events: none;
    font-family: sans-serif;
    box-shadow: 0 1px 3px rgba(0,0,0,.25);
    transition: transform 0.15s ease;
}

.nb-badge.nb-hidden {
    display: none;
}

/* ---- Balloon ---- */
.nb-balloon {
    display: none;
    position: absolute;
    top: calc(100% + 8px);
    left: 50%;
    transform: translateX(-50%);
    min-width: 220px;
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 10px;
    box-shadow: 0 8px 24px rgba(0,0,0,.15);
    z-index: 99999;
    overflow: hidden;
    animation: nb-pop 0.18s ease;
}

@keyframes nb-pop {
    from { opacity: 0; transform: translateX(-50%) translateY(-6px) scale(0.97); }
    to   { opacity: 1; transform: translateX(-50%) translateY(0) scale(1); }
}

.nb-balloon::before {
    content: '';
    position: absolute;
    top: -7px;
    left: 50%;
    transform: translateX(-50%);
    border-width: 0 7px 7px 7px;
    border-style: solid;
    border-color: transparent transparent #ddd transparent;
}

.nb-balloon::after {
    content: '';
    position: absolute;
    top: -6px;
    left: 50%;
    transform: translateX(-50%);
    border-width: 0 6px 6px 6px;
    border-style: solid;
    border-color: transparent transparent #fff transparent;
}

.nb-balloon.nb-open {
    display: block;
}

/* ---- Balloon Header ---- */
.nb-balloon-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 14px;
    background: #f8f9fa;
    border-bottom: 1px solid #eee;
    font-family: sans-serif;
    font-weight: 600;
    font-size: 13px;
    color: #444;
}

.nb-close {
    background: none;
    border: none;
    cursor: pointer;
    color: #888;
    font-size: 14px;
    line-height: 1;
    padding: 2px 4px;
    border-radius: 4px;
    transition: color 0.15s, background 0.15s;
}

.nb-close:hover {
    color: #333;
    background: rgba(0,0,0,.07);
}

/* ---- Balloon Body ---- */
.nb-balloon-body {
    padding: 14px 16px;
    color: #333;
    font-family: sans-serif;
    line-height: 1.6;
    max-height: 320px;
    overflow-y: auto;
}

.nb-balloon-body p { margin: 0 0 8px; }
.nb-balloon-body p:last-child { margin-bottom: 0; }
.nb-balloon-body a { color: #4a90e2; }
.nb-balloon-body ul, .nb-balloon-body ol { padding-left: 20px; margin: 6px 0; }
