/******************************
Entry Button
******************************/

.point-entry-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 0 16px;
}

.rcEntryButton-button.point-entry-btn__button {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  max-width: 480px;
  border-color: #bf0000;
  background-color: #bf0000;
  border-width: 0;
  color: #fff;
  border-radius: 36px;
  font-size: 20px;
  font-weight: 600;
  box-shadow: 0 2px 8px 0 #0003;
}

/* Button height for both test and control paths */
.point-entry-btn.rcEntryButton .rcEntryButton-button {
  height: 72px;
}

/* Normal disabled state */
.rcEntryButton-button.point-entry-btn__button:disabled {
  opacity: 1;
  border-color: #ffbebe;
  background-color: #ffbebe;
  color: #fff;
  box-shadow: none;
  font-weight: 400;
}

/* Disabled due to a state */
[class*='rcEntryButton-status--'] .rcEntryButton-button.point-entry-btn__button:disabled {
  border-color: #f3f3f3;
  background-color: #f3f3f3;
  color: #717171;
}

.rcEntryButton-status--applied .rcEntryButton-button.point-entry-btn__button:disabled {
  border-color: #ebf7ec;
  background-color: #ebf7ec;
  color: #069907;
}

.point-entry-btn__icon {
  height: 24px;
  width: auto;
}

.point-entry-btn__default,
.point-entry-btn__applied,
.point-entry-btn__entered,
.point-entry-btn__closed,
.point-entry-btn__before,
.point-entry-btn__loading,
.point-entry-btn__notfound {
  display: none;
  width: 0;
}

/*
1. Show default when the container does not have any status modifier
2. Show the button contents based on the container status
 */

.point-entry-btn:not([class*='rcEntryButton-status--']) .point-entry-btn__default,
.rcEntryButton-status--loading .point-entry-btn__loading,
.rcEntryButton-status--applied .point-entry-btn__applied,
.rcEntryButton-status--entered .point-entry-btn__entered,
.rcEntryButton-status--closed .point-entry-btn__closed,
.rcEntryButton-status--before .point-entry-btn__before,
.rcEntryButton-status--notfound .point-entry-btn__notfound {
  display: flex;
  gap: 8px;
  width: auto;
  align-items: center;
}

.rcEntryButton-status--applied .point-entry-btn__applied {
  animation: roll-in 0.6s linear;
}

.point-entry-btn__loading-spinner {
  display: block;
  width: 32px;
  height: 32px;
  animation: spinner 0.6s linear infinite;
}

/* Checkbox Label */
.point-entry-btn .rcEntryButton-checkbox__label {
  align-items: center;
}

.point-entry-btn .rcEntryButton-checkbox {
  padding: initial;
  background: none;
}

.point-entry-button__checkbox-label {
  margin-left: 5px;
}

/* Checkbox Size */
.rcEntryButton.point-entry-btn .rcEntryButton-checkbox__check {
  width: 20px;
  height: 20px;
}

.rcEntryButton.point-entry-btn .rcEntryButton-checkbox__check::after {
  width: 7px;
  height: 12px;
  top: 2px;
}

/******************************
Bubble
******************************/

.point-entry-bubble {
  display: none;
  background-color: #fff9c8;
  width: 100%;
  max-width: 600px;
  border-radius: 8px;
  position: relative;
  filter: drop-shadow(0 1px 12px #0003);
  margin: 0 auto 28px;
  text-align: center;
  padding: 20px 0;
}

/* 
  Fix for Safari shadow glitch.
  Targets only Safari, since this property is potentially expensive to have.
  https://developer.mozilla.org/en-US/docs/Web/CSS/will-change
  https://stackoverflow.com/questions/56478925/safari-drop-shadow-filter-remains-visible-even-with-hidden-element
  */
@supports (-webkit-appearance: none) and (stroke-color: transparent) {
  .point-entry-bubble {
    will-change: filter;
  }
}

.point-entry-bubble::before {
  display: block;
  content: '';
  background-color: #fff9c8;
  position: absolute;
  width: 52px;
  height: 24px;
  left: 50%;
  margin-left: -26px;
  bottom: -13px;
  clip-path: polygon(0% 0%, 100% 0, 50% 100%);
}

/* Show the bubble only when the user has not entered yet and the checkbox is not checked */
.point-entry-btn:not([class*='rcEntryButton-status--']) .point-entry-bubble:not(:has(~ .rcEntryButton-checkbox input:checked)) {
  display: block;
}

.point-entry-bubble__row {
  font-size: 20px;
  display: block;
}

.point-entry-bubble__row--top {
  font-size: 24px;
  color: #34466c;
}

.point-entry-bubble__row--main {
  font-weight: 600;
  font-size: 28px;
  letter-spacing: -2%;
}

.point-entry-bubble__sub {
  font-size: 20px;
}

.point-entry-bubble__row--main .point-entry-bubble__sub {
  font-size: 24px;
}

.point-entry-bubble__highlight {
  color: #bf0000;
}

/******************************
Modal
******************************/

.point-entry-modal__wrapper {
  width: 500px;
}

.point-entry-modal__content {
  padding: 0;
  display: flex;
  flex-direction: column;
  border-radius: 16px;
}

.point-entry-modal__head {
  background-color: #fff7d6;
  border-radius: 16px 16px 0 0;
  height: 261px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
}

.point-entry-modal__img {
  display: block;
  width: 140px;
  margin: 0 0 14px -4px;
}

.point-entry-modal__text {
  font-size: 16px;
  line-height: 1.6;
  font-weight: 500;
  text-align: center;
  letter-spacing: -5%;
}

.point-entry-modal__subtitle {
  color: #34466c;
}

.point-entry-modal__text-small {
  font-size: 14px;
}

.point-entry-modal__text-large {
  font-size: 20px;
  font-weight: 600;
}

.point-entry-modal__highlight {
  color: #bf0000;
}

.point-entry-modal__coin {
  display: inline-block;
  height: 20px;
  width: auto;
  vertical-align: text-bottom;
  margin-right: 4px;
}

.point-entry-modal__footer {
  color: #bf0000;
  text-align: center;
  font-size: 14px;
  padding: 24px;
}

.point-entry-modal__bottom {
  padding: 0 24px 24px;
}

.point-entry-modal__close {
  width: 100%;
  height: 48px;
  border-radius: 24px;
  border: 1px solid #00000014;
  background-color: #f7f7f7;
  color: #333;
  font-size: 14px;
  font-weight: 600;
}

/******************************
Login Button
******************************/

.point-poc-login-btn {
  display: flex;
  align-items: center;
  text-align: center;
  width: 100%;
  max-width: 480px;
  height: 72px;
  font-size: 22px;
  margin: 0 auto;
  border-color: #bf0000;
  color: #bf0000;
  font-weight: 700;
  box-shadow: 0 1px 7px rgb(0 0 0 / 15%);
}

@media (hover: hover) {
  .point-poc-login-btn:hover {
    color: #bf0000;
  }
}

.point-poc-login-btn:visited {
  color: #bf0000;
}

/******************************
Animations
******************************/

/* Animation for the transition to the applied state */
@keyframes roll-in {
  0% {
    display: none;
    width: 0;
    clip-path: polygon(50% 0, 50% 0, 50% 100%, 50% 100%);
  }

  0.1% {
    display: flex;
    width: auto;
    clip-path: polygon(50% 0, 50% 0, 50% 100%, 50% 100%);
  }

  100% {
    clip-path: polygon(0 0, 100% 0, 100% 100%, 0 100%);
  }
}

@keyframes spinner {
  0% {
    transform: rotate(0deg);
  }

  100% {
    transform: rotate(360deg);
  }
}
