/* ============================================================================
   NOTIFICATION BELL - Header Component
   ============================================================================ */

.notification-wrapper {
    position: relative !important;
    display: inline-flex !important;
    align-items: center !important;
    z-index: 50 !important;
}

.notification-btn {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 2.5rem !important;
    height: 2.5rem !important;
    border-radius: 0.5rem !important;
    background: #f3f4f6 !important;
    color: #6b7280 !important;
    border: none !important;
    cursor: pointer !important;
    position: relative !important;
    transition: all 0.2s !important;
}

.notification-btn:hover {
    background: #e5e7eb !important;
    color: #374151 !important;
}

.notification-badge {
    position: absolute;
    top: -0.25rem;
    right: -0.25rem;
    background: #cd3301;
    color: white;
    font-size: 0.6875rem;
    font-weight: 600;
    min-width: 1.25rem;
    height: 1.25rem;
    border-radius: 9999px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 0.375rem;
    line-height: 1;
}

/* Hide if it accidentally appears in sidebar */
#nav-sidebar .notification-wrapper,
.nav-sidebar .notification-wrapper {
    display: none !important;
}

/* ============================================================================
   NOTIFICATION PANEL
   ============================================================================ */

.notification-panel {
    position: absolute;
    top: calc(100% + 0.5rem);
    right: 0;
    width: 22rem;
    max-height: 28rem;
    overflow-y: auto;
    background: white;
    border-radius: 0.75rem;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.2);
    border: 1px solid #e5e7eb;
    z-index: 100;
}

.notification-header {
    padding: 1rem 1.25rem;
    border-bottom: 1px solid #f3f4f6;
    font-weight: 600;
    color: #111827;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.notification-header-actions {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
}

.notification-mark-all {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 2rem;
    height: 2rem;
    border-radius: 0.375rem;
    border: none;
    background: transparent;
    color: #9ca3af;
    cursor: pointer;
    transition: all 0.15s;
}

.notification-undo {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 2rem;
    height: 2rem;
    border-radius: 0.375rem;
    border: none;
    background: transparent;
    color: #9ca3af;
    cursor: pointer;
    transition: all 0.15s;
}

.notification-mark-all:hover {
    background: #f3f4f6;
    color: #374151;
}

.notification-undo:hover {
    background: #f3f4f6;
    color: #374151;
}

.notification-undo.is-disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.notification-list {
    padding: 0.25rem 0;
}

/* ============================================================================
   NOTIFICATION ITEMS
   ============================================================================ */

.notification-item {
    padding: 0.75rem 1.25rem;
    border-bottom: 1px solid #f3f4f6;
    transition: background 0.15s;
}

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

.notification-item:hover {
    background: #f9fafb;
}

.notification-item--unread {
    background: #eff6ff;
    border-left: 3px solid #cd3301;
}

.notification-item--unread:hover {
    background: #dbeafe;
}

.notification-item-header {
    display: flex;
    gap: 0.625rem;
    align-items: flex-start;
}

.notification-type-icon {
    flex-shrink: 0;
    margin-top: 0.125rem;
}

.notification-item-content {
    flex: 1;
    min-width: 0;
}

.notification-item-actions {
    margin-left: auto;
    display: inline-flex;
    align-items: center;
    gap: 0.125rem;
    flex-shrink: 0;
}

.notification-delete-global {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.25rem;
    border-radius: 0.375rem;
    border: none;
    background: transparent;
    cursor: pointer;
    color: #ef4444;
    transition: all 0.15s;
}

.notification-delete-global:hover {
    background: #fee2e2;
}

.notification-dismiss {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.125rem;
    border-radius: 0.25rem;
    border: none;
    background: transparent;
    color: #9ca3af;
    cursor: pointer;
    line-height: 1;
    transition: all 0.15s;
}

.notification-dismiss:hover {
    background: #f3f4f6;
    color: #6b7280;
}

.notification-title {
    font-size: 0.8125rem;
    font-weight: 600;
    color: #111827;
    margin-bottom: 0.125rem;
    line-height: 1.3;
}

.notification-text {
    font-size: 0.8125rem;
    color: #6b7280;
    margin-bottom: 0.25rem;
    line-height: 1.4;
}

.notification-time {
    font-size: 0.6875rem;
    color: #9ca3af;
}

.notification-empty,
.notification-loading {
    padding: 2rem;
    text-align: center;
    color: #9ca3af;
    font-size: 0.875rem;
}

/* ============================================================================
   APPROVAL ACTION BUTTONS
   ============================================================================ */

.notification-actions {
    display: flex;
    gap: 0.5rem;
    margin-top: 0.5rem;
    padding-left: 1.625rem;
}

.notification-action-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.375rem 0.75rem;
    border-radius: 0.375rem;
    border: 1px solid transparent;
    font-size: 0.75rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.15s;
    line-height: 1;
}

.notification-action-btn--approve {
    background: #ecfdf5;
    color: #059669;
    border-color: #a7f3d0;
}

.notification-action-btn--approve:hover {
    background: #059669;
    color: white;
}

.notification-action-btn--reject {
    background: #fef2f2;
    color: #dc2626;
    border-color: #fecaca;
}

.notification-action-btn--reject:hover {
    background: #dc2626;
    color: white;
}

/* ============================================================================
   VIEW DETAILS LINK
   ============================================================================ */

.notification-view-link {
    display: block;
    margin-top: 0.375rem;
    padding-left: 1.625rem;
    font-size: 0.75rem;
    color: #cd3301;
    text-decoration: none;
    font-weight: 500;
}

.notification-view-link:hover {
    text-decoration: underline;
}

/* ============================================================================
   TOAST NOTIFICATIONS
   ============================================================================ */

.notification-toast {
    position: fixed;
    bottom: 1.5rem;
    right: 1.5rem;
    padding: 0.75rem 1.25rem;
    border-radius: 0.5rem;
    font-size: 0.875rem;
    font-weight: 500;
    color: white;
    z-index: 10000;
    opacity: 0;
    transform: translateY(1rem);
    transition: all 0.3s ease;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
}

.notification-toast--visible {
    opacity: 1;
    transform: translateY(0);
}

.notification-toast--success {
    background: #059669;
}

.notification-toast--error {
    background: #dc2626;
}

.notification-toast--warning {
    background: #d97706;
}

.notification-toast--info {
    background: #0284c7;
}

/* ============================================================================
   DARK MODE
   ============================================================================ */

.dark .notification-btn {
    background: #374151 !important;
    color: #9ca3af !important;
}

.dark .notification-btn:hover {
    background: #4b5563 !important;
    color: #e5e7eb !important;
}

.dark .notification-panel {
    background: #1f2937;
    border-color: #374151;
}

.dark .notification-header {
    color: #f9fafb;
    border-bottom-color: #374151;
}

.dark .notification-mark-all {
    color: #6b7280;
}

.dark .notification-mark-all:hover {
    background: #374151;
    color: #e5e7eb;
}

.dark .notification-undo {
    color: #6b7280;
}

.dark .notification-undo:hover {
    background: #374151;
    color: #e5e7eb;
}

.dark .notification-undo.is-disabled {
    opacity: 0.5;
}

.dark .notification-item {
    border-bottom-color: #374151;
}

.dark .notification-item:hover {
    background: #1a2332;
}

.dark .notification-item--unread {
    background: #1e293b;
    border-left-color: #cd3301;
}

.dark .notification-item--unread:hover {
    background: #1e3a5f;
}

.dark .notification-title {
    color: #f1f5f9;
}

.dark .notification-text {
    color: #94a3b8;
}

.dark .notification-time {
    color: #6b7280;
}

.dark .notification-dismiss {
    color: #6b7280;
}

.dark .notification-dismiss:hover {
    background: #374151;
    color: #e5e7eb;
}

.dark .notification-action-btn--approve {
    background: #064e3b;
    color: #6ee7b7;
    border-color: #065f46;
}

.dark .notification-action-btn--approve:hover {
    background: #059669;
    color: white;
}

.dark .notification-action-btn--reject {
    background: #450a0a;
    color: #fca5a5;
    border-color: #7f1d1d;
}

.dark .notification-action-btn--reject:hover {
    background: #dc2626;
    color: white;
}

.dark .notification-view-link {
    color: #f36b45;
}
