: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;
}

/* buttons */

.ruby-button{
  display: flex;
  flex-direction: row;
  justify-content: center;
  align-items: center;
  padding: 4px;

  width: 100%;
  max-width: 240px;
  min-width: 140px;
  height: 40px;
  background-color: var(--ruby-color-1);
  border-radius: 5px;
  user-select: none;

  border: none;
  font-family: 'Montserrat';
  font-style: normal;
  font-weight: 700;
  font-size: 16px;
  line-height: 1;
  color: #FFFFFF;
  cursor: pointer;
  transition: opacity 0.4s cubic-bezier(.8,0,.2,1), background-color 0.4s cubic-bezier(.8,0,.2,1), color 0.4s cubic-bezier(.8,0,.2,1);
}
.ruby-button:hover,
.ruby-button:active{
  background-color: var(--ruby-color-2);
}

.ruby-button--white{
  background-color: #fff;
  border: 1px solid #F2F2F2;
  color: #000;
}
.ruby-button--white:hover,
.ruby-button--white:active{
  color: #fff;
  background-color: var(--ruby-color-1);
}

.ruby-button[disabled] {
  background-color: var(--ruby-color-3);
  color: #fff;
  pointer-events: none;
}

/* buttons end */

/* counter */

.ruby-counter{
  display: flex;
  flex-direction: row;
  align-items: stretch;
  justify-content: space-between;
  background: #FFFFFF;
  border: 1px solid var(--ruby-color-6);
  border-radius: 5px;
  min-width: 140px;
  max-width: 140px;
}
.ruby-counter__button{
  width: 30px;
  height: 38px;
  background-color: #fff;
  border: none;
  flex-shrink: 0;
  cursor: pointer;
}
.ruby-counter__button:hover,
.ruby-counter__button:active{
  background-color: var(--ruby-color-5);
}
.ruby-counter__button--minus{
  background-image: url(../img/ruby/minus-icon.svg);
  background-repeat: no-repeat;
  background-position: center;
}
.ruby-counter__button--plus{
  background-image: url(../img/ruby/plus-icon.svg);
  background-repeat: no-repeat;
  background-position: center;
}
.ruby-counter__button--disabled,
.ruby-counter__button:disabled{
  opacity: 0.3;
}
.ruby-counter__input{
  appearance: none;
  -moz-appearance: textfield;
  text-align: center;
  width: 100%;
  display: block;
  height: inherit;
  border: none;
  font-family: 'Montserrat';
  font-style: normal;
  font-weight: 600;
  font-size: 16px;
  outline-color: var(--ruby-color-4);
  color: #000000;
}
.ruby-counter__input::-webkit-inner-spin-button,
.ruby-counter__input::-webkit-outer-spin-button {
  -webkit-appearance: none;
  margin: 0;
}
.ruby-counter__warning-text{
  visibility: hidden;
  opacity: 1;
  position: absolute;
  transform: translateY(5%);
  width: 133px;
  height: 42px;
  background: #FFFFFF;
  box-shadow: 0px 15px 15px -10px rgba(0, 0, 0, 0.1);
  border-radius: 5px;
  font-family: 'Montserrat';
  font-style: normal;
  font-weight: 600;
  font-size: 14px;
  text-align: center;
  color: var(--ruby-color-1);
  transition: transform 0.4s ease-out, opacity 0.4s ease-out;
}
.ruby-counter__warning-text::after{
  content: "";
  display: block;
  width: 15px;
  height: 15px;
  background-color: #fff;
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translate(-50%, 50%) rotate(45deg);
}
.ruby-counter__warning-text--visible{
  visibility: visible;
  opacity: 1;
  transform: translateY(-110%);
}

/* counter end */

/* modal */

.ruby-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;
}

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

.ruby-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;
}

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

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

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

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

.ruby-modal__sub-title {
  font-weight: 600;
  font-size: 18px;
  text-align: center;
  color: var(--ruby-color-3);
}

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

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

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

.ruby-modal__footer {
  border-top: 1px solid var(--ruby-color-5);
  margin-top: 30px;
  padding-right: 28px;
  min-height: 60px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

@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 */