/* ── ConsultBot Widget — orange accent, distinct from portfolio SekharBot ── */

#cbot-bubble {
  position: fixed;
  bottom: 1.75rem;
  right: 1.75rem;
  width: 56px;
  height: 56px;
  background: #f97316;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 9998;
  box-shadow: 0 4px 20px rgba(249,115,22,0.45);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  border: none;
  outline: none;
}
#cbot-bubble:hover {
  transform: scale(1.08);
  box-shadow: 0 6px 28px rgba(249,115,22,0.6);
}
#cbot-bubble svg { width: 26px; height: 26px; fill: #fff; }
#cbot-bubble .cbot-notif {
  position: absolute;
  top: -3px;
  right: -3px;
  width: 14px;
  height: 14px;
  background: #22c55e;
  border-radius: 50%;
  border: 2px solid white;
  display: none;
  animation: cbot-pulse 2s infinite;
}
@keyframes cbot-pulse {
  0%,100% { transform: scale(1); }
  50%      { transform: scale(1.25); }
}

#cbot-panel {
  position: fixed;
  bottom: 5.5rem;
  right: 1.75rem;
  width: 370px;
  max-width: calc(100vw - 2rem);
  height: 540px;
  max-height: calc(100vh - 7rem);
  background: #1a1a2e;
  border-radius: 16px;
  box-shadow: 0 12px 48px rgba(0,0,0,0.45);
  display: flex;
  flex-direction: column;
  z-index: 9999;
  transform: translateY(20px);
  opacity: 0;
  pointer-events: none;
  transition: transform 0.25s ease, opacity 0.25s ease;
  border: 1px solid rgba(249,115,22,0.25);
  overflow: hidden;
}
#cbot-panel.open {
  transform: translateY(0);
  opacity: 1;
  pointer-events: all;
}
#cbot-panel.expanded {
  width: 520px;
  max-width: calc(100vw - 2rem);
}

/* Header */
.cbot-header {
  background: linear-gradient(90deg, #16213e, #0f3460);
  padding: 0.85rem 1rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  border-bottom: 1px solid rgba(249,115,22,0.2);
  flex-shrink: 0;
}
.cbot-avatar {
  width: 36px;
  height: 36px;
  background: #f97316;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.85rem;
  color: #fff;
  flex-shrink: 0;
}
.cbot-header-info { flex: 1; }
.cbot-header-name   { font-weight: 700; font-size: 0.9rem; color: white; line-height: 1.2; }
.cbot-header-status {
  font-size: 0.7rem;
  color: #f97316;
  display: flex;
  align-items: center;
  gap: 0.3rem;
}
.cbot-header-status::before {
  content: '';
  width: 6px; height: 6px;
  background: #22c55e;
  border-radius: 50%;
  display: inline-block;
}
#cbot-expand-btn {
  background: none;
  border: none;
  color: rgba(255,255,255,0.4);
  cursor: pointer;
  font-size: 1rem;
  padding: 0.2rem 0.3rem;
  line-height: 1;
  transition: color 0.15s;
  margin-right: 0.1rem;
}
#cbot-expand-btn:hover { color: #f97316; }
#cbot-close-btn {
  background: none;
  border: none;
  color: rgba(255,255,255,0.5);
  cursor: pointer;
  font-size: 1.1rem;
  padding: 0.2rem;
  line-height: 1;
  transition: color 0.15s;
}
#cbot-close-btn:hover { color: white; }

/* Messages */
.cbot-messages {
  flex: 1;
  overflow-y: auto;
  padding: 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  scroll-behavior: smooth;
}
.cbot-messages::-webkit-scrollbar { width: 4px; }
.cbot-messages::-webkit-scrollbar-track { background: transparent; }
.cbot-messages::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.15); border-radius: 2px; }

.cbot-msg { max-width: 90%; animation: cbot-msg-in 0.2s ease; }
@keyframes cbot-msg-in {
  from { opacity: 0; transform: translateY(6px); }
  to   { opacity: 1; transform: translateY(0); }
}
.cbot-msg.bot  { align-self: flex-start; }
.cbot-msg.user { align-self: flex-end; }

.cbot-bubble-text {
  padding: 0.6rem 0.9rem;
  border-radius: 12px;
  font-size: 0.82rem;
  line-height: 1.6;
}
.cbot-msg.bot .cbot-bubble-text {
  background: rgba(255,255,255,0.07);
  color: rgba(255,255,255,0.9);
  border-bottom-left-radius: 3px;
}
.cbot-msg.user .cbot-bubble-text {
  background: #f97316;
  color: #fff;
  font-weight: 600;
  border-bottom-right-radius: 3px;
}

/* Typing */
.cbot-typing {
  align-self: flex-start;
  display: flex;
  gap: 4px;
  padding: 0.65rem 0.9rem;
  background: rgba(255,255,255,0.07);
  border-radius: 12px;
  border-bottom-left-radius: 3px;
}
.cbot-typing span {
  width: 7px; height: 7px;
  background: rgba(255,255,255,0.4);
  border-radius: 50%;
  animation: cbot-bounce 1.2s infinite;
}
.cbot-typing span:nth-child(2) { animation-delay: 0.2s; }
.cbot-typing span:nth-child(3) { animation-delay: 0.4s; }
@keyframes cbot-bounce {
  0%,60%,100% { transform: translateY(0); }
  30% { transform: translateY(-5px); background: #f97316; }
}

/* Chips */
.cbot-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-top: 0.5rem;
}
.cbot-chip {
  background: rgba(249,115,22,0.12);
  border: 1px solid rgba(249,115,22,0.35);
  color: #f97316;
  font-size: 0.72rem;
  font-weight: 600;
  padding: 0.3rem 0.7rem;
  border-radius: 999px;
  cursor: pointer;
  transition: all 0.15s;
  white-space: nowrap;
}
.cbot-chip:hover {
  background: rgba(249,115,22,0.25);
  border-color: #f97316;
}

/* Info card */
.cbot-card {
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(249,115,22,0.2);
  border-radius: 10px;
  padding: 0.75rem;
  margin-top: 0.4rem;
  font-size: 0.79rem;
}
.cbot-card-row {
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
  padding: 0.22rem 0;
  color: rgba(255,255,255,0.8);
  line-height: 1.5;
}
.cbot-card-row strong { color: #f97316; min-width: 90px; flex-shrink: 0; }
.cbot-card a { color: #f97316; text-decoration: none; }
.cbot-card a:hover { text-decoration: underline; }

/* Lead capture form */
.cbot-lead-form {
  margin-top: 0.75rem;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(249,115,22,0.2);
  border-radius: 10px;
  padding: 0.85rem;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}
.cbot-lead-field { display: flex; flex-direction: column; gap: 0.25rem; }
.cbot-lead-field label { font-size: 0.72rem; color: rgba(255,255,255,0.55); font-weight: 600; }
.cbot-lead-field input[type="text"],
.cbot-lead-field input[type="email"] {
  background: rgba(255,255,255,0.07);
  border: 1px solid rgba(255,255,255,0.15);
  border-radius: 7px;
  color: white;
  font-size: 0.8rem;
  padding: 0.45rem 0.7rem;
  outline: none;
  font-family: inherit;
  transition: border-color 0.15s;
}
.cbot-lead-field input:focus { border-color: #f97316; }
.cbot-lead-types {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin-top: 0.2rem;
}
.cbot-type-btn {
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.15);
  color: rgba(255,255,255,0.7);
  font-size: 0.7rem;
  padding: 0.3rem 0.6rem;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.15s;
  white-space: nowrap;
}
.cbot-type-btn:hover,
.cbot-type-btn.selected {
  background: rgba(249,115,22,0.2);
  border-color: #f97316;
  color: #f97316;
}
.cbot-lead-submit {
  background: #f97316;
  border: none;
  color: white;
  font-size: 0.82rem;
  font-weight: 700;
  padding: 0.55rem 1rem;
  border-radius: 8px;
  cursor: pointer;
  transition: background 0.15s;
  align-self: flex-start;
  margin-top: 0.2rem;
}
.cbot-lead-submit:hover { background: #ea6c0a; }
.cbot-lead-error {
  font-size: 0.75rem;
  color: #f87171;
  margin-bottom: 0.2rem;
}
.cbot-lead-confirm {
  margin-top: 0.6rem;
  background: rgba(34,197,94,0.12);
  border: 1px solid rgba(34,197,94,0.3);
  border-radius: 8px;
  padding: 0.6rem 0.8rem;
  font-size: 0.8rem;
  color: #86efac;
  line-height: 1.5;
}

/* Input row */
.cbot-input-row {
  padding: 0.75rem 1rem;
  border-top: 1px solid rgba(255,255,255,0.08);
  display: flex;
  gap: 0.5rem;
  flex-shrink: 0;
}
#cbot-input {
  flex: 1;
  background: rgba(255,255,255,0.07);
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 8px;
  color: white;
  font-size: 0.82rem;
  padding: 0.5rem 0.75rem;
  outline: none;
  transition: border-color 0.15s;
  font-family: inherit;
}
#cbot-input::placeholder { color: rgba(255,255,255,0.3); }
#cbot-input:focus { border-color: #f97316; }
#cbot-send {
  background: #f97316;
  border: none;
  border-radius: 8px;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  flex-shrink: 0;
  transition: background 0.15s;
}
#cbot-send:hover { background: #ea6c0a; }
#cbot-send svg { width: 16px; height: 16px; fill: white; }

/* Mobile */
@media (max-width: 576px) {
  #cbot-panel {
    right: 0.75rem;
    left: 0.75rem;
    width: auto;
    bottom: 5rem;
  }
  #cbot-panel.expanded { width: auto; left: 0.75rem; right: 0.75rem; }
  #cbot-expand-btn { display: none; }
  #cbot-bubble { bottom: 1.25rem; right: 1.25rem; }
}
