/* ═══════════════════════════════════════════════════
   CHATBOT WIDGET — ITP BluLine
   Adaugă în assets/css/style.css sau într-un fișier separat assets/css/chatbot.css
   ═══════════════════════════════════════════════════ */

.cb-bubble {
  position: fixed;
  bottom: 24px;
  right: 24px;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: #1263ff;
  color: #fff;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 20px rgba(18,99,255,.4);
  z-index: 9999;
  transition: transform .2s, box-shadow .2s;
}
.cb-bubble:hover { transform: scale(1.08); box-shadow: 0 6px 28px rgba(18,99,255,.5); }
.cb-bubble svg { width: 26px; height: 26px; }
.cb-badge {
  position: absolute;
  top: -4px; right: -4px;
  background: #ef4444;
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  min-width: 18px;
  height: 18px;
  border-radius: 9px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 4px;
}

.cb-window {
  position: fixed;
  bottom: 90px;
  right: 24px;
  width: 360px;
  max-height: 520px;
  background: #fff;
  border-radius: 18px;
  box-shadow: 0 8px 40px rgba(0,0,0,.18);
  display: flex;
  flex-direction: column;
  z-index: 9998;
  overflow: hidden;
  transform: scale(.92) translateY(16px);
  opacity: 0;
  pointer-events: none;
  transition: transform .22s ease, opacity .22s ease;
}
.cb-window.cb-open {
  transform: scale(1) translateY(0);
  opacity: 1;
  pointer-events: all;
}

.cb-head {
  background: #1263ff;
  color: #fff;
  padding: 14px 16px;
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}
.cb-head-avatar {
  width: 36px; height: 36px;
  background: rgba(255,255,255,.2);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 18px;
}
.cb-head-info strong { display: block; font-size: 14px; }
.cb-head-info span { font-size: 12px; opacity: .8; }
.cb-head-close {
  margin-left: auto;
  background: none;
  border: none;
  color: #fff;
  cursor: pointer;
  opacity: .7;
  font-size: 20px;
  line-height: 1;
  padding: 0 4px;
}
.cb-head-close:hover { opacity: 1; }

.cb-messages {
  flex: 1;
  overflow-y: auto;
  padding: 16px 12px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  scroll-behavior: smooth;
}

.cb-msg {
  max-width: 85%;
  padding: 10px 14px;
  border-radius: 14px;
  font-size: 13.5px;
  line-height: 1.5;
}
.cb-msg.bot {
  background: #f1f5fd;
  color: #0b1220;
  align-self: flex-start;
  border-bottom-left-radius: 4px;
}
.cb-msg.user {
  background: #1263ff;
  color: #fff;
  align-self: flex-end;
  border-bottom-right-radius: 4px;
}
.cb-msg.typing {
  background: #f1f5fd;
  align-self: flex-start;
  border-bottom-left-radius: 4px;
  padding: 12px 16px;
}
.cb-dots span {
  display: inline-block;
  width: 6px; height: 6px;
  background: #94a3b8;
  border-radius: 50%;
  margin: 0 2px;
  animation: cbDot .9s infinite;
}
.cb-dots span:nth-child(2) { animation-delay: .2s; }
.cb-dots span:nth-child(3) { animation-delay: .4s; }
@keyframes cbDot { 0%,60%,100%{transform:translateY(0)} 30%{transform:translateY(-5px)} }

.cb-notice {
  font-size: 11px;
  color: #64748b;
  text-align: center;
  padding: 4px 12px 0;
  background: #fff;
  flex-shrink: 0;
}

.cb-footer {
  padding: 10px 12px 12px;
  background: #fff;
  display: flex;
  gap: 8px;
  flex-shrink: 0;
  border-top: 1px solid #f1f5fd;
}
.cb-input {
  flex: 1;
  border: 1.5px solid #e2e8f0;
  border-radius: 10px;
  padding: 9px 12px;
  font-size: 13.5px;
  outline: none;
  resize: none;
  font-family: inherit;
  color: #0b1220;
  transition: border-color .2s;
  max-height: 80px;
}
.cb-input:focus { border-color: #1263ff; }
.cb-send {
  background: #1263ff;
  color: #fff;
  border: none;
  border-radius: 10px;
  width: 38px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: background .2s;
}
.cb-send:hover { background: #0d4ed8; }
.cb-send:disabled { background: #94a3b8; cursor: default; }
.cb-send svg { width: 18px; height: 18px; }

.cb-quick {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding: 0 12px 10px;
  background: #fff;
}
.cb-quick button {
  background: #f1f5fd;
  border: 1px solid #e2e8f0;
  border-radius: 20px;
  padding: 5px 12px;
  font-size: 12px;
  color: #1263ff;
  cursor: pointer;
  transition: background .15s;
  white-space: nowrap;
}
.cb-quick button:hover { background: #dbeafe; }

@media (max-width: 400px) {
  .cb-window { width: calc(100vw - 16px); right: 8px; bottom: 80px; }
  .cb-bubble { right: 16px; bottom: 16px; }
}