.conexam-chat {
  position: fixed;
  left: 18px;
  bottom: 18px;
  width: 340px;
  max-width: calc(100vw - 36px);
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 14px;
  box-shadow: 0 8px 28px rgba(0, 0, 0, .22);
  z-index: 99990;
  display: flex;
  flex-direction: column;
  font-family: 'Segoe UI', system-ui, sans-serif;
  overflow: hidden;
}
.conexam-chat[hidden] { display: none; }

.cc-cabecera {
  background: #0b3d66;
  color: #fff;
  padding: 12px 14px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.cc-titulo { font-weight: 600; font-size: 15px; }
.cc-cerrar {
  background: none;
  border: none;
  color: #fff;
  font-size: 18px;
  cursor: pointer;
  line-height: 1;
}

.cc-mensajes {
  height: 300px;
  overflow-y: auto;
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  background: #f8fafc;
}
.cc-msg {
  max-width: 85%;
  padding: 9px 12px;
  border-radius: 12px;
  font-size: 14px;
  line-height: 1.4;
  white-space: pre-wrap;
}
.cc-bot { background: #eef2f7; color: #1c2733; align-self: flex-start; border-bottom-left-radius: 4px; }
.cc-user { background: #0b3d66; color: #fff; align-self: flex-end; border-bottom-right-radius: 4px; }

.cc-entrada {
  display: flex;
  gap: 8px;
  padding: 10px;
  border-top: 1px solid #e2e8f0;
  background: #fff;
}
.cc-entrada input {
  flex: 1;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  padding: 8px 10px;
  font-size: 14px;
}
.cc-entrada input:focus { outline: 2px solid #0b3d66; }
.cc-enviar {
  background: #0b3d66;
  color: #fff;
  border: none;
  border-radius: 8px;
  width: 42px;
  font-size: 16px;
  cursor: pointer;
}

.cc-flotante {
  position: fixed;
  left: 18px;
  bottom: 18px;
  width: 58px;
  height: 58px;
  border-radius: 50%;
  background: #0b3d66;
  color: #fff;
  border: none;
  font-size: 26px;
  box-shadow: 0 6px 18px rgba(0, 0, 0, .3);
  cursor: pointer;
  z-index: 99989;
}