/* ===================================
   ConversationChat Component Styles
   =================================== */

/* === Custom Scrollbar === */
.custom-scrollbar::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

.custom-scrollbar::-webkit-scrollbar-track {
    background: #f3f4f6;
    border-radius: 3px;
}

.custom-scrollbar::-webkit-scrollbar-thumb {
    background: #d1d5db;
    border-radius: 3px;
    transition: background 0.2s;
}

.custom-scrollbar::-webkit-scrollbar-thumb:hover {
    background: #9ca3af;
}

/* Firefox */
.custom-scrollbar {
    scrollbar-width: thin;
    scrollbar-color: #d1d5db #f3f4f6;
}

/* === Message Animations === */
@keyframes slideInFromBottom {
    from {
        opacity: 0;
        transform: translateY(15px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

[data-message-id] {
    animation: slideInFromBottom 0.3s ease-out;
}

/* === Conversation Item Hover === */
.conversation-item {
    transition: all 0.2s ease;
}

.conversation-item:hover {
    transform: translateX(2px);
}

.conversation-item.active {
    box-shadow: 0 2px 8px rgba(59, 130, 246, 0.2);
}

/* === Textarea Auto-Resize === */
textarea {
    min-height: 40px;
    max-height: 150px;
    resize: none;
    transition: height 0.1s ease;
}

/* === Online Status Pulse === */
.status-online {
    position: relative;
}

.status-online::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    border-radius: 50%;
    background: inherit;
    animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.5;
        transform: scale(1.2);
    }
}

/* === Typing Indicator === */
.typing-indicator {
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.typing-indicator span {
    width: 8px;
    height: 8px;
    background-color: #9ca3af;
    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.5;
    }
    30% {
        transform: translateY(-8px);
        opacity: 1;
    }
}

/* === Skeleton Loading === */
.skeleton {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: loading 1.5s ease-in-out infinite;
}

@keyframes loading {
    0% {
        background-position: 200% 0;
    }
    100% {
        background-position: -200% 0;
    }
}

/* === Responsive === */
@media (max-width: 768px) {
    .conversation-chat-sidebar {
        position: fixed;
        left: 0;
        top: 0;
        bottom: 0;
        z-index: 50;
        transform: translateX(-100%);
        transition: transform 0.3s ease;
    }
    
    .conversation-chat-sidebar.open {
        transform: translateX(0);
    }
}

/* === Dark Mode Support (optional) === */
@media (prefers-color-scheme: dark) {
    .custom-scrollbar::-webkit-scrollbar-track {
        background: #1f2937;
    }
    
    .custom-scrollbar::-webkit-scrollbar-thumb {
        background: #4b5563;
    }
    
    .custom-scrollbar::-webkit-scrollbar-thumb:hover {
        background: #6b7280;
    }
}
