@import url("https://fonts.googleapis.com/css2?family=Lato:ital,wght@0,100;0,300;0,400;0,700;0,900;1,100;1,300;1,400;1,700;1,900&display=swap");

/* Box sizing rules */
*,
*::before,
*::after {
  box-sizing: border-box;
}

/* Remove default margin */
body,
h1,
h2,
h3,
h4,
p,
figure,
blockquote,
dl,
dd {
  margin: 0;
}

/* Remove list styles on ul, ol elements with a list role, which suggests default styling will be removed */
ul[role="list"],
ol[role="list"] {
  list-style: none;
}

/* Set core root defaults */
html:focus-within {
  scroll-behavior: smooth;
}

/* Set core body defaults */
body {
  min-height: 100vh;
  text-rendering: optimizeSpeed;
  line-height: 1.5;
  font-family: "Lato", sans-serif;
  background-size: 32px 32px;
  color: var(--message-text-black);
  background: none transparent;
}

/* A elements that don't have a class get default styles */
a:not([class]) {
  text-decoration-skip-ink: auto;
}

/* Make images easier to work with */
img,
picture {
  max-width: 100%;
  display: block;
}

/* Inherit fonts for inputs and buttons */
input,
button,
textarea,
select {
  font: inherit;
}

/* Remove all animations, transitions and smooth scroll */
@media (prefers-reduced-motion: reduce) {
  html:focus-within {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

/* GLOBAL STYLES */
:root {
  --blue: #335dff;
  --grey: #f4f4f5;
  --black: #333333;
  --light-blue: #0080ff;
  --grey-d-1: #eee;
  --grey-d-2: #ddd;
  --grey-d-3: #888;
  --green: #3ebd93;
  --white: #fff;
  --input-black: #18181b;
  --label-black: #27272a;
  --footer-terms: #71717a;
  --dark: #222;
  --light-grey: #d4d4d8;
  --message-text-black: #102a43;
  --light-grey-name: #9ca3af;
  --crimson: crimson;
  --text-area-grey: #7b8794;
  --terms-grey: #8b8a90;
  --subtext: #8e8e8e;
  --primaryColor: var(--light-blue);
  /* primary color is dynamic and customizable across the chat */
  --secondaryColor: var(--white);
  /* secondary color is customisable and used for svg and text-color */
}
/* GLOBAL STYLES */

/* Toggle svg */
#toggle-form {
  display: flex;
  justify-content: center;
  transition: all 0.3s linear;
}
#toggle-form svg path {
  fill: var(--secondaryColor);
}

#chatbox-message-header {
  display: flex;
  align-items: center;
  justify-content: end;
  background: var(--primaryColor);
  padding: 0.5rem 0.75rem;
}
#lets-chat-header {
  display: flex;
  height: 40px;
  align-items: center;
  grid-gap: 8px;
  margin: 0 auto 0 auto;
  color: var(--secondaryColor);
}
#lets-chat-header .chatbox-message-image {
  display: flex;
  justify-content: center;
}
#lets-chat-header .chatbox-message-image svg path {
  fill: var(--secondaryColor);
}

/* CLASSES */

/* SET TRANSITION TO NONE IF PAGE DIDN'T LOAD*/
.preload * {
  -webkit-transition: none !important;
  -moz-transition: none !important;
  -ms-transition: none !important;
  -o-transition: none !important;
  transition: none !important;
  display: none;
}

.hide {
  display: none !important;
}

.no-pointer-events {
  pointer-events: none !important;
}

.show {
  display: flex !important;
}

/* CHATBOX */
.chatbox-wrapper {
  position: fixed;
  bottom: 1rem;
  right: 1rem;
  width: 4rem;
  height: 4rem;
}
.chatbox-toggle {
  width: 57px;
  height: 57px;
  background: var(--primaryColor);
  color: var(--secondaryColor);
  font-size: 2rem;
  display: flex;
  justify-content: center;
  align-items: center;
  border-radius: 50%;
  box-shadow: 0px 10px 15px rgba(31, 41, 55, 0.1),
    0px 0px 6px rgba(31, 41, 55, 0.05);
  cursor: pointer;
  transition: filter 0.5s ease-out 50ms;
  position: relative;
}
.chatbox-toggle:hover {
  filter: brightness(1.2);
  box-shadow: 0.5rem 0.5rem 2rem rgba(0, 0, 0, 0.1);
}
.chatbox-toggle:active {
  transform: scale(0.9);
}

/* Mobile close icon */
.mobile-close-icon {
  display: none;
  position: relative;
  border-style: none;
  width: 24px;
  height: 24px;
  align-items: center;
  justify-content: center;
  font-size: 15px;
  cursor: pointer;
  border-radius: 50%;
  color: var(--primaryColor);
  background-color: var(--secondaryColor);
  transition: all 0.2s ease-in-out 50ms;
}
.close-wrapper {
  display: flex;
  justify-content: end;
  margin-right: 15px;
}

.mobile-close-icon:hover {
  color: var(--secondaryColor);
  background-color: var(--primaryColor);
}

.chatbox-info-wrapper {
  display: flex;
  position: absolute;
  flex-direction: column;
  bottom: calc(100% + 1rem);
  right: 0;
  width: 300px;
  height: auto;
  border-radius: 12px;
  background-color: var(--white) !important;
  box-shadow: 0px 10px 15px rgba(31, 41, 55, 0.1),
    0px 0px 6px rgba(31, 41, 55, 0.05);
  transform-origin: bottom right;
  animation: pop-up 0.4s;
  animation-iteration-count: 1;
}
.chatbox-info-close {
  position: absolute;
  cursor: pointer;
  top: 0;
  right: 0;
  margin: 4px 10px 4px 10px;
  width: 6px;
  height: 12px;
}
.chatbox-info-header {
  display: flex;
  align-items: center;
  margin: 19px;
  cursor: pointer;
  justify-content: space-between;
  background: var(--white);
}
.chatbox-info-profile {
  display: flex;
  align-items: center;
  grid-gap: 0.5rem;
}

.chatbox-info-name {
  font-size: 16px;
  color: var(--message-text-black);
  font-weight: 400;
  margin-left: 10px;
}
.tooltip-down-arrow {
  position: absolute;
  cursor: pointer;
  bottom: 0;
  right: 0;
  margin-bottom: -3px;
  margin-right: 39px;
  width: 10px;
  height: 10px;
}
.down-arrow {
  width: 0;
  height: 0;
  border: 14px solid transparent;
  border-bottom: 0;
  border-radius: 20%;
  border-top: 18px solid white;
}
.chatbox-message-wrapper {
  position: absolute;
  display: flex;
  flex-direction: column;
  bottom: calc(100% + 1rem);
  right: 0;
  min-width: 340px;
  min-height: 525px;
  background-color: var(--white);
  max-height: 677px;
  overflow-y: scroll;
  border-radius: 1rem;
  overflow: hidden;
  box-shadow: 0px 10px 15px rgba(31, 41, 55, 0.1),
    0px 0px 6px rgba(31, 41, 55, 0.05);
  transform: scale(0);
  transform-origin: bottom right;
  transition: 0.2s;
}
.chatbox-iframe-wrapper {
  flex-grow: 1;
  height: 100%;
  position: relative;
}
.chatbox-iframe {
  width: 100%;
  height: 100%;
  position: absolute;
  display: none;
}

.show .chatbox-iframe {
  display: block;
}

.avatar {
  width: 34px;
  height: 34px;
  border-radius: 50% !important;
}

.chatbox-message-wrapper.show {
  transform: scale(1);
}

.required-field {
  color: var(--primaryColor);
  font-size: 15px;
}
.chatbox-message-text-wrapper,
.chatbox-message-text-response.submitted {
  display: flex;
  align-items: center;
  grid-gap: 11.5px;
}
.chatbox-message-text-initial {
  transform-origin: left;
  animation: pop-up 0.4s;
  animation-iteration-count: 1;
}

.chatbox-message-item.sent {
  display: none;
  align-items: center;
  grid-gap: 0.5rem;
  margin: 0 0 0 auto;
  justify-content: right;
  transform-origin: right;
  animation: pop-up 0.4s;
  transform-origin: bottom right;
  animation-fill-mode: backwards;
  animation-iteration-count: 1;
}

.chatbox-message-item.sent.submitted {
  display: flex;
}
.chatbox-message-text-response {
  display: none;
  transform-origin: left;
  animation: pop-up 0.4s ease 1.2s;
  animation-fill-mode: backwards;
  animation-iteration-count: 1;
}

.chatbox-message-image {
  width: auto;
  height: auto;
  object-fit: cover;
}
.chatbox-message-image svg path {
  fill: var(--secondaryColor);
}
.lets-chat-header-image {
  display: flex;
  width: 34px;
  height: 34px;
  border-radius: 100%;
  margin: 19px 4px auto 0;
}
.chatbox-message-brand-name {
  display: flex;
  justify-content: left;
  color: var(--light-grey-name);
  font-size: 12px;
}

.chatbox-message-name {
  font-size: 18px;
  color: var(--secondaryColor);
  font-weight: 700;
}
.chatbox-message-dropdown {
  position: relative;
}

/* Location Header */

.chatbox-header-text {
  font-size: 13px;
  width: 100%;
  display: flex;
  line-height: 20px;
  color: var(--secondaryColor);
  padding-bottom: 5px;
}

.chatbox-header-text p {
  font-weight: 800;
  font-size: 14px;
  color: var(--secondaryColor);
}

/* Loader */
.loader-dots {
  display: none;
  width: 30px;
  aspect-ratio: 4;
  --_g: no-repeat
    radial-gradient(
      circle closest-side,
      var(--secondaryColor) 90%,
      var(--primaryColor)
    );
  background: var(--_g) 0% 50%, var(--_g) 50% 50%, var(--_g) 100% 50%;
  background-size: calc(100% / 3) 100%;
  animation: loader 1s infinite linear;
}

.chatbox-message-submit .chatbox-message-image {
  display: flex;
  justify-content: center;
}

/* Input style */

/* Hide number input spin arrows */
input::-webkit-outer-spin-button,
input::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}
input::-webkit-contacts-auto-fill-button {
  visibility: hidden;
}
.count {
  margin-top: -25px;
  font-size: 11px;
  display: flex;
  color: var(--text-area-grey);
  right: 90px;
  font-weight: 700;
  justify-content: right;
}
.chatbox-message-no-message {
  font-size: 1rem;
  font-weight: 600;
  text-align: center;
}
.chatbox-message-info {
  font-size: 10px;
  font-weight: 400;
  margin: 10px auto 0 auto;
  line-height: 14px;
  width: 300px;
  color: var(--terms-grey);
  display: flex;
  justify-content: center;
  text-align: center;
}
/* CHATBOX */

/* ERRORS */
.errors {
  color: var(--crimson);
  font-size: 12px;
  font-weight: 600;
  text-align: center;
  margin-bottom: 10px;
}
@media screen and (min-width: 577px) {
  /* Media query for IDs */
  .chatbox-wrapper {
    bottom: 1rem;
    right: 1rem;
  }
}
