/* ============================================================
   Wanda Properties — Custom Functional Styles
   All brand colours via CSS variables set in wanda-overrides.css
   ============================================================ */

/* ── WhatsApp Float ── */
.whatsapp-float {
    position: fixed !important;
    bottom: 100px !important;
    right: 24px !important;
    z-index: 9998 !important;
    width: 48px !important;
    height: 48px !important;
    background: #25d366 !important;
    border-radius: 50% !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    box-shadow: 0 4px 16px rgba(37,211,102,.45) !important;
    text-decoration: none !important;
    transition: transform .2s, box-shadow .2s !important;
}
.whatsapp-float:hover { transform: scale(1.1) !important; }
.whatsapp-float svg { width: 24px; height: 24px; }

/* ── AI Chat Widget — fixed, bottom-right, above WhatsApp ── */
#ai-chat-widget {
    position: fixed;
    bottom: 24px;
    right: 24px;
    z-index: 9997;
}

#ai-chat-toggle {
    width: 52px;
    height: 52px;
    background: #006039;
    border-radius: 50%;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 20px rgba(0,96,57,.4);
    transition: transform .2s, background .2s;
    color: #fff;
}
#ai-chat-toggle:hover { transform: scale(1.08); background: #004d2e; }

/* Chat box — position:fixed so it never clips into footer */
#ai-chat-box {
    position: fixed;
    bottom: 88px;
    right: 24px;
    width: 330px;
    height: 460px;
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 8px 40px rgba(0,0,0,.2);
    display: none;
    flex-direction: column;
    z-index: 9996;
    overflow: hidden;
    border: 1px solid #e5e7eb;
}
#ai-chat-box.open { display: flex; }

.ai-chat-header {
    background: #006039;
    color: #fff;
    padding: 12px 16px;
    font-weight: 700;
    font-size: 13px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 2px solid #E6B005;
    flex-shrink: 0;
}
.ai-chat-header .close-chat {
    background: none; border: none; color: rgba(255,255,255,.7);
    font-size: 18px; cursor: pointer; line-height: 1; padding: 0;
    transition: color .15s;
}
.ai-chat-header .close-chat:hover { color: #E6B005; }

.ai-chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: 12px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    background: #f8f9fa;
}
.ai-chat-messages::-webkit-scrollbar { width: 3px; }
.ai-chat-messages::-webkit-scrollbar-thumb { background: #d1d5db; border-radius: 4px; }

.ai-msg {
    max-width: 83%;
    padding: 8px 12px;
    border-radius: 12px;
    font-size: 13px;
    line-height: 1.5;
    word-break: break-word;
}
.ai-msg.bot {
    background: #fff;
    color: #1a1a1a;
    align-self: flex-start;
    border-bottom-left-radius: 3px;
    box-shadow: 0 1px 3px rgba(0,0,0,.08);
}
.ai-msg.user {
    background: #006039;
    color: #fff;
    align-self: flex-end;
    border-bottom-right-radius: 3px;
}
.ai-msg.typing { color: #9ca3af; font-style: italic; font-size: 12px; }

.ai-chat-input {
    display: flex;
    border-top: 1px solid #e5e7eb;
    padding: 8px;
    gap: 6px;
    background: #fff;
    flex-shrink: 0;
}
.ai-chat-input input {
    flex: 1;
    border: 1.5px solid #e0e0e0;
    border-radius: 20px;
    padding: 7px 12px;
    font-size: 12.5px;
    outline: none;
    background: #f9fafb;
    transition: border-color .15s;
    font-family: inherit;
}
.ai-chat-input input:focus { border-color: #006039; background: #fff; }
.ai-chat-input button {
    background: #006039;
    color: #fff;
    border: none;
    border-radius: 20px;
    padding: 7px 14px;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    font-family: inherit;
    transition: background .15s;
    white-space: nowrap;
}
.ai-chat-input button:hover { background: #E6B005; color: #006039; }

/* ── Responsive ── */
@media (max-width: 480px) {
    #ai-chat-box { width: calc(100vw - 32px); right: 16px; bottom: 84px; }
    #ai-chat-widget { right: 16px; bottom: 20px; }
    .whatsapp-float { right: 16px !important; bottom: 84px !important; }
}
