/* Source Publishing Services: visitor chat styles */

.sps-chat-launcher {
  position:fixed;
  right:22px;
  bottom:22px;
  z-index:1100;
  width:58px;
  height:58px;
  border:0;
  border-radius:50%;
  background:linear-gradient(135deg,#075ea8,#12a9c4);
  color:#fff;
  box-shadow:0 16px 38px rgba(4,69,120,.34);
  font:700 24px/1 Arial,sans-serif;
  cursor:pointer
}
.sps-chat-launcher:hover {
  transform:translateY(-2px)
}
.sps-chat-panel {
  position:fixed;
  right:22px;
  bottom:92px;
  z-index:1100;
  width:min(380px,calc(100vw - 28px));
  height:min(590px,calc(100vh - 120px));
  display:flex;
  flex-direction:column;
  background:#fff;
  border:1px solid #cfe0ed;
  border-radius:20px;
  overflow:hidden;
  box-shadow:0 26px 70px rgba(5,45,80,.28);
  font-family:Arial,Helvetica,sans-serif;
  color:#15324b
}
.sps-chat-panel[hidden] {
  display:none
}
.sps-chat-header {
  display:flex;
  justify-content:space-between;
  gap:12px;
  align-items:center;
  padding:16px 17px;
  background:linear-gradient(135deg,#064f8f,#0876bf);
  color:#fff
}
.sps-chat-header strong {
  display:block;
  font-size:15px
}
.sps-chat-status {
  display:block;
  margin-top:3px;
  font-size:12px;
  opacity:.82
}
.sps-chat-close {
  border:0;
  background:rgba(255,255,255,.14);
  color:#fff;
  width:34px;
  height:34px;
  border-radius:9px;
  font-size:22px;
  cursor:pointer
}
.sps-chat-start {
  padding:22px;
  overflow:auto
}
.sps-chat-start h3 {
  margin:0 0 8px;
  font-size:20px
}
.sps-chat-start p {
  margin:0 0 18px;
  color:#5b7285;
  font-size:14px
}
.sps-chat-start label {
  display:grid;
  gap:6px;
  margin-bottom:13px;
  font-size:13px;
  font-weight:700
}
.sps-chat-start input {
  width:100%;
  border:1px solid #bfd0dd;
  border-radius:10px;
  padding:10px 11px;
  font:inherit
}
.sps-chat-start button,.sps-chat-send,.sps-chat-human {
  border:0;
  border-radius:10px;
  padding:10px 13px;
  background:#075ea8;
  color:#fff;
  font-weight:700;
  cursor:pointer
}
.sps-chat-start button {
  width:100%;
  margin-top:4px
}
.sps-chat-error {
  min-height:18px;
  color:#b42318;
  font-size:12px;
  margin-top:10px
}
.sps-chat-body {
  display:flex;
  flex:1;
  min-height:0;
  flex-direction:column
}
.sps-chat-messages {
  flex:1;
  overflow:auto;
  padding:16px;
  background:#f5f9fc
}
.sps-chat-message {
  max-width:82%;
  margin:0 0 10px;
  padding:10px 12px;
  border-radius:14px;
  white-space:pre-wrap;
  overflow-wrap:anywhere;
  font-size:14px;
  line-height:1.42
}
.sps-chat-message.assistant,.sps-chat-message.agent {
  background:#fff;
  border:1px solid #dce7ef;
  border-bottom-left-radius:4px
}
.sps-chat-message.agent {
  border-color:#b6d8eb;
  background:#eaf7ff
}
.sps-chat-message.visitor {
  margin-left:auto;
  background:#075ea8;
  color:#fff;
  border-bottom-right-radius:4px
}
.sps-chat-message small {
  display:block;
  margin-top:5px;
  font-size:10px;
  opacity:.65
}
.sps-chat-actions {
  display:flex;
  justify-content:flex-end;
  padding:8px 12px 0;
  background:#fff
}
.sps-chat-human {
  background:#e8f2fa;
  color:#064f8f;
  padding:7px 10px;
  font-size:12px
}
.sps-chat-composer {
  display:grid;
  grid-template-columns:1fr auto;
  gap:8px;
  padding:12px;
  background:#fff;
  border-top:1px solid #e0e9f0
}
.sps-chat-composer textarea {
  resize:none;
  min-height:42px;
  max-height:100px;
  border:1px solid #bdcedc;
  border-radius:10px;
  padding:10px;
  font:inherit;
  color:#15324b
}
.sps-chat-send {
  align-self:end
}
.sps-chat-note {
  padding:0 12px 10px;
  background:#fff;
  color:#6a8091;
  font-size:11px
}
.sps-chat-disabled {
  opacity:.55;
  pointer-events:none
}
@media(max-width:600px) {
  .sps-chat-launcher {
    right:14px;
    bottom:14px
  }
  .sps-chat-panel {
    right:14px;
    bottom:82px;
    height:calc(100vh - 100px)
  }
}
