/* Notification System Styles */
.notification-dropdown {
    position: relative;
    margin-right: 10px;
    display: inline-block;
    vertical-align: middle;
}

/* Ensure notification dropdown is properly aligned */
.user-header .notification-dropdown,
.header-right .notification-dropdown {
    display: flex;
    align-items: center;
}

.notification-btn {
    position: relative;
    border: 1px solid #dee2e6;
    background: #fff;
    color: #6c757d;
    transition: all 0.3s ease;
    border-radius: 8px;
    padding: 8px 12px;
    font-size: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 44px;
    min-height: 44px;
}

.notification-btn i {
    font-size: 16px;
    line-height: 1;
    display: block;
}

.notification-btn:hover {
    background: #c5ccd3;
    border-color: #007bff;
    color: #007bff;
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(0, 123, 255, 0.15);
}

/* Professional theme - notification button on dark header */
.theme-professional .notification-btn {
    background: rgba(255, 255, 255, 0.15);
    border-color: rgba(255, 255, 255, 0.3);
    color: #ffffff;
}

.theme-professional .notification-btn:hover {
    background: rgba(255, 255, 255, 0.25);
    border-color: rgba(255, 255, 255, 0.5);
    color: #ffffff;
    box-shadow: 0 2px 8px rgba(255, 255, 255, 0.2);
}

.theme-professional .notification-btn i {
    color: #ffffff;
}

.theme-professional .notification-btn:hover i {
    color: #ffffff;
}

.notification-badge {
    position: absolute;
    top: -8px;
    right: -8px;
    background: #dc3545;
    color: white;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    font-size: 11px;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
    border: 2px solid #fff;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    animation: pulse 2s infinite;
    z-index: 10;
    pointer-events: none;
}

/* Professional theme - notification badge */
.theme-professional .notification-badge {
    background: #f59e0b;
    color: #ffffff;
    border: 2px solid #0d9488;
    box-shadow: 0 2px 6px rgba(245, 158, 11, 0.4);
}

@keyframes pulse {
    0% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.1);
    }
    100% {
        transform: scale(1);
    }
}

.notification-menu {
    width: 380px;
    max-width: 90vw;
    border: none;
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.12);
    padding: 0;
    margin-top: 8px;
    background: #fff;
    overflow: hidden;
    transform: translateY(-10px);
    opacity: 0;
    transition: all 0.3s ease;
}

.notification-menu.show {
    transform: translateY(0);
    opacity: 1;
}

.notification-header {
    padding: 16px 20px;
    border-bottom: 1px solid #e9ecef;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.notification-title {
    margin: 0;
    font-size: 16px;
    font-weight: 600;
    color: #495057;
    display: flex;
    align-items: center;
}

.mark-all-read {
    font-size: 12px;
    color: #007bff;
    text-decoration: none;
    padding: 4px 8px;
    border-radius: 4px;
    transition: all 0.2s ease;
}

.mark-all-read:hover {
    background: #e7f3ff;
    color: #0056b3;
}

.notification-content {
    max-height: 400px;
    overflow-y: auto;
    padding: 0;
}

.notification-content::-webkit-scrollbar {
    width: 4px;
}

.notification-content::-webkit-scrollbar-track {
    background: #f1f1f1;
}

.notification-content::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 2px;
}

.notification-content::-webkit-scrollbar-thumb:hover {
    background: #a8a8a8;
}

.notification-loading {
    padding: 40px 20px;
    text-align: center;
    color: #6c757d;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
}

.notification-empty {
    padding: 40px 20px;
    text-align: center;
    color: #6c757d;
}

.notification-empty i {
    font-size: 32px;
    margin-bottom: 12px;
    opacity: 0.5;
}

.notification-error {
    padding: 20px;
    text-align: center;
    color: #dc3545;
}

.notification-error i {
    font-size: 24px;
    margin-bottom: 8px;
}

.notification-item {
    padding: 16px 20px;
    border-bottom: 1px solid #f1f3f4;
    cursor: pointer;
    transition: all 0.2s ease;
    position: relative;
    display: flex;
    align-items: flex-start;
    gap: 12px;
}

.notification-item:last-child {
    border-bottom: none;
}

.notification-item:hover {
    background: #f8f9fa;
    transform: translateX(2px);
}

.notification-item.unread {
    background: #e7f3ff;
    border-left: 4px solid #007bff;
}

.notification-item.unread:hover {
    background: #d1ecf1;
}

.notification-item-content {
    flex: 1;
    min-width: 0;
}

.notification-item-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 4px;
}

.notification-item-title {
    margin: 0;
    font-size: 14px;
    font-weight: 600;
    color: #212529;
    line-height: 1.3;
    flex: 1;
    margin-right: 8px;
}

.notification-item-time {
    color: #6c757d;
    font-size: 12px;
    white-space: nowrap;
    margin-top: 2px;
}

.notification-item-description {
    margin: 0;
    font-size: 13px;
    color: #6c757d;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.notification-item-indicator {
    width: 8px;
    height: 8px;
    background: #007bff;
    border-radius: 50%;
    margin-top: 6px;
    flex-shrink: 0;
    animation: pulse 2s infinite;
}

.notification-footer {
    padding: 16px 20px;
    border-top: 1px solid #e9ecef;
    background: #f8f9fa;
}

.notification-footer .btn {
    font-size: 13px;
    font-weight: 500;
    border-radius: 6px;
    transition: all 0.2s ease;
}

.notification-footer .btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 123, 255, 0.15);
}

/* Customer theme - ensure notification button is visible on light header */
.theme-customer .notification-btn,
body:not(.theme-professional) .notification-btn {
    background: #fff;
    border-color: #dee2e6;
    color: #6c757d;
}

.theme-customer .notification-btn:hover,
body:not(.theme-professional) .notification-btn:hover {
    background: #c5ccd3;
    border-color: #007bff;
    color: #007bff;
}

.theme-customer .notification-btn i,
body:not(.theme-professional) .notification-btn i {
    color: #6c757d;
}

.theme-customer .notification-btn:hover i,
body:not(.theme-professional) .notification-btn:hover i {
    color: #007bff;
}

/* Mobile Responsiveness */
@media (max-width: 768px) {
    .notification-menu {
        width: 320px;
        max-width: 95vw;
        margin-top: 4px;
    }
    
    .notification-header {
        padding: 12px 16px;
    }
    
    .notification-item {
        padding: 12px 16px;
    }
    
    .notification-footer {
        padding: 12px 16px;
    }
    
    .notification-item-title {
        font-size: 13px;
    }
    
    .notification-item-description {
        font-size: 12px;
    }
    
    .notification-btn {
        padding: 6px 10px;
        font-size: 13px;
    }
    
    .notification-btn i {
        font-size: 14px;
    }
}

@media (max-width: 480px) {
    .notification-menu {
        width: 280px;
        max-width: 98vw;
    }
    
    .notification-header {
        padding: 10px 12px;
    }
    
    .notification-item {
        padding: 10px 12px;
    }
    
    .notification-footer {
        padding: 10px 12px;
    }
}

/* Animation for new notifications */
@keyframes slideInRight {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

.notification-item.new {
    animation: slideInRight 0.3s ease;
}

/* Dark mode support */
@media (prefers-color-scheme: dark) {
    .notification-menu {
        background: #2d3748;
        border: 1px solid #4a5568;
    }
    
    .notification-header {
        background: linear-gradient(135deg, #4a5568 0%, #2d3748 100%);
        border-bottom-color: #4a5568;
    }
    
    .notification-title {
        color: #e2e8f0;
    }
    
    .notification-item {
        border-bottom-color: #4a5568;
    }
    
    .notification-item:hover {
        background: #4a5568;
    }
    
    .notification-item.unread {
        background: #2b6cb0;
        border-left-color: #3182ce;
    }
    
    .notification-item-title {
        color: #e2e8f0;
    }
    
    .notification-item-description {
        color: #a0aec0;
    }
    
    .notification-footer {
        background: #4a5568;
        border-top-color: #4a5568;
    }
}
