/* Additional CSS Styles for Chat */

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateX(-20px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* Message Animations */
.message {
    animation: slideIn 0.3s ease;
}

.message.sent .message-content {
    animation: fadeIn 0.3s ease;
}

.message.received .message-content {
    animation: fadeIn 0.3s ease;
}

/* User Item Animation */
.chat-user-item {
    animation: fadeIn 0.3s ease;
}

/* Scrollbar Styling */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.2);
    border-radius: 4px;
    transition: background 0.3s ease;
}

::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.3);
}

/* Typing Indicator */
.typing-indicator {
    display: flex;
    gap: 4px;
    padding: 10px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    margin-bottom: 10px;
}

.typing-indicator span {
    width: 8px;
    height: 8px;
    background: rgba(255, 255, 255, 0.6);
    border-radius: 50%;
    animation: typing 1.4s infinite;
}

.typing-indicator span:nth-child(2) {
    animation-delay: 0.2s;
}

.typing-indicator span:nth-child(3) {
    animation-delay: 0.4s;
}

@keyframes typing {
    0%, 60%, 100% {
        transform: translateY(0);
        opacity: 0.6;
    }
    30% {
        transform: translateY(-10px);
        opacity: 1;
    }
}

/* Online Status */
.online-status {
    position: absolute;
    bottom: 2px;
    right: 2px;
    width: 14px;
    height: 14px;
    background: #4cd137;
    border: 2px solid #1a1a2e;
    border-radius: 50%;
}

/* Hover Effects */
.message.sent .message-content:hover {
    transform: scale(1.02);
    transition: transform 0.2s ease;
}

.message.received .message-content:hover {
    transform: scale(1.02);
    transition: transform 0.2s ease;
}

/* Input Focus Effect */
#message-input:focus {
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.3);
}

/* Send Button Animation */
.send-btn:active {
    transform: scale(0.95);
}

/* Toggle Button Pulse */
@keyframes pulse {
    0%, 100% {
        box-shadow: 0 0 0 0 rgba(102, 126, 234, 0.4);
    }
    50% {
        box-shadow: 0 0 0 10px rgba(102, 126, 234, 0);
    }
}

.chat-toggle-btn:hover {
    animation: pulse 1.5s infinite;
}

/* Responsive Improvements */
@media (max-width: 768px) {
    .message-content {
        max-width: 85%;
    }
    
    .user-avatar,
    .header-avatar {
        width: 40px;
        height: 40px;
    }
    
    .message-avatar {
        width: 35px;
        height: 35px;
    }
}

/* Dark Mode Enhancements */
.chat-sidebar {
    background: rgba(20, 20, 35, 0.98);
}

.sidebar-header {
    background: rgba(102, 126, 234, 0.05);
}

/* Glassmorphism Effect */
.chat-sidebar::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, 
        transparent, 
        rgba(102, 126, 234, 0.5), 
        transparent
    );
}
.chat-message-avatar img{
    height: 150px;
    width: 200px;
    border-radius: 45px;
}
/* Message Read Status */
.message-read {
    display: inline-block;
    margin-left: 5px;
    color: rgba(255, 255, 255, 0.6);
    font-size: 12px;
}

/* Smooth Transitions */
* {
    transition: background-color 0.3s ease, 
                border-color 0.3s ease,
                color 0.3s ease;
}