/* RX Chat Widget – clean, minimal, no dependencies */

:root {
  --rx-bg: #0f172a;
  --rx-panel: #111827;
  --rx-border: rgba(255,255,255,.12);
  --rx-accent: #22c55e;
  --rx-text: #e5e7eb;
  --rx-muted: rgba(229,231,235,.7);
  --rx-shadow: 0 18px 55px rgba(0,0,0,.35);
  --rx-radius: 14px;
  --rx-font: system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
}

#rx-chat-launcher {
  position: fixed;
  right: 18px;
  bottom: 18px;
  width: 56px;
  height: 56px;
  border-radius: 999px;
  background: var(--rx-accent);
  box-shadow: var(--rx-shadow);
  border: none;
  cursor: pointer;
  z-index: 2147483647;
  display: grid;
  place-items: center;
}

#rx-chat-launcher svg {
  width: 26px;
  height: 26px;
  fill: #06110a;
}

#rx-chat-panel {
  position: fixed;
  right: 18px;
  bottom: 86px;
  width: 340px;
  max-width: calc(100vw - 36px);
  height: 460px;
  max-height: calc(100vh - 130px);
  background: var(--rx-panel);
  color: var(--rx-text);
  font-family: var(--rx-font);
  border: 1px solid var(--rx-border);
  border-radius: var(--rx-radius);
  box-shadow: var(--rx-shadow);
  overflow: hidden;
  z-index: 2147483647;
  display: none;
}

#rx-chat-header {
  height: 54px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 12px 0 14px;
  background: rgba(255,255,255,.03);
  border-bottom: 1px solid var(--rx-border);
}

#rx-chat-title {
  font-weight: 700;
  font-size: 14px;
  letter-spacing: .2px;
}

#rx-chat-close {
  border: none;
  background: transparent;
  color: var(--rx-muted);
  cursor: pointer;
  font-size: 20px;
  line-height: 1;
  padding: 8px;
  border-radius: 10px;
}
#rx-chat-close:hover {
  background: rgba(255,255,255,.06);
  color: var(--rx-text);
}

#rx-chat-body {
  height: calc(100% - 54px - 92px);
  padding: 12px;
  overflow: auto;
}

.rx-msg {
  margin: 0 0 10px 0;
  padding: 10px 10px;
  border: 1px solid rgba(255,255,255,.08);
  border-radius: 12px;
  background: rgba(255,255,255,.03);
}

.rx-msg .meta {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  font-size: 12px;
  color: var(--rx-muted);
  margin-bottom: 6px;
}

.rx-msg .text {
  font-size: 14px;
  color: var(--rx-text);
  word-wrap: break-word;
  white-space: pre-wrap;
}

#rx-chat-footer {
  height: 92px;
  border-top: 1px solid var(--rx-border);
  background: rgba(255,255,255,.02);
  padding: 10px;
  display: grid;
  grid-template-columns: 110px 1fr;
  gap: 10px;
  align-items: center;
}

#rx-chat-name, #rx-chat-input {
  width: 100%;
  border-radius: 12px;
  border: 1px solid rgba(255,255,255,.12);
  background: rgba(0,0,0,.25);
  color: var(--rx-text);
  outline: none;
  padding: 10px 12px;
  font-size: 13px;
}

#rx-chat-input-wrap {
  display: grid;
  grid-template-columns: 1fr 76px;
  gap: 10px;
}

#rx-chat-send {
  border-radius: 12px;
  border: none;
  background: var(--rx-accent);
  color: #06110a;
  font-weight: 700;
  cursor: pointer;
}
#rx-chat-send:hover { filter: brightness(0.95); }

#rx-chat-status {
  grid-column: 1 / -1;
  font-size: 12px;
  color: var(--rx-muted);
  margin-top: -4px;
}
