.ams-assistant {
  width: min(100%, 520px);
  border: 1px solid #d8e3df;
  border-radius: 8px;
  overflow: hidden;
  background: #ffffff;
  color: #15332d;
  font-family: inherit;
  box-shadow: 0 14px 36px rgba(15, 118, 110, 0.12);
}

.ams-assistant__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px;
  background: #0f766e;
  color: #ffffff;
}

.ams-assistant__header strong,
.ams-assistant__header span {
  display: block;
}

.ams-assistant__header span {
  margin-top: 2px;
  font-size: 13px;
  opacity: 0.9;
}

.ams-assistant__messages {
  display: flex;
  min-height: 260px;
  max-height: 420px;
  flex-direction: column;
  gap: 10px;
  overflow-y: auto;
  padding: 14px;
  background: #f6fbf9;
}

.ams-assistant__message {
  max-width: 88%;
  white-space: pre-wrap;
  border-radius: 8px;
  padding: 10px 12px;
  font-size: 14px;
  line-height: 1.55;
}

.ams-assistant__message--bot {
  align-self: flex-start;
  background: #ffffff;
  border: 1px solid #dbe7e3;
}

.ams-assistant__message--user {
  align-self: flex-end;
  background: #0f766e;
  color: #ffffff;
}

.ams-assistant__form {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
  padding: 12px;
  border-top: 1px solid #d8e3df;
  background: #ffffff;
}

.ams-assistant__form textarea {
  width: 100%;
  min-height: 44px;
  max-height: 120px;
  resize: vertical;
  border: 1px solid #bfd0ca;
  border-radius: 8px;
  padding: 10px;
  font: inherit;
}

.ams-assistant__form button,
.ams-assistant-float__button {
  border: 0;
  border-radius: 8px;
  background: #0f766e;
  color: #ffffff;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}

.ams-assistant__form button {
  min-width: 72px;
  padding: 0 16px;
}

.ams-assistant-float {
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 9999;
}

.ams-assistant-float__button {
  width: 58px;
  height: 58px;
  box-shadow: 0 12px 28px rgba(15, 118, 110, 0.28);
}

.ams-assistant-float__panel {
  position: absolute;
  right: 0;
  bottom: 72px;
  width: min(360px, calc(100vw - 32px));
}

.ams-assistant-float__panel .ams-assistant {
  width: 100%;
}

@media (max-width: 520px) {
  .ams-assistant__form {
    grid-template-columns: 1fr;
  }

  .ams-assistant__form button {
    min-height: 42px;
  }
}
