/**
 * Notification System Styles
 */

/* Notification Dropdown Container */
.notification-dropdown {
    position: relative;
    display: inline-block;
}

/* Notification Bell Button */
.notification-dropdown .notification-badge {
    position: relative;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0.75rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    border-radius: 8px;
}

.notification-dropdown .notification-badge:hover {
    background: rgba(255, 255, 255, 0.1);
}

.notification-dropdown .notification-badge i {
    font-size: 1.25rem;
    color: var(--text-secondary);
    transition: color 0.2s ease;
}

.notification-dropdown .notification-badge.has-notifications i {
    color: var(--brand-primary);
}

/* Badge Count */
.notification-dropdown .badge-count {
    position: absolute;
    top: 0.25rem;
    right: 0.25rem;
    background: var(--danger-color, #e74c3c);
    color: white;
    font-size: 0.65rem;
    font-weight: 600;
    padding: 0.2rem 0.4rem;
    border-radius: 10px;
    min-width: 1.2rem;
    height: 1.2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

/* Notification Dropdown Menu */
.notification-menu {
    position: absolute;
    top: calc(100% + 0.5rem);
    right: 0;
    width: 380px;
    max-height: 600px;
    background: white;
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.15);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 1000;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.notification-menu.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

/* Header */
.notification-header {
    padding: 1rem 1.25rem;
    border-bottom: 1px solid #e9ecef;
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.notification-header h3 {
    margin: 0;
    font-size: 1rem;
    font-weight: 600;
}

.mark-all-read {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: white;
    padding: 0.4rem 0.6rem;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 0.9rem;
}

.mark-all-read:hover {
    background: rgba(255, 255, 255, 0.3);
}

/* Notification List */
.notification-list {
    max-height: 450px;
    overflow-y: auto;
    padding: 0.5rem 0;
}

.notification-list::-webkit-scrollbar {
    width: 6px;
}

.notification-list::-webkit-scrollbar-track {
    background: #f1f1f1;
}

.notification-list::-webkit-scrollbar-thumb {
    background: #ccc;
    border-radius: 3px;
}

.notification-list::-webkit-scrollbar-thumb:hover {
    background: #999;
}

/* Notification Item */
.notification-item {
    padding: 1rem 1.25rem;
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    cursor: pointer;
    transition: all 0.2s ease;
    position: relative;
    border-left: 3px solid transparent;
}

.notification-item:hover {
    background: #f8f9fa;
}

.notification-item.unread {
    background: #f0f7ff;
    border-left-color: var(--brand-primary, #667eea);
}

.notification-item.unread:hover {
    background: #e6f2ff;
}

/* Notification Icon */
.notification-icon {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    font-size: 1.1rem;
}

.notification-icon.task_assigned {
    background: #e3f2fd;
    color: #1976d2;
}

.notification-icon.task_updated {
    background: #fff3e0;
    color: #f57c00;
}

.notification-icon.task_status_changed {
    background: #f3e5f5;
    color: #7b1fa2;
}

.notification-icon.task_completed {
    background: #e8f5e9;
    color: #388e3c;
}

.notification-icon.task_comment {
    background: #fce4ec;
    color: #c2185b;
}

.notification-icon.test {
    background: #e0f2f1;
    color: #00897b;
}

/* Notification Content */
.notification-content {
    flex: 1;
    min-width: 0;
}

.notification-title {
    font-weight: 600;
    font-size: 0.9rem;
    color: #2c3e50;
    margin-bottom: 0.25rem;
}

.notification-message {
    font-size: 0.85rem;
    color: #6c757d;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.notification-time {
    font-size: 0.75rem;
    color: #95a5a6;
    margin-top: 0.25rem;
}

/* Unread Dot */
.notification-unread-dot {
    width: 8px;
    height: 8px;
    background: var(--brand-primary, #667eea);
    border-radius: 50%;
    position: absolute;
    right: 1rem;
    top: 50%;
    transform: translateY(-50%);
}

/* Empty State */
.notification-empty {
    padding: 3rem 1.5rem;
    text-align: center;
    color: #95a5a6;
}

.notification-empty i {
    font-size: 3rem;
    margin-bottom: 1rem;
    opacity: 0.5;
}

.notification-empty p {
    margin: 0;
    font-size: 0.95rem;
}

/* Loading State */
.notification-loading {
    padding: 2rem;
    text-align: center;
    color: #95a5a6;
}

.notification-loading i {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
}

/* Error State */
.notification-error {
    padding: 2rem;
    text-align: center;
    color: #e74c3c;
}

.notification-error i {
    font-size: 2rem;
    margin-bottom: 0.5rem;
}

/* Footer */
.notification-footer {
    padding: 0.75rem 1.25rem;
    border-top: 1px solid #e9ecef;
    text-align: center;
    background: #f8f9fa;
}

.notification-footer a {
    color: var(--brand-primary, #667eea);
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
    transition: color 0.2s ease;
}

.notification-footer a:hover {
    color: var(--brand-primary-dark, #5568d3);
}

/* Toast Notifications */
.notification-toast {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    background: white;
    padding: 1rem 1.5rem;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    display: flex;
    align-items: center;
    gap: 0.75rem;
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.3s ease;
    z-index: 10000;
}

.notification-toast.show {
    opacity: 1;
    transform: translateY(0);
}

.notification-toast.success {
    border-left: 4px solid #28a745;
}

.notification-toast i {
    font-size: 1.25rem;
    color: #28a745;
}

.notification-toast span {
    font-size: 0.9rem;
    color: #2c3e50;
}

/* Responsive */
@media (max-width: 768px) {
    .notification-menu {
        width: 340px;
        max-width: calc(100vw - 2rem);
    }
    
    .notification-toast {
        bottom: 1rem;
        right: 1rem;
        left: 1rem;
        max-width: calc(100vw - 2rem);
    }
}

/* Animation for new notifications */
@keyframes pulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.1);
    }
}

.notification-badge.has-notifications {
    animation: pulse 2s ease-in-out infinite;
}
