
/* Enhanced Chat Container */
.chat-container {
    position: fixed;
    bottom: 0;
    left: 20px;
    width: 350px;
    height: 500px;
    border: none;
    border-radius: 12px 12px 0 0;
    background-color: #fff;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.15);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

/* Enhanced Chat Header */
.chat-header {
    background: linear-gradient(135deg, #0077b5 0%, #005885 100%);
    color: white;
    padding: 16px 20px;
    border-radius: 12px 12px 0 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.chat-header span {
    font-weight: 600;
    font-size: 16px;
}

.btn-close {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: white;
    border-radius: 50%;
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-close:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: scale(1.05);
}

/* Enhanced Chat Body */
.chat-body {
    flex: 1;
    padding: 20px;
    overflow-y: auto;
    background: linear-gradient(180deg, #f8f9fa 0%, #ffffff 100%);
    scroll-behavior: smooth;
}

.chat-body::-webkit-scrollbar {
    width: 6px;
}

.chat-body::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 3px;
}

.chat-body::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 3px;
}

.chat-body::-webkit-scrollbar-thumb:hover {
    background: #a8a8a8;
}

/* Message Styles */
.message {
    margin-bottom: 16px;
    display: flex;
    flex-direction: column;
}

.message.sent {
    align-items: flex-end;
}

.message.received {
    align-items: flex-start;
}

.message-bubble {
    max-width: 80%;
    padding: 12px 16px;
    border-radius: 18px;
    word-wrap: break-word;
    position: relative;
    animation: fadeInUp 0.3s ease;
}

.message.sent .message-bubble {
    background: linear-gradient(135deg, #0077b5 0%, #005885 100%);
    color: white;
    border-bottom-right-radius: 6px;
}

.message.received .message-bubble {
    background: white;
    color: #333;
    border: 1px solid #e1e5e9;
    border-bottom-left-radius: 6px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.message-sender {
    font-size: 12px;
    color: #666;
    margin-bottom: 4px;
    font-weight: 500;
}

.message-time {
    font-size: 11px;
    color: #999;
    margin-top: 4px;
    text-align: right;
}

/* Enhanced Chat Footer */
.chat-footer {
    padding: 16px 20px;
    background: white;
    border-top: 1px solid #e1e5e9;
    display: flex;
    gap: 12px;
    align-items: center;
}

#chatInput {
    flex: 1;
    border: 2px solid #e1e5e9;
    border-radius: 24px;
    padding: 12px 16px;
    font-size: 14px;
    transition: all 0.2s ease;
    background: #f8f9fa;
}

#chatInput:focus {
    outline: none;
    border-color: #0077b5;
    background: white;
    box-shadow: 0 0 0 3px rgba(0, 119, 181, 0.1);
}

#sendBtn {
    background: linear-gradient(135deg, #0077b5 0%, #005885 100%);
    border: none;
    border-radius: 50%;
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 18px;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 2px 8px rgba(0, 119, 181, 0.3);
}

#sendBtn:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 12px rgba(0, 119, 181, 0.4);
}

#sendBtn:active {
    transform: scale(0.95);
}

/* Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* User Cards Enhancement */
.user-card {
    transition: all 0.2s ease;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.user-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
}

/* Responsive Design */
@media (max-width: 768px) {
    .chat-container {
        width: 100%;
        height: 100vh;
        right: 0;
        border-radius: 0;
    }

    .chat-header {
        border-radius: 0;
    }
}
