/* VELA AI customer-service widget */
#vela-chat-root {
    --vela-gold: #a8843a;
    --vela-gold-dark: #8a6a2f;
    --vela-cream: #fcf9f2;
    --vela-ink: #3a342b;
    --vela-soft: #f4efe4;
    font-family: inherit;
}
#vela-ai-fab {
    position: fixed;
    right: 22px;
    bottom: 22px;
    z-index: 99990;
    width: 58px;
    height: 58px;
    border-radius: 50%;
    background: var(--vela-gold);
    color: #fff;
    border: 1px solid var(--vela-gold);
    box-shadow: 0 8px 22px rgba(168,132,58,.4);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform .2s ease, background .2s ease;
    padding: 0;
}
#vela-ai-fab:hover { transform: scale(1.06); background: var(--vela-gold-dark); }
#vela-ai-fab svg { width: 28px; height: 28px; }
#vela-ai-fab .vlbadge{
    position:absolute; top:-2px; right:-2px;
    width:12px; height:12px; border-radius:50%;
    background:#c0392b; border:2px solid #fff; display:none;
}
#vela-ai-fab.vela-new .vlbadge { display:block; }

/* Chat panel */
#vela-ai-panel {
    position: fixed;
    right: 22px;
    bottom: 92px;
    z-index: 99990;
    width: 360px;
    max-width: calc(100vw - 32px);
    height: 480px;
    max-height: calc(100vh - 140px);
    background: var(--vela-cream);
    border: 1px solid #e4dcc9;
    border-radius: 16px;
    box-shadow: 0 18px 50px rgba(58,52,43,.28);
    display: none;
    flex-direction: column;
    overflow: hidden;
}
#vela-ai-panel.vela-open { display: flex; }
#vela-ai-head {
    background: var(--vela-gold);
    color: #fff;
    padding: 14px 16px;
    display: flex;
    align-items: center;
    gap: 10px;
}
#vela-ai-head .vla{ font-size:15px; font-weight:600; flex:1; }
#vela-ai-head .vlx{
    background:transparent; border:none; color:#fff; font-size:20px; line-height:1; cursor:pointer; padding:0 2px;
}
#vela-ai-body{ flex:1; overflow-y:auto; padding:14px; display:flex; flex-direction:column; gap:10px; }
.vela-msg{ max-width:82%; padding:9px 12px; border-radius:14px; font-size:14px; line-height:1.5; white-space:pre-wrap; word-break:break-word; }
.vela-msg.vela-bot{ align-self:flex-start; background:#fff; border:1px solid #ece4d2; color:var(--vela-ink); border-bottom-left-radius:4px; }
.vela-msg.vela-user{ align-self:flex-end; background:var(--vela-gold); color:#fff; border-bottom-right-radius:4px; }
.vela-typing{ align-self:flex-start; background:#fff; border:1px solid #ece4d2; color:#9b9080; padding:9px 12px; border-radius:14px; font-size:13px; }
#vela-ai-inputrow{ display:flex; gap:8px; padding:10px 12px; border-top:1px solid #ece4d2; background:#fff; }
#vela-ai-input{
    flex:1; border:1px solid #ddd2bb; border-radius:10px; padding:9px 12px; font-size:14px;
    background:var(--vela-cream); color:var(--vela-ink); outline:none;
}
#vela-ai-input:focus{ border-color:var(--vela-gold); }
#vela-ai-send{
    background:var(--vela-gold); color:#fff; border:none; border-radius:10px; padding:0 16px; font-size:14px; cursor:pointer;
}
#vela-ai-send:hover{ background:var(--vela-gold-dark); }
#vela-ai-send:disabled{ opacity:.5; cursor:default; }

/* Product-page "Ask AI" button */
#vela-ai-product-btn{
    width:100%; max-width:100%;
    display:flex; align-items:center; justify-content:center; gap:8px;
    margin-top:12px;
    padding:11px 16px;
    border:1px solid var(--vela-gold,#a8843a);
    border-radius:12px;
    background:transparent;
    color:var(--vela-gold,#a8843a);
    font-weight:500; font-size:14px; cursor:pointer;
    transition: background .2s ease, color .2s ease;
}
#vela-ai-product-btn:hover{ background:var(--vela-gold,#a8843a); color:#fff; }
#vela-ai-product-btn svg{ width:18px; height:18px; }

@media (max-width: 480px){
  #vela-ai-panel{ right:8px; bottom:76px; left:8px; width:auto; height:70vh; }
  #vela-ai-fab{ right:16px; bottom:16px; }
}