/* Web Chat Container */
.ai-wa-web-chat-container {
    display: flex;
    flex-direction: column;
    width: 100%;
    height: 80vh;
    min-height: 400px;
    max-height: 80vh;
    background: #ffffff;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    border: 1px solid #eaeaea;
}

/* Header */
.ai-wa-web-chat-header {
    display: flex;
    align-items: center;
    background: #e81259;
    color: white;
    padding: 15px 20px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    z-index: 2;
}

.ai-wa-web-chat-avatar {
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    margin-right: 15px;
}

.ai-wa-web-chat-avatar svg {
    width: 24px;
    height: 24px;
    fill: white;
}

.ai-wa-web-chat-title-wrapper {
    display: flex;
    flex-direction: column;
}

.ai-wa-web-chat-title {
    margin: 0;
    font-size: 16px;
    font-weight: 600;
    line-height: 1.2;
    color:#FFF;
}

.ai-wa-web-chat-status {
    font-size: 12px;
    opacity: 0.8;
}

/* Messages Area */
.ai-wa-web-chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
    background: #e5ddd5;
    /* WhatsApp-like background */
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.ai-wa-web-chat-message {
    display: flex;
    width: 100%;
}

.ai-wa-web-chat-message-ai {
    justify-content: flex-start;
}

.ai-wa-web-chat-message-user {
    justify-content: flex-end;
}

.ai-wa-web-chat-bubble {
    max-width: 75%;
    padding: 10px 14px;
    border-radius: 12px;
    font-size: 14px;
    line-height: 1.4;
    word-wrap: break-word;
    position: relative;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

.ai-wa-web-chat-message-ai .ai-wa-web-chat-bubble {
    background: white;
    color: #333;
    border-top-left-radius: 2px;
}

.ai-wa-web-chat-message-user .ai-wa-web-chat-bubble {
    background: #dcf8c6;
    color: #333;
    border-top-right-radius: 2px;
}

/* Input Area */
.ai-wa-web-chat-input-area {
    padding: 12px 15px;
    background: #f0f0f0;
    border-top: 1px solid #ddd;
}

#ai-wa-web-chat-form {
    display: flex;
    gap: 10px;
    align-items: center;
}

#ai-wa-web-chat-input {
    flex: 1;
    padding: 12px 15px;
    border: none;
    border-radius: 20px;
    font-size: 14px;
    outline: none;
    box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.05);
}

#ai-wa-web-chat-input:focus {
    box-shadow: 0 0 0 2px rgba(18, 140, 126, 0.2);
}

#ai-wa-web-chat-submit {
    background: #128C7E;
    color: white;
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    transition: background 0.2s;
}

#ai-wa-web-chat-submit:hover {
    background: #0d6e63;
}

#ai-wa-web-chat-submit svg {
    width: 20px;
    height: 20px;
    fill: white;
    margin-left: 2px;
    /* slight visual adjustment */
}

/* Typing Indicator */
.ai-wa-web-chat-typing-indicator {
    display: flex;
    gap: 4px;
    align-items: center;
    padding: 14px 18px !important;
}

.ai-wa-web-chat-typing-indicator span {
    width: 6px;
    height: 6px;
    background: #90949c;
    border-radius: 50%;
    animation: ai-wa-typing 1.4s infinite ease-in-out both;
}

.ai-wa-web-chat-typing-indicator span:nth-child(1) {
    animation-delay: -0.32s;
}

.ai-wa-web-chat-typing-indicator span:nth-child(2) {
    animation-delay: -0.16s;
}

@keyframes ai-wa-typing {

    0%,
    80%,
    100% {
        transform: scale(0);
    }

    40% {
        transform: scale(1);
    }
}