@import url("https://fonts.google.com/specimen/Rubik");

/* Variables */
:root {
  /* font weights */
  --regular: 400;
  --medium: 500;
  --bold: 700;

  /* primary colors */
  --pale-violet: hsl(276, 100%, 81%);
  --chat-sender-text: hsl(276, 55%, 52%);
  --chat-sender-bg: hsl(275, 67%, 88%);
  --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%);

  /* gradients */
  --light-magenta: hsl(293, 100%, 63%);
  --light-violet: hsl(264, 100%, 61%);

  /* secondary colors */
  --white: hsl(0, 0%, 100%);
  --body-bg: hsl(270, 20%, 96%);
  --very-dark-desaturated-violet: hsl(271, 36%, 24%);
  --very-light-magenta: hsl(289, 100%, 72%);
}

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

body {
  min-height: 100vh;
  width: 100vw;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  font-size: 16px;
  font-family: "Rubik", sans-serif;
  background-color: var(--body-bg);
  overflow-x: hidden;
}

/* Darked background illustration */

body::before {
  content: "";
  position: absolute;
  top: -40%;
  left: -50%;
  height: 100%;
  width: 100%;
  border-radius: 0px 0px 500px 500px;
  background: linear-gradient(
    180deg,
    var(--light-magenta),
    var(--light-violet)
  );
  z-index: -1;
}

.illustration {
  position: relative;
  margin: 3em;
  width: 100%;
  max-width: 375px;
  background-color: var(--body-bg);
  border: 15px solid var(--white);
  border-radius: 30px;
  pointer-events: none;
  user-select: none;
}

/* Notch of mobile */
.illustration::after {
  content: "";
  height: 1.3rem;
  width: 50%;
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  border-radius: 0 0 15px 15px;
  background-color: var(--white);
}

.illustration-header {
  padding: 2em 1em 1em;
  border-radius: 15px 15px 5px 5px;
  background: linear-gradient(90deg, var(--light-violet), var(--light-magenta));
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.fa-chevron-left {
  margin-right: 0.7em;
  color: var(--white);
}
/* Profile */
.header-profile {
  margin-left: -6em;
  display: flex;
  align-items: center;
}
.profile-avatar {
  height: 50px;
  width: 50px;
  margin-right: 1em;
  border-radius: 50px;
  border: 2px solid var(--white);
}
.profile-text h3 {
  color: var(--white);
  font-size: 1rem;
  font-weight: var(--bold);
}
.profile-text p {
  color: var(--pale-violet);
  font-size: 0.7rem;
  font-weight: var(--medium);
}
.fa-ellipsis-v {
  justify-self: flex-end;
  color: var(--white);
}

/* Chat msg */

.chat-container {
  display: flex;
  flex-direction: column;
  margin-top: 1em;
}
.chat-msg {
  max-width: 25ch;
  margin: 0.5em 0.8em;
  padding: 0.8em 1em;
  font-size: 0.9rem;
  font-weight: var(--medium);
  box-shadow: 0px 0px 20px rgba(203, 129, 255, 0.3);
}

/* Chat msg from left side*/

.chat-sender {
  align-self: flex-start;
  background-color: var(--chat-sender-bg);
  color: var(--chat-sender-text);
  border-radius: 10px 10px 10px 0px;
}

/* Chat msg from right side*/

.chat-receiver {
  align-self: flex-end;
  background-color: var(--white);
  color: rgb(31, 31, 31);
  border-radius: 10px 10px 0px 10px;
}

/* Chat msg width images */

.chat-images {
  margin: 0.5em 0em;
  align-self: flex-end;
  display: flex;
}
.chat-img {
  margin: 0 0.7em;
  height: 60px;
  width: 60px;
  border-radius: 15px;
}

/* Dark coloured chat msg */

.chat-dark {
  width: 75%;
  margin: 0.5em 0.8em;
  padding: 0.8em 1.3em;
  font-size: 0.9rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-weight: var(--medium);
  color: var(--white);
  border-radius: 10px 10px 10px 0px;
  background: linear-gradient(90deg, var(--light-magenta), var(--light-violet));
}
.fa-circle {
  font-size: 1.4rem;
  color: var(--very-light-magenta);
}
.dark-msg-text {
  margin-left: -2em;
  text-align: left;
}
.msg-price {
  font-size: 1.3rem;
  font-weight: var(--bold);
}

/* Input */

.input {
  background-color: var(--white);
  margin: 1em 0.8em;
  padding: 0.6em 1.3em;
  display: flex;
  align-items: center;
  color: var(--grayish-blue);
  justify-content: space-between;
  border-radius: 25px;
}
.placeholder-text {
  font-size: 0.9rem;
}
.fa-chevron-right {
  height: 30px;
  width: 30px;
  margin-right: -0.8em;
  line-height: 30px;
  text-align: center;
  border-radius: 50px;
  background-color: var(--very-dark-desaturated-violet);
}

/* Main Section */

main {
  margin: 2em;
  text-align: center;
}
.main-heading {
  font-size: 2rem;
  font-weight: var(--bold);
  color: var(--very-dark-desaturated-violet);
  margin-bottom: 0.6em;
}
.main-p {
  font-size: 1rem;
  font-weight: var(--regular);
  color: var(--dark-grayish-violet);
  line-height: 1.7em;
}

/* Media queries */

@media (min-width: 800px) {
  body {
    flex-direction: row;
    padding: 2em 5em;
  }
  body::before {
    top: 0%;
    left: -20%;
    height: 100%;
    width: 40%;
    border-radius: 0px 0px 500px 500px;
  }
  main {
    text-align: left;
  }

  /* Dimmed background illustration */

  body::after {
    content: "";
    position: absolute;
    bottom: -10%;
    right: -20%;
    height: 80%;
    width: 40%;
    border-radius: 500px 500px 0px 0px;
    background: linear-gradient(
      180deg,
      var(--light-magenta),
      var(--light-violet)
    );
    opacity: 0.05;
    z-index: -1;
  }
}

/* Attribution */

.attribution {
  position: absolute;
  bottom: 0;
  text-align: center;
}
