/* Infinity Wear - Notification System Styles */

/* Notification Container */
.notifications-container {
    max-height: 500px;
    overflow-y: auto;
    padding: 0;
    margin: 0;
}

.notification-item {
    display: flex;
    align-items: center;
    padding: 12px 16px;
    border-bottom: 1px solid #e9ecef;
    background: #fff;
    transition: all 0.3s ease;
    cursor: pointer;
    position: relative;
}

.notification-item:hover {
    background: #f8f9fa;
    transform: translateX(2px);
}

.notification-item.read {
    opacity: 0.7;
    background: #f8f9fa;
}

.notification-item.notification-enter {
    animation: slideInRight 0.3s ease;
}

@keyframes slideInRight {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* Notification Icon */
.notification-icon {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-left: 12px;
    flex-shrink: 0;
}

.notification-icon i {
    font-size: 18px;
    color: #fff;
}

.notification-item[data-type="order"] .notification-icon {
    background: linear-gradient(135deg, #28a745, #20c997);
}

.notification-item[data-type="contact"] .notification-icon {
    background: linear-gradient(135deg, #17a2b8, #6f42c1);
}

.notification-item[data-type="whatsapp"] .notification-icon {
    background: linear-gradient(135deg, #25d366, #128c7e);
}

.notification-item[data-type="importer_order"] .notification-icon {
    background: linear-gradient(135deg, #ffc107, #fd7e14);
}

.notification-item[data-type="system"] .notification-icon {
    background: linear-gradient(135deg, #6c757d, #495057);
}

.notification-item[data-type="task"] .notification-icon {
    background: linear-gradient(135deg, #007bff, #6610f2);
}

.notification-item[data-type="marketing"] .notification-icon {
    background: linear-gradient(135deg, #e83e8c, #dc3545);
}

.notification-item[data-type="sales"] .notification-icon {
    background: linear-gradient(135deg, #28a745, #20c997);
}

/* Notification Content */
.notification-content {
    flex: 1;
    min-width: 0;
}

.notification-title {
    font-weight: 600;
    font-size: 14px;
    color: #212529;
    margin-bottom: 4px;
    line-height: 1.4;
}

.notification-message {
    font-size: 13px;
    color: #6c757d;
    line-height: 1.4;
    margin-bottom: 4px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.notification-time {
    font-size: 11px;
    color: #adb5bd;
    font-weight: 500;
}

/* Notification Actions */
.notification-actions {
    display: flex;
    gap: 4px;
    opacity: 0;
    transition: opacity 0.2s ease;
}

.notification-item:hover .notification-actions {
    opacity: 1;
}

.notification-actions .btn {
    padding: 4px 8px;
    font-size: 11px;
    border-radius: 4px;
    border: none;
    cursor: pointer;
    transition: all 0.2s ease;
}

.notification-actions .btn:hover {
    transform: scale(1.05);
}

/* Toast Notifications */
.toast-notification {
    position: fixed;
    top: 20px;
    right: 20px;
    background: #fff;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    padding: 16px;
    min-width: 300px;
    max-width: 400px;
    z-index: 9999;
    display: flex;
    align-items: center;
    gap: 12px;
    transform: translateX(100%);
    transition: transform 0.3s ease;
}

.toast-notification.show {
    transform: translateX(0);
}

.toast-notification.hide {
    transform: translateX(100%);
}

.toast-icon {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #007bff;
    color: #fff;
    flex-shrink: 0;
}

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

.toast-title {
    font-weight: 600;
    font-size: 14px;
    color: #212529;
    margin-bottom: 2px;
}

.toast-message {
    font-size: 13px;
    color: #6c757d;
    line-height: 1.4;
}

.toast-close {
    background: none;
    border: none;
    font-size: 18px;
    color: #adb5bd;
    cursor: pointer;
    padding: 0;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.2s ease;
}

.toast-close:hover {
    background: #f8f9fa;
    color: #6c757d;
}

/* Notification Badge */
.notification-badge {
    position: absolute;
    top: -8px;
    right: -8px;
    background: #dc3545;
    color: #fff;
    font-size: 10px;
    font-weight: 600;
    padding: 2px 6px;
    border-radius: 10px;
    min-width: 18px;
    height: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
}

/* Connection Status */
.connection-status {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    font-weight: 500;
    padding: 4px 8px;
    border-radius: 12px;
}

.connection-status.connected {
    background: #d4edda;
    color: #155724;
}

.connection-status.disconnected {
    background: #f8d7da;
    color: #721c24;
}

.connection-status::before {
    content: '';
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: currentColor;
}

/* Notification Stats */
.notification-stats {
    display: flex;
    gap: 16px;
    padding: 12px;
    background: #f8f9fa;
    border-radius: 8px;
    margin-bottom: 16px;
}

.stat-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
}

.stat-label {
    font-size: 11px;
    color: #6c757d;
    font-weight: 500;
}

.stat-value {
    font-size: 16px;
    font-weight: 700;
    color: #212529;
}

/* Notification Dropdown */
.notification-dropdown {
    position: relative;
    display: inline-block;
}

.notification-dropdown-toggle {
    position: relative;
    background: none;
    border: none;
    padding: 8px;
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.2s ease;
}

.notification-dropdown-toggle:hover {
    background: #f8f9fa;
}

.notification-dropdown-menu {
    position: absolute;
    top: 100%;
    right: 0;
    background: #fff;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    min-width: 320px;
    max-width: 400px;
    max-height: 500px;
    overflow: hidden;
    z-index: 1000;
    transform: translateY(-10px);
    opacity: 0;
    visibility: hidden;
    transition: all 0.2s ease;
}

.notification-dropdown-menu.show {
    transform: translateY(0);
    opacity: 1;
    visibility: visible;
}

.notification-dropdown-header {
    padding: 16px;
    border-bottom: 1px solid #e9ecef;
    background: #f8f9fa;
}

.notification-dropdown-title {
    font-size: 16px;
    font-weight: 600;
    color: #212529;
    margin: 0;
}

.notification-dropdown-actions {
    display: flex;
    gap: 8px;
    margin-top: 12px;
}

.notification-dropdown-actions .btn {
    font-size: 12px;
    padding: 6px 12px;
}

/* Empty State */
.notifications-empty {
    text-align: center;
    padding: 40px 20px;
    color: #6c757d;
}

.notifications-empty i {
    font-size: 48px;
    color: #dee2e6;
    margin-bottom: 16px;
}

.notifications-empty h4 {
    font-size: 16px;
    font-weight: 600;
    color: #495057;
    margin-bottom: 8px;
}

.notifications-empty p {
    font-size: 14px;
    margin: 0;
}

/* Loading State */
.notifications-loading {
    text-align: center;
    padding: 20px;
    color: #6c757d;
}

.notifications-loading i {
    font-size: 24px;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

/* Responsive Design */
@media (max-width: 768px) {
    .notification-item {
        padding: 10px 12px;
    }
    
    .notification-icon {
        width: 32px;
        height: 32px;
        margin-left: 8px;
    }
    
    .notification-icon i {
        font-size: 14px;
    }
    
    .notification-title {
        font-size: 13px;
    }
    
    .notification-message {
        font-size: 12px;
    }
    
    .toast-notification {
        right: 10px;
        left: 10px;
        min-width: auto;
    }
    
    .notification-dropdown-menu {
        right: -20px;
        left: -20px;
        min-width: auto;
    }
    
    .notification-stats {
        flex-wrap: wrap;
        gap: 12px;
    }
}

/* Dark Mode Support */
@media (prefers-color-scheme: dark) {
    .notification-item {
        background: #2d3748;
        border-bottom-color: #4a5568;
        color: #e2e8f0;
    }
    
    .notification-item:hover {
        background: #4a5568;
    }
    
    .notification-item.read {
        background: #4a5568;
        opacity: 0.8;
    }
    
    .notification-title {
        color: #e2e8f0;
    }
    
    .notification-message {
        color: #a0aec0;
    }
    
    .notification-time {
        color: #718096;
    }
    
    .toast-notification {
        background: #2d3748;
        border-color: #4a5568;
        color: #e2e8f0;
    }
    
    .notification-dropdown-menu {
        background: #2d3748;
        border-color: #4a5568;
    }
    
    .notification-dropdown-header {
        background: #4a5568;
        border-bottom-color: #718096;
    }
    
    .notification-dropdown-title {
        color: #e2e8f0;
    }
}

/* Animation Classes */
.fade-in {
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

.slide-up {
    animation: slideUp 0.3s ease;
}

@keyframes slideUp {
    from {
        transform: translateY(20px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

/* Notification Priority Colors */
.notification-item[data-priority="urgent"] {
    border-left: 4px solid #dc3545;
}

.notification-item[data-priority="high"] {
    border-left: 4px solid #fd7e14;
}

.notification-item[data-priority="normal"] {
    border-left: 4px solid #007bff;
}

.notification-item[data-priority="low"] {
    border-left: 4px solid #28a745;
}

/* Notification Sound Indicator */
.notification-item.has-sound::after {
    content: '🔊';
    position: absolute;
    top: 8px;
    right: 8px;
    font-size: 12px;
    opacity: 0.6;
}
