@import url('https://fonts.googleapis.com/css2?family=Roboto+Condensed:ital,wght@0,300;0,400;0,700;1,400&display=swap');

*,
::before,
:after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: 'Roboto Condensed', sans-serif;
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100vw;
  overflow-x: hidden;
  height: 100vh;
  background-image: linear-gradient(
    45deg,
    hsl(240deg 23% 94%) 0%,
    hsl(264deg 21% 94%) 9%,
    hsl(292deg 18% 94%) 18%,
    hsl(320deg 22% 94%) 27%,
    hsl(337deg 27% 95%) 36%,
    hsl(350deg 31% 95%) 45%,
    hsl(1deg 33% 96%) 55%,
    hsl(10deg 36% 96%) 64%,
    hsl(18deg 35% 96%) 73%,
    hsl(26deg 33% 96%) 82%,
    hsl(34deg 28% 96%) 91%,
    hsl(45deg 22% 96%) 100%
  );
  background-position: center;
  background-size: cover;
  color: #343434;
}

.container {
  max-width: 600px;
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
}

h1 {
  margin-top: 1rem;
  text-shadow: 0 2px white, 0 3px #d1d0d0;
  font-size: 3rem;
}

input,
select {
  margin: 0.5rem 0;
  padding: 0.5rem 1rem;
  border-radius: 5px;
  font-size: 1rem;
  font-family: inherit;
  border: 1px solid rebeccapurple;
  transition: 180ms box-shadow ease-in-out;
  max-width: 130px;
}

input:focus,
select:focus {
  outline: 3px solid transparent;
  box-shadow: 0 0 0 3px rebeccapurple;
}

form {
  padding: 1rem;
  border: 3px solid rebeccapurple;
  box-shadow: 5px 5px 10px 5px #d1d0d0;
  background-color: #f4f4f4;
  border-radius: 15px;
  margin-bottom: 1rem;
}

form h4 {
  text-align: center;
  margin-bottom: 0.5rem;
}

form button {
  display: block;
  margin: 0 auto;
}

.form-group {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

#target-income-form {
  margin-top: 1rem;
  width: 100%;
}

#new-work-block-form {
  max-width: 300px;
  margin: 0 auto;
}

#totals {
  padding: 1rem;
  margin: 1rem;
  border: 3px solid rebeccapurple;
  width: 100%;
  box-shadow: 5px 5px 10px 5px #d1d0d0;
  background-color: #f4f4f4;
  border-radius: 15px;
}

#annual-gross-income-target {
  display: flex;
  flex-direction: column;
  flex: 1;
  justify-content: center;
  align-items: center;
  width: 100%;
  margin-top: 1rem;
}

#annual-gross-income-target span {
  font-size: 2rem;
}

#edit-target-income-button {
  scale: 0.7;
}

.results-container {
  border-bottom: 1px dotted gray;
  padding-bottom: 1rem;
  width: 100%;
}

.row {
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  width: 100%;
  align-items: center;
  justify-content: center;
}

.column {
  display: flex;
  flex-direction: column;
  flex-basis: 100%;
  flex: 1;
  align-items: center;
  justify-content: center;
}

.column span {
  font-size: 2.5rem;
}

#progress {
  text-align: center;
}

#progress-bar {
  display: block;
  width: 100%;
  background-color: #b3b0b0;
  border-radius: 5px;
  text-align: center;
}

#bar {
  width: 1%;
  height: 20px;
  color: #fff;
  border-radius: 5px;
  text-align: center;
  line-height: 20px;
  background-color: rebeccapurple;
}

#totals button {
  display: inline-block;
  max-width: 100px;
  margin: 0 auto;
}

.work-block-container {
  width: 100%;
}

.work-blocks-title {
  margin-top: 1rem;
  margin-bottom: 1rem;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  width: 100%;
}

.work-blocks-title:before {
  content: '';
  flex: 1;
}

.work-blocks-title h3 {
  font-size: 2rem;
  color: #343434;
  text-shadow: 0 2px white, 0 3px #d1d0d0;
  align-items: center;
  flex: 1;
}

.add-work-block-button {
  display: flex;
  justify-content: center;
}

#work-blocks {
  display: flex;
  flex-direction: row;
  justify-content: center;
  flex-wrap: wrap;
  width: 100%;
}

.work-block {
  flex-basis: 1 1 100%;
  position: relative;
  width: 200px;
  padding: 1rem;
  margin: 1rem;
  border: 1px solid rebeccapurple;
  box-shadow: 5px 5px 10px 5px #d1d0d0;
  background-color: #f4f4f4;
  border-radius: 15px;
  transition: background-color 0.3s;
}

.work-block:hover {
  border: 1px solid rgb(41, 1, 82);
  background-color: rgb(125, 98, 151);
}

.work-block div {
  display: flex;
  justify-content: space-between;
}

.work-block div:not(:last-child) {
  margin-bottom: 0.5rem;
}

.work-block .delete {
  position: absolute;
  padding: 0.25rem;
  top: 0.5rem;
  right: 0.5rem;
}

.work-block .delete:hover {
  cursor: pointer;
}

/* Utilities */
/* Utility class to hide elements */
.hide {
  display: none !important;
}

.under {
  color: red;
}

.over {
  color: green;
}

button {
  background-image: linear-gradient(
    to right,
    rebeccapurple 0%,
    #9d53e7 29%,
    #9d53e7 61%,
    rebeccapurple 100%
  );
  padding: 0.5rem;
  text-align: center;
  text-transform: uppercase;
  transition: 0.3s;
  background-size: 200% auto;
  color: white;
  /* box-shadow: 3px 3px 6px 3px #d1d0d0; */
  border-radius: 10px;
}

button:hover {
  background-position: right center; /* change the direction of the change here */
  color: #fff;
  text-decoration: none;
  cursor: pointer;
}

button:focus {
  outline: none;
}

/* Animation */
.attract {
  animation: shake 0.75s;
  animation-iteration-count: 1;
}

@keyframes shake {
  0% {
    transform: translate(1px, 1px) rotate(0deg);
  }
  10% {
    transform: translate(-1px, -2px) rotate(-1deg);
  }
  20% {
    transform: translate(-3px, 0px) rotate(1deg);
  }
  30% {
    transform: translate(3px, 2px) rotate(0deg);
  }
  40% {
    transform: translate(1px, -1px) rotate(1deg);
  }
  50% {
    transform: translate(-1px, 2px) rotate(-1deg);
  }
  60% {
    transform: translate(-3px, 1px) rotate(0deg);
  }
  70% {
    transform: translate(3px, 1px) rotate(-1deg);
  }
  80% {
    transform: translate(-1px, -1px) rotate(1deg);
  }
  90% {
    transform: translate(1px, 2px) rotate(0deg);
  }
  100% {
    transform: translate(1px, -2px) rotate(-1deg);
  }
}
