﻿* {
  box-sizing: border-box;
}

#cmshq_chat {
  align-items: flex-end;
  bottom: 30px;
  display: flex;
  flex-direction: column;
  position: fixed;
  right: 30px;
  width: 100%;
  max-width: 24rem;

  @media (min-width: 768px) {
    margin-left: auto;
  }
}

#cmshq_chat-container {
  display: flex;
  position: relative;
  margin-left: auto;
  font-size: 0.875rem;
  line-height: 1.25rem;
  flex-direction: column;
  max-width: 24rem;
  width: 100%;
}

#cmshq_chat-body-container {
  overflow: hidden;
  pointer-events: none;
  display: none;
  transition-duration: 0.2s;
  bottom: -30px;
  position: relative;
  background-color: #ffffff;
  border-radius: 0.5rem;
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1),
    0 4px 6px -2px rgba(0, 0, 0, 0.05);
  width: 100%;
}

#cmshq_chat-body-container.open {
  pointer-events: auto;
  opacity: 1;
  bottom: 0;
  display: block;
}

#cmshq_chat-header {
  display: flex;
  padding-top: 0.75rem;
  padding-bottom: 0.75rem;
  padding-left: 1rem;
  padding-right: 1rem;
  background-color: #ffffff;
  justify-content: space-between;
  align-items: center;
  width: 100%;
  border-bottom-width: 1px;
  border-color: #f3f4f6;
  box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06);
}

#cmshq_chat-messages {
  overflow-y: auto;
  padding-left: 1rem;
  padding-right: 1rem;
  padding-top: 2.5rem;
  padding-bottom: 2.5rem;
  padding-bottom: 6rem;
  background-color: #ffffff;
  width: 100%;
  height: 480px;
  max-height: calc(100vh - 200px);
}

#cmshq_chat-messages::-webkit-scrollbar {
  width: 6px;
}

#cmshq_chat-messages::-webkit-scrollbar-thumb {
  background-color: #dfdfdf;
  border-radius: 10px;
}

#cmshq_chat-launcher {
  align-items: center;
  border-radius: 28px;
  color: #fff;
  cursor: pointer;
  display: flex;
  height: 56px;
  justify-content: center;
  margin-top: 12px;
  width: 56px;
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1),
    0 4px 6px -2px rgba(0, 0, 0, 0.05);
}

.cmshq_message {
  display: flex;
  align-items: flex-end;
  max-width: 88%;
}

.cmshq_message.send {
  justify-content: flex-end;
  margin-left: auto;
}

.cmshq_message-username {
  margin-left: 0.25rem;
  margin-bottom: 1px;
  color: #9ca3af;
  font-size: 11px;
}

.cmshq_message-body {
  display: flex;
  padding: 0.75rem;
  flex: 1 1 0%;
  border-radius: 0.5rem;
}

.cmshq_chat-footer {
  position: absolute;
  bottom: 0;
  left: 0;
  background-color: #ffffff;
  width: 100%;
  border-top-style: solid;
  border-top-width: 1px;
  border-color: #f3f4f6;
}

.cmshq_chat-input {
  padding-top: 1rem;
  padding-bottom: 1rem;
  padding-left: 1.25rem;
  padding-right: 6.5rem;
  font-size: 0.875rem;
  line-height: 1.25rem;
  width: 100%;
  border-width: 0;
  box-shadow: 0 0 0 calc(0px) rgba(59, 130, 246, 0.5);
  outline: 0;
  resize: none;
  font-family: "Inter", "Helvetica Neue", Helvetica, Arial, sans-serif;
}

.cmshq_chat-actions {
  position: absolute;
  right: 0.5rem;
  top: 50%;
  transform: translateY(-50%);
}

.cmshq_chat-send-button,
.cmshq_chat-emoji-button,
.cmshq_chat-image-button {
  background-color: transparent;
  border-width: 0;
  box-shadow: var(--tw-ring-inset) 0 0 0 calc(0px + var(--tw-ring-offset-width))
    var(--tw-ring-color);
  outline: 0;
  box-shadow: none;
  cursor: pointer;
  padding-left: 4px;
  padding-right: 4px;
  margin: 0;
}

.cmshq_chat-send-button:disabled {
  color: grey;
}

.cmshq_chat-send-button:hover {
  opacity: 0.9;
}

.cmshq_chat-emoji-button,
.cmshq_chat-image-button {
  opacity: 0.4;
  transition-duration: 0.1s;
}

.cmshq_chat-emoji-button:hover,
.cmshq_chat-image-button:hover {
  opacity: 0.7;
}

.receive .cmshq_message-body {
  background-color: #f3f4f6;
  color: #000000;
}

.cmshq_message-body a {
  margin-left: 4px;
  margin-right: 4px;
  color: inherit;
  text-decoration: underline;
}

.cmshq_message-body img,
.cmshq_message-body video {
  max-width: 100%;
}

.cmshq_message-body img {
  max-height: 200px;
}

.cmshq_message-body video {
  max-height: 400px;
}

.cmshq_message-body a:hover {
  opacity: 0.8;
}

.send + .send,
.receive + .receive {
  margin-top: 12px;
}

.send + .send .name,
.receive + .receive .name {
  display: none;
}

.send + .receive {
  margin-top: 24px;
}

.receive + .send {
  margin-top: 24px;
}

.fade-up {
  box-shadow: 0 -20px 20px rgba(255, 255, 255, 1);
}

#cmshq_emoji-picker-container {
  position: fixed;
  bottom: 150px;
  right: 80px;
}

.cmshq_hidden {
  display: none;
}

/* Start of anchoring hack -- this is how the chat sticks to the bottom when new messages are added */
.embed::-webkit-scrollbar {
  width: 6px;
}

.embed::-webkit-scrollbar-thumb {
  background-color: #dfdfdf;
  border-radius: 10px;
}

.cmshq_chat-messages * {
  overflow-anchor: none;
}

#anchor {
  overflow-anchor: auto;
  height: 1px;
}
/* End of anchoring hack */

/* Hide scrollbar for Chrome, Safari and Opera */
.no-scrollbar::-webkit-scrollbar {
  display: none;
}

/* Hide scrollbar for IE, Edge and Firefox */
.no-scrollbar {
  -ms-overflow-style: none; /* IE and Edge */
  scrollbar-width: none; /* Firefox */
}
