/* ============================================================
   Notification Bell — clopotel header (Facebook-style)
   ============================================================ */

/* Wrapper poziționat relativ pentru dropdown */
.notif-bell-wrapper {
    position: relative;
    display: inline-flex;
    align-items: center;
}

/* Butonul clopotel */
.notif-bell-btn {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    border: none;
    border-radius: 50%;
    background: transparent;
    color: var(--cork-text-muted, #6b7280);
    font-size: 18px;
    cursor: pointer;
    transition: background 0.18s ease, color 0.18s ease;
    margin-right: 2px;
}

.notif-bell-btn:hover,
.notif-bell-btn:focus-visible {
    background: var(--cork-bg-hover, rgba(0, 0, 0, 0.08));
    color: var(--cork-text, #1a1a2e);
    outline: none;
}

/* Badge număr */
.notif-bell-badge {
    position: absolute;
    top: 2px;
    right: 2px;
    min-width: 17px;
    height: 17px;
    padding: 0 4px;
    border-radius: 9px;
    background: #e02d2d;
    color: #fff;
    font-size: 10px;
    font-weight: 700;
    line-height: 17px;
    text-align: center;
    pointer-events: none;
    box-sizing: border-box;
}

/* Dropdown panel */
.notif-bell-dropdown {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    width: 360px;
    max-width: 96vw;
    background: var(--cork-bg-card, #fff);
    border: 1px solid var(--cork-border-subtle, #e5e7eb);
    border-radius: 12px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.14);
    z-index: 9999;
    overflow: hidden;
    animation: notifBellFadeIn 0.16s ease;
}

@keyframes notifBellFadeIn {
    from { opacity: 0; transform: translateY(-6px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* Header dropdown */
.notif-bell-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 16px 10px;
    border-bottom: 1px solid var(--cork-border-subtle, #e5e7eb);
}

.notif-bell-title {
    font-size: 16px;
    font-weight: 700;
    color: var(--cork-text, #111827);
}

.notif-bell-viewall {
    font-size: 13px;
    font-weight: 600;
    color: var(--cork-primary, #1877f2);
    text-decoration: none;
    padding: 4px 8px;
    border-radius: 6px;
    transition: background 0.15s;
}

.notif-bell-viewall:hover {
    background: var(--cork-bg-hover, rgba(24, 119, 242, 0.08));
    text-decoration: none;
}

/* Lista items */
.notif-bell-list {
    max-height: 420px;
    overflow-y: auto;
    padding: 6px 0;
}

.notif-bell-list::-webkit-scrollbar {
    width: 5px;
}
.notif-bell-list::-webkit-scrollbar-track {
    background: transparent;
}
.notif-bell-list::-webkit-scrollbar-thumb {
    background: var(--cork-border-subtle, #d1d5db);
    border-radius: 4px;
}

/* Loading / empty state */
.notif-bell-loading,
.notif-bell-empty {
    padding: 24px 16px;
    text-align: center;
    color: var(--cork-text-muted, #6b7280);
    font-size: 14px;
}

/* Item individual */
.notif-bell-item {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 10px 14px;
    cursor: default;
    transition: background 0.15s;
    position: relative;
}

.notif-bell-item:hover {
    background: var(--cork-bg-hover, rgba(0, 0, 0, 0.04));
}

/* Icon stânga */
.notif-bell-item-icon {
    flex-shrink: 0;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--cork-primary-light, #e7f0fd);
    color: var(--cork-primary, #1877f2);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 15px;
    margin-top: 2px;
}

/* Corp item */
.notif-bell-item-body {
    flex: 1;
    min-width: 0;
}

.notif-bell-item-msg {
    font-size: 13px;
    font-weight: 500;
    color: var(--cork-text, #111827);
    line-height: 1.4;
    word-break: break-word;
}

.notif-bell-client {
    display: block;
    font-size: 12px;
    color: var(--cork-text-muted, #6b7280);
    margin-top: 2px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.notif-bell-task-link {
    display: inline-block;
    font-size: 12px;
    font-weight: 600;
    color: var(--cork-primary, #1877f2);
    text-decoration: none;
    margin-top: 3px;
    margin-bottom: 2px;
}

.notif-bell-task-link:hover {
    text-decoration: underline;
}

.notif-bell-item-meta {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 4px;
}

.notif-bell-item-date {
    font-size: 11px;
    color: var(--cork-text-muted, #9ca3af);
}

/* Tip pill */
.notif-bell-tip {
    display: inline-block;
    padding: 1px 7px;
    border-radius: 10px;
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.notif-bell-tip--memento  { background: #e0f2fe; color: #0369a1; }
.notif-bell-tip--task     { background: #f0fdf4; color: #15803d; }
.notif-bell-tip--montaj   { background: #fff7ed; color: #c2410c; }
.notif-bell-tip--oferta   { background: #faf5ff; color: #7c3aed; }
.notif-bell-tip--desemnat { background: #fef9c3; color: #854d0e; }

/* Butoane acțiuni (dreapta) */
.notif-bell-item-actions {
    display: flex;
    flex-direction: column;
    gap: 4px;
    flex-shrink: 0;
    opacity: 0;
    transition: opacity 0.15s;
}

.notif-bell-item:hover .notif-bell-item-actions {
    opacity: 1;
}

.notif-bell-action-facut,
.notif-bell-action-sterge {
    width: 26px;
    height: 26px;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    transition: background 0.15s, color 0.15s;
}

.notif-bell-action-facut {
    background: #dcfce7;
    color: #15803d;
}
.notif-bell-action-facut:hover {
    background: #bbf7d0;
}

.notif-bell-action-sterge {
    background: #fee2e2;
    color: #b91c1c;
}
.notif-bell-action-sterge:hover {
    background: #fecaca;
}

.notif-bell-action-facut:disabled,
.notif-bell-action-sterge:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Spațiu la dreapta butonului de logout */
.topbar-logout-form {
    margin-right: 12px;
}

/* ── Dark theme overrides ──────────────────────────────────── */
[data-theme="dark"] .notif-bell-btn {
    color: var(--cork-text-muted, #9ca3af);
}
[data-theme="dark"] .notif-bell-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    color: var(--cork-text, #f3f4f6);
}
[data-theme="dark"] .notif-bell-dropdown {
    background: var(--cork-bg-card, #1e2535);
    border-color: var(--cork-border-subtle, #374151);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.45);
}
[data-theme="dark"] .notif-bell-header {
    border-color: var(--cork-border-subtle, #374151);
}
[data-theme="dark"] .notif-bell-title {
    color: var(--cork-text, #f3f4f6);
}
[data-theme="dark"] .notif-bell-item-msg {
    color: var(--cork-text, #e5e7eb);
}
[data-theme="dark"] .notif-bell-item-icon {
    background: rgba(24, 119, 242, 0.15);
}
[data-theme="dark"] .notif-bell-item:hover {
    background: rgba(255, 255, 255, 0.05);
}
