:root{
  --ruby-color-1: #B12535;
  --ruby-color-2: #B2686A;
  --ruby-color-3: #7D858C;
  --ruby-color-4: #AAAFB3;
  --ruby-color-5: #E2E7E9;
  --ruby-color-6: #E5EAEC;
}

/* modal */

.base-modal {
  position: fixed;
  inset: 0;
  display: none;
  width: 100%;
  height: 100%;
  background: rgb(0 0 0 / 30%);
  z-index: 999;
  user-select: none;
  animation: display-hide 0.4s cubic-bezier(.8, 0, .2, 1) forwards;
}

.base-modal--visible {
  display: flex;
  animation: display-show 0.4s cubic-bezier(.8, 0, .2, 1) forwards;
}

.base-modal__content {
  position: relative;
  border-radius: 10px;
  width: 100%;
  max-width: min(945px, 90vw);
  margin: auto;
  padding: 20px 30px;
  background-color: #fff;
  animation: fadeDown 0.4s cubic-bezier(.8,0,.2,1) forwards;
}

.w-500 .base-modal__content {
  max-width: 500px;
}

.base-modal--visible .base-modal__content{
  animation: fadeUp 0.4s cubic-bezier(.8,0,.2,1) forwards;
}

.base-modal__close {
  position: absolute;
  top: 25px;
  right: 30px;
  background-color: transparent;
  border: none;
  background-image: url(img/icon-close.svg);
  background-position: center;
  background-repeat: no-repeat;
  background-size: 100%;
  width: 13px;
  height: 13px;
  cursor: pointer;
}
.base-modal__close:hover {
  filter: brightness(0);
}

.base-modal__header {
  margin-bottom: 10px;
  border-bottom: 1px solid #E2E7E9;
  padding-bottom: 10px;
}

.base-modal__title {
  font-weight: 700;
  font-size: 24px;
  text-align: center;
  color: #000000;
  margin-right: 20px;
}

.base-modal__body {
  display: flex;
  flex-direction: column;
  overflow-y: auto;
  max-height: min(650px,80vh);
  min-height: 150px;
  scrollbar-color: var(--ruby-color-1) var(--ruby-color-5);
  scrollbar-width: thin;
  scroll-snap-type: y mandatory;
  scrollbar-gutter: stable;
}

.base-modal__body::-webkit-scrollbar {
  width: 5px;
  background-color: var(--ruby-color-5);
}
.base-modal__body::-webkit-scrollbar-thumb {
  background-color: var(--ruby-color-1);
}

.base-modal__body::-webkit-scrollbar-track {
  background-color: var(--ruby-color-5);
}

@keyframes fadeUp {
  from {
    transform: translateY(200%);
  }
  to {
    transform: translateY(0);
  }
}
@keyframes fadeDown {
  from {
    transform: translateY(0);
  }
  to {
    transform: translateY(200%);
  }
}

@keyframes display-show {
  from {
    opacity: 0;
  }

  to {
    opacity: 1;
  }
}

@keyframes display-hide {
  from {
    display: flex;
    opacity: 1;
  }

  to {
    display: none;
    opacity: 0;
  }
}

/* modal end */

