:root {
  --clr-primary-300: hsl(276, 100%, 81%);
  --clr-primary-400: hsla(276, 55%, 52%, 60%);

  --clr-neural-100: hsl(0, 0%, 100%);
  --clr-neutral-400: hsl(270, 7%, 64%);
  --clr-neutral-500: hsl(271, 15%, 43%);
  --clr-neutral-600: hsl(271, 36%, 24%);

  /* the design specs list these as secondary  */
  --clr-secondary-300: hsl(206, 6%, 79%);
  --clr-secondary-400: hsl(270, 20%, 96%);
  --clr-secondary-500: hsl(289, 100%, 72%);
  --clr-secondary-600: hsl(271, 36%, 24%);
  --bg-chat: hsl(275, 43%, 94%);

  --fw-400: 400;
  --fw-500: 500;
  --fw-700: 700;
}

body {
  font-family: "Rubik", sans-serif;
  font-size: 100%;
}

/* Box sizing rules */
*,
*::before,
*::after {
  box-sizing: border-box;
}

/* Remove default margin */
body,
h1,
h2,
p {
  margin: 0;
}

/* Set core root defaults */
html:focus-within {
  scroll-behavior: smooth;
}

/* Set core body defaults */
body {
  min-height: 100vh;
  text-rendering: optimizeSpeed;
  line-height: 1.5;
}

/* A elements that don't have a class get default styles */
a:not([class]) {
  text-decoration-skip-ink: auto;
}

/* Make images easier to work with */
img,
picture {
  max-width: 100%;
  display: block;
}

/* Remove all animations, transitions and smooth scroll for people that prefer not to see them */
@media (prefers-reduced-motion: reduce) {
  html:focus-within {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

.flow > * + * {
  margin-top: 1rem;
}

.bg-gradient {
  --gradient: linear-gradient(
    var(--gradient-angle, 45deg),
    hsl(293, 100%, 63%),
    hsl(264, 100%, 61%)
  );
}



.phone {
  max-width: 23.4375rem;
  width: 90%;
  margin: 10vh auto;
  background:hsl(270, 20%, 96%);
  border-radius: 40px;
  box-shadow: 0 0 0 20px rgb(255, 255, 255);
  filter: drop-shadow(0 4px 28px rgba(0,0,0, 0.3));
  position: relative;
  z-index: 0;
}

.phone::before {
  content: '';
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  background-color: #fff;
  width: 220px;
  height: 25px;
  border-radius: 0 0 40px 40px;
  z-index: 1;
}

.phone-header  {
 /*  display: flex;
  align-items: center; */
  display: grid;
  grid-template-columns: 40px auto;
  align-items: center;
  padding: 1em 0 0 1em;
  gap: 0 1em;
  width: 100%;
  height: 100px;
  color: white;
  border-radius: 40px 40px 6px  6px;
  --gradient-angle: 295deg;
  background: var(--gradient);
}

.profile-picture {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 2px solid white;
}

.user-name {
  font-size: 1.125rem;
  font-weight: var(--fw-700);
}

.user-status {
  font-size: 0.75rem;
}
.phone-chat {
  display: grid;
  grid-template-columns: 1rem repeat(5, 70px) 1rem;
  row-gap: 1em;
  grid-template-rows: 10px repeat(8, 60px) 1em;
}

.chat-message {
  font-size: 12px;
  padding: .5em 1em;
  font-weight: var(--fw-700);
}

.chat-message:nth-of-type(1) {
  grid-column: 2/5;
  grid-row:2;
  background: var(--bg-chat);
  color: var(--clr-primary-400);
  border-radius: 16px 16px 16px 8px;
}

.chat-message:nth-of-type(2) {
  grid-row: 3;
  grid-column: 2/ span 3;
  background: var(--bg-chat);
  color: var(--clr-primary-400);
  border-radius: 16px 16px 16px 8px;
}

.chat-img {
  width: 62px;
  height: 62px;
  border-radius: 14px;
}

.chat-message.space-evenly {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  grid-column: 4/ span 3;
  grid-row: 4;
  justify-self: end;
  background: none;

}

.chat-message:nth-of-type(3) {
  grid-row: 5;
  grid-column: 4 /7;
  background: white;
  border-radius: 16px 16px 8px 16px;
  color: var(--clr-neutral-400);
  box-shadow: 0 4px 20px rgba(0,0,0,0.1);
}

.chat-message:nth-of-type(4) {
  grid-row: 6;
  grid-column: 5/span 2;
  align-self:start;
  background: white;
  border-radius: 16px 16px 8px 16px;
  color: var(--clr-neutral-400);
  box-shadow: 0 4px 20px rgba(0,0,0,0.1);

}

.chat-message:nth-of-type(5) {
  grid-row: 7;
  grid-column: 2 /span 3;
  align-self: center;
  background: var(--bg-chat);
  color: var(--clr-primary-400);
  border-radius: 16px 16px 16px 8px;
}

.chat-message:nth-of-type(6) {
  grid-row: 8;
  grid-column: 2 / 6;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-around;
  color: white;
  --gradient-angle: 130deg;
  background: var(--gradient);
  padding-left: 1.4em;
  border-radius: 16px 16px 16px 6px;
}

.chat-message:nth-of-type(7) {
  grid-row: 9;
  grid-column: 2/ 6;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-around;
  color: white;
  --gradient-angle: 130deg;
  background: var(--gradient);
  border-radius: 16px 16px 16px 6px;
}

.chat-message:nth-of-type(7) span {
  display: inline-block;
}

.chat-message .round {
  position: relative;
  font-size: 12px;
  display: inline-block;
}

.chat-message .round::before {
  content: '';
  position: absolute;
  width: 22px;
  height: 22px;
  background: transparent;
  border-radius: 20px;
  left: -2.6em;
  border: 1px solid white;
}

.chat-message span {
  font-size: 1.4rem;
  font-weight: var(--fw-700);
}


