/**
 * Public-facing styles for Zesty AI chat widget
 */

/* Chat Widget Container */
.zesty-ai-chat-widget {
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 350px;
    height: 500px;
    background: #fff;
    border-radius: 10px;
    box-shadow: 0 5px 25px rgba(0, 0, 0, 0.1);
    display: flex;
    flex-direction: column;
    z-index: 999999;
    transition: all 0.3s ease;
    transform: translateY(120%);
}

.zesty-ai-chat-widget.active {
    transform: translateY(0);
}

/* Chat Header */
.zesty-ai-chat-header {
    background: #93BE3C;
    color: #fff;
    padding: 15px;
    border-radius: 10px 10px 0 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.zesty-ai-chat-title {
    font-size: 16px;
    font-weight: 600;
    margin: 0;
}

.zesty-ai-chat-close {
    background: none;
    border: none;
    color: #fff;
    cursor: pointer;
    padding: 5px;
    font-size: 20px;
    line-height: 1;
}

/* Chat Messages Area */
.zesty-ai-chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: 15px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

/* Message Bubbles */
.zesty-ai-message {
    max-width: 80%;
    padding: 10px 15px;
    border-radius: 15px;
    margin: 2px 0;
}

.zesty-ai-message.user {
    background: #f0f2f5;
    align-self: flex-end;
    border-bottom-right-radius: 5px;
}

.zesty-ai-message.bot {
    background: #e8f5e9;
    align-self: flex-start;
    border-bottom-left-radius: 5px;
}

/* Input Area */
.zesty-ai-chat-input {
    padding: 15px;
    border-top: 1px solid #eee;
    display: flex;
    gap: 10px;
}

.zesty-ai-chat-input input {
    flex: 1;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 20px;
    outline: none;
}

.zesty-ai-chat-input input:focus {
    border-color: #93BE3C;
}

.zesty-ai-chat-send {
    background: #93BE3C;
    color: #fff;
    border: none;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.3s ease;
}

.zesty-ai-chat-send:hover {
    background: #7a9e32;
}

/* Chat Toggle Button */
.zesty-ai-chat-toggle {
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 60px;
    height: 60px;
    background: #93BE3C;
    border-radius: 50%;
    color: #fff;
    border: none;
    cursor: pointer;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    z-index: 999998;
    transition: background 0.3s ease;
}

.zesty-ai-chat-toggle:hover {
    background: #7a9e32;
}

/* Loading Animation */
.zesty-ai-typing {
    display: flex;
    align-items: center;
    gap: 5px;
    padding: 10px;
    background: #f0f2f5;
    border-radius: 10px;
    width: fit-content;
}

.zesty-ai-typing span {
    width: 8px;
    height: 8px;
    background: #93BE3C;
    border-radius: 50%;
    animation: typing 1s infinite;
}

.zesty-ai-typing span:nth-child(2) {
    animation-delay: 0.2s;
}

.zesty-ai-typing span:nth-child(3) {
    animation-delay: 0.4s;
}

@keyframes typing {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-5px); }
}

/* Responsive Design */
@media (max-width: 480px) {
    .zesty-ai-chat-widget {
        width: 100%;
        height: 100%;
        bottom: 0;
        right: 0;
        border-radius: 0;
    }

    .zesty-ai-chat-header {
        border-radius: 0;
    }
}