/* Appointment Chat Styles */

.chat-messages {
    display: flex;
    flex-direction: column;
    gap: 15px;
    padding: 15px;
    overflow-y: auto;
}

.chat-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 40px 20px;
    color: #6c757d;
    text-align: center;
}

.chat-empty i {
    font-size: 3rem;
    margin-bottom: 15px;
    opacity: 0.5;
}

.chat-empty small {
    display: block;
    margin-top: 10px;
    font-size: 0.875rem;
}

.chat-message {
    display: flex;
    flex-direction: column;
    max-width: 70%;
    margin-bottom: 10px;
}

.chat-message.client {
    align-self: flex-end;
    align-items: flex-end;
}

.chat-message.agent {
    align-self: flex-start;
    align-items: flex-start;
}

.chat-sender {
    font-size: 0.75rem;
    font-weight: 600;
    color: #6c757d;
    margin-bottom: 4px;
}

.chat-bubble {
    background: #f8f9fa;
    padding: 10px 15px;
    border-radius: 12px;
    word-wrap: break-word;
    position: relative;
}

.chat-message.client .chat-bubble {
    background: #0d6efd;
    color: white;
    border-bottom-right-radius: 4px;
}

.chat-message.agent .chat-bubble {
    background: #e9ecef;
    color: #212529;
    border-bottom-left-radius: 4px;
}

.chat-timestamp {
    font-size: 0.7rem;
    color: #6c757d;
    margin-top: 4px;
}

.message-status {
    font-size: 0.7rem;
    color: #6c757d;
    margin-top: 2px;
}

.message-status.delivered {
    color: #198754;
}

.message-attachment {
    margin-top: 8px;
}

.message-attachment .btn {
    font-size: 0.875rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%;
}

.chat-input {
    background: #f8f9fa;
}

.chat-typing {
    display: flex;
    align-items: center;
    padding: 10px 15px;
    background: #e9ecef;
    border-radius: 12px;
    max-width: 70px;
    margin-bottom: 10px;
}

.chat-typing .typing-dots {
    display: flex;
    gap: 4px;
}

.chat-typing .typing-dots span {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #6c757d;
    animation: typing 1.4s infinite;
}

.chat-typing .typing-dots span:nth-child(2) {
    animation-delay: 0.2s;
}

.chat-typing .typing-dots span:nth-child(3) {
    animation-delay: 0.4s;
}

@keyframes typing {
    0%, 60%, 100% {
        opacity: 0.3;
        transform: scale(0.8);
    }
    30% {
        opacity: 1;
        transform: scale(1);
    }
}

/* Scroll styling */
.chat-messages::-webkit-scrollbar {
    width: 6px;
}

.chat-messages::-webkit-scrollbar-track {
    background: #f1f1f1;
}

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

.chat-messages::-webkit-scrollbar-thumb:hover {
    background: #555;
}
