@use "../../index.scss" as styles;

.overlay {
  height: 100%;
  width: 100%;
  position: absolute;
  top: 0;
  left: 0;
  z-index: 100;
  background-color: styles.$color-base-overlay-gray;
}

.modal {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, 100%);
  width: 100%;
  max-width: 700px;
  height: 665px;
  z-index: 120;
  border: 4px solid styles.$color-base-dark-gray-four;
  transition: all 0.4s ease-in-out;
  opacity: 0;
  display: flex;
  flex-direction: column;

  &.modal-enter {
    transform: translate(-50%, -50%);
    opacity: 1;
  }

  &.modal-exit {
    transform: translate(-50%, 100%);
    opacity: 0;
  }
}

.modal-header {
  display: flex;
  justify-content: flex-start;
  flex-direction: row;
  align-items: center;
  background-color: styles.$color-base-gray;
  padding: 16px 30px;
  width: 100%;

  @media screen and (max-width: 450px) {
    padding-left: 15px;
    padding-right: 15px;
  }
}

.modal-header-wrapper {
  width: 100%;
  display: flex;
  justify-content: space-between;
  flex-direction: row;
  align-items: center;
}

.modal-title {
  font-size: 24px;

  @media screen and (max-width: 450px) {
    font-size: 22px;
    width: 80%;
  }
}

.modal-close-button {
  background-color: transparent;
  outline: none;
  border: none;
  display: flex;
  place-content: center;
  justify-content: center;
  align-items: center;
  padding: 5px;
  color: styles.$color-base-dark-gray;

  &:hover {
    cursor: pointer;
    background-color: styles.$color-base-dark-gray-two;
    color: white;
  }
}

.modal-body {
  flex: 1;
  width: 100%;
  overflow-x: hidden;
  overflow-y: scroll;
  background-color: styles.$color-base-dark-gray-three;
  border: 6px solid styles.$color-base-dark-gray-two;

  &::-webkit-scrollbar {
    width: 12px;
  }

  &::-webkit-scrollbar-track {
    background-color: styles.$color-base-gray;
  }

  &::-webkit-scrollbar-thumb {
    border: 2px solid styles.$color-base-dark-gray-four;
    background-color: styles.$color-base-gray;
    box-shadow: inset 0px 2px #ffffffc0, inset 0px -2px #323232c0;
  }
}
