/* ============================================
   AI CHATBOT WIDGET — CurveLinks
   ============================================ */
.cbot-overlay{position:fixed;inset:0;background:rgba(15,40,30,.4);backdrop-filter:blur(3px);z-index:998;opacity:0;visibility:hidden;transition:opacity .3s}
.cbot-overlay.open{opacity:1;visibility:visible}

.cbot{position:fixed;bottom:24px;right:24px;width:400px;max-width:calc(100vw - 32px);height:600px;max-height:calc(100vh - 48px);background:var(--cream,#F5EFE4);border-radius:20px;box-shadow:0 24px 70px -12px rgba(15,40,30,.45);z-index:999;display:flex;flex-direction:column;overflow:hidden;transform:translateY(30px) scale(.96);opacity:0;visibility:hidden;transition:transform .35s cubic-bezier(.34,1.56,.64,1),opacity .3s,visibility .3s}
.cbot.open{transform:translateY(0) scale(1);opacity:1;visibility:visible}
@media(max-width:480px){.cbot{bottom:0;right:0;width:100vw;height:100dvh;max-height:100dvh;border-radius:0}}

/* Header */
.cbot-head{background:linear-gradient(135deg,#1E5C42,#164733);padding:18px 20px;display:flex;align-items:center;gap:12px;flex-shrink:0}
.cbot-avatar{width:42px;height:42px;border-radius:50%;background:var(--gold,#C9A961);display:flex;align-items:center;justify-content:center;font-size:20px;flex-shrink:0;box-shadow:0 0 0 3px rgba(201,169,97,.25)}
.cbot-head-txt{flex:1;min-width:0}
.cbot-head-name{color:#F5EFE4;font-family:var(--serif,Georgia,serif);font-size:16px;font-weight:500;line-height:1.2}
.cbot-head-status{color:#C9A961;font-size:11px;display:flex;align-items:center;gap:5px;margin-top:2px}
.cbot-head-status::before{content:'';width:7px;height:7px;border-radius:50%;background:#5FD98E;box-shadow:0 0 0 0 rgba(95,217,142,.6);animation:cbotPulse 2s infinite}
@keyframes cbotPulse{0%{box-shadow:0 0 0 0 rgba(95,217,142,.6)}70%{box-shadow:0 0 0 6px rgba(95,217,142,0)}100%{box-shadow:0 0 0 0 rgba(95,217,142,0)}}
.cbot-close{background:rgba(245,239,228,.12);border:0;color:#F5EFE4;width:32px;height:32px;border-radius:50%;cursor:pointer;font-size:18px;display:flex;align-items:center;justify-content:center;transition:background .15s;flex-shrink:0}
.cbot-close:hover{background:rgba(245,239,228,.24)}

/* Messages area */
.cbot-body{flex:1;overflow-y:auto;padding:20px 18px;display:flex;flex-direction:column;gap:14px;scroll-behavior:smooth}
.cbot-body::-webkit-scrollbar{width:6px}
.cbot-body::-webkit-scrollbar-thumb{background:rgba(30,92,66,.2);border-radius:3px}

/* Message bubbles */
.cbot-msg{display:flex;gap:9px;max-width:88%;animation:cbotIn .35s ease}
@keyframes cbotIn{from{opacity:0;transform:translateY(8px)}to{opacity:1;transform:translateY(0)}}
.cbot-msg.bot{align-self:flex-start}
.cbot-msg.user{align-self:flex-end;flex-direction:row-reverse}
.cbot-msg-ava{width:28px;height:28px;border-radius:50%;flex-shrink:0;display:flex;align-items:center;justify-content:center;font-size:14px}
.cbot-msg.bot .cbot-msg-ava{background:#1E5C42;color:var(--gold,#C9A961)}
.cbot-msg.user .cbot-msg-ava{background:var(--gold,#C9A961);color:#1E5C42}
.cbot-bubble{padding:11px 15px;border-radius:16px;font-size:14px;line-height:1.55;color:#2B2B26}
.cbot-msg.bot .cbot-bubble{background:#fff;border-bottom-left-radius:5px;box-shadow:0 2px 8px rgba(15,40,30,.06)}
.cbot-msg.user .cbot-bubble{background:#1E5C42;color:#F5EFE4;border-bottom-right-radius:5px}
.cbot-bubble a{color:inherit;text-decoration:underline}

/* Typing indicator */
.cbot-typing{display:flex;gap:4px;padding:14px 16px;background:#fff;border-radius:16px;border-bottom-left-radius:5px;width:fit-content;box-shadow:0 2px 8px rgba(15,40,30,.06)}
.cbot-typing span{width:7px;height:7px;border-radius:50%;background:#1E5C42;opacity:.4;animation:cbotDot 1.4s infinite}
.cbot-typing span:nth-child(2){animation-delay:.2s}
.cbot-typing span:nth-child(3){animation-delay:.4s}
@keyframes cbotDot{0%,60%,100%{opacity:.3;transform:translateY(0)}30%{opacity:1;transform:translateY(-4px)}}

/* Quick reply chips */
.cbot-chips{display:flex;flex-wrap:wrap;gap:8px;padding:0 18px 4px;align-self:flex-start;max-width:100%}
.cbot-chip{background:#fff;border:1.5px solid rgba(30,92,66,.2);color:#1E5C42;padding:8px 14px;border-radius:20px;font-size:13px;font-weight:500;cursor:pointer;transition:all .15s;font-family:inherit}
.cbot-chip:hover{background:#1E5C42;color:#F5EFE4;border-color:#1E5C42;transform:translateY(-1px)}

/* Input area */
.cbot-foot{padding:14px 16px;background:#fff;border-top:1px solid rgba(30,92,66,.08);flex-shrink:0}
.cbot-input-row{display:flex;gap:9px;align-items:flex-end}
.cbot-input{flex:1;border:1.5px solid rgba(30,92,66,.15);border-radius:22px;padding:11px 16px;font-size:14px;font-family:inherit;resize:none;outline:none;max-height:80px;line-height:1.4;transition:border-color .15s;color:#2B2B26}
.cbot-input:focus{border-color:var(--gold,#C9A961)}
.cbot-send{width:42px;height:42px;border-radius:50%;background:#1E5C42;color:var(--gold,#C9A961);border:0;cursor:pointer;font-size:18px;display:flex;align-items:center;justify-content:center;flex-shrink:0;transition:transform .15s,background .15s}
.cbot-send:hover{background:#164733;transform:scale(1.05)}
.cbot-send:disabled{opacity:.4;cursor:not-allowed;transform:none}
.cbot-foot-note{text-align:center;font-size:10px;color:#999;margin-top:8px}

/* Progress bar */
.cbot-progress{height:3px;background:rgba(30,92,66,.1);flex-shrink:0}
.cbot-progress-fill{height:100%;background:linear-gradient(90deg,var(--gold,#C9A961),#E0C578);width:0;transition:width .5s ease;border-radius:0 3px 3px 0}
