@import url("https://fonts.googleapis.com/css2?family=Bai+Jamjuree:ital,wght@0,200;0,300;0,400;0,500;0,600;0,700;1,200;1,300;1,400;1,500;1,600;1,700&family=Barlow+Semi+Condensed:ital,wght@0,100;0,200;0,300;0,400;0,500;0,600;0,700;0,800;0,900;1,100;1,200;1,300;1,400;1,500;1,600;1,700;1,800;1,900&family=Big+Shoulders:opsz,wght@10..72,100..900&family=DM+Sans:ital,opsz,wght@0,9..40,100..1000;1,9..40,100..1000&family=Fraunces:ital,opsz,wght@0,9..144,100..900;1,9..144,100..900&family=Hanken+Grotesk:ital,wght@0,100..900;1,100..900&family=Inter:ital,opsz,wght@0,14..32,100..900;1,14..32,100..900&family=Karla:ital,wght@0,200..800;1,200..800&family=Kumbh+Sans:wght@100..900&family=Lato:ital,wght@0,100;0,300;0,400;0,700;0,900;1,100;1,300;1,400;1,700;1,900&family=League+Spartan:wght@100..900&family=Lexend+Deca:wght@100..900&family=Montserrat:ital,wght@0,100..900;1,100..900&family=Open+Sans:ital,wght@0,300..800;1,300..800&family=Outfit:wght@100..900&family=Poppins:ital,wght@0,100;0,200;0,300;0,400;0,500;0,600;0,700;0,800;0,900;1,100;1,200;1,300;1,400;1,500;1,600;1,700;1,800;1,900&family=Raleway:ital,wght@0,100..900;1,100..900&family=Red+Hat+Display:ital,wght@0,300..900;1,300..900&family=Roboto:ital,wght@0,100..900;1,100..900&family=Rubik:ital,wght@0,300..900;1,300..900&family=Work+Sans:ital,wght@0,100..900;1,100..900&family=Young+Serif&display=swap");
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  list-style: none;
  text-decoration: none;
}
:root {
  --pale-violet: hsl(276, 100%, 81%);
  --moderate-violet: hsl(276, 55%, 52%);
  --desaturated-dark-violet: hsl(271, 15%, 43%);
  --grayish-blue: hsl(206, 6%, 79%);
  --very-dark-desaturated-violet: hsl(271, 36%, 24%);
  --dark-grayish-violet: hsl(270, 7%, 64%);
  --light-magenta: hsl(293, 100%, 63%);
  --light-violet: hsl(264, 100%, 61%);
  --white: hsl(0, 0%, 100%);
  --light-grayish-violet: hsl(270, 20%, 96%);
  --very-dark-desaturated-violet: hsl(271, 36%, 24%);
  --very-light-magenta: hsl(289, 100%, 72%);
}

body {
  font-family: "Rubik", sans-serif;
  background-color: #fafafa;
  min-height: 100vh;
  display: flex;
  justify-content: center;
  align-items: center;
  overflow-x: hidden;
}
/* 400 500 700 */
h1.large {
  color: var(--very-dark-desaturated-violet);
  font-weight: 500;
  font-size: 38px;
  margin-bottom: 30px;
}
p.small {
  color: var(--dark-grayish-violet);
  font-size: 16px;
  font-weight: 400;
  line-height: 1.7;
}
.bg > div {
  position: absolute;
  height: 85%;
  z-index: -1;
  width: 420px;
}
.bg > div:first-child {
  top: 0;
  left: -160px;
  border-bottom-left-radius: 310px;
  border-bottom-right-radius: 310px;
  background: linear-gradient(
    to bottom,
    var(--light-magenta),
    var(--light-violet)
  );
  width: 580px;
}
.bg > div:last-child {
  bottom: 0;
  right: -100px;
  border-top-right-radius: 200px;
  border-top-left-radius: 200px;
  background-color: #f9f4fa;
}
.card {
  max-width: 920px;
  width: 100%;
  align-items: center;
  gap: 100px;
  display: grid;
  grid-template-columns: 385px 1fr;
  margin-inline: 15px;
}

.card > .phone {
  background-color: var(--white);
  padding: 13px;
  border-radius: 25px;
  box-shadow: -1px 40px 72px rgba(0, 0, 0, 0.15);
}
.card > .phone > .user {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: linear-gradient(60deg, var(--light-violet), var(--light-magenta));
  padding: 35px 15px 15px 15px;
  border-radius: 25px 25px 10px 10px;
  position: relative;
  box-shadow: 0 5px 10px rgba(0, 0, 0, 0.15);
}
.card > .phone > .user::before {
  content: "";
  width: 50%;
  height: 25px;
  background-color: var(--white);
  position: absolute;
  top: -1px;
  left: 50%;
  transform: translateX(-50%);
  border-radius: 0px 0px 20px 20px;
}
.card > .phone > .user > .info {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.card > .phone > .user > .info > .contact {
  display: flex;
  align-items: center;
  gap: 10px;
}
.card > .phone > .user > .info > .contact > .image img {
  width: 35px;
  border-radius: 50%;
  border: 2px solid var(--white);
}
.card > .phone > .user > .info > .image svg {
  margin-right: 5px;
  position: relative;
  left: -3px;
}
.card > .phone > .user > .dots {
  display: flex;
  flex-direction: column;
}
.card > .phone > .user > .dots > span {
  display: inline-block;
  width: 3px;
  height: 3px;
  background-color: white;
  margin-bottom: 2px;
  border-radius: 50%;
}
.card > .phone > .user > .info > .contact > .text > p.name {
  color: white;
  font-weight: 500;
  font-size: 16px;
  margin-bottom: 5px;
}
.card > .phone > .user > .info > .contact > .text > p.desc {
  color: var(--dark-grayish-violet);
  font-weight: 400;
  font-size: 14px;
}
.card > .phone > .chat {
  padding: 15px;
  background-color: var(--light-grayish-violet);
  box-shadow: 0 -40px 0 var(--light-grayish-violet);
  border-radius: inherit;
  display: flex;
  flex-direction: column;
}

.chat > div[class$="chat"] {
  margin-bottom: 10px;
  width: fit-content;
  padding: 10px 15px;
  border-radius: 15px;
  max-width: 70%;
}
.chat > div[class^="left"]:has(+ div[class^="right"]) {
  margin-bottom: 15px;
}
.chat > div[class^="right"]:has(+ div[class^="left"]) {
  margin-bottom: 15px;
}
.chat > div[class^="left"] {
  background-color: hsl(272deg, 41%, 93%);
}
.chat > div[class^="right"] {
  background-color: var(--white);
  align-self: end;
  box-shadow: 0px 6px 10px rgb(0 0 0 / 4%);
}
.chat > div p.xsmall {
  font-weight: 400;
  font-size: 14px;
  line-height: 1.3;
}
.chat > div[class^="left"]:not(:has(.styled-box)) p.xsmall {
  color: var(--moderate-violet);
}
.chat > div[class^="right"] p.xsmall {
  color: var(--desaturated-dark-violet);
}
.chat > div[class^="right"]:has(.images) {
  background-color: transparent;
  padding: 0;
  box-shadow: none;
}
.chat > div[class^="right"] > .images {
  display: flex;
  gap: 10px;
  justify-content: end;
}
.chat > div[class^="right"] > .images img {
  max-width: calc(100% / 5 + 5px);
  border-radius: 15px;
}

.chat > div[class^="left"]:has(.styled-box) {
  width: 80%;
  max-width: 100%;
  background: linear-gradient(
    to right,
    var(--light-magenta),
    var(--light-violet)
  );
  padding: 15px;
}
.chat > div[class^="left"] .styled-box {
  display: flex;
  justify-content: space-between;
  align-items: center;
  color: white;
}
.chat > div[class^="left"] .styled-box .walk {
  display: flex;
  align-items: center;
  gap: 10px;
}
.chat > div[class^="left"] .styled-box .walk span.circle {
  display: inline-block;
  width: 15px;
  aspect-ratio: 1;
  background-color: transparent;
  border: 1px solid white;
  border-radius: 50%;
}
.chat > div[class^="left"] .styled-box p.large {
  font-weight: 700;
  font-size: 18px;
}
.chat > .message input {
  border: none;
  outline: none;
  width: 100%;
  position: relative;
  padding: 15px;
  border-radius: 50px;
  font-family: "Rubik", sans-serif;
  padding-left: 25px;
}
.chat > .message input::placeholder {
  color: var(--grayish-blue);
  font-size: 12px;
}
.chat > .message {
  display: inline-block;
  position: relative;
  margin-top: 10px;
}
.chat > .message .submit p {
  position: absolute;
  top: 50%;
  right: 10px;
  transform: translateY(-50%);
  background-color: var(--very-dark-desaturated-violet);
  color: white;
  height: 75%;
  aspect-ratio: 1;
  display: flex;
  justify-content: center;
  align-items: center;
  border-radius: 50%;
  font-weight: 700;
}
.chat > div[class^="left"]:has(.styled-box) {
  border-bottom-left-radius: 8px;
}
@media (max-width: 768px) {
  .bg > div:first-child {
    width: 85%;
    height: 300px;
    left: 0;
    border-radius: 0px;
    border-top-right-radius: 310px;
    border-bottom-right-radius: 310px;
  }
  .bg > div:last-child {
    position: fixed;
    width: 85%;
    height: 300px;
    right: 0;
    border-radius: 0px;
    border-top-left-radius: 310px;
    border-bottom-left-radius: 310px;
  }
  .card {
    grid-template-columns: 1fr;
    margin-top: 100px;
    margin-bottom: 100px;
  }
  .card > .phone {
    max-width: 350px;
    margin-inline: auto;
  }
  .card .text {
    text-align: center;
  }
}
@media (max-width: 585px) {
  .bg > div:first-child {
    width: 300px;
    height: 50%;
    left: 0;
    border-radius: 0px;
    border-bottom-right-radius: 310px;
    border-bottom-left-radius: 310px;
  }
  .bg > div:last-child {
    position: fixed;

    width: 300px;
    height: 50%;
    right: 0;
    border-radius: 0px;
    border-top-right-radius: 310px;
    border-top-left-radius: 310px;
  }
}
