.overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0);
  z-index: 1000;
  justify-content: center;
  align-items: center;
}

.popup-box {
  border-radius: 4px;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
  text-align: center;
  max-width: 500px;
  width: 90%;
  transition: transform 0.3s ease;
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 10px;
  padding: 10px;
  position: absolute;
  top: 50px;
}

.overlay.active {
  display: flex;
}

.overlay.active .popup-box {
  animation: popIn 0.3s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

.popup-box p {
  margin: 0;
  font-size: 14px;
  color: white;
}

.success .popup-box {
  background: #2e7d32;
}

.error .popup-box {
  background: #d32f2f;
}

.icon-circle {
  width: 24px;
  height: 24px;
  border: 1px solid white;
  border-radius: 50%;
  position: relative;
  display: inline-block;
  vertical-align: middle;
}

.error .icon-circle::before,
.error .icon-circle::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 12px;
  height: 2px;
  background-color: white;
  border-radius: 2px;
}

.error .icon-circle::before {
  transform: translate(-50%, -50%) rotate(45deg);
}

.error .icon-circle::after {
  transform: translate(-50%, -50%) rotate(-45deg);
}

.success .icon-circle::after {
  content: "";
  position: absolute;
  left: 9px;
  top: 5px;
  width: 5px;
  height: 10px;
  border: solid white;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg) scale(0);
  animation: checkmark-appear 0.2s ease-out 0.2s forwards;
}

@keyframes checkmark-appear {
  to {
    transform: rotate(45deg) scale(1);
  }
}

@keyframes popIn {
  0% {
    transform: scale(0.5);
    opacity: 0;
  }
  100% {
    transform: scale(1);
    opacity: 1;
  }
}
