@font-face {
  font-family: "iransans";
  src: url("./fonts/Iran Sans Bold.ttf") format("opentype");
  font-weight: normal;
  font-style: normal;
}

:root {
  --lighter-green: #dbf5a7;
  --light-green: #9eed9b;
  --green: #35d874;
  --medium-green: #518c4c;
  --dark-green: #133a05;
  --darker-green: #093223;
}

.widget {
  margin-top: 50%;
  margin-left: 74%;
  width: 400px;
  font-family: "iransans", sans-serif;
  color: var(--dark-green);
  transition: transform 0.5s ease-in-out;
  transform-origin: bottom right;
}

.progress-bar {
  display: flex;
  justify-content: flex-end;
  position: absolute;
  width: 475px;
  height: 100px;
  background: linear-gradient(
    to right,
    var(--lighter-green),
    var(--light-green)
  );
  border-radius: 15px;
  overflow: hidden;
  transition: width 0.5s ease-in-out, background-color 0.5s ease-in-out;
}

.progress {
  position: relative;
  width: 0%;
  height: 100%;
  border-radius: 15px;
  background-color: var(--dark-green);
  transition: width 0.5s ease-in-out, background-color 0.5s ease-in-out;
}

.text {
  position: relative;
  justify-content: center;
  align-items: center;
  direction: rtl;
  width: 475px;
  height: 10%;
  margin-top: 3%;
  opacity: 0;
  text-align: right;
  transition: opacity 0.5s ease-in-out, color 0.3s ease-in-out,
    background-color 0.5s ease;
  overflow: hidden;
}

.title-container,
.description-container {
  position: relative;
  right: 7%;
}

.title {
  display: inline-block;
  font-size: 2em;
}

.description {
  display: inline-block;
  font-size: 1em;
}

.title,
.description {
  z-index: 1;
  transition: opacity 0.5s ease-in-out;
}

.title-overlay,
.description-overlay {
  position: absolute;
  width: 0;
  right: 0;
  overflow: hidden;
  white-space: nowrap;
  color: var(--light-green);
  transition: width 0.5s ease-in-out;
  z-index: 2;
  transition: opacity 0.5s ease-in-out;
}

.title-overlay {
  display: inline-block;
  font-size: 2em;
}

.description-overlay {
  display: inline-block;
  font-size: 1em;
}

.img-container {
  display: flex;
  position: absolute;
  justify-content: center;
  align-items: center;
  width: 140px;
  height: 200px;
  bottom: 0%;
  overflow: hidden;
}

.img {
  display: flex;
  position: absolute;
  justify-content: center;
  align-items: center;
  z-index: 1;
  width: 65px;
  left: 15px;
  bottom: 20%;
  animation: float 6s ease-in-out infinite alternate;
  transition: transform 1s cubic-bezier(0.68, -0.55, 0.27, 1.55),
    opacity 0.5s ease-in-out;
}

.show {
  opacity: 1;
}

.wink {
  animation: wink 2.5s ease-in-out;
}

.scale {
  transform: scale(1.2);
}

.complete {
  color: var(--green);
}

@keyframes zoom {
  from {
    transform: scale(1);
  }
  to {
    transform: scale(1.1);
  }
}

@keyframes wink {
  0%,
  100% {
    background: linear-gradient(
      to right,
      var(--medium-green),
      var(--dark-green)
    );
  }
  20%,
  60% {
    background: var(--medium-green);
  }
  40%,
  80% {
    background: var(--darker-green);
  }
}

@keyframes float {
  0%,
  100% {
    transform: rotate(0deg) translateX(0) translateY(0);
  }
  25% {
    transform: rotate(3deg) translateX(-3px) translateY(3px);
  }
  50% {
    transform: rotate(-7deg) translateX(5px) translateY(-5px);
  }
  75% {
    transform: rotate(5deg) translateX(-4px) translateY(2px);
  }
}
