/* Cube-Age Chat Widget · rule-based FAQ bot styles
   Matches site palette (white base + slate-navy + blue-cyan accent). */

.chat-root{
  position:fixed;
  bottom:24px;
  right:24px;
  z-index:9999;
  font-family:'Plus Jakarta Sans','Inter',-apple-system,'Segoe UI',sans-serif;
}

/* --- Floating button --- */
.chat-openbtn{
  width:56px;height:56px;
  border:none;border-radius:50%;
  background:linear-gradient(135deg,#2563eb,#06b6d4);
  color:#fff;
  cursor:pointer;
  display:flex;align-items:center;justify-content:center;
  box-shadow:0 8px 24px -8px rgba(37,99,235,.55),0 4px 12px -4px rgba(15,23,42,.25);
  transition:.25s cubic-bezier(.16,1,.3,1);
}
.chat-openbtn:hover{
  transform:translateY(-3px) scale(1.04);
  box-shadow:0 14px 32px -10px rgba(37,99,235,.65),0 6px 16px -4px rgba(15,23,42,.3);
}
.chat-openbtn:focus-visible{outline:2px solid #06b6d4;outline-offset:3px}

/* --- Panel --- */
.chat-panel{
  position:absolute;
  bottom:72px;right:0;
  width:360px;
  max-width:calc(100vw - 32px);
  max-height:min(560px,calc(100vh - 96px));
  background:#fff;
  border-radius:18px;
  box-shadow:0 24px 64px -12px rgba(15,23,42,.32),0 8px 20px -8px rgba(15,23,42,.16);
  display:flex;flex-direction:column;
  overflow:hidden;
  transform-origin:bottom right;
  opacity:0;pointer-events:none;
  transform:translateY(12px) scale(.94);
  transition:opacity .22s ease,transform .22s cubic-bezier(.16,1,.3,1);
}
.chat-root.open .chat-panel{
  opacity:1;pointer-events:auto;
  transform:none;
}
.chat-root.open .chat-openbtn{transform:scale(.92);opacity:.85}

/* --- Header --- */
.chat-header{
  padding:16px 18px 14px;
  background:linear-gradient(135deg,#0f172a,#1e293b);
  color:#fff;
  display:flex;align-items:flex-start;justify-content:space-between;gap:12px;
  flex-shrink:0;
}
.chat-title-wrap{flex:1;min-width:0}
.chat-title{
  font-family:'Outfit','Plus Jakarta Sans',sans-serif;
  font-weight:800;font-size:15px;letter-spacing:.2px;
}
.chat-subtitle{
  font-size:11.5px;color:rgba(255,255,255,.6);
  margin-top:2px;line-height:1.4;
}
.chat-close{
  background:transparent;border:none;color:rgba(255,255,255,.7);
  cursor:pointer;font-size:22px;line-height:1;
  width:26px;height:26px;border-radius:6px;
  display:flex;align-items:center;justify-content:center;
  transition:.15s;flex-shrink:0;
}
.chat-close:hover{color:#fff;background:rgba(255,255,255,.1)}
.chat-close:focus-visible{outline:2px solid #06b6d4;outline-offset:1px}

/* --- Message list --- */
.chat-msgs{
  flex:1;overflow-y:auto;
  padding:16px 16px 8px;
  background:#f8fafc;
  scroll-behavior:smooth;
}
.chat-msgs::-webkit-scrollbar{width:6px}
.chat-msgs::-webkit-scrollbar-thumb{background:rgba(15,23,42,.2);border-radius:3px}

.chat-msg{margin-bottom:10px;display:flex}
.chat-msg.bot{justify-content:flex-start}
.chat-msg.user{justify-content:flex-end}
.chat-bubble{
  max-width:82%;
  padding:10px 14px;
  border-radius:14px;
  font-size:13.5px;line-height:1.55;
  word-wrap:break-word;
}
.chat-msg.bot .chat-bubble{
  background:#fff;color:#0f172a;
  border:1px solid rgba(15,23,42,.08);
  border-bottom-left-radius:4px;
}
.chat-msg.user .chat-bubble{
  background:linear-gradient(135deg,#2563eb,#06b6d4);
  color:#fff;
  border-bottom-right-radius:4px;
}
.chat-msg.bot .chat-cta{
  display:inline-block;
  margin-top:8px;
  padding:8px 14px;
  background:#0f172a;color:#fff;
  font-size:12px;font-weight:600;
  text-decoration:none;border-radius:8px;
  transition:.15s;
}
.chat-msg.bot .chat-cta:hover{background:#2563eb}

/* --- Quick topic chips --- */
.chat-chips-head{
  font-size:11px;color:rgba(15,23,42,.5);
  text-transform:uppercase;letter-spacing:1.5px;font-weight:700;
  margin:6px 0 8px;
}
.chat-chips{
  display:flex;flex-wrap:wrap;gap:6px;
  margin-bottom:12px;
}
.chat-chip{
  background:#fff;
  border:1px solid rgba(15,23,42,.15);
  border-radius:100px;
  padding:6px 12px;
  font-size:12px;color:#0f172a;
  cursor:pointer;
  font-family:inherit;
  transition:.15s;
}
.chat-chip:hover{
  background:#0f172a;color:#fff;
  border-color:#0f172a;
  transform:translateY(-1px);
}
.chat-chip:focus-visible{outline:2px solid #2563eb;outline-offset:1px}

/* --- Input form --- */
.chat-form{
  display:flex;gap:8px;
  padding:12px 14px;
  border-top:1px solid rgba(15,23,42,.08);
  background:#fff;
  flex-shrink:0;
}
.chat-input{
  flex:1;
  padding:9px 14px;
  border:1px solid rgba(15,23,42,.15);
  border-radius:100px;
  font-size:13px;
  font-family:inherit;
  color:#0f172a;
  background:#f8fafc;
  transition:.15s;
}
.chat-input:focus{
  outline:none;
  border-color:#2563eb;
  background:#fff;
  box-shadow:0 0 0 3px rgba(37,99,235,.12);
}
.chat-send{
  padding:9px 18px;
  background:#0f172a;color:#fff;
  border:none;border-radius:100px;
  font-size:12.5px;font-weight:700;
  cursor:pointer;
  font-family:inherit;
  transition:.15s;
}
.chat-send:hover{background:#2563eb}
.chat-send:focus-visible{outline:2px solid #06b6d4;outline-offset:2px}

/* --- Mobile --- */
@media (max-width:480px){
  .chat-root{bottom:16px;right:16px}
  .chat-openbtn{width:52px;height:52px}
  .chat-panel{
    width:calc(100vw - 32px);
    bottom:68px;
  }
}
