/* VisionBot — host site + embeddable widget. --bot-accent themes the widget live. */
:root { --bot-accent: #3BC9F0; }

/* ---------- Host site (the page the widget sits on) ---------- */
.cb-hero { display: grid; grid-template-columns: 1.3fr .7fr; gap: 26px; align-items: center; background: var(--gradient-steel); border: 1px solid var(--steel); border-radius: var(--radius-lg); padding: clamp(28px,5vw,52px); margin-top: 22px; }
.cb-hero h1 { font-size: clamp(1.8rem,4vw,2.7rem); margin: 12px 0 10px; }
.cb-hero p { color: var(--muted); max-width: 52ch; margin-bottom: 22px; }
.cb-hero-art { font-size: clamp(5rem,12vw,9rem); text-align: center; filter: drop-shadow(0 14px 30px rgba(59,201,240,.25)); }

.cb-svc { display: grid; grid-template-columns: repeat(5,1fr); gap: 14px; margin: 26px 0; }
.svc-tile { background: var(--surface); border: 1px solid var(--steel); border-radius: var(--radius); padding: 20px 14px; text-align: center; transition: .15s; }
.svc-tile:hover { transform: translateY(-3px); border-color: var(--steel-2); }
.svc-tile span { font-size: 2rem; }
.svc-tile h4 { font-size: .92rem; margin-top: 8px; }

.cb-embed { display: grid; grid-template-columns: 1fr 1fr; gap: 28px; align-items: center; background: var(--surface); border: 1px solid var(--steel); border-radius: var(--radius-lg); padding: clamp(24px,4vw,40px); }
.brand-row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-top: 18px; }
.swatch { width: 30px; height: 30px; border-radius: 50%; border: 2px solid var(--steel); cursor: pointer; transition: .15s; }
.swatch:hover { transform: scale(1.12); }
.swatch.on { box-shadow: 0 0 0 3px var(--bg), 0 0 0 5px currentColor; outline: 2px solid #fff3; }
.snippet { background: #0a0d12; border: 1px solid var(--steel); border-radius: var(--radius); overflow: hidden; }
.snip-head { display: flex; justify-content: space-between; align-items: center; padding: 10px 14px; border-bottom: 1px solid var(--steel); color: var(--muted); font-size: .82rem; }
.snippet pre { padding: 16px; font-family: "Courier New", monospace; font-size: .82rem; color: #cfe8f2; white-space: pre; overflow-x: auto; }

/* ---------- The widget ---------- */
.vb { position: fixed; inset-block-end: 22px; inset-inline-end: 22px; z-index: 300; }
.vb-launcher { position: relative; width: 60px; height: 60px; border-radius: 50%; border: none; cursor: pointer; background: var(--bot-accent); color: #04222b; font-size: 1.6rem; box-shadow: 0 10px 28px rgba(0,0,0,.4); transition: transform .18s var(--ease); display: grid; place-items: center; margin-inline-start: auto; }
.vb-launcher:hover { transform: scale(1.06); }
.vb-ico-x { display: none; }
.vb.open .vb-ico-chat { display: none; }
.vb.open .vb-ico-x { display: block; }
.vb-dot { position: absolute; inset-block-start: -3px; inset-inline-end: -3px; min-width: 20px; height: 20px; border-radius: 999px; background: var(--forge); color: #fff; font-size: .72rem; font-weight: 800; display: grid; place-items: center; padding: 0 5px; }

.vb-panel { position: absolute; inset-block-end: 74px; inset-inline-end: 0; width: min(370px, calc(100vw - 32px)); height: min(560px, calc(100vh - 130px)); background: var(--surface); border: 1px solid var(--steel); border-radius: 18px; box-shadow: 0 24px 60px rgba(0,0,0,.5); display: flex; flex-direction: column; overflow: hidden; opacity: 0; transform: translateY(12px) scale(.97); transform-origin: bottom; pointer-events: none; transition: opacity .2s var(--ease), transform .2s var(--ease); }
.vb.open .vb-panel { opacity: 1; transform: none; pointer-events: auto; }

.vb-head { display: flex; align-items: center; gap: 11px; padding: 14px 16px; background: var(--bot-accent); color: #04222b; }
.vb-av { width: 38px; height: 38px; border-radius: 11px; background: rgba(255,255,255,.25); display: grid; place-items: center; font-size: 1.25rem; }
.vb-id strong { display: block; font-size: .98rem; }
.vb-st { font-size: .74rem; opacity: .85; }
.vb-st::before { content: "● "; }
.vb-close { margin-inline-start: auto; background: rgba(0,0,0,.12); border: none; color: inherit; width: 28px; height: 28px; border-radius: 8px; cursor: pointer; font-size: .9rem; }

.vb-msgs { flex: 1; overflow: auto; padding: 16px; display: flex; flex-direction: column; gap: 11px; }
.vb-msg { display: flex; max-width: 86%; }
.vb-msg.user { margin-inline-start: auto; }
.vb-bub { padding: 10px 13px; border-radius: 14px; line-height: 1.5; font-size: .9rem; }
.vb-msg.bot .vb-bub { background: var(--surface-2); border: 1px solid var(--steel); border-start-start-radius: 4px; }
.vb-msg.user .vb-bub { background: var(--bot-accent); color: #04222b; border-start-end-radius: 4px; font-weight: 600; }
.vb-typing .vb-bub { display: inline-flex; gap: 5px; }
.vb-typing .d { width: 7px; height: 7px; border-radius: 50%; background: var(--muted); animation: vbblink 1.2s infinite; }
.vb-typing .d:nth-child(2) { animation-delay: .2s; } .vb-typing .d:nth-child(3) { animation-delay: .4s; }
@keyframes vbblink { 0%,60%,100% { opacity: .25; } 30% { opacity: 1; } }

.vb-card { width: 100%; display: flex; flex-direction: column; gap: 8px; }
.vb-form-t { font-weight: 700; font-size: .88rem; }
.vb-fi { background: var(--bg-2); border: 1px solid var(--steel); border-radius: 9px; padding: 9px 11px; color: var(--text); font: inherit; font-size: .88rem; }
.vb-fi:focus { outline: none; border-color: var(--bot-accent); }
.vb-fbtn { margin-top: 2px; }
.vb-slot { display: block; width: 100%; text-align: start; background: var(--bg-2); border: 1px solid var(--steel); border-radius: 9px; padding: 9px 12px; margin-bottom: 6px; color: var(--text); font: inherit; font-size: .86rem; cursor: pointer; transition: .12s; }
.vb-slot:hover { border-color: var(--bot-accent); background: rgba(59,201,240,.08); }

.vb-chips { display: flex; gap: 7px; flex-wrap: wrap; padding: 0 16px 8px; }
.vb-chip { background: transparent; border: 1px solid var(--steel); color: var(--text); border-radius: 999px; padding: 6px 12px; font-size: .8rem; cursor: pointer; transition: .12s; }
.vb-chip:hover { border-color: var(--bot-accent); color: var(--bot-accent); }
.vb-input { display: flex; gap: 9px; padding: 12px 14px; border-top: 1px solid var(--steel); }
.vb-input input { flex: 1; background: var(--bg-2); border: 1px solid var(--steel); border-radius: 10px; padding: 10px 13px; color: var(--text); font: inherit; }
.vb-input input:focus { outline: none; border-color: var(--bot-accent); }
.vb-input .btn-accent { background: var(--bot-accent); color: #04222b; }
.vb-foot { text-align: center; font-size: .72rem; color: var(--muted); padding: 0 0 10px; }

@media (max-width: 820px) {
  .cb-hero { grid-template-columns: 1fr; text-align: center; }
  .cb-hero p { margin-inline: auto; }
  .cb-hero-art { display: none; }
  .cb-svc { grid-template-columns: repeat(2,1fr); }
  .cb-embed { grid-template-columns: 1fr; }
}
