/* ═══ Vianto Chat Widget — Deploy 37 ═══ */

/* Bubble */
.vchat-bubble{position:fixed;bottom:24px;right:24px;width:56px;height:56px;border-radius:50%;background:linear-gradient(135deg,#C8179A,#7C3AED);color:#fff;display:flex;align-items:center;justify-content:center;cursor:pointer;box-shadow:0 4px 20px rgba(124,58,237,.35);z-index:9999;transition:transform .2s,box-shadow .2s;border:none;outline:none}
.vchat-bubble:hover{transform:scale(1.08);box-shadow:0 6px 28px rgba(124,58,237,.45)}
.vchat-bubble svg{width:26px;height:26px;transition:opacity .2s}
.vchat-bubble .vchat-close{display:none}
.vchat-bubble.open .vchat-open{display:none}
.vchat-bubble.open .vchat-close{display:block}

/* Panel */
.vchat-panel{position:fixed;bottom:92px;right:24px;width:380px;max-height:520px;background:#FDFAF7;border-radius:16px;box-shadow:0 8px 40px rgba(0,0,0,.15);z-index:9998;display:flex;flex-direction:column;overflow:hidden;opacity:0;transform:translateY(16px) scale(.96);pointer-events:none;transition:opacity .25s ease,transform .25s ease}
.vchat-panel.open{opacity:1;transform:translateY(0) scale(1);pointer-events:auto}

/* Header */
.vchat-header{background:linear-gradient(135deg,#C8179A,#7C3AED 60%,#2563EB);color:#fff;padding:16px 20px;display:flex;align-items:center;gap:12px}
.vchat-header-avatar{width:36px;height:36px;border-radius:50%;background:rgba(255,255,255,.2);display:flex;align-items:center;justify-content:center;flex-shrink:0}
.vchat-header-avatar svg{width:20px;height:20px}
.vchat-header-info{flex:1}
.vchat-header-name{font-weight:600;font-size:15px}
.vchat-header-status{font-size:12px;opacity:.8}
.vchat-expand{color:rgba(255,255,255,.6);display:flex;align-items:center;justify-content:center;width:32px;height:32px;border-radius:8px;transition:background .2s,color .2s;flex-shrink:0;text-decoration:none}
.vchat-expand:hover{background:rgba(255,255,255,.15);color:#fff}

/* Messages area */
.vchat-messages{flex:1;overflow-y:auto;padding:16px;display:flex;flex-direction:column;gap:12px;min-height:280px;max-height:340px}
.vchat-messages::-webkit-scrollbar{width:4px}
.vchat-messages::-webkit-scrollbar-thumb{background:rgba(0,0,0,.1);border-radius:4px}

/* Message bubbles */
.vchat-msg{max-width:85%;padding:10px 14px;border-radius:14px;font-size:14px;line-height:1.5;word-wrap:break-word}
.vchat-msg a{color:#C8179A;text-decoration:underline}
.vchat-msg-bot{background:#fff;border:1px solid rgba(26,26,26,.08);align-self:flex-start;border-bottom-left-radius:4px}
.vchat-msg-user{background:linear-gradient(135deg,#C8179A,#7C3AED);color:#fff;align-self:flex-end;border-bottom-right-radius:4px}

/* Property cards in chat */
.vchat-props{display:flex;flex-direction:column;gap:8px;margin-top:4px}
.vchat-prop-card{display:flex;gap:10px;background:#fff;border:1px solid rgba(26,26,26,.08);border-radius:10px;padding:8px;cursor:pointer;text-decoration:none;color:inherit;transition:border-color .2s}
.vchat-prop-card:hover{border-color:#C8179A}
.vchat-prop-thumb{width:60px;height:45px;border-radius:6px;object-fit:cover;background:#eee;flex-shrink:0}
.vchat-prop-info{flex:1;min-width:0}
.vchat-prop-title{font-size:12px;font-weight:600;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.vchat-prop-meta{font-size:11px;color:rgba(26,26,26,.5)}
.vchat-prop-price{font-size:13px;font-weight:700;color:#C8179A;margin-top:2px}

/* Typing indicator */
.vchat-typing{display:flex;gap:4px;padding:10px 14px;align-self:flex-start}
.vchat-typing span{width:7px;height:7px;background:rgba(26,26,26,.2);border-radius:50%;animation:vchat-bounce .6s infinite alternate}
.vchat-typing span:nth-child(2){animation-delay:.15s}
.vchat-typing span:nth-child(3){animation-delay:.3s}
@keyframes vchat-bounce{to{opacity:.3;transform:translateY(-4px)}}

/* Input area */
.vchat-input-area{display:flex;gap:8px;padding:12px 16px;border-top:1px solid rgba(26,26,26,.06);background:#fff}
.vchat-input{flex:1;border:1px solid rgba(26,26,26,.12);border-radius:10px;padding:10px 14px;font-size:14px;font-family:inherit;resize:none;outline:none;max-height:80px;line-height:1.4}
.vchat-input:focus{border-color:#C8179A}
.vchat-input::placeholder{color:rgba(26,26,26,.3)}
.vchat-send{width:38px;height:38px;border-radius:10px;background:linear-gradient(135deg,#C8179A,#7C3AED);color:#fff;border:none;cursor:pointer;display:flex;align-items:center;justify-content:center;flex-shrink:0;transition:opacity .2s;align-self:flex-end}
.vchat-send:hover{opacity:.9}
.vchat-send:disabled{opacity:.4;cursor:not-allowed}
.vchat-send svg{width:18px;height:18px}

/* Rate limit notice */
.vchat-limit{text-align:center;font-size:12px;color:rgba(26,26,26,.4);padding:8px}

/* Full-page mode */
.vchat-fullpage .vchat-panel{position:static;width:100%;max-width:680px;max-height:none;margin:0 auto;border-radius:16px;opacity:1;transform:none;pointer-events:auto;box-shadow:0 4px 24px rgba(0,0,0,.08)}
.vchat-fullpage .vchat-messages{min-height:400px;max-height:60vh}
.vchat-fullpage .vchat-bubble{display:none}

/* Close button inside header */
.vchat-header-close{color:rgba(255,255,255,.6);display:none;align-items:center;justify-content:center;width:32px;height:32px;border-radius:8px;transition:background .2s,color .2s;flex-shrink:0;cursor:pointer;background:none;border:none}
.vchat-header-close:hover{background:rgba(255,255,255,.15);color:#fff}

/* Mobile */
@media(max-width:600px){
  .vchat-panel{bottom:0;right:0;left:0;width:100%;max-height:100vh;border-radius:16px 16px 0 0}
  .vchat-panel.open{border-radius:16px 16px 0 0}
  .vchat-messages{min-height:200px;max-height:calc(100vh - 220px)}
  .vchat-bubble{bottom:16px;right:16px;width:52px;height:52px}
  .vchat-bubble.open{display:none}
  .vchat-header-close{display:flex}
}
