/* Модальное окно благодарности в стилистике CKR Loyalty */
body.thanks-modal-open {
  overflow: hidden;
  padding-right: var(--thanks-scrollbar-width, 0px);
}

.thanks-modal {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: grid;
  place-items: center;
  padding: 24px;
  visibility: hidden;
  opacity: 0;
  pointer-events: none;
  transition: visibility .3s ease, opacity .3s ease;
}

.thanks-modal.is-open {
  visibility: visible;
  opacity: 1;
  pointer-events: auto;
}

.thanks-modal__overlay {
  position: absolute;
  inset: 0;
  background: rgba(6, 10, 24, .76);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
}

.thanks-modal__dialog {
  position: relative;
  width: min(100%, 570px);
  max-height: calc(100vh - 48px);
  /* overflow: auto; */
  overflow: hidden;
  padding: 52px 48px 44px;
  color: #fff;
  background:
    radial-gradient(circle at 92% 8%, rgba(120, 169, 255, .22), transparent 30%),
    linear-gradient(145deg, #0d1530 0%, #111d40 62%, #1b2d60 100%);
  border: 1px solid rgba(255, 255, 255, .13);
  border-radius: 30px;
  box-shadow: 0 38px 110px rgba(0, 0, 0, .44);
  text-align: center;
  transform: translateY(22px) scale(.97);
  transition: transform .35s cubic-bezier(.2, .75, .2, 1);
  isolation: isolate;
}

.thanks-modal.is-open .thanks-modal__dialog {
  transform: translateY(0) scale(1);
}

.thanks-modal__dialog:focus {
  outline: none;
}

.thanks-modal__decor {
  position: absolute;
  z-index: -1;
  border-radius: 50%;
  pointer-events: none;
}

.thanks-modal__decor--one {
  top: -90px;
  right: -70px;
  width: 220px;
  height: 220px;
  background: rgba(165, 138, 255, .16);
}

.thanks-modal__decor--two {
  left: -95px;
  bottom: -120px;
  width: 245px;
  height: 245px;
  background: rgba(255, 201, 40, .1);
}

.thanks-modal__close {
  position: absolute;
  top: 18px;
  right: 18px;
  width: 42px;
  height: 42px;
  padding: 0;
  color: rgba(255, 255, 255, .76);
  background: rgba(255, 255, 255, .07);
  border: 1px solid rgba(255, 255, 255, .12);
  border-radius: 13px;
  cursor: pointer;
  transition: color .2s ease, background .2s ease, transform .2s ease;
}

.thanks-modal__close:hover {
  color: #fff;
  background: rgba(255, 255, 255, .13);
  transform: rotate(4deg);
}

.thanks-modal__close span {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 17px;
  height: 2px;
  background: currentColor;
  border-radius: 2px;
}

.thanks-modal__close span:first-child {
  transform: translate(-50%, -50%) rotate(45deg);
}

.thanks-modal__close span:last-child {
  transform: translate(-50%, -50%) rotate(-45deg);
}

.thanks-modal__icon {
  width: 84px;
  height: 84px;
  display: grid;
  place-items: center;
  margin: 0 auto 24px;
  color: #111a3b;
  background: #ffc928;
  border: 9px solid rgba(255, 201, 40, .14);
  border-radius: 27px;
  box-shadow: 0 20px 45px rgba(255, 201, 40, .18);
}

.thanks-modal__icon svg {
  width: 47px;
  height: 47px;
}

.thanks-modal__eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 13px;
  color: rgba(255, 255, 255, .58);
  font-size: 11px;
  font-weight: 850;
  letter-spacing: .12em;
  text-transform: uppercase;
}

.thanks-modal__eyebrow::before {
  content: "";
  width: 7px;
  height: 7px;
  background: #ffc928;
  border-radius: 50%;
  box-shadow: 0 0 0 5px rgba(255, 201, 40, .11);
}

.thanks-modal h2 {
  margin: 0;
  font-size: clamp(34px, 6vw, 48px);
  line-height: 1.04;
  letter-spacing: -.045em;
}

.thanks-modal__dialog > p {
  max-width: 440px;
  margin: 18px auto 0;
  color: rgba(255, 255, 255, .65);
  font-size: 15px;
  line-height: 1.65;
}

.thanks-modal__steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin-top: 30px;
}

.thanks-modal__steps > div {
  min-width: 0;
  padding: 16px 12px;
  background: rgba(255, 255, 255, .055);
  border: 1px solid rgba(255, 255, 255, .09);
  border-radius: 16px;
  text-align: left;
}

.thanks-modal__steps span {
  display: block;
  margin-bottom: 14px;
  color: #ffc928;
  font-size: 10px;
  font-weight: 900;
}

.thanks-modal__steps p {
  margin: 0;
  color: rgba(255, 255, 255, .72);
  font-size: 11px;
  line-height: 1.45;
}

.thanks-modal__button {
  width: 100%;
  min-height: 54px;
  margin-top: 24px;
  padding: 0 22px;
  color: #111a3b;
  background: #ffc928;
  border: 0;
  border-radius: 15px;
  font: inherit;
  font-weight: 850;
  cursor: pointer;
  box-shadow: 0 13px 32px rgba(255, 201, 40, .17);
  transition: background .2s ease, transform .2s ease;
}

.thanks-modal__button:hover {
  background: #ffd44f;
  transform: translateY(-2px);
}

@media (max-width: 620px) {
  .thanks-modal {
    align-items: end;
    padding: 10px;
  }

  .thanks-modal__dialog {
    width: 100%;
    max-height: calc(100dvh - 20px);
    padding: 46px 20px 24px;
    border-radius: 26px;
  }

  .thanks-modal__close {
    top: 14px;
    right: 14px;
  }

  .thanks-modal__icon {
    width: 72px;
    height: 72px;
    margin-bottom: 20px;
    border-radius: 23px;
  }

  .thanks-modal h2 {
    font-size: 34px;
  }

  .thanks-modal__dialog > p {
    font-size: 14px;
  }

  .thanks-modal__steps {
    grid-template-columns: 1fr;
    gap: 8px;
    margin-top: 22px;
  }

  .thanks-modal__steps > div {
    display: grid;
    grid-template-columns: 28px 1fr;
    gap: 8px;
    align-items: start;
    padding: 12px 14px;
  }

  .thanks-modal__steps span {
    margin: 1px 0 0;
  }
}

@media (prefers-reduced-motion: reduce) {
  .thanks-modal,
  .thanks-modal__dialog,
  .thanks-modal__close,
  .thanks-modal__button {
    transition: none;
  }
}
