@import url("https://fonts.googleapis.com/css2?family=Open+Sans:wght@300;500&family=Poppins:wght@500;700&display=swap");

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: "Poppins", sans-serif;
  background: linear-gradient(white, hsl(0, 0%, 75%)) no-repeat;
  min-height: 100vh;
  padding-bottom: 25px;
}

header {
  text-align: center;
  font-size: 4em;
}

.wrapper {
  display: flex;
  justify-content: center;
  align-items: center;
  margin: auto;
  margin-top: 50px;
  width: min(800px, 90vw);
  padding: 2em;
  background: url(bg-shorten-desktop.svg) hsl(257, 27%, 26%) no-repeat;
  border-radius: 7px;
  position: relative;
}

.input-text {
  width: 70%;
  padding: 0.9em;
  outline: none;
  font-size: 0.8em;
  border-radius: 5px;
  border: none;
  margin-right: 1em;
  font-family: inherit;
}

.input-text::placeholder {
  font-family: inherit;
  font-weight: 500;
}

.shorten-btn {
  text-transform: capitalize;
  background: hsl(180, 66%, 49%);
  border: none;
  outline: none;
  font-weight: 700;
  color: white;
  padding: 1em 2em;
  border-radius: 7px;
  font-size: 0.8em;
  cursor: pointer;
  font-family: inherit;
}

.shorten-btn:hover {
  background: hsl(180, 83%, 66%);
}

.error-message {
  position: absolute;
  bottom: 0;
  left: 10%;
  margin: 0;
  font-size: 0.8em;
  color: hsl(0, 87%, 67%);
}

.input-error {
  color: hsl(0, 87%, 67%);
  border: 2px solid hsl(0, 87%, 67%);
}

.input-error::placeholder {
  color: hsl(0, 87%, 67%);
}

.links {
  display: flex;
  justify-content: center;
  align-items: center;
  flex-direction: column;
  row-gap: 15px;
  margin: 20px;
}

.link {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: min(800px, 90vw);
  background-color: white;
  padding: 1em;
  border-radius: 5px;
}

.original-link {
  font-size: 1em;
}

.shorten {
  display: flex;
  justify-content: space-evenly;
  align-items: center;
  column-gap: 10px;
}

.shortened-link {
  color: hsl(180, 66%, 49%);
  font-size: 1em;
}

.copy {
  padding: 0.5em;
  width: 8em;
  text-transform: capitalize;
  background-color: hsl(180, 66%, 49%);
  outline: none;
  border: none;
  border-radius: 3px;
  cursor: pointer;
  color: white;
  font-family: inherit;
  transition: 0s 0.5s ease;
  font-size: 1em;
}

.copy:hover {
  background-color: hsl(180, 83%, 66%);
}

.copy:active {
  transition: 0s;
  background-color: hsl(257, 27%, 26%);
}

.invisible {
  display: none;
}

.footer {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  text-align: center;
  font-family: "Open Sans", sans-serif;
  color: #f5f5f5;
  background-color: black;
  padding: 10px 0px;
  font-size: min(2vw, 15px);
  position: fixed;
  left: 0px;
  bottom: 0px;
  width: 100%;
}

.loader {
  border: 0.2rem solid #f3f3f3;
  border-radius: 50%;
  border-top: 0.2rem solid #3498db;
  width: 2.5rem;
  height: 2.5rem;
  -webkit-animation: spin 2s linear infinite;
  animation: spin 2s linear infinite;
  margin-left: 1rem;
  visibility: hidden;
}

@-webkit-keyframes spin {
  0% {
    -webkit-transform: rotate(0deg);
  }
  100% {
    -webkit-transform: rotate(360deg);
  }
}

@keyframes spin {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}

@media only screen and (max-width: 600px) {
  html {
    font-size: 70%;
  }
}

@media only screen and (max-width: 400px) {
  html {
    font-size: 50%;
  }
}
