/* ============================================================
   ONtime landing — AI chat widget
   Brand tokens come from styles.css (:root). Everything scoped
   under .oc- to avoid collisions with landing styles.
   ============================================================ */

.oc-fab{
  position:fixed;right:22px;bottom:22px;z-index:900;
  display:flex;align-items:center;gap:.55em;
  background:var(--blue);color:#fff;font-weight:700;font-size:.98rem;
  border-radius:999px;padding:.8em 1.25em;
  box-shadow:0 14px 34px -10px rgba(83,152,234,.75);
  transition:transform .2s var(--ease),box-shadow .2s var(--ease),background .2s;
}
.oc-fab:hover{background:var(--blue-hover);transform:translateY(-2px)}
.oc-fab svg{width:1.25em;height:1.25em}
.oc-fab__hint{display:none}
@media(min-width:640px){.oc-fab__hint{display:inline}}

.oc-panel{
  position:fixed;right:22px;bottom:92px;z-index:901;
  width:min(380px,calc(100vw - 32px));
  max-height:min(560px,calc(100dvh - 120px));
  display:flex;flex-direction:column;
  background:var(--card);border:1px solid var(--border);border-radius:var(--radius);
  box-shadow:var(--shadow-lg);overflow:hidden;
  opacity:0;transform:translateY(14px) scale(.98);pointer-events:none;
  transition:opacity .22s var(--ease),transform .22s var(--ease);
}
.oc-panel.is-open{opacity:1;transform:none;pointer-events:auto}
/* The landing shows a full-width sticky CTA pill (.cta-sticky) at the bottom
   on ≤980px. Lift the FAB above it so the two don't overlap, and push the
   panel up to clear the raised FAB. */
@media(max-width:980px){
  .oc-fab{bottom:80px}
  .oc-panel{bottom:138px;max-height:min(560px,calc(100dvh - 170px))}
}
@media(max-width:480px){
  .oc-panel{right:8px;left:8px;width:auto;bottom:138px;max-height:calc(100dvh - 158px)}
}

.oc-head{
  display:flex;align-items:center;gap:.7em;
  padding:14px 16px;background:var(--blue);color:#fff;
}
.oc-head__ava{
  width:36px;height:36px;border-radius:50%;background:rgba(255,255,255,.18);
  display:flex;align-items:center;justify-content:center;flex-shrink:0;
}
.oc-head__ava svg{width:20px;height:20px}
.oc-head__title{font-weight:700;font-size:1rem;line-height:1.2}
.oc-head__sub{font-size:.78rem;opacity:.85}
.oc-head__close{margin-left:auto;padding:6px;border-radius:8px;line-height:0}
.oc-head__close:hover{background:rgba(255,255,255,.15)}
.oc-head__close svg{width:18px;height:18px}

.oc-msgs{
  flex:1;overflow-y:auto;padding:14px;display:flex;flex-direction:column;gap:8px;
  background:var(--bg);min-height:180px;
}
.oc-msg{max-width:85%;padding:.55em .9em;border-radius:16px;font-size:.92rem;line-height:1.45;
  white-space:pre-wrap;word-break:break-word}
.oc-msg--bot{align-self:flex-start;background:var(--card);border:1px solid var(--border);
  border-bottom-left-radius:6px;box-shadow:var(--shadow-sm)}
.oc-msg--user{align-self:flex-end;background:var(--blue);color:#fff;border-bottom-right-radius:6px}
.oc-msg--typing span{display:inline-block;width:6px;height:6px;margin-right:3px;border-radius:50%;
  background:var(--muted);animation:oc-blink 1.2s infinite}
.oc-msg--typing span:nth-child(2){animation-delay:.2s}
.oc-msg--typing span:nth-child(3){animation-delay:.4s;margin-right:0}
@keyframes oc-blink{0%,80%,100%{opacity:.25}40%{opacity:1}}

.oc-input{
  display:flex;gap:8px;padding:10px 12px;border-top:1px solid var(--border);background:var(--card);
}
.oc-input input{
  flex:1;font:inherit;font-size:.95rem;color:var(--ink);
  background:var(--bg);border:1px solid var(--border);border-radius:12px;
  padding:.6em .9em;outline:none;
}
.oc-input input:focus{border-color:var(--blue)}
.oc-input button{
  background:var(--blue);color:#fff;border-radius:12px;padding:0 14px;line-height:0;
  transition:background .2s;
}
.oc-input button:hover{background:var(--blue-hover)}
.oc-input button:disabled{opacity:.5;cursor:default}
.oc-input button svg{width:18px;height:18px}

.oc-foot{
  padding:8px 12px 10px;background:var(--card);text-align:center;
}
.oc-foot button{
  font-size:.8rem;font-weight:600;color:var(--blue);
}
.oc-foot button:hover{text-decoration:underline}

/* Handoff form (shown in place of messages) */
.oc-handoff{padding:18px 16px;background:var(--bg);flex:1;overflow-y:auto}
.oc-handoff h4{font-size:1rem;margin-bottom:4px;color:var(--ink)}
.oc-handoff p{font-size:.85rem;color:var(--muted);margin-bottom:12px}
.oc-handoff label{display:block;font-size:.8rem;font-weight:600;color:var(--muted);margin:10px 0 4px}
.oc-handoff input,.oc-handoff textarea{
  width:100%;font:inherit;font-size:.95rem;color:var(--ink);
  background:var(--card);border:1px solid var(--border);border-radius:12px;
  padding:.6em .9em;outline:none;resize:vertical;
}
.oc-handoff input:focus,.oc-handoff textarea:focus{border-color:var(--blue)}
.oc-handoff .oc-err{color:#c0392b;font-size:.8rem;margin-top:8px}
.oc-handoff__actions{display:flex;gap:10px;margin-top:14px;align-items:center}
.oc-handoff__ok{text-align:center;padding:30px 10px}
.oc-handoff__ok svg{width:44px;height:44px;color:var(--green);margin:0 auto 10px}
