/* Add these new styles to your existing customer-support.css */

/* Chat window slide-in animation */
#chat-window {
    transform-origin: bottom right;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

#chat-window.hidden {
    transform: scale(0.95) translateY(10px);
    opacity: 0;
    pointer-events: none;
}

/* Message animations */
#chat-messages > div {
    animation: messageSlide 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes messageSlide {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Chat toggle button hover effect */
#chat-toggle:hover {
    transform: scale(1.1);
}

/* Additional responsive styles */
@media (max-width: 640px) {
    #chat-window {
        width: calc(100vw - 2rem);
        right: 1rem;
        height: 80vh;
        bottom: calc(1.5rem + 48px);
    }
    
    #chat-toggle {
        width: 48px;
        height: 48px;
    }
}

/* Typing indicator animation */
.typing-dots {
    display: flex;
    align-items: center;
    padding: 8px 12px;
    background: #1e2235;
    border-radius: 12px;
    width: fit-content;
}

.dot {
    width: 6px;
    height: 6px;
    margin: 0 2px;
    background: linear-gradient(to right, #98c0ef, #7aa7e0);
    border-radius: 50%;
    animation: typing 1.4s infinite ease-in-out;
}

.dot:nth-child(1) { animation-delay: 200ms; }
.dot:nth-child(2) { animation-delay: 300ms; }
.dot:nth-child(3) { animation-delay: 400ms; }

@keyframes typing {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-6px); }
}

/* Chat toggle button animation */
.rotate-icon {
    transform: rotate(360deg);
}

/* Custom scrollbar */
#chat-messages::-webkit-scrollbar {
    width: 4px;
}

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

#chat-messages::-webkit-scrollbar-thumb {
    background: linear-gradient(to bottom, #98c0ef, #7aa7e0);
    border-radius: 2px;
}

/* Add these styles for better message display */
#chat-messages {
    scroll-behavior: smooth;
    padding-bottom: 1rem;
}

#chat-messages > div {
    width: 100%;
    margin-bottom: 0.5rem;
}

#chat-messages p {
    white-space: pre-wrap;
    word-break: break-word;
    overflow-wrap: break-word;
    hyphens: auto;
    line-height: 1.5;
}

/* Improve message container spacing */
.space-y-4 > * + * {
    margin-top: 1rem;
}

/* Adjust message max-width for better readability */
@media (max-width: 640px) {
    #chat-messages > div > div:last-child {
        max-width: 85%;
    }
}
  