.pilltop-chat-root {
  position: fixed;
  right: 22px;
  bottom: 22px;
  z-index: 99990;
  font-family: Mulish, Arial, sans-serif;
  color: #142d46;
}

.pt-chat-launcher {
  height: 48px;
  padding: 0 18px;
  border: 0;
  border-radius: 24px;
  background: #1b6d55;
  color: #fff;
  display: inline-flex;
  align-items: center;
  gap: 9px;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  box-shadow: 0 7px 20px rgba(20, 45, 70, .18);
}

.pt-chat-launcher__icon {
  width: 18px;
  height: 18px;
  flex: 0 0 18px;
  background: #fff;
  -webkit-mask: url("message-square-list.svg") center / contain no-repeat;
  mask: url("message-square-list.svg") center / contain no-repeat;
}

.pilltop-chat-root.pt-chat-open .pt-chat-launcher {
  display: none;
}

.pt-chat-panel {
  position: absolute;
  right: 0;
  bottom: 60px;
  display: flex;
  flex-direction: column;
  width: min(360px, calc(100vw - 28px));
  height: min(638px, calc(100vh - 120px));
  border: 1px solid #dbe4ea;
  border-radius: 8px;
  background: #fff;
  overflow: hidden;
  box-shadow: 0 16px 44px rgba(20, 45, 70, .18);
}

.pilltop-chat-root.pt-chat-open .pt-chat-panel {
  bottom: 0;
}

.pt-chat-panel[hidden] {
  display: none;
}

.pt-chat-head {
  min-height: 54px;
  padding: 0 14px 0 18px;
  border-bottom: 1px solid #e6edf2;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 17px;
}

.pt-chat-close {
  width: 34px;
  height: 34px;
  border: 0;
  background: transparent;
  color: #66788a;
  font-size: 26px;
  line-height: 1;
  cursor: pointer;
}

.pt-chat-messages {
  flex: 1;
  overflow-y: auto;
  padding: 14px;
  background: #f7fafb;
}

.pt-chat-message {
  max-width: 88%;
  margin: 0 0 10px;
  padding: 10px 12px;
  border-radius: 8px;
  font-size: 14px;
  line-height: 1.45;
  white-space: pre-line;
}

.pt-chat-message--assistant {
  background: #fff;
  border: 1px solid #e2eaf0;
}

.pt-chat-message--assistant a {
  color: #2564cc;
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.pt-chat-quick-help {
  margin: 2px 0 13px;
}

.pt-chat-quick-help__title {
  margin: 0 0 8px;
  color: #8b98aa;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: .08em;
  line-height: 1.15;
  text-transform: uppercase;
}

.pt-chat-quick-help__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.pt-chat-quick-help__button {
  min-height: 34px;
  padding: 0 12px;
  border: 1px solid #a9cffd;
  border-radius: 18px;
  background: #f5faff;
  color: #1f56d8;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font: inherit;
  font-size: 14px;
  font-weight: 700;
  line-height: 1;
  text-decoration: none;
  cursor: pointer;
}

.pt-chat-quick-help__icon {
  width: 17px;
  height: 17px;
  flex: 0 0 17px;
  background: currentColor;
}

.pt-chat-quick-help__icon--contact {
  -webkit-mask: url("message-square-list.svg") center / contain no-repeat;
  mask: url("message-square-list.svg") center / contain no-repeat;
}

.pt-chat-quick-help__icon--order {
  -webkit-mask: url("burger-list.svg") center / contain no-repeat;
  mask: url("burger-list.svg") center / contain no-repeat;
}

.pt-chat-typing {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  width: 58px;
  min-height: 38px;
  justify-content: center;
}

.pt-chat-typing span {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #8aa0b3;
  animation: pt-chat-typing 1s infinite ease-in-out;
}

.pt-chat-typing span:nth-child(2) {
  animation-delay: .15s;
}

.pt-chat-typing span:nth-child(3) {
  animation-delay: .3s;
}

@keyframes pt-chat-typing {
  0%, 80%, 100% {
    opacity: .35;
    transform: translateY(0);
  }

  40% {
    opacity: 1;
    transform: translateY(-3px);
  }
}

.pt-chat-message--user {
  margin-left: auto;
  background: #1b6d55;
  color: #fff;
}

.pt-chat-compose {
  padding: 10px;
  border-top: 1px solid #e6edf2;
  background: #fff;
}

.pt-chat-compose__row {
  display: flex;
  gap: 8px;
}

.pt-chat-compose input,
.pt-chat-order-form input {
  min-width: 0;
  border: 1px solid #cedae4;
  border-radius: 6px;
  background: #fff;
  color: #142d46;
  font: inherit;
}

.pt-chat-compose input {
  flex: 1;
  height: 42px;
  padding: 0 10px;
}

.pt-chat-compose button,
.pt-chat-order-form button {
  border: 0;
  border-radius: 6px;
  background: #2564cc;
  color: #fff;
  padding: 0 14px;
  font: inherit;
  font-weight: 600;
  cursor: pointer;
}

.pt-chat-compose .pt-chat-send {
  width: 42px;
  height: 42px;
  flex: 0 0 42px;
  padding: 0;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.pt-chat-send__icon {
  width: 19px;
  height: 19px;
  background: #fff;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M22 2 11 13'/%3E%3Cpath d='m22 2-7 20-4-9-9-4Z'/%3E%3C/svg%3E") center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M22 2 11 13'/%3E%3Cpath d='m22 2-7 20-4-9-9-4Z'/%3E%3C/svg%3E") center / contain no-repeat;
}

.pt-chat-compose button:disabled {
  opacity: .6;
  cursor: default;
}

.pt-chat-compose__error {
  margin: 7px 0 0;
  color: #b42318;
  font-size: 13px;
  line-height: 1.25;
}

.pt-chat-order-form {
  padding: 12px;
  margin: 0 0 10px;
  border: 1px solid #dbe4ea;
  border-radius: 8px;
  background: #fff;
}

.pt-chat-order-form label {
  display: block;
  margin: 0 0 9px;
  font-size: 13px;
  font-weight: 600;
}

.pt-chat-order-form input {
  display: block;
  width: 100%;
  height: 38px;
  margin-top: 5px;
  padding: 0 9px;
}

.pt-chat-order-form button {
  height: 39px;
}

@media (max-width: 520px) {
  .pilltop-chat-root {
    right: 14px;
    bottom: 14px;
  }

  .pt-chat-panel {
    bottom: 57px;
    height: min(575px, calc(100vh - 94px));
  }

  .pilltop-chat-root.pt-chat-open .pt-chat-panel {
    bottom: 0;
  }
}
