/* Notifications Badge (bottom-right) */
.notifications-badge {
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 56px;
    height: 56px;
    background: var(--card-bg);
    /* Match tasks button */
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    transition: all 0.3s ease;
    z-index: 1040;
    color: var(--text-color);
    font-size: 24px;
}

.notifications-badge:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.25);
    color: var(--primary-color);
}

.notifications-badge.active {
    background: var(--primary-color);
    color: white;
}

/* Notification count badge */
.notifications-count {
    position: absolute;
    top: -2px;
    right: -2px;
    min-width: 24px;
    height: 24px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    font-weight: 600;
    color: white;
    padding: 0 6px;
    border: 2px solid var(--surface);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.count-success {
    background: #28a745;
}

.count-info {
    background: #17a2b8;
}

.count-warning {
    background: #ffc107;
    color: #000;
}

.count-error {
    background: #dc3545;
}

/* Sidebar - Fixed Height Floating */
.notifications-sidebar {
    position: fixed;
    right: 20px;
    bottom: 90px;
    top: auto;
    /* Fixed 1/3 screen height */
    height: 35vh;
    min-height: 35vh;
    max-height: 35vh;
    width: 380px;
    max-width: 90vw;
    background: var(--card-bg);
    box-shadow: 0 4px 25px rgba(0, 0, 0, 0.2);
    border-radius: 12px;
    border-left: none;
    z-index: 1050;
    display: flex;
    flex-direction: column;
    animation: slideUpFade 0.3s ease-out;
}

@keyframes slideUpFade {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Header */
.notifications-header {
    padding: 16px 20px;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: var(--hover-bg);
    border-radius: 12px 12px 0 0;
}

.notifications-header h6 {
    font-weight: 600;
    color: var(--text-color);
}

.notifications-header-actions {
    display: flex;
    align-items: center;
    gap: 12px;
}

/* Body */
.notifications-body {
    flex: 1;
    overflow-y: auto;
    padding: 8px;
}

/* Empty state */
.notifications-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 40px 20px;
    color: var(--muted-text);
}

.notifications-empty i {
    font-size: 48px;
    margin-bottom: 12px;
    opacity: 0.5;
}

/* Notification item */
.notification-item {
    margin-bottom: 8px;
    border-radius: 8px;
    border-left: 4px solid;
    background: var(--input-bg);
    transition: all 0.2s ease;
}

.notification-item:hover {
    background: var(--hover-bg);
}

.notification-success {
    border-left-color: #28a745;
}

.notification-error {
    border-left-color: #dc3545;
}

.notification-warning {
    border-left-color: #ffc107;
}

.notification-info {
    border-left-color: #17a2b8;
}

.notification-content {
    display: flex;
    align-items: flex-start;
    padding: 12px;
    gap: 10px;
}

.notification-icon {
    flex-shrink: 0;
    font-size: 20px;
}

.notification-success .notification-icon {
    color: #28a745;
}

.notification-error .notification-icon {
    color: #dc3545;
}

.notification-warning .notification-icon {
    color: #ffc107;
}

.notification-info .notification-icon {
    color: #17a2b8;
}

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

.notification-message {
    word-wrap: break-word;
    font-size: 14px;
    color: var(--text-color);
    margin-bottom: 4px;
}

.notification-time {
    font-size: 12px;
}

.notification-dismiss {
    flex-shrink: 0;
    background: none;
    border: none;
    padding: 0;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: var(--muted-text);
    border-radius: 4px;
    transition: all 0.2s ease;
}

.notification-dismiss:hover {
    background: var(--border-color);
    color: var(--text-color);
}

/* Backdrop */
.notifications-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 1045;
    /* Click catch only */
}