:root {
  --courlux-chatbot-widget-primary-color: #b6dbcc;
  --courlux-chatbot-widget-text-color: #47423d;
}

/** widget **/

#courlux-chatbot-widget {
  position: fixed;
  bottom: 1rem;
  right: 1rem;
  border-radius: 50%;
  background: var(--courlux-chatbot-widget-primary-color);
  display: flex;
  align-items: center;
  justify-content: center;
  height: 60px;
  width: 60px;
  cursor: pointer;
  overflow: hidden;
  opacity: 0;
  z-index: -1;
  pointer-events: none;
  transition: opacity 1s ease;
}

#courlux-chatbot-widget.visible {
  opacity: 1;
  z-index: 9999;
  pointer-events: all;
}

#courlux-chatbot-widget svg {
  height: 36px;
  width: 36px;
}

#courlux-chatbot-widget svg path {
  fill: white;
}

#courlux-chatbot-widget .courlux-chatbot-widget--hoverable {
  position: absolute;
  height: 10px;
  width: 10px;
  box-shadow: 0 0 50px 15px white;
  border-radius: 50%;
  display: none;
}

#courlux-chatbot-widget .courlux-chatbot-widget--hoverable.visible {
  display: inline-block;
}

/** panels wrapper **/

.courlux-chatbot-widget--panels-wrapper * {
  font-family: inherit;
  color: var(--courlux-chatbot-widget-text-color);
}

.courlux-chatbot-widget--panels-wrapper a {
  color: blue;
  text-decoration: underline;
}

.courlux-chatbot-widget--panels-wrapper {
  opacity: 0;
  z-index: -1;
  pointer-events: none;
  transition: opacity 0.2s ease;
  position: fixed;
  bottom: 5.25rem;
  right: 0.5rem;
  border-radius: 8px;
  background-color: white;
  box-shadow: 0 0 20px #ccc;
  width: calc(100% - 1rem);
  max-width: 400px;
  display: flex;
  flex-flow: column nowrap;
  overflow: hidden;
}

.courlux-chatbot-widget--panels-wrapper ::-webkit-scrollbar {
  width: 2px;
}

.courlux-chatbot-widget--panels-wrapper ::-webkit-scrollbar-thumb {
  background-color: var(--courlux-chatbot-widget-primary-color);
  border-radius: 1rem;
}

.courlux-chatbot-widget--panels-wrapper.visible {
  opacity: 1;
  z-index: 9999;
  pointer-events: all;
}

/** panels container **/

.courlux-chatbot-widget--panels-container {
  flex: 1 1 auto;
  height: calc(100vh - 14rem);
  max-height: 600px;
  width: 100%;
}

.courlux-chatbot-widget--panels-container > div {
  height: 100%;
  width: 100%;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
  padding: 2rem;
}

/** chat panel **/

.courlux-chatbot-widget--chat-panel {
  justify-items: flex-end;
  overflow: hidden auto;
}

.courlux-chatbot-widget--chat-msg {
  margin: 0 0 0.5rem;
  padding: 0.4rem 0.5rem;
  width: fit-content;
  max-width: 80%;
  font-size: 15px;
  border-radius: 8px;
  color: inherit;
  background-color: #02d1ae20;
  white-space: pre-wrap;
  float: left;
  clear: right;
}
.courlux-chatbot-widget--chat-msg.bot-msg {
  margin-left: 1rem;
  position: relative;
}
.courlux-chatbot-widget--chat-msg.bot-msg span {
  position: absolute;
  top: 2px;
  left: -22px;
}
.courlux-chatbot-widget--chat-msg.bot-msg svg {
  height: 20px;
  width: 20px;
  display: inline-block;
}
.courlux-chatbot-widget--chat-msg.bot-msg svg path {
  fill: var(--courlux-chatbot-widget-primary-color);
}

.courlux-chatbot-widget--chat-msg:not(.bot-msg) {
  float: right;
  background-color: #00000016;
  clear: left;
}

.courlux-chatbot-widget--chat-panel ul {
  display: flex;
  flex-flow: row wrap;
  gap: 0.33rem;
  list-style: none;
  padding: 0;
  margin: 0.5rem 0 0;
  font-size: 13px;
  float: left;
  clear: both;
}

.courlux-chatbot-widget--chat-panel li {
  border: 1px solid var(--courlux-chatbot-widget-text-color);
  color: inherit;
  border-radius: 8px;
  padding: 0.2rem 0.4rem;
  cursor: pointer;
}

.courlux-chatbot-widget--chat-panel li:hover {
  opacity: 0.7;
}

.courlux-chatbot-widget--typing-wrapper {
  align-items: center;
  border-radius: 15px;
  display: flex;
  height: 25px;
  justify-content: center;
  gap: 5px;
  padding: 0 5px;
  position: relative;
  width: 60px;
  float: left;
  clear: right;
  background-color: #02d1ae20;
}

.courlux-chatbot-widget--typing-inner {
  background-color: #00000016;
  border-radius: 5px;
  height: 8px;
  position: relative;
  width: 8px;
}

.courlux-chatbot-widget--typing-inner:nth-child(1) {
  animation: courlux-chatbot-widget--chat-typing-indicator 1.5s infinite;
}
.courlux-chatbot-widget--typing-inner:nth-child(2) {
  animation: courlux-chatbot-widget--chat-typing-indicator 1.5s infinite 0.2s;
}
.courlux-chatbot-widget--typing-inner:nth-child(3) {
  animation: courlux-chatbot-widget--chat-typing-indicator 1.5s infinite 0.4s;
}

@keyframes courlux-chatbot-widget--chat-typing-indicator {
  0% {
    top: 0;
  }
  6.25% {
    top: -1px;
  }
  12.5% {
    top: 0;
  }
  18.75% {
    top: 1px;
  }
  25% {
    top: 0;
  }

  12.5% {
    background-color: var(--courlux-chatbot-widget-primary-color);
  }
}

/** QA panel **/

.courlux-chatbot-widget--qa-panel {
  display: flex;
  flex-flow: row wrap;
  gap: 1rem;
  overflow: hidden auto;
  transform: translateY(-100%);
  position: relative;
  padding: 0 0 1rem !important;
}

.courlux-chatbot-widget--qa-panel button {
  width: calc(50% - 1.5rem);
  height: fit-content;
  background-color: transparent;
  outline: none;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  transition: 0.2s ease;
  color: var(--courlux-chatbot-widget-text-color);
}

.courlux-chatbot-widget--qa-panel button:nth-child(2n) {
  margin-left: 1rem;
}

.courlux-chatbot-widget--qa-panel button:hover {
  opacity: 0.7;
  background-color: #eee;
  color: var(--courlux-chatbot-widget-primary-color);
  border-color: var(--courlux-chatbot-widget-primary-color);
}

.courlux-chatbot-widget--qa-panel button figure {
  margin: 0;
  width: 100%;
  padding: 1rem 0;
}

.courlux-chatbot-widget--qa-panel button figcaption {
  margin-bottom: 0.5rem;
  color: inherit;
  font-size: 14px;
  font-style: normal;
  line-height: initial;
  font-weight: initial;
  white-space: normal;
}

.courlux-chatbot-widget--qa-panel button img {
  width: 40px;
  object-fit: contain;
}

/** form panel **/

.courlux-chatbot-widget--form-panel {
  transform: translateY(-200%);
  overflow: hidden auto;
}

.courlux-chatbot-widget--panels-container > div.active {
  opacity: 1;
  pointer-events: all;
  z-index: 0;
}

.courlux-chatbot-widget--form-panel {
  font-size: 14px;
}

.courlux-chatbot-widget--form-panel p:not(#response-message) {
  margin: 0 0 1rem;
}

.courlux-chatbot-widget--form-panel form {
  width: 100%;
  display: flex;
  flex-flow: row wrap;
  gap: 0.5rem;
}
.courlux-chatbot-widget--form-panel input[name="email"] {
  width: calc(50% - 0.5rem / 2);
}
.courlux-chatbot-widget--form-panel input[name="phone"] {
  width: calc(50% - 0.5rem / 2);
}
.courlux-chatbot-widget--form-panel textarea {
  grid-area: textarea;
  resize: vertical;
  min-height: 60px;
  height: 80px;
  max-height: 100px;
}
.courlux-chatbot-widget--form-panel button {
  grid-area: btn;
  padding: 0.6rem;
  background-color: var(--courlux-chatbot-widget-primary-color);
  outline: none;
  border: none;
  border-radius: 4px;
  color: white;
  font-weight: 500;
  font-size: 15px;
  cursor: pointer;
}
.courlux-chatbot-widget--form-panel button:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  pointer-events: none;
}
.courlux-chatbot-widget--form-panel button:hover {
  opacity: 0.7;
}

.courlux-chatbot-widget--form-panel select,
.courlux-chatbot-widget--form-panel input,
.courlux-chatbot-widget--form-panel textarea {
  width: 100%;
  border: 1px solid #ccc;
  border-radius: 4px;
  padding: 0.4rem;
  outline: none;
  background-color: transparent;
  font-size: inherit;
}

.courlux-chatbot-widget--form-panel #response-message {
  display: none;
  margin: 0.5rem 0;
}

/** panel tabs **/

.courlux-chatbot-widget--panel-tabs {
  width: 100%;
  display: flex;
  position: relative;
  border-top: 1px solid #eee;
}

.courlux-chatbot-widget--panel-tabs::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: calc(100% / 3);
  height: 3px;
  background-color: var(--courlux-chatbot-widget-primary-color);
  transition: 0.2s ease;
}

.courlux-chatbot-widget--panel-tabs[data-active-tab="qa"]::before {
  left: calc(100% / 3);
}
.courlux-chatbot-widget--panel-tabs[data-active-tab="form"]::before {
  left: calc((100% / 3) * 2);
}

.courlux-chatbot-widget--panel-tabs button {
  display: flex;
  flex-flow: column nowrap;
  align-items: center;
  justify-content: center;
  gap: 0.25rem;
  padding: 0.66rem 0.25rem;
  width: calc(100% / 3);
  background: transparent;
  border: none;
  outline: none;
  cursor: pointer;
}

.courlux-chatbot-widget--panel-tabs button:hover {
  opacity: 0.6;
}

.courlux-chatbot-widget--panel-tabs button svg {
  height: 24px;
  width: 24px;
}

.courlux-chatbot-widget--panel-tabs button:first-child {
  gap: 0.5rem;
}

.courlux-chatbot-widget--panel-tabs button:first-child svg {
  height: 20px;
  width: 20px;
}

/** QA search bar **/
.courlux-chatbot-widget--qa-panel-searchbar {
  display: flex;
  align-items: center;
  justify-content: center;
  height: fit-content;
  padding: 1rem;
  font-size: 14px;
  position: sticky;
  top: 0;
  width: 100%;
  background-color: var(--courlux-chatbot-widget-primary-color);
  z-index: 1;
}

.courlux-chatbot-widget--qa-panel-searchbar input {
  width: 90%;
  border-radius: 4px;
  padding: 0.4rem;
  border: none;
  outline: none;
  background-color: white;
  font-size: inherit;
}

.courlux-chatbot-widget--qa-panel-searchbar ul {
  display: flex;
  flex-flow: column nowrap;
  gap: 0.5rem;
  position: absolute;
  z-index: 1;
  top: 100%;
  max-height: 180px;
  overflow: hidden auto;
  list-style: none;
  padding: 0.5rem;
  margin: 0;
  width: 100%;
  border-bottom: 1px solid #ccc;
  background-color: white;
}

.courlux-chatbot-widget--qa-panel-searchbar ul:empty {
  display: none;
}

.courlux-chatbot-widget--qa-panel-searchbar li {
  cursor: pointer;
}

.courlux-chatbot-widget--qa-panel-searchbar li:not(:last-child) {
  padding-bottom: 0.5rem;
  border-bottom: 1px solid #ccc;
}

.courlux-chatbot-widget--qa-panel-searchbar li:hover {
  opacity: 0.7;
}

/** QA question panel **/

.courlux-chatbot-widget--qa-panel--question-wrapper {
  z-index: 1 !important;
  overflow: hidden auto;
}

.courlux-chatbot-widget--qa-panel--question-content-container ul {
  list-style: none;
  padding: 0;
  margin: 0.5rem 0 0;
  gap: 0.5rem;
}

.courlux-chatbot-widget--qa-panel--question-content-container ul li {
  font-size: 14px;
  border: 1px solid #eee;
  cursor: pointer;
  padding: 0.75rem 1rem;
  line-height: 1.5;
  border-radius: 6px;
  margin-bottom: 0.5rem;
}
.courlux-chatbot-widget--qa-panel--question-content-container ul li:hover {
  opacity: 0.7;
}

/** QA answer panel **/

.courlux-chatbot-widget--qa-panel--answer-wrapper,
.courlux-chatbot-widget--qa-panel--question-wrapper {
  width: 100%;
  height: 100%;
  background-color: white;
  position: absolute;
  top: 0;
  left: 100%;
  pointer-events: none;
  transition: left 0.2s ease-in-out;
  padding: 1.5rem;
  font-size: 13px;
  z-index: 2;
}

.courlux-chatbot-widget--qa-panel--answer-wrapper.active,
.courlux-chatbot-widget--qa-panel--question-wrapper.active {
  left: 0;
  pointer-events: all;
}

.courlux-chatbot-widget--qa-panel--answer-wrapper button,
.courlux-chatbot-widget--qa-panel--question-wrapper button {
  border: none;
  outline: none;
  cursor: pointer;
  background-color: var(--courlux-chatbot-widget-primary-color);
  color: white;
  padding: 0.4rem 1rem;
  margin-top: 1rem;
}

.courlux-chatbot-widget--qa-panel--question-wrapper button {
  margin-top: 0;
}

.courlux-chatbot-widget--qa-panel--answer-wrapper button:hover,
.courlux-chatbot-widget--qa-panel--question-wrapper button:hover {
  opacity: 0.7;
  color: white;
}

.courlux-chatbot-widget--qa-panel--answer-content-container .qa-question {
  font-size: 14px;
  font-weight: 500;
  margin: 0 0 0.9rem;
}

.courlux-chatbot-widget--qa-panel--answer-content-container .qa-content {
  line-height: 1.5;
}
