.modal {
  z-index: 999;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  display: flex;
  align-items: center;
  justify-content: center;

  background-color: white;

  @media (--screenLG) {
    display: block;
    background-color: rgba(0, 0, 0, 0.25);
  }
}

.modal__icon-wrapper {
  display: flex;
  justify-content: flex-end;
  width: 100%;
  height: auto;
  margin-top: 30px;

  & .modal__close-icon {
    height: 20px;
    width: 20px;
    stroke-width: 3px;
    cursor: pointer;
  }
}

.modal__container {
  outline: none;
  @media (--screenLG) {
    position: absolute;
    left: 0;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
  }
  @media (--maxScreenMD) {
    height: 100%;
  }
}

.modal__open .modal__content {
  animation-name: showModal;
  animation-timing-function: cubic-bezier(0, 0, 0.2, 1);
  animation-duration: 300ms;
  animation-fill-mode: both;
  will-change: transform, opacity;
}

.modal__close .modal__content {
  animation-name: hideModal;
  animation-timing-function: cubic-bezier(0.4, 0, 1, 1);
  opacity: 0;
  animation-duration: 300ms;
  animation-fill-mode: both;
  will-change: transform, opacity;
}

.modal__content {
  position: relative;
  background-color: white;
  overflow: auto;
  max-height: 100vh;

  & .modal__title-wrapper {
    display: flex;
    flex-direction: column;
    justify-content: center;
    text-align: center;
    margin-top: 20px;
    margin-bottom: 30px;

    & .modal__category-title {
      font-size: 16px;
    }
    & h2 {
      margin-top: 24px;
    }
  }
}

.modal__list {
  display: flex;
  flex-direction: column;

  & .modal__list-item {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    border: 1px solid #ededed;
    border-radius: 2px;
    padding-top: 20px;
    margin-bottom: 12px;

    @media (--screenLG) {
      flex-direction: row;
      padding: 25px 16px;
      justify-content: space-between;

      & h3 {
        width: 200px;
      }
      & div {
        max-width: 500px;
        flex-grow: 1;
      }
      & button {
        flex-shrink: 0;
      }
    }

    @media (--maxScreenMD) {
      text-align: center;
      & h3,
      & div,
      & button {
        margin-bottom: 20px;
        padding: 0 8px;
      }
    }

    & button {
      width: fit-content;
    }

    &:last-child {
      margin-bottom: 30px;
    }
  }
}

.modal__show-all {
  display: flex;
  flex-direction: row;
  align-items: center;
  width: max-content;
  margin-bottom: 150px;
  @media (--screenLG) {
    margin-bottom: 50px;
  }
  & .arrow__svg {
    height: 12px;
    transform: rotate(180deg);
    margin-left: 10px;
    font-size: 16px;
  }
}

@keyframes showModal {
  from {
    opacity: 0;
    transform: scale(0);
  }

  to {
    opacity: 1;
    transform: none;
  }
}

@keyframes hideModal {
  from {
    opacity: 1;
    transform: none;
  }

  to {
    opacity: 0;
    transform: scale(0);
  }
}
