:root{
  --crmi-brand: #000000;
}
.crmi-ai-bubble{
  position: fixed;
  right: 20px;
  bottom: 20px;
  width: 56px;
  height: 56px;
  border-radius: 999px;
  background: var(--crmi-brand);
  color: #fff;
  display: grid;
  place-items: center;
  cursor: pointer;
  box-shadow: 0 10px 25px rgba(0,0,0,.2);
  z-index: 9999;
}
.crmi-ai-bubble span{ font-size: 22px; line-height: 1; }

.crmi-ai-agent{
  font-family: system-ui, -apple-system, Segoe UI, Roboto, Arial, "Helvetica Neue", Helvetica, sans-serif;
  border: 1px solid #e5e7eb;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 6px 28px rgba(0,0,0,.12);
  background: #fff;
}

.crmi-ai-agent.crmi-floating{
  position: fixed;
  right: 20px;
  bottom: 92px;
  width: 360px;
  max-height: 70vh;
  display: none;
  flex-direction: column;
  z-index: 9999;
}
.crmi-ai-agent.crmi-floating.open{ display: flex; }

.crmi-ai-agent.crmi-inline{
  width: 100%;
  max-width: 680px;
  margin: 20px auto;
  display: flex;
  flex-direction: column;
}

.crmi-header{
  background: linear-gradient(180deg, var(--crmi-brand), #1f2937);
  color: #fff;
  padding: 14px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.crmi-title{ font-weight: 700; }
.crmi-subtitle{ font-size: 12px; opacity: .85; }
.crmi-close{
  background: transparent;
  border: 0;
  color: #fff;
  font-size: 22px;
  cursor: pointer;
}

.crmi-body{
  padding: 12px;
  overflow: auto;
  gap: 10px;
  display: flex;
  flex-direction: column;
  min-height: 160px;
  max-height: 48vh;
}

.crmi-msg{
  display: flex;
  width: 100%;
}
.crmi-msg.user{
  justify-content: flex-end;
}
.crmi-msg .crmi-bubble{
  padding: 10px 12px;
  border-radius: 14px;
  max-width: 85%;
  font-size: 14px;
  line-height: 1.4;
  white-space: pre-wrap;
}
.crmi-msg.user .crmi-bubble{
  background: #111827;
  color: white;
}
.crmi-msg.assistant .crmi-bubble{
  background: #f3f4f6;
  color: #111827;
}

.crmi-gdpr{
  padding: 8px 12px;
  font-size: 12px;
  color: #6b7280;
  border-top: 1px dashed #e5e7eb;
}

.crmi-input{
  display: flex;
  gap: 8px;
  padding: 10px;
  border-top: 1px solid #e5e7eb;
}
.crmi-text{
  flex: 1;
  border: 1px solid #d1d5db;
  border-radius: 12px;
  padding: 10px 12px;
  font-size: 14px;
}
.crmi-send{
  background: var(--crmi-brand);
  color: white;
  border: 0;
  border-radius: 10px;
  padding: 10px 14px;
  cursor: pointer;
}

.crmi-handoff{
  display: flex;
  gap: 10px;
  padding: 8px 12px 12px 12px;
}
.crmi-handoff a{
  font-size: 12px;
  text-decoration: none;
  color: var(--crmi-brand);
}
