:root { 
  --color1: #0ca557; 
  --color2: #0C8BC7;
}
/* Prefijo hnbchat- para evitar colisiones */
#hnbchat-bubble {
  position: fixed;
  bottom: 20px;
  right: 20px;
  width: 66px;
  height: 66px;
  border-radius: 50%;
  background-color: var(--color1);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 17px;
  cursor: pointer;
  box-shadow: 0 2px 6px rgba(0,0,0,0.2);
  z-index: 99999;
  transition: transform 0.15s ease;
  text-align: center;
  line-height: 20px;
}
#hnbchat-bubble:hover { transform: scale(1.06); }

#hnbchat-window {
  position: fixed;
  bottom: 90px;
  right: 20px;
  width: 360px;
  max-width: 90vw;
  height: 520px;
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 6px 20px rgba(0,0,0,0.18);
  display: none;
  flex-direction: column;
  overflow: hidden;
  z-index: 99998;
  font-family: inherit;
}
@media (prefers-color-scheme: dark) {
  #hnbchat-window { background: #ffffff; color: #e5e7eb; }
}

.hnbchat-header {
  background: var(--color1);
  color: #fff;
  padding: 10px 12px;
  display:flex;
  align-items:center;
  justify-content:space-between;
}
.hnbchat-header h3 { margin:0; font-size:14px; font-weight:600; }
.hnbchat-header button {
  background: transparent;
  border: none;
  color: #fff;
  font-size: 24px;
  cursor: pointer;
  position: relative;
  top: -4px;
}

.hnbchat-messages {
  flex:1;
  padding: 14px;
  overflow-y:auto;
  display:flex;
  flex-direction:column;
  gap:10px;
  background: transparent;
}

.hnbchat-msg { max-width: 70ch; padding: 10px 12px; border-radius: 12px; white-space: pre-wrap; word-break: break-word; font-size: 14px; line-height: 1.45; }
.hnbchat-msg.user { align-self:flex-end; background:var(--color1); color:#fff; border-bottom-right-radius:6px; }
.hnbchat-msg.assistant { align-self:flex-start; background:#f1f5f9; color:#0f172a; border-bottom-left-radius:6px; }
.hnbchat-msg.system { align-self:center; background:#fff7ed; color:#7c2d12; font-size:12px; }

.hnbchat-composer { display:flex; gap:8px; padding:10px; border-top:1px solid rgba(0,0,0,0.06); background:transparent; }
.hnbchat-composer input { flex:1; padding:10px 12px; border-radius:10px; border:1px solid rgba(0,0,0,0.08); background:transparent; color: #333333; }
.hnbchat-composer button { padding:10px 14px; border-radius:10px; border:1px solid var(--color1); background:var(--color1); color:#fff; font-weight:600; cursor:pointer; }
