* {
  padding: 0;
  margin: 0;
  box-sizing: border-box;
}

:root {
  font-size: 62.5%;
  font-family: "Roboto", sans-serif;
}

body {
  background-color: #1a1924;
  color: #e1e1e6;
}

.chat {
  padding: 2.4rem 3.2rem;
  height: 100vh;
  display: flex;
  flex-direction: column;
  max-width: 102.4rem;
  margin: auto;
}

.header {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.header .left {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1.6rem;
}

.header .left .avatar {
  width: 4.8rem;
  height: 4.8rem;
  border-radius: 50%;
  object-fit: cover;
}

.header .left .info .name {
  font-size: 1.6rem;
}
.header .left .info .status {
  display: flex;
  gap: 0.4rem;
  align-items: center;
  font-size: 1.2rem;
  color: #00b37e;
}

.header .left .info .status .circle {
  display: block;
  width: 0.8rem;
  height: 0.8rem;
  border-radius: 50%;
  background-color: #00b37e;
}

.header .right button {
  display: flex;
  align-items: center;
  justify-content: center;
  background: none;
  cursor: pointer;
  outline: none;
  border: 2px solid transparent;
  padding: 0.2rem;
  border-radius: 0.4rem;
}

.header .right button:focus {
  border-color: #00b37d;
}

.messages {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 3rem;
  padding: 3rem 0;
}

.messages .message {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.messages .date {
  text-align: center;
  font-size: 1.2rem;
}

.message .sender {
  font-size: 1.2rem;
}
.message .text {
  background-color: #633bbc;
  width: fit-content;
  max-width: 50%;
  padding: 1.4rem;
  border-radius: 0 0.8rem 0.8rem 0.8rem;
  font-size: 1.2rem;
}
.message.sent {
  display: flex;
  width: 100%;
  align-items: flex-end;
}
.message.sent .text {
  border-radius: 0.8rem 0 0.8rem 0.8rem;
  background-color: #07847e;
}

.message-input {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  padding: 0 2.4rem;
  background-color: #282843;
  border-radius: 2rem;
  border: 2px solid #2c2c4b;
}

.message-input:has(input:focus) {
  border: 2px solid #00b37d;
}

.message-input input {
  width: 100%;
  font-size: 1.4rem;
  padding: 1.2rem 0;
  background: none;
  color: #e1e1e6;
  border: none;
  outline: none;
}

.message-input button {
  background: none;
  border: none;
  outline: none;
  cursor: pointer;
  border-radius: 0.8rem;
  padding: 0.2rem;
  border: 2px solid transparent;
}

.message-input button:focus {
  border: 2px solid #00b37d;
}

@media screen and (max-width: 375px) {
  .message .text {
      max-width: 60%;
  }
}