.rpj-popup * {
  box-sizing: border-box;
}

.rpj-popup {
  position: fixed;
  inset: 0;
  z-index: 999999;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 18px;
  font-family: Arial, Helvetica, sans-serif;
}

.rpj-popup.is-open {
  display: flex;
}

.rpj-popup__overlay {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, 0.72);
  backdrop-filter: blur(3px);
}

.rpj-popup__box {
  position: relative;
  width: min(920px, 100%);
  max-height: calc(100vh - 36px);
  overflow: auto;
  background: #ffffff;
  border-radius: 8px;
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.3);
  display: grid;
  grid-template-columns: 1fr 1.05fr;
}

.rpj-popup__promo {
  color: #ffffff;
  padding: 32px;
  background:
    linear-gradient(160deg, rgba(20, 83, 45, 0.94), rgba(10, 54, 35, 0.95)),
    url("https://images.unsplash.com/photo-1500530855697-b586d89ba3ee?auto=format&fit=crop&w=1000&q=80");
  background-size: cover;
  background-position: center;
}

.rpj-popup__tag {
  display: inline-flex;
  padding: 8px 11px;
  border: 1px solid rgba(255, 255, 255, 0.32);
  border-radius: 999px;
  font-size: 13px;
  font-weight: 700;
  background: rgba(255, 255, 255, 0.12);
}

.rpj-popup__promo h2 {
  margin: 20px 0 12px;
  color: #ffffff;
  font-size: clamp(26px, 4vw, 42px);
  line-height: 1.06;
}

.rpj-popup__promo p {
  margin: 0;
  color: rgba(255, 255, 255, 0.9);
  font-size: 16px;
  line-height: 1.55;
}

.rpj-popup__points {
  display: grid;
  gap: 11px;
  margin: 24px 0 0;
  padding: 0;
  list-style: none;
}

.rpj-popup__points li {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  font-size: 14px;
  line-height: 1.4;
}

.rpj-popup__check {
  flex: 0 0 auto;
  width: 21px;
  height: 21px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: #d99a28;
  color: #132016;
  font-weight: 900;
}

.rpj-popup__formwrap {
  position: relative;
  padding: 30px;
}

.rpj-popup__close {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 36px;
  height: 36px;
  border: 0;
  border-radius: 50%;
  cursor: pointer;
  color: #273444;
  background: #eef2f6;
  font-size: 24px;
  line-height: 1;
}

.rpj-popup__title {
  padding-right: 38px;
}

.rpj-popup__title h3 {
  margin: 0 0 8px;
  color: #1f2933;
  font-size: 24px;
  line-height: 1.2;
}

.rpj-popup__title p {
  margin: 0 0 18px;
  color: #5f6b7a;
  font-size: 14px;
  line-height: 1.5;
}

.rpj-form {
  display: grid;
  gap: 13px;
}

.rpj-form__row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.rpj-form label {
  display: grid;
  gap: 6px;
  color: #273444;
  font-size: 13px;
  font-weight: 700;
}

.rpj-form input,
.rpj-form select,
.rpj-form textarea {
  width: 100%;
  border: 1px solid #dbe3ea;
  border-radius: 6px;
  padding: 12px;
  color: #152238;
  background: #ffffff;
  font-size: 15px;
  outline: none;
}

.rpj-form input:focus,
.rpj-form select:focus,
.rpj-form textarea:focus {
  border-color: #d99a28;
  box-shadow: 0 0 0 3px rgba(217, 154, 40, 0.18);
}

.rpj-form textarea {
  min-height: 82px;
  resize: vertical;
}

.rpj-form__note {
  margin: -2px 0 0;
  color: #667085;
  font-size: 12px;
  line-height: 1.4;
}

.rpj-form__submit {
  width: 100%;
  border: 0;
  border-radius: 6px;
  padding: 14px 18px;
  cursor: pointer;
  color: #ffffff;
  background: linear-gradient(135deg, #14532d, #0f7a42);
  font-size: 16px;
  font-weight: 800;
}

.rpj-form__message {
  display: none;
  margin: 0;
  padding: 11px 12px;
  border-radius: 6px;
  font-size: 14px;
  line-height: 1.4;
}

.rpj-form__message.is-success {
  display: block;
  color: #14532d;
  background: #dcfce7;
  border: 1px solid #86efac;
}

.rpj-form__message.is-error {
  display: block;
  color: #7f1d1d;
  background: #fee2e2;
  border: 1px solid #fca5a5;
}

@media (max-width: 760px) {
  .rpj-popup {
    padding: 10px;
    align-items: flex-start;
  }

  .rpj-popup__box {
    grid-template-columns: 1fr;
    max-height: calc(100vh - 20px);
  }

  .rpj-popup__promo,
  .rpj-popup__formwrap {
    padding: 22px;
  }

  .rpj-form__row {
    grid-template-columns: 1fr;
  }
}
