/* Jose 31 Oct: Taita assistant — the RevenuivaAI Lisa widget CSS (rva-v5/lisa_widget.css), Taita colours */
#revvy-widget{--accent:var(--teal);--primary:var(--navy);--border-color:var(--line);--neutral-light:#f3f7f9;--font-stack:Inter,-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,sans-serif}
/* ============ AI ASSISTANT CHATBOT (2026-07-20) ============ */
#revvy-widget { position: fixed; bottom: 24px; right: 24px; z-index: 9999; font-family: var(--font-stack); }
#revvy-bubble {
    width: 60px; height: 60px; border-radius: 50%; border: none; cursor: pointer;
    background: linear-gradient(150deg, #071a2d 0%, #0a3550 100%);
    box-shadow: 0 8px 26px rgba(7, 26, 45, 0.38);
    display: flex; align-items: center; justify-content: center;
    position: relative; transition: transform 0.18s ease, box-shadow 0.18s ease;
}
#revvy-bubble::after {
    content: ""; position: absolute; top: 6px; right: 6px; width: 12px; height: 12px;
    background: var(--accent); border: 2px solid #fff; border-radius: 50%;
}
#revvy-bubble:hover { transform: translateY(-2px) scale(1.04); box-shadow: 0 12px 32px rgba(7, 26, 45, 0.46); }
#revvy-bubble .revvy-ico-close { display: none; }
#revvy-widget.revvy-open #revvy-bubble .revvy-ico-chat { display: none; }
#revvy-widget.revvy-open #revvy-bubble .revvy-ico-close { display: block; }
#revvy-widget.revvy-open #revvy-bubble::after { display: none; }

#revvy-panel {
    position: absolute; bottom: 76px; right: 0; width: 370px; max-width: calc(100vw - 32px);
    height: 540px; max-height: calc(100vh - 120px);
    background: #fff; border-radius: 18px; overflow: hidden;
    box-shadow: 0 24px 60px rgba(7, 26, 45, 0.28); border: 1px solid var(--border-color);
    display: flex; flex-direction: column;
    opacity: 0; transform: translateY(14px) scale(0.97); pointer-events: none;
    transition: opacity 0.2s ease, transform 0.2s ease;
}
#revvy-widget.revvy-open #revvy-panel { opacity: 1; transform: translateY(0) scale(1); pointer-events: auto; }

.revvy-head { background: linear-gradient(150deg, #071a2d 0%, #0a3550 100%); color: #fff; padding: 15px 16px; display: flex; align-items: center; justify-content: space-between; }
.revvy-head-l { display: flex; align-items: center; gap: 11px; }
.revvy-avatar { width: 38px; height: 38px; border-radius: 50%; background: var(--accent); color: #fff; font-weight: 800; font-size: 1.1rem; display: flex; align-items: center; justify-content: center; }
.revvy-title { font-weight: 700; font-size: 1rem; line-height: 1.2; }
.revvy-status { font-size: 0.76rem; opacity: 0.85; display: flex; align-items: center; gap: 5px; margin-top: 2px; }
.revvy-dot { width: 7px; height: 7px; border-radius: 50%; background: #22c55e; display: inline-block; box-shadow: 0 0 0 rgba(34,197,94,0.5); animation: revvyPulse 2s infinite; }
@keyframes revvyPulse { 0%{box-shadow:0 0 0 0 rgba(34,197,94,0.5);} 70%{box-shadow:0 0 0 6px rgba(34,197,94,0);} 100%{box-shadow:0 0 0 0 rgba(34,197,94,0);} }
.revvy-x { background: none; border: none; color: #fff; cursor: pointer; opacity: 0.85; padding: 4px; display: flex; }
.revvy-x:hover { opacity: 1; }

#revvy-msgs { flex: 1; overflow-y: auto; padding: 16px; background: var(--neutral-light); display: flex; flex-direction: column; gap: 10px; }
.revvy-msg { display: flex; }
.revvy-msg.revvy-user { justify-content: flex-end; }
.revvy-b { max-width: 82%; padding: 10px 13px; border-radius: 14px; font-size: 0.9rem; line-height: 1.45; white-space: normal; word-wrap: break-word; }
.revvy-bot .revvy-b { background: #fff; color: #1e293b; border: 1px solid var(--border-color); border-bottom-left-radius: 4px; }
.revvy-user .revvy-b { background: var(--primary); color: #fff; border-bottom-right-radius: 4px; }
.revvy-typing { display: flex; gap: 4px; align-items: center; }
.revvy-typing span { width: 7px; height: 7px; border-radius: 50%; background: #94a3b8; display: inline-block; animation: revvyBlink 1.2s infinite; }
.revvy-typing span:nth-child(2){ animation-delay: 0.2s; } .revvy-typing span:nth-child(3){ animation-delay: 0.4s; }
@keyframes revvyBlink { 0%,60%,100%{opacity:0.3;} 30%{opacity:1;} }

.revvy-input { display: flex; align-items: flex-end; gap: 8px; padding: 10px 12px; border-top: 1px solid var(--border-color); background: #fff; }
#revvy-text { flex: 1; resize: none; border: 1px solid var(--border-color); border-radius: 12px; padding: 10px 12px; font-family: inherit; font-size: 0.9rem; line-height: 1.4; max-height: 110px; outline: none; color: #1e293b; }
#revvy-text:focus { border-color: var(--accent); }
#revvy-send { width: 40px; height: 40px; flex: none; border: none; border-radius: 10px; background: var(--accent); cursor: pointer; display: flex; align-items: center; justify-content: center; transition: filter 0.15s ease; }
#revvy-send:hover { filter: brightness(1.08); }
#revvy-send:disabled { opacity: 0.5; cursor: default; }
.revvy-foot { text-align: center; font-size: 0.68rem; color: #94a3b8; padding: 6px 0 9px; background: #fff; }

/* RTL */
[dir="rtl"] #revvy-widget { right: auto; left: 24px; }
[dir="rtl"] #revvy-panel { right: auto; left: 0; }
[dir="rtl"] #revvy-bubble::after { right: auto; left: 6px; }
[dir="rtl"] .revvy-msg.revvy-user { justify-content: flex-start; }
[dir="rtl"] .revvy-bot .revvy-b { border-bottom-left-radius: 14px; border-bottom-right-radius: 4px; }
[dir="rtl"] .revvy-user .revvy-b { border-bottom-right-radius: 14px; border-bottom-left-radius: 4px; }

@media (max-width: 480px) {
    #revvy-widget { bottom: 16px; right: 16px; }
    [dir="rtl"] #revvy-widget { left: 16px; right: auto; }
    #revvy-panel { width: calc(100vw - 24px); height: calc(100vh - 110px); bottom: 72px; }
}
