:root {
  --grey: #f2f4f6;
  --black: #000;
  --main: #2c71df;
  --main-shadow: #2763c4;
  --white: #fff;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html, body, #root {
  height: 100%;
}

*, button, input {
  border: 0;
  outline: 0;
  font-family: 'Ubuntu', sans-serif;
}

#root {
  width: 100vw;
  height: 100vh;
  background: var(--grey);
  display: block;
}

#chat-grid {
  width: 100%;
  height: 100%;

  display: grid;
  grid-template-rows: 85vh 15vh;
}

#chat-grid #messages {
  width: 100%;

  display: flex;
  flex-direction: column;

  overflow: auto;

  padding: 1rem;
}

#messages .message {
  position: relative;
  width: auto;
  max-width: 80%;
  height: auto;

  margin: .4rem 0;
  padding: 5px 8px;
  
  border-radius: .4em;

  display: flex;
  align-items: center;
  word-break: break-word;
}

.operator {
  align-self: flex-start;
  background: var(--main);
  color: var(--white);
  text-align: left;
}

.operator:after {
	content: '';
	position: absolute;
	left: 0;
	top: 50%;
	width: 0;
	height: 0;
	border: 15px solid transparent;
	border-right-color: var(--main);
	border-left: 0;
	border-bottom: 0;
	margin-top: -7.5px;
	margin-left: -15px;
}

.customer {
  align-self: flex-end;
  background: var(--white);
  color: var(--black);
  text-align: right;
}

.customer:after {
	content: '';
	position: absolute;
	right: 0;
	top: 50%;
	width: 0;
	height: 0;
	border: 15px solid transparent;
	border-left-color: var(--white);
	border-right: 0;
	border-bottom: 0;
	margin-top: -7.5px;
	margin-right: -15px;
}

#chat-grid #chat-input {
  width: 100%;
  height: 100%;
  
  padding: 0 1rem;

  display: flex;
  flex-direction: row;
  justify-content: space-between;
}

#message-input {
  width: 100%;
  border-radius: 22.5px;
  margin: .5rem 0;

  padding: 0 1rem;
  
  background: var(--white);
  color: var(--black);
}

#submit {
  width: 80px;
  background: none;
  color: var(--main);
  font-size: 1rem;
  cursor: pointer;
}

#submit:hover {
  color: var(--main-shadow);
}