@import url('https://fonts.googleapis.com/css2?family=Roboto:ital,wght@0,100..900;1,100..900&display=swap');

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

:root {
  --blue-800: hsl(234, 29%, 20%);
  --blue-700: hsl(235, 18%, 26%);
  --grey: hsl(0, 0%, 58%);
  ---white: hsl(0, 0%, 100%);
  --red: hsl(4, 100%, 67%);
}

ul li {
  list-style-type: none;
  position: relative;
  margin-left: 1.5rem;
  padding: 0.5rem;
}

body {
  font-family: 'roboto', sans-serif;
  font-size: clamp(0.95rem 1vw + 3rem);
  line-height: 1.3;
}

.container {
  width: 100%;
  max-width: 375px;
  margin: 0 auto;
  box-shadow: 0 0 10px
    rgba(0, 0, 0, 0.1);
}

.signup-content {
  padding: 1.5rem 2rem;
}

.signup-content h1 {
  font-size: 2.3rem;
  font-weight: 700;
  margin-bottom: 1.1rem;
}

ul li::before {
  content: url(img/icon-list.svg);
  position: absolute;
  left: -1.5rem;
}

.signup-content p {
  margin-bottom: 1.1rem;
}

form {
  margin-top: 1.5rem;
}

form label {
  font-size: 1rem;
  padding: 0.4rem 0;
  font-weight: 500;
  display: block;
  width: 100%;
}

.flex-layout span {
  position: absolute;
  right: 2rem;
  display: inline;
  float: right;
  bottom: 4px;
}

.visually-hidden {
  font-size: 1rem;
  color: var(--red);
  display: none;
}

form input {
  margin-bottom: 1rem;
  padding: 1rem;
  border-radius: 0.5rem;
  border: 1px solid var(--grey);
  display: block;
  width: 100%;
}

form input[type='email']:focus {
  outline: none;
  border: 3px solid var(--red);
}

form button {
  margin-top: 1.5rem;
  padding: 1rem;
  border-radius: 0.5rem;
  background-color: var(--blue-700);
  color: var(---white);
  font-weight: 700;
  cursor: pointer;
  display: block;
  width: 100%;
}

form button:hover {
  background-color: var(--red);
  color: var(---white);
  border: none;
}

.btn-close:hover {
  background-color: var(--red);
  border: 1px solid var(--red);
}

.mobile-success-message {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  width: 100%;
  background-color: var(---white);
  display: block;
  z-index: 999;
  padding: 6rem 1.5rem;
  text-align: left;
}

.mobile-success-message img {
  width: 60px;
  height: 60px;
  margin-bottom: 1.5rem;
}

.mobile-success-message h2 {
  font-size: 2.4rem;
  font-weight: 600;
  width: 100%;
  max-width: 200px;
  margin-bottom: 1.2rem;
}

.mobile-success-message p {
  width: 100%;
  max-width: 90%;
  font-size: 1.2rem;
}

.mobile-success-message button {
  margin-top: 6rem;
  width: 100%;
  max-width: 375px;
  padding: 1.1rem 1rem;
  border-radius: 0.5rem;
  background-color: var(--blue-800);
  color: var(---white);
  font-weight: 700;
  cursor: pointer;
  font-size: 1.1rem;
}

.hidden {
  display: none;
}

@media screen and (min-width: 390px) {
  .flex-layout span {
    right: 2.5rem;
    bottom: 35px;
  }
}

@media screen and (min-width: 414px) {
  .flex-layout span {
    right: 3.5rem;
    bottom: 85px;
  }
}

@media screen and (min-width: 428px) {
  .flex-layout span {
    right: 3.5rem;
    bottom: 115px;
  }
}

@media screen and (min-width: 768px) {
  body {
    background: var(--blue-700);
  }

  main {
    display: flex;
    flex-direction: column;
    background-color: var(---white);
  }

  .container {
    max-width: 530px;
    border-radius: 15px;
  }

  .flex-layout span {
    right: 10rem;
    bottom: 100px;
    top: 635px;
  }

  .mobile-success-message {
    max-width: 100%;
    background-color: var(--blue-800);
  }

  .mobile-success-message img {
    width: 50px;
    height: 50px;
  }

  .mobile-success-message-container {
    width: 100%;
    max-width: 420px;
    margin: 0 auto;
    border-radius: 24px;
    background-color: var(---white);
    padding: 3rem;
  }

  .mobile-success-message p {
    max-width: 100%;
    text-align: left;
  }

  .mobile-success-message button {
    margin-top: 2rem;
    padding: 1rem;
  }
}

@media screen and (min-width: 1024px) {
  body {
    background: var(--blue-700);
  }

  main {
    flex-direction: row-reverse;
    background-color: var(---white);
  }

  .container {
    max-width: 860px;
    margin: 3rem auto;
  }

  .signup-image {
    padding: 1rem;
  }

  .signup-content {
    margin: auto 0;
  }

  .flex-layout span {
    left: 24rem;
    top: 420px;
  }

  .mobile-success-message {
    max-width: 100%;
    background-color: var(--blue-800);
  }

  .mobile-success-message img {
    width: 50px;
    height: 50px;
  }

  .mobile-success-message-container {
    width: 100%;
    max-width: 420px;
    margin: 0 auto;
    border-radius: 24px;
    background-color: var(---white);
    padding: 3rem;
  }

  .mobile-success-message p {
    max-width: 100%;
    text-align: left;
  }

  .mobile-success-message button {
    margin-top: 2rem;
    padding: 1rem;
  }
}

@media screen and (min-width: 1440px) {
  .flex-layout span {
    left: 35rem;
    top: 420px;
  }
}
