/* OKKwork — popup «2 месяца в подарок»: раскладка, типографика, поля */

.okkwork-balance-gift-popup {
  position: fixed;
  inset: 0;
  z-index: 102200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  box-sizing: border-box;
  pointer-events: none;
  opacity: 0;
  visibility: hidden;
  transition:
    opacity 0.32s ease,
    visibility 0.32s ease;
}

.okkwork-balance-gift-popup.is-open {
  pointer-events: auto;
  opacity: 1;
  visibility: visible;
}

.okkwork-balance-gift-popup__backdrop {
  position: absolute;
  inset: 0;
  border: 0;
  padding: 0;
  margin: 0;
  background: rgba(15, 23, 42, 0.52);
  backdrop-filter: blur(6px);
  cursor: pointer;
  opacity: 0;
  transition: opacity 0.32s ease;
}

.okkwork-balance-gift-popup.is-open .okkwork-balance-gift-popup__backdrop {
  opacity: 1;
}

.okkwork-balance-gift-popup__dialog {
  position: relative;
  width: min(100%, 720px);
  max-height: min(92vh, 760px);
  overflow: hidden auto;
  border-radius: 20px;
  background: #fff;
  border: 1px solid rgba(6, 88, 162, 0.12);
  box-shadow:
    0 28px 64px rgba(6, 88, 162, 0.2),
    0 0 0 1px rgba(255, 255, 255, 0.85) inset;
  transform: translateY(20px) scale(0.96);
  opacity: 0;
  transition:
    transform 0.4s cubic-bezier(0.2, 0.9, 0.2, 1),
    opacity 0.32s ease;
  font-family: "Rubik", "Segoe UI", system-ui, sans-serif;
}

.okkwork-balance-gift-popup.is-open .okkwork-balance-gift-popup__dialog {
  transform: translateY(0) scale(1);
  opacity: 1;
}

.okkwork-balance-gift-popup__glow {
  position: absolute;
  inset: -30% -10% auto;
  height: 200px;
  background: radial-gradient(
    ellipse at 50% 0%,
    rgba(148, 216, 45, 0.28) 0%,
    rgba(46, 185, 122, 0.1) 42%,
    transparent 72%
  );
  pointer-events: none;
}

.okkwork-balance-gift-popup__sparkles {
  position: absolute;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
}

.okkwork-balance-gift-popup__sparkles span {
  position: absolute;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #94d82d;
  opacity: 0;
  animation: okkwork-gift-sparkle 3s ease-in-out infinite;
}

.okkwork-balance-gift-popup__sparkles span:nth-child(1) {
  top: 14%;
  left: 6%;
  animation-delay: 0s;
}

.okkwork-balance-gift-popup__sparkles span:nth-child(2) {
  top: 10%;
  right: 8%;
  animation-delay: 0.8s;
}

.okkwork-balance-gift-popup__sparkles span:nth-child(3) {
  top: 22%;
  left: 18%;
  width: 4px;
  height: 4px;
  animation-delay: 1.6s;
}

.okkwork-balance-gift-popup__sparkles span:nth-child(4) {
  top: 18%;
  right: 20%;
  width: 4px;
  height: 4px;
  animation-delay: 2.4s;
}

@keyframes okkwork-gift-sparkle {
  0%,
  100% {
    opacity: 0;
    transform: translateY(0);
  }

  50% {
    opacity: 0.55;
    transform: translateY(-6px);
  }
}

.okkwork-balance-gift-popup__close {
  position: absolute;
  top: 14px;
  right: 14px;
  z-index: 3;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border: 1px solid rgba(6, 88, 162, 0.12);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.92);
  color: rgba(72, 87, 101, 0.8);
  cursor: pointer;
  transition:
    background-color 0.15s ease,
    border-color 0.15s ease,
    transform 0.15s ease;
}

.okkwork-balance-gift-popup__close-icon {
  font-size: 20px;
  line-height: 1;
}

.okkwork-balance-gift-popup__close:hover {
  background: #fff;
  border-color: rgba(6, 88, 162, 0.22);
  transform: scale(1.04);
}

/* ——— Hero ——— */
.okkwork-balance-gift-popup__hero {
  position: relative;
  padding: 24px 28px 20px;
  border-bottom: 1px solid rgba(6, 88, 162, 0.08);
  background: linear-gradient(
    180deg,
    rgba(148, 216, 45, 0.12) 0%,
    rgba(255, 255, 255, 0) 100%
  );
}

.okkwork-balance-gift-popup__hero-inner {
  display: flex;
  align-items: center;
  gap: 18px;
  max-width: 100%;
}

.okkwork-balance-gift-popup__hero-icon {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 56px;
  height: 56px;
  border-radius: 16px;
  background: linear-gradient(145deg, #fff 0%, rgba(148, 216, 45, 0.2) 100%);
  border: 1px solid rgba(46, 185, 122, 0.2);
  box-shadow: 0 6px 18px rgba(46, 185, 122, 0.18);
  animation: okkwork-gift-icon-bounce 2.8s ease-in-out infinite;
}

@keyframes okkwork-gift-icon-bounce {
  0%,
  100% {
    transform: translateY(0);
  }

  50% {
    transform: translateY(-3px);
  }
}

.okkwork-balance-gift-popup__hero-icon img {
  width: 32px;
  height: 32px;
  object-fit: contain;
}

.okkwork-balance-gift-popup__hero-copy {
  flex: 1;
  min-width: 0;
  text-align: left;
}

.okkwork-balance-gift-popup__eyebrow {
  margin: 0 0 4px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #2eb97a;
  line-height: 1.2;
}

.okkwork-balance-gift-popup__title {
  margin: 0 0 6px;
  font-size: 24px;
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.01em;
  color: #0658a2;
}

.okkwork-balance-gift-popup__lead {
  margin: 0;
  font-size: 14px;
  font-weight: 400;
  line-height: 1.45;
  color: rgba(72, 87, 101, 0.82);
  max-width: 52ch;
}

/* ——— Body / layout ——— */
.okkwork-balance-gift-popup__body {
  padding: 0;
}

.okkwork-balance-gift-popup__layout {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
  gap: 0;
  align-items: stretch;
}

.okkwork-balance-gift-popup__section {
  padding: 22px 26px 26px;
  min-width: 0;
}

.okkwork-balance-gift-popup__section--steps {
  border-right: 1px solid rgba(6, 88, 162, 0.08);
  background: rgba(248, 250, 252, 0.65);
}

.okkwork-balance-gift-popup__section--form {
  background: #fff;
}

.okkwork-balance-gift-popup__section-head {
  margin-bottom: 16px;
}

.okkwork-balance-gift-popup__section-title {
  margin: 0 0 4px;
  font-size: 15px;
  font-weight: 700;
  line-height: 1.25;
  color: #0658a2;
  letter-spacing: -0.01em;
}

.okkwork-balance-gift-popup__section-lead {
  margin: 0;
  font-size: 12px;
  font-weight: 400;
  line-height: 1.35;
  color: rgba(72, 87, 101, 0.65);
}

/* ——— Steps ——— */
.okkwork-balance-gift-popup__steps {
  margin: 0;
  padding: 0;
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.okkwork-balance-gift-popup__step {
  position: relative;
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 11px 12px;
  border-radius: 12px;
  background: #fff;
  border: 1px solid rgba(6, 88, 162, 0.1);
  opacity: 0;
  transform: translateY(8px);
  animation: okkwork-gift-step-in 0.42s ease forwards;
  transition:
    border-color 0.18s ease,
    box-shadow 0.18s ease,
    transform 0.18s ease;
}

.okkwork-balance-gift-popup.is-open .okkwork-balance-gift-popup__step:nth-child(1) {
  animation-delay: 0.06s;
}

.okkwork-balance-gift-popup.is-open .okkwork-balance-gift-popup__step:nth-child(2) {
  animation-delay: 0.12s;
}

.okkwork-balance-gift-popup.is-open .okkwork-balance-gift-popup__step:nth-child(3) {
  animation-delay: 0.18s;
}

.okkwork-balance-gift-popup.is-open .okkwork-balance-gift-popup__step:nth-child(4) {
  animation-delay: 0.24s;
}

.okkwork-balance-gift-popup.is-open .okkwork-balance-gift-popup__step:nth-child(5) {
  animation-delay: 0.3s;
}

.okkwork-balance-gift-popup__step:hover {
  border-color: rgba(46, 185, 122, 0.28);
  box-shadow: 0 4px 14px rgba(6, 88, 162, 0.06);
  transform: translateY(-1px);
}

@keyframes okkwork-gift-step-in {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.okkwork-balance-gift-popup__step-num {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  border-radius: 8px;
  background: linear-gradient(135deg, #2eb97a, #0658a2);
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  line-height: 1;
}

.okkwork-balance-gift-popup__step-body {
  flex: 1;
  min-width: 0;
}

.okkwork-balance-gift-popup__step-title {
  display: block;
  font-size: 13px;
  font-weight: 600;
  line-height: 1.3;
  color: #485765;
  margin-bottom: 2px;
}

.okkwork-balance-gift-popup__step-desc {
  display: block;
  font-size: 12px;
  font-weight: 400;
  line-height: 1.4;
  color: rgba(72, 87, 101, 0.72);
}

.okkwork-balance-gift-popup__platforms {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 8px;
}

.okkwork-balance-gift-popup__platform {
  display: inline-flex;
  align-items: center;
  padding: 3px 8px;
  border-radius: 6px;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.02em;
  line-height: 1.2;
}

.okkwork-balance-gift-popup__platform--ig {
  background: rgba(225, 48, 108, 0.1);
  color: #c13584;
}

.okkwork-balance-gift-popup__platform--tg {
  background: rgba(0, 136, 204, 0.1);
  color: #0088cc;
}

.okkwork-balance-gift-popup__platform--rt {
  background: rgba(6, 88, 162, 0.1);
  color: #0658a2;
}

/* ——— Form ——— */
.okkwork-balance-gift-popup__section--form {
  opacity: 0;
  transform: translateX(10px);
  animation: okkwork-gift-form-in 0.45s ease 0.2s forwards;
}

@keyframes okkwork-gift-form-in {
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

.okkwork-balance-gift-popup__form {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.okkwork-balance-gift-popup__field {
  display: block;
}

.okkwork-balance-gift-popup__field-label {
  display: block;
  margin-bottom: 6px;
  font-size: 12px;
  font-weight: 600;
  line-height: 1.2;
  color: #0658a2;
}

.okkwork-balance-gift-popup__field-control {
  display: flex;
  align-items: stretch;
  min-height: 44px;
  border: 1px solid rgba(6, 88, 162, 0.18);
  border-radius: 10px;
  background: #fff;
  overflow: hidden;
  transition:
    border-color 0.15s ease,
    box-shadow 0.15s ease;
}

.okkwork-balance-gift-popup__field-control:focus-within {
  border-color: rgba(6, 88, 162, 0.45);
  box-shadow: 0 0 0 3px rgba(6, 88, 162, 0.08);
}

.okkwork-balance-gift-popup__field-badge {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.04em;
  border-right: 1px solid rgba(6, 88, 162, 0.08);
}

.okkwork-balance-gift-popup__field-badge--ig {
  background: rgba(225, 48, 108, 0.08);
  color: #c13584;
}

.okkwork-balance-gift-popup__field-badge--tg {
  background: rgba(0, 136, 204, 0.08);
  color: #0088cc;
}

.okkwork-balance-gift-popup__field-badge--rt {
  background: rgba(6, 88, 162, 0.08);
  color: #0658a2;
}

.okkwork-balance-gift-popup__field input {
  flex: 1;
  min-width: 0;
  height: 44px;
  padding: 0 12px;
  border: 0;
  background: transparent;
  font-family: inherit;
  font-size: 14px;
  font-weight: 400;
  color: #485765;
}

.okkwork-balance-gift-popup__field input:focus {
  outline: none;
}

.okkwork-balance-gift-popup__field input::placeholder {
  color: rgba(72, 87, 101, 0.42);
  font-size: 13px;
}

.okkwork-balance-gift-popup__form-actions {
  margin-top: 4px;
}

.okkwork-balance-gift-popup__submit {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 46px;
  border: 0;
  border-radius: 12px;
  background: linear-gradient(135deg, #2eb97a 0%, #0658a2 100%);
  color: #fff;
  font-family: inherit;
  font-size: 15px;
  font-weight: 700;
  line-height: 1;
  cursor: pointer;
  box-shadow: 0 8px 20px rgba(6, 88, 162, 0.22);
  transition:
    transform 0.15s ease,
    box-shadow 0.15s ease,
    filter 0.15s ease;
}

.okkwork-balance-gift-popup__submit-text {
  position: relative;
}

.okkwork-balance-gift-popup__submit:hover {
  transform: translateY(-1px);
  box-shadow: 0 10px 26px rgba(46, 185, 122, 0.28);
  filter: brightness(1.03);
}

.okkwork-balance-gift-popup__submit:active {
  transform: translateY(0);
}

.okkwork-balance-gift-popup__form-hint {
  margin: 10px 0 0;
  font-size: 11px;
  font-weight: 400;
  line-height: 1.4;
  text-align: center;
  color: rgba(72, 87, 101, 0.55);
}

/* ——— Success ——— */
.okkwork-balance-gift-popup__success {
  padding: 40px 32px 32px;
  text-align: center;
}

.okkwork-balance-gift-popup__success-icon {
  font-size: 48px;
  line-height: 1;
  margin-bottom: 12px;
  animation: okkwork-gift-success-pop 0.5s cubic-bezier(0.2, 0.9, 0.2, 1);
}

@keyframes okkwork-gift-success-pop {
  0% {
    transform: scale(0.4);
    opacity: 0;
  }

  70% {
    transform: scale(1.1);
  }

  100% {
    transform: scale(1);
    opacity: 1;
  }
}

.okkwork-balance-gift-popup__success-title {
  margin: 0 0 8px;
  font-size: 22px;
  font-weight: 700;
  color: #0658a2;
}

.okkwork-balance-gift-popup__success-text {
  margin: 0 0 20px;
  font-size: 14px;
  line-height: 1.45;
  color: #485765;
  max-width: 36ch;
  margin-left: auto;
  margin-right: auto;
}

body.okkwork-balance-gift-popup-open {
  overflow: hidden;
}

@media (max-width: 680px) {
  .okkwork-balance-gift-popup {
    padding: 12px;
    align-items: flex-end;
  }

  .okkwork-balance-gift-popup__dialog {
    width: 100%;
    max-height: 94vh;
    border-radius: 18px 18px 0 0;
  }

  .okkwork-balance-gift-popup__hero {
    padding: 20px 20px 16px;
  }

  .okkwork-balance-gift-popup__hero-inner {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
  }

  .okkwork-balance-gift-popup__title {
    font-size: 22px;
  }

  .okkwork-balance-gift-popup__layout {
    grid-template-columns: 1fr;
  }

  .okkwork-balance-gift-popup__section--steps {
    border-right: 0;
    border-bottom: 1px solid rgba(6, 88, 162, 0.08);
    padding: 18px 20px 20px;
  }

  .okkwork-balance-gift-popup__section--form {
    padding: 18px 20px 22px;
    animation: none;
    opacity: 1;
    transform: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  .okkwork-balance-gift-popup,
  .okkwork-balance-gift-popup__dialog,
  .okkwork-balance-gift-popup__backdrop,
  .okkwork-balance-gift-popup__step,
  .okkwork-balance-gift-popup__section--form,
  .okkwork-balance-gift-popup__hero-icon,
  .okkwork-balance-gift-popup__sparkles span,
  .okkwork-balance-gift-popup__success-icon {
    animation: none !important;
    transition: none !important;
  }

  .okkwork-balance-gift-popup.is-open .okkwork-balance-gift-popup__step,
  .okkwork-balance-gift-popup__section--form {
    opacity: 1;
    transform: none;
  }
}
