.modal-no-scroll {
  overflow: hidden;
}
.c-modal-overlay {
  position: fixed;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  background-color: rgba(0, 0, 0, 0.4);
  z-index: 1000;
  overflow: auto;
}

.c-modal {
  position: relative;
  max-width: 500px;
  width: 100%;
  padding: 3rem 2rem;
  background-color: #fff;
  border-radius: 20px;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
}

.c-modal__close {
  position: absolute;
  top: 1.5rem;
  right: 1.5rem;
  background: transparent;
  border: none;
  line-height: 1;
  cursor: pointer;
  width: 18px;
  height: 18px;
}

.c-modal__close span {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 18px;
  height: 1.5px;
  background: #434343;
  transform-origin: center;
}

.c-modal__close span:first-child {
  transform: translate(-50%, -50%) rotate(45deg);
}

.c-modal__close span:last-child {
  transform: translate(-50%, -50%) rotate(-45deg);
}

.c-modal__close.active span:first-child {
  animation:
    line1-rotate 0.3s ease forwards,
    shrinkLine 0.3s ease 0.3s forwards;
}

.c-modal__close.active span:last-child {
  animation:
    line2-rotate 0.3s ease forwards,
    shrinkLine 0.3s ease 0.3s forwards;
}

@keyframes line1-rotate {
  0% {
    transform: translate(-50%, -50%) rotate(45deg);
  }

  100% {
    transform: translate(-50%, -50%) rotate(90deg);
  }
}

@keyframes line2-rotate {
  0% {
    transform: translate(-50%, -50%) rotate(-45deg);
  }

  100% {
    transform: translate(-50%, -50%) rotate(-90deg);
  }
}

@keyframes shrinkLine {
  0% {
    width: 18px;
    opacity: 1;
  }

  50% {
    width: 8px;
    opacity: 1;
  }

  100% {
    width: 8px;
    opacity: 0;
  }
}