/* Chat & Notifications Styles */

/* Notification Badge Animation */
@keyframes pulse {
    0% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.1);
    }
    100% {
        transform: scale(1);
    }
}

.badge.pulse {
    animation: pulse 1s infinite;
}

/* Notification Dropdown */
.notifications-dropdown {
    max-width: 400px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.notifications-dropdown .dropdown-item {
    white-space: normal;
    padding: 12px 16px;
    border-bottom: 1px solid #f0f0f0;
}

.notifications-dropdown .dropdown-item:last-child {
    border-bottom: none;
}

.notifications-dropdown .dropdown-item:hover {
    background-color: #f8f9fa;
}

/* Chat Styles */
.chat-list {
    overflow-y: auto;
}

.chat-list::-webkit-scrollbar {
    width: 6px;
}

.chat-list::-webkit-scrollbar-track {
    background: #f1f1f1;
}

.chat-list::-webkit-scrollbar-thumb {
    background: #888;
    border-radius: 3px;
}

.chat-list::-webkit-scrollbar-thumb:hover {
    background: #555;
}

.chat-room-item {
    transition: all 0.2s ease;
}

.chat-room-item:hover {
    transform: translateX(-2px);
}

.chat-room-item.active {
    border-left: 4px solid #007bff;
}

.avatar-circle {
    min-width: 40px;
    font-size: 18px;
}

.online-status {
    animation: pulse 2s infinite;
}

/* Message Styles */
.message {
    animation: slideIn 0.3s ease;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.message-bubble {
    word-wrap: break-word;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

.message.sent .message-bubble {
    background: linear-gradient(135deg, #007bff 0%, #0056b3 100%);
}

.message.received .message-bubble {
    background: #f1f3f5;
}

/* Typing Indicator */
#typingIndicator {
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

/* Toast Notifications */
.toast-container {
    z-index: 9999;
}

.toast {
    min-width: 300px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

/* Responsive */
@media (max-width: 768px) {
    .notifications-dropdown {
        max-width: 100vw;
        width: 100vw;
        left: 0 !important;
        right: 0 !important;
    }

    .chat-list {
        height: 300px !important;
    }

    #messagesContainer {
        max-height: 400px !important;
    }
}

/* Notification Item Styles */
.notification-item {
    border-left: 3px solid transparent;
    transition: all 0.2s ease;
}

.notification-item.bg-light {
    border-left-color: #007bff;
    background-color: #f8f9fa !important;
}

.notification-item:hover {
    border-left-color: #0056b3;
}

/* Badge Styles */
.badge.bg-danger {
    animation: pulse 1.5s infinite;
}

/* Connection Status */
#connectionStatus {
    font-size: 0.75rem;
    padding: 2px 8px;
    border-radius: 12px;
}

#connectionStatus.text-success {
    background-color: #d4edda;
}

#connectionStatus.text-danger {
    background-color: #f8d7da;
}
