/* HUB-366: the visitor's live chat window. It stands alone, whatever site frames it. */
.cw {
  display: flex;
  flex-direction: column;
  height: 100dvh;
  background: #fff;
  color: #1f2a44;
  font-size: 14px;
}
.cw-head {
  padding: 14px 16px;
  background: #1f2a44;
  color: #fff;
}
.cw-head h1 {
  margin: 0;
  /* the app's own heading colour is dark: unreadable on this header */
  color: #fff;
  font-size: 16px;
  font-weight: 600;
}
.cw-head p {
  display: flex;
  align-items: center;
  gap: 6px;
  margin: 2px 0 0;
  font-size: 12px;
}
.cw-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #f5a623;
}
.cw-dot.is-on {
  background: #2ecc71;
}
.cw-away {
  margin: 0;
  padding: 10px 16px;
  background: #fff6e0;
  color: #7a4f00;
}
.cw-note {
  margin: auto;
  padding: 16px;
  color: #5b6682;
}
.cw-greeting {
  margin: 0 0 4px;
  padding: 10px 12px;
  border-radius: 10px;
  background: #f1f4f9;
  list-style: none;
}
.cw-log {
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: 10px;
  min-height: 0;
  margin: 0;
  padding: 14px 16px;
  overflow-y: auto;
  list-style: none;
}
.cw-line {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  max-width: 85%;
}
.cw-line--me {
  align-self: flex-end;
  align-items: flex-end;
}
.cw-line__who {
  font-size: 11px;
  color: #5b6682;
}
.cw-line p {
  margin: 2px 0 0;
  padding: 9px 12px;
  border-radius: 12px;
  background: #f1f4f9;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
.cw-line--me p {
  background: #2457e6;
  color: #fff;
}
.cw-line a {
  color: inherit;
  text-decoration: underline;
}
.cw-start {
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: 10px;
  min-height: 0;
  padding: 14px 16px;
  overflow-y: auto;
}
.cw-start label {
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-weight: 600;
}
.cw input,
.cw textarea {
  width: 100%;
  padding: 8px 10px;
  border: 1px solid #c8d0de;
  border-radius: 8px;
  background: #fff;
  color: inherit;
  font: inherit;
  font-weight: 400;
}
.cw textarea {
  resize: none;
}
.cw .cw-trap {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
}
.cw button {
  padding: 9px 16px;
  border: 0;
  border-radius: 8px;
  background: #2457e6;
  color: #fff;
  font: inherit;
  font-weight: 600;
  cursor: pointer;
}
.cw button:disabled {
  opacity: 0.5;
  cursor: default;
}
.cw-send {
  display: flex;
  align-items: flex-end;
  gap: 8px;
  padding: 10px 16px 4px;
  border-top: 1px solid #e4e8f0;
}
.cw .cw-new {
  align-self: center;
  margin: 2px 0 8px;
  padding: 4px 8px;
  background: none;
  color: #5b6682;
  font-size: 12px;
  font-weight: 400;
  text-decoration: underline;
}
.cw-error {
  margin: 0;
  padding: 6px 16px;
  color: #b42318;
}
.cw-start .cw-error {
  padding: 0;
}
