.l-chat {
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 9999;
  max-width: 390px;
  width: 100%;
}
@media screen and (width <= 963px) {
  .l-chat {
    bottom: 80px;
  }
}
@media screen and (width <= 768px) {
  .l-chat {
    width: 90%;
  }
}
.l-chat .chat-block {
  display: -webkit-box;
  display: -webkit-flex;
  display: -ms-flexbox;
  display: flex;
  -webkit-box-orient: vertical;
  -webkit-box-direction: normal;
  -webkit-flex-direction: column;
      -ms-flex-direction: column;
          flex-direction: column;
  gap: 4px;
}
.l-chat__question {
  margin: 8px 0;
  font-weight: 500;
  background: #f3f3f3;
  border-radius: 0 16px 16px 16px;
  padding: 10px 14px;
  max-width: 80%;
  -webkit-align-self: flex-start;
      -ms-flex-item-align: start;
          align-self: flex-start;
}
.l-chat__answer {
  margin-block: 12px;
  display: grid;
  grid-auto-rows: 1fr;
  gap: 6px;
}
.l-chat__answer > button {
  border-radius: 6px;
  border: 1px solid rgba(157, 138, 255, 0.2117647059);
  padding: 10px;
  cursor: pointer;
  -webkit-transition: 0.3s;
  transition: 0.3s;
  background: none;
  width: 100%;
  text-align: center;
}
@media screen and (width > 963px) {
  .l-chat__answer > button:hover {
    opacity: 0.7;
    background-color: rgba(51, 51, 51, 0.3215686275);
    border: 1px solid rgba(51, 51, 51, 0.3215686275);
    color: #fff;
  }
}
.l-chat__answer-text {
  margin: 8px 0 8px auto;
  font-weight: 500;
  background: #333;
  color: #fff;
  border-radius: 16px 0 16px 16px;
  padding: 10px 14px;
  max-width: 80%;
  -webkit-align-self: flex-end;
      -ms-flex-item-align: end;
          align-self: flex-end;
}
.l-chat .chat-toggle {
  width: 205px;
  height: 54px;
  border-radius: 27px;
  border: 3px solid #333;
  background: #fff;
  color: #333;
  cursor: pointer;
  display: block;
  -webkit-margin-start: auto;
          margin-inline-start: auto;
  -webkit-transition: 0.3s;
  transition: 0.3s;
  position: relative;
  font-weight: 500;
  font-size: 18px;
  text-align: center;
}
.l-chat .chat-toggle::before {
  content: "";
  position: absolute;
  top: 50%;
  translate: calc(-50% - 10px) -50%;
  background-image: url(../images/icon_chat.png);
  display: block;
  width: 70px;
  aspect-ratio: 1;
  background-position: center;
  background-size: contain;
  background-repeat: no-repeat;
}
@media screen and (width > 963px) {
  .l-chat .chat-toggle:hover {
    opacity: 0.7;
  }
}
.l-chat .chat-toggle.is-open {
  width: 100%;
  height: 53px;
  border-radius: 16px 16px 0 0;
  border: 1px solid #fff;
  color: #fff;
  background-color: #333;
  translate: 0px 17px;
  display: -webkit-box;
  display: -webkit-flex;
  display: -ms-flexbox;
  display: flex;
  -webkit-box-align: center;
  -webkit-align-items: center;
      -ms-flex-align: center;
          align-items: center;
  -webkit-box-pack: justify;
  -webkit-justify-content: space-between;
      -ms-flex-pack: justify;
          justify-content: space-between;
  padding-inline: 20px;
}
.l-chat .chat-toggle.is-open::before {
  display: none;
}
@media screen and (width <= 576px) {
  .l-chat .chat-toggle.is-open {
    font-size: 16px;
  }
}
.l-chat .chat-window {
  width: 100%;
  height: 420px;
  margin-top: 10px;
  background: #fff;
  border-radius: 8px;
  -webkit-box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
          box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
  overflow-y: auto;
  padding: 10px 20px;
  -webkit-transition: 0.3s;
  transition: 0.3s;
}
.l-chat .is-hidden {
  height: 0;
  overflow-y: hidden;
  margin-top: unset;
  padding: unset;
}
.l-chat .chat-form {
  margin: 10px 0;
}
.l-chat .chat-form input,
.l-chat .chat-form textarea {
  width: 100%;
  margin-bottom: 8px;
  padding: 6px;
}
.l-chat__back {
  display: inline-block;
  margin-top: 8px;
  padding: 4px 10px;
  background: none;
  border: none;
  color: #999;
  font-size: 12px;
  cursor: pointer;
  -webkit-transition: color 0.2s;
  transition: color 0.2s;
}
.l-chat__back:hover {
  color: #333;
}