/* Custom styles for Avian Chat */

body {
    height: 100vh;
    overflow: hidden;
}

.cursor-pointer {
    cursor: pointer;
}

.conversation-item:hover {
    background-color: #f8f9fa;
}

.conversation-item.active {
    background-color: #e3f2fd;
    border-left: 4px solid #2196f3;
}

.user-badge:hover {
    background-color: #198754 !important;
    transform: scale(1.05);
    transition: all 0.2s ease;
}

#messagesArea {
    background-color: #f8f9fa;
}

.message {
    margin-bottom: 1rem;
}

.message.own {
    text-align: right;
}

.message-bubble {
    display: inline-block;
    max-width: 70%;
    padding: 10px 15px;
    border-radius: 18px;
    word-wrap: break-word;
}

.message.own .message-bubble {
    background-color: #007bff;
    color: white;
    border-bottom-right-radius: 4px;
}

.message.other .message-bubble {
    background-color: white;
    border: 1px solid #dee2e6;
    border-bottom-left-radius: 4px;
}

.message-meta {
    font-size: 0.75rem;
    color: #6c757d;
    margin-top: 2px;
}

.message.own .message-meta {
    text-align: right;
}

.message.other .message-meta {
    text-align: left;
}

.message-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    margin-right: 8px;
}

.message.other {
    display: flex;
    align-items: flex-start;
}

.message.other .message-content {
    flex: 1;
}

.typing-indicator {
    padding: 10px 15px;
    background-color: #e9ecef;
    border-radius: 18px;
    display: inline-block;
    margin-bottom: 1rem;
}

.typing-dots {
    display: inline-flex;
    align-items: center;
}

.typing-dots span {
    height: 8px;
    width: 8px;
    border-radius: 50%;
    background-color: #6c757d;
    margin: 0 2px;
    animation: typing 1.4s infinite ease-in-out;
}

.typing-dots span:nth-child(1) {
    animation-delay: -0.32s;
}

.typing-dots span:nth-child(2) {
    animation-delay: -0.16s;
}

@keyframes typing {
    0%, 80%, 100% {
        transform: scale(0.8);
        opacity: 0.5;
    }
    40% {
        transform: scale(1);
        opacity: 1;
    }
}

.search-result-item {
    padding: 8px 12px;
    border-bottom: 1px solid #dee2e6;
    cursor: pointer;
}

.search-result-item:hover {
    background-color: #f8f9fa;
}

.search-result-item:last-child {
    border-bottom: none;
}

.online-indicator {
    position: absolute;
    bottom: 2px;
    right: 2px;
    width: 12px;
    height: 12px;
    background-color: #28a745;
    border: 2px solid white;
    border-radius: 50%;
}

.away-indicator {
    background-color: #ffc107;
}

.offline-indicator {
    background-color: #6c757d;
}

/* Scrollbar styling */
.overflow-auto::-webkit-scrollbar {
    width: 6px;
}

.overflow-auto::-webkit-scrollbar-track {
    background: #f1f1f1;
}

.overflow-auto::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 3px;
}

.overflow-auto::-webkit-scrollbar-thumb:hover {
    background: #a8a8a8;
}

/* Responsive design */
@media (max-width: 768px) {
    .message-bubble {
        max-width: 85%;
    }
    
    body {
        overflow: auto;
    }
    
    .col-md-3, .col-md-9 {
        min-height: 100vh;
    }
}

/* Loading spinner */
.spinner-border-sm {
    width: 1rem;
    height: 1rem;
}

/* Message input focus */
#messageInput:focus {
    box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.25);
}

/* Unread badge animation */
.badge {
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.1);
    }
    100% {
        transform: scale(1);
    }
}
