/* Connexigh FAQ Assistant — widget styles, matched to the site's red brand scheme (#f44336). */
:root {
  --cx-accent: #f44336;
  --cx-accent-dark: #c62828;
  --cx-bg: #ffffff;
  --cx-bg-soft: #f6f4ef;
  --cx-text: #21201d;
  --cx-text-muted: #6b6862;
  --cx-radius: 14px;
  --cx-shadow: 0 12px 32px rgba(0, 0, 0, 0.16);
}

.cx-launcher {
  position: fixed;
  bottom: 96px;
  right: 22px;
  z-index: 999999;
  width: 58px;
  height: 58px;
  border-radius: 50%;
  background: var(--cx-accent);
  color: #fff;
  border: none;
  cursor: pointer;
  box-shadow: var(--cx-shadow);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.15s ease;
}
.cx-launcher:hover { transform: scale(1.06); }
.cx-launcher:focus-visible { outline: 3px solid var(--cx-accent-dark); outline-offset: 2px; }
.cx-launcher svg { width: 26px; height: 26px; }

.cx-panel {
  position: fixed;
  bottom: 166px;
  right: 22px;
  z-index: 999999;
  width: 360px;
  max-width: calc(100vw - 32px);
  height: 520px;
  max-height: calc(100vh - 140px);
  background: var(--cx-bg);
  border-radius: var(--cx-radius);
  box-shadow: var(--cx-shadow);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}
.cx-panel[hidden] { display: none; }

.cx-header {
  background: var(--cx-accent);
  color: #fff;
  padding: 14px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.cx-header-title { font-weight: 600; font-size: 15px; }
.cx-header-sub { font-size: 12px; opacity: 0.85; margin-top: 2px; }
.cx-close {
  background: none;
  border: none;
  color: #fff;
  cursor: pointer;
  font-size: 20px;
  line-height: 1;
  padding: 4px;
}

.cx-messages {
  flex: 1;
  overflow-y: auto;
  padding: 14px;
  background: var(--cx-bg-soft);
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.cx-msg {
  max-width: 84%;
  padding: 9px 12px;
  border-radius: 12px;
  font-size: 13.5px;
  line-height: 1.45;
  white-space: pre-wrap;
}
.cx-msg.user {
  align-self: flex-end;
  background: var(--cx-accent);
  color: #fff;
  border-bottom-right-radius: 3px;
}
.cx-msg.assistant {
  align-self: flex-start;
  background: var(--cx-bg);
  color: var(--cx-text);
  border: 1px solid #e8e5de;
  border-bottom-left-radius: 3px;
}
.cx-msg.typing { color: var(--cx-text-muted); font-style: italic; }

.cx-msg a { color: var(--cx-accent-dark); font-weight: 600; }

.cx-inputbar {
  display: flex;
  gap: 8px;
  padding: 10px;
  border-top: 1px solid #eee;
  background: var(--cx-bg);
}
.cx-input {
  flex: 1;
  border: 1px solid #ddd;
  border-radius: 10px;
  padding: 9px 12px;
  font-size: 13.5px;
  resize: none;
  font-family: inherit;
}
.cx-input:focus { outline: 2px solid var(--cx-accent); outline-offset: 1px; }
.cx-send {
  background: var(--cx-accent);
  color: #fff;
  border: none;
  border-radius: 10px;
  padding: 0 16px;
  cursor: pointer;
  font-weight: 600;
  font-size: 13px;
}
.cx-send:disabled { opacity: 0.5; cursor: default; }

.cx-privacy {
  font-size: 10.5px;
  color: var(--cx-text-muted);
  text-align: center;
  padding: 6px 10px 10px;
  background: var(--cx-bg);
}

@media (prefers-reduced-motion: reduce) {
  .cx-launcher { transition: none; }
}
