#zca-ai-widget {
    position: fixed;
    bottom: 80px;
    right: 20px;
    z-index: 99999;
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

/* Toggle button */
#zca-ai-toggle {
    background: #b8a989;
    color: #fff;
    border: none;
    border-radius: 50%;
    width: 60px;
    height: 60px;
    font-size: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 4px 10px rgba(0,0,0,0.25);
    transition: box-shadow 0.25s ease, transform 0.25s ease;
    padding: 0;
}

/* Hover glow (desktop only) */
#zca-ai-toggle:hover {
    box-shadow: 0 0 18px rgba(46, 125, 50, 0.7);
    transform: translateY(-2px);
}



/* Panel */
#zca-ai-panel {
    position: fixed;
    bottom: 80px;
    right: 20px;
    width: 340px;
    max-height: 70vh;
    background: #ffffff;
    border-radius: 14px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.25);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.zca-ai-hidden {
    display: none !important;
}

/* Header */
.zca-ai-header {
    display: flex;
    align-items: center;
    padding: 10px 12px;
    background: #2e7d32;
    color: #fff;
}

.zca-ai-title {
    flex: 1;
    font-weight: 600;
}

.zca-ai-header-btn {
    background: transparent;
    border: none;
    color: #fff;
    font-size: 18px;
    cursor: pointer;
}

/* Messages */
#zca-ai-messages {
    flex: 1;
    overflow-y: auto;
    padding: 10px;
    background: #f7f7f7;
    font-size: 13px;
}

.zca-ai-msg {
    margin-bottom: 8px;
    max-width: 85%;
}

.zca-ai-msg-user {
    text-align: right;
    margin-left: auto;
}

.zca-ai-msg-user span {
    display: inline-block;
    background: #d7f5d8;
    color: #1b5e20;
    padding: 6px 10px;
    border-radius: 16px 16px 4px 16px;
}

.zca-ai-msg-bot span {
    display: inline-block;
    background: #e9eef2;
    color: #333;
    padding: 6px 10px;
    border-radius: 16px 16px 16px 4px;
}

/* Typing */
.zca-ai-typing {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    background: #e9eef2;
    padding: 6px 10px;
    border-radius: 16px 16px 16px 4px;
}

.zca-ai-typing-dot {
    width: 6px;
    height: 6px;
    background: #666;
    border-radius: 50%;
    animation: zcaTyping 1.4s infinite ease-in-out both;
}

.zca-ai-typing-dot:nth-child(2) { animation-delay: 0.2s; }
.zca-ai-typing-dot:nth-child(3) { animation-delay: 0.4s; }

@keyframes zcaTyping {
    0%, 80%, 100% { transform: scale(0); }
    40% { transform: scale(1); }
}

/* Photo preview */
.zca-ai-photo-preview {
    max-width: 120px;
    max-height: 120px;
    border-radius: 10px;
    overflow: hidden;
    margin-bottom: 8px;
    margin-left: auto;
    border: 2px solid #d7f5d8;
}

.zca-ai-photo-preview img {
    width: 100%;
    height: auto;
}

/* Input row */
.zca-ai-input-row {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px;
    background: #fff;
    border-top: 1px solid #ddd;
}

.zca-ai-upload-btn,
.zca-ai-camera-btn {
    background: #eeeeee;
    padding: 6px 8px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 16px;
    border: none;
}

.zca-ai-upload-btn input {
    display: none;
}

#zca-ai-input {
    flex: 1;
    padding: 6px 8px;
    border-radius: 8px;
    border: 1px solid #ccc;
    font-size: 13px;
}

#zca-ai-send {
    background: #2e7d32;
    color: #fff;
    border: none;
    border-radius: 999px;
    padding: 6px 12px;
    font-size: 13px;
    cursor: pointer;
}

#zca-ai-send:hover {
    background: #1b5e20;
}

/* Mobile adaptation */
@media (max-width: 600px) {

    /* Widget position (lifted above TrustedSite badge) */
    #zca-ai-widget {
        bottom: 85px;
        right: 15px;
    }

    /* Panel sizing for mobile */
    #zca-ai-panel {
        right: 10px;
        left: 10px;
        width: auto;
        max-height: 75vh;
    }

    /* Mobile-sized round button */
    #zca-ai-toggle {
		background: #b8a989;
        width: 65px;
        height: 65px;
        font-size: 32px;
        box-shadow: 0 3px 8px rgba(0,0,0,0.25);
    }

    /* Disable hover glow on touch devices */
    #zca-ai-toggle:hover {
        box-shadow: 0 3px 8px rgba(0,0,0,0.25);
        transform: none;
    }
}