/* ── Lumination Chatbot Widget ── */

#lmc-chatbot {
  --lmc-primary: #6C5CE7;
  --lmc-radius: 16px;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  font-size: 14px;
  line-height: 1.5;
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 99999;
}

/* ── Bubble ── */

#lmc-bubble {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  border: none;
  background: var(--lmc-primary);
  color: #fff;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
  transition: transform 0.2s, box-shadow 0.2s;
}

#lmc-bubble:hover {
  transform: scale(1.08);
  box-shadow: 0 6px 24px rgba(0, 0, 0, 0.25);
}

/* ── Panel ── */

#lmc-panel {
  position: absolute;
  bottom: 0;
  right: 0;
  width: 360px;
  height: 520px;
  background: #fff;
  border-radius: var(--lmc-radius);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.18);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

#lmc-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px;
  background: var(--lmc-primary);
  color: #fff;
}

#lmc-title {
  font-weight: 600;
  font-size: 15px;
}

#lmc-close {
  background: none;
  border: none;
  color: #fff;
  font-size: 22px;
  cursor: pointer;
  line-height: 1;
  padding: 0 4px;
  opacity: 0.8;
}

#lmc-close:hover { opacity: 1; }

/* ── Messages ── */

#lmc-messages {
  flex: 1;
  overflow-y: auto;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.lmc-msg {
  max-width: 85%;
  padding: 10px 14px;
  border-radius: var(--lmc-radius);
  word-wrap: break-word;
  overflow-wrap: break-word;
}

.lmc-msg-user {
  align-self: flex-end;
  background: var(--lmc-primary);
  color: #fff;
  border-bottom-right-radius: 4px;
}

.lmc-msg-assistant {
  align-self: flex-start;
  background: #f0f0f0;
  color: #222;
  border-bottom-left-radius: 4px;
}

.lmc-msg-assistant strong { font-weight: 600; }

.lmc-msg-assistant pre {
  background: #e4e4e4;
  padding: 8px 10px;
  border-radius: 8px;
  overflow-x: auto;
  font-size: 12px;
  margin: 6px 0;
}

.lmc-msg-assistant code {
  font-size: 12px;
  background: #e4e4e4;
  padding: 1px 4px;
  border-radius: 3px;
}

.lmc-msg-assistant pre code {
  background: none;
  padding: 0;
}

.lmc-msg-assistant ul {
  margin: 4px 0;
  padding-left: 18px;
}

.lmc-msg-assistant li { margin: 2px 0; }

/* Loading dots */
.lmc-loading { opacity: 0.5; }

/* ── Input form ── */

#lmc-form {
  display: flex;
  align-items: center;
  padding: 10px 12px;
  border-top: 1px solid #e8e8e8;
  gap: 8px;
  background: #fff;
}

#lmc-input {
  flex: 1;
  border: 1px solid #ddd;
  border-radius: 20px;
  padding: 8px 14px;
  font-size: 14px;
  outline: none;
  font-family: inherit;
}

#lmc-input:focus { border-color: var(--lmc-primary); }

#lmc-send {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: none;
  background: var(--lmc-primary);
  color: #fff;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

#lmc-send:hover { opacity: 0.9; }

/* ── Hidden state ── */

.lmc-hidden { display: none !important; }

/* ── Mobile ── */

@media (max-width: 480px) {
  #lmc-chatbot { bottom: 12px; right: 12px; left: 12px; }
  #lmc-panel { width: auto; left: 0; right: 0; height: 70vh; }
}
