/* =======================================================================
   Labelling Notification Bell & Dropdown
   ======================================================================= */

/* Bell container */
.labelling-notif-bell {
    position: relative;
    cursor: pointer;
    padding: 4px 8px;
    border-radius: 6px;
    transition: background 0.2s;
}
.labelling-notif-bell:hover {
    background: rgba(255,255,255,0.15);
}
.labelling-notif-bell .bell-icon {
    font-size: 1.25rem;
    color: #fff;
}
.labelling-notif-bell .badge-count {
    position: absolute;
    top: 0;
    right: 2px;
    background: #dc3545;
    color: #fff;
    font-size: 0.65rem;
    font-weight: 700;
    padding: 1px 5px;
    border-radius: 10px;
    min-width: 16px;
    text-align: center;
    line-height: 1.3;
}

/* Dropdown panel */
.labelling-notif-dropdown {
    position: absolute;
    top: calc(100% + 6px);
    right: 0;
    width: 370px;
    max-height: 480px;
    background: #fff;
    border: 1px solid #dee2e6;
    border-radius: 10px;
    box-shadow: 0 8px 30px rgba(0,0,0,0.15);
    z-index: 2000;
    display: none;
    flex-direction: column;
    overflow: hidden;
}
.labelling-notif-dropdown.show {
    display: flex;
}
.labelling-notif-dropdown .notif-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 16px;
    border-bottom: 1px solid #eee;
    background: #f8f9fa;
}
.labelling-notif-dropdown .notif-header h6 {
    margin: 0;
    font-weight: 600;
    font-size: 0.9rem;
    color: #333;
}
.labelling-notif-dropdown .notif-header .mark-all-btn {
    font-size: 0.75rem;
    color: #0d6efd;
    cursor: pointer;
    border: none;
    background: none;
    padding: 0;
}
.labelling-notif-dropdown .notif-header .mark-all-btn:hover {
    text-decoration: underline;
}

/* Items list */
.labelling-notif-dropdown .notif-list {
    overflow-y: auto;
    max-height: 380px;
    flex: 1;
}
.labelling-notif-dropdown .notif-item {
    display: flex;
    gap: 10px;
    padding: 10px 16px;
    border-bottom: 1px solid #f0f0f0;
    cursor: pointer;
    transition: background 0.15s;
}
.labelling-notif-dropdown .notif-item:hover {
    background: #f5f8ff;
}
.labelling-notif-dropdown .notif-item.unread {
    background: #eef3ff;
}
.labelling-notif-dropdown .notif-item .notif-icon {
    font-size: 1.3rem;
    flex-shrink: 0;
    width: 32px;
    text-align: center;
    line-height: 1.5;
}
.labelling-notif-dropdown .notif-item .notif-content {
    flex: 1;
    min-width: 0;
}
.labelling-notif-dropdown .notif-item .notif-title {
    font-size: 0.82rem;
    font-weight: 500;
    color: #333;
    line-height: 1.3;
    margin-bottom: 2px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.labelling-notif-dropdown .notif-item .notif-meta {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.72rem;
    color: #888;
}
.labelling-notif-dropdown .notif-item .notif-meta .severity-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    flex-shrink: 0;
}
.labelling-notif-dropdown .notif-item .notif-meta .severity-dot.info    { background: #0d6efd; }
.labelling-notif-dropdown .notif-item .notif-meta .severity-dot.success { background: #198754; }
.labelling-notif-dropdown .notif-item .notif-meta .severity-dot.warning { background: #ffc107; }
.labelling-notif-dropdown .notif-item .notif-meta .severity-dot.error   { background: #dc3545; }

/* Empty state */
.labelling-notif-dropdown .notif-empty {
    text-align: center;
    padding: 32px 16px;
    color: #999;
    font-size: 0.85rem;
}
.labelling-notif-dropdown .notif-empty i {
    font-size: 2rem;
    display: block;
    margin-bottom: 8px;
    opacity: 0.4;
}

/* Footer */
.labelling-notif-dropdown .notif-footer {
    border-top: 1px solid #eee;
    padding: 8px 16px;
    text-align: center;
    background: #f8f9fa;
}
.labelling-notif-dropdown .notif-footer a {
    font-size: 0.78rem;
    color: #0d6efd;
    text-decoration: none;
    cursor: pointer;
}
.labelling-notif-dropdown .notif-footer a:hover {
    text-decoration: underline;
}

/* ======================================================================
   Modal (full notification list)
   ====================================================================== */
.labelling-notif-modal-overlay {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0,0,0,0.4);
    z-index: 3000;
    display: none;
    justify-content: center;
    align-items: center;
}
.labelling-notif-modal-overlay.show {
    display: flex;
}
.labelling-notif-modal {
    background: #fff;
    width: 560px;
    max-width: 95vw;
    max-height: 80vh;
    border-radius: 12px;
    box-shadow: 0 12px 40px rgba(0,0,0,0.2);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}
.labelling-notif-modal .modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 20px;
    border-bottom: 1px solid #eee;
    background: #f8f9fa;
}
.labelling-notif-modal .modal-header h5 {
    margin: 0;
    font-weight: 600;
    font-size: 1rem;
    color: #333;
}
.labelling-notif-modal .modal-header .close-btn {
    background: none;
    border: none;
    font-size: 1.3rem;
    cursor: pointer;
    color: #666;
    padding: 0 4px;
}
.labelling-notif-modal .modal-body {
    flex: 1;
    overflow-y: auto;
    padding: 0;
}
.labelling-notif-modal .modal-body .notif-item {
    display: flex;
    gap: 10px;
    padding: 12px 20px;
    border-bottom: 1px solid #f0f0f0;
    cursor: pointer;
    transition: background 0.15s;
}
.labelling-notif-modal .modal-body .notif-item:hover {
    background: #f5f8ff;
}
.labelling-notif-modal .modal-body .notif-item.unread {
    background: #eef3ff;
}
.labelling-notif-modal .modal-body .notif-item .notif-icon {
    font-size: 1.4rem;
    flex-shrink: 0;
    width: 36px;
    text-align: center;
    line-height: 1.5;
}
.labelling-notif-modal .modal-body .notif-item .notif-content {
    flex: 1;
    min-width: 0;
}
.labelling-notif-modal .modal-body .notif-item .notif-title {
    font-size: 0.85rem;
    font-weight: 500;
    color: #333;
    line-height: 1.4;
    margin-bottom: 2px;
}
.labelling-notif-modal .modal-body .notif-item .notif-subtitle {
    font-size: 0.78rem;
    color: #666;
    margin-bottom: 4px;
}
.labelling-notif-modal .modal-body .notif-item .notif-meta {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.72rem;
    color: #888;
}
.labelling-notif-modal .modal-body .notif-item .notif-meta .severity-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    flex-shrink: 0;
}
.labelling-notif-modal .modal-body .notif-item .notif-meta .severity-dot.info    { background: #0d6efd; }
.labelling-notif-modal .modal-body .notif-item .notif-meta .severity-dot.success { background: #198754; }
.labelling-notif-modal .modal-body .notif-item .notif-meta .severity-dot.warning { background: #ffc107; }
.labelling-notif-modal .modal-body .notif-item .notif-meta .severity-dot.error   { background: #dc3545; }

.labelling-notif-modal .modal-footer {
    display: flex;
    justify-content: center;
    padding: 10px 20px;
    border-top: 1px solid #eee;
    background: #f8f9fa;
}
.labelling-notif-modal .modal-footer .load-more-btn {
    font-size: 0.82rem;
    color: #0d6efd;
    cursor: pointer;
    border: none;
    background: none;
    padding: 4px 12px;
}
.labelling-notif-modal .modal-footer .load-more-btn:hover {
    text-decoration: underline;
}
.labelling-notif-modal .modal-footer .load-more-btn:disabled {
    color: #ccc;
    cursor: default;
    text-decoration: none;
}

/* Mobile responsive */
@media (max-width: 480px) {
    .labelling-notif-dropdown {
        width: calc(100vw - 20px);
        right: -60px;
    }
    .labelling-notif-modal {
        width: 100vw;
        max-width: 100vw;
        max-height: 100vh;
        border-radius: 0;
    }
}
