.contact-widget {
  --cw-accent: #5b3cc4;
  --cw-ink: #f7f9fc;
  --cw-muted: #9ba8bb;
  --cw-line: rgba(255,255,255,.12);
  max-width: 640px;
}
.contact-widget .chat {
  min-height: 480px;
  max-height: 640px;
  background: #0c1828;
  border: 1px solid var(--cw-line);
  overflow: hidden;
  display: grid;
  grid-template-rows: auto 1fr auto;
}
.contact-widget .chat header {
  display: flex;
  align-items: center;
  gap: 13px;
  padding: 16px 18px;
  border-bottom: 1px solid var(--cw-line);
  color: var(--cw-ink);
}
.contact-widget .avatar {
  width: 42px;
  height: 42px;
  background: var(--cw-accent);
  color: #fff;
  display: grid;
  place-items: center;
  font-weight: 700;
}
.contact-widget .chat header div:nth-child(2) { display: grid; gap: 4px; }
.contact-widget .chat header strong { font-size: 15px; }
.contact-widget .chat header span { font-size: 12px; color: var(--cw-muted); }
.contact-widget .chat header i {
  display: inline-block;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #4bd28f;
  margin-right: 5px;
}
.contact-widget .reset {
  margin-left: auto;
  border: 0;
  background: transparent;
  color: #9eacbd;
  font-size: 22px;
  cursor: pointer;
}
.contact-widget .messages { padding: 20px; overflow: auto; }
.contact-widget .day {
  text-align: center;
  color: #748397;
  font-size: 11px;
  margin-bottom: 16px;
}
.contact-widget .bubble { max-width: 82%; margin: 0 0 14px; }
.contact-widget .bubble p {
  padding: 13px 16px;
  margin: 0;
  background: #18283a;
  color: #e5eaf1;
  line-height: 1.5;
  font-size: 14px;
  white-space: pre-wrap;
}
.contact-widget .bubble time {
  display: block;
  font-size: 10px;
  color: #728196;
  margin: 6px 8px;
}
.contact-widget .bubble.user { margin-left: auto; }
.contact-widget .bubble.user p { background: var(--cw-accent); color: #fff; }
.contact-widget .bubble.user time { text-align: right; }
.contact-widget .bubble.pending { opacity: .65; }
.contact-widget .chat form {
  border-top: 1px solid var(--cw-line);
  padding: 14px 16px 16px;
}
.contact-widget .identity {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-bottom: 10px;
}
.contact-widget .identity label {
  font-size: 10px;
  color: #9eacbd;
  text-transform: uppercase;
  letter-spacing: .08em;
}
.contact-widget .identity input {
  display: block;
  width: 100%;
  margin-top: 6px;
  background: #101f30;
  border: 1px solid var(--cw-line);
  padding: 11px;
  color: #fff;
  outline: none;
}
.contact-widget .composer {
  display: flex;
  align-items: flex-end;
  gap: 10px;
  background: #101f30;
  border: 1px solid var(--cw-line);
  padding: 9px;
}
.contact-widget .composer textarea {
  flex: 1;
  resize: none;
  max-height: 120px;
  border: 0;
  outline: 0;
  background: transparent;
  color: #fff;
  padding: 7px;
  font: inherit;
  line-height: 1.45;
}
.contact-widget .composer button {
  border: 0;
  background: var(--cw-accent);
  color: #fff;
  height: 40px;
  padding: 0 14px;
  font-weight: 700;
  cursor: pointer;
}
.contact-widget .composer button b { display: none; }
.contact-widget .status {
  text-align: center;
  margin: 9px 0 0;
  color: #77869a;
  font-size: 10px;
}
.contact-widget .status.error { color: #c0392b; }
.contact-widget .sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
}
@media (max-width: 640px) {
  .contact-widget .identity { grid-template-columns: 1fr; }
  .contact-widget .chat { min-height: 420px; max-height: none; }
}
@media (prefers-reduced-motion: reduce) {
  .contact-widget * { scroll-behavior: auto !important; }
}
