.sp-overlay, .sp-overlay *, .sp-overlay *::before, .sp-overlay *::after,
#sp-gift, #sp-gift * {
  box-sizing: border-box;
}

:root {
  --sp-green: #81B644;
  --sp-green-dark: #6C9B36;
  --sp-ink: #1a1a1a;
  --sp-line: #D5D5D5;
  --sp-muted: #6b6b6b;
  --sp-radius: 18px;
}

.sp-overlay {
  position: fixed; inset: 0; background: rgba(0,0,0,.5);
  z-index: 999998; display: none; align-items: center; justify-content: center;
  padding: 20px; font-family: 'Ubuntu', sans-serif; -webkit-font-smoothing: antialiased;
}
.sp-overlay.sp-open { display: flex; animation: sp-fade .25s ease; }
@keyframes sp-fade { from { opacity: 0 } to { opacity: 1 } }

.sp-modal {
  background: #fff; width: 100%; max-width: 940px; max-height: 92vh;
  display: flex; position: relative; overflow: hidden;
  border-radius: var(--sp-radius);
  box-shadow: 0 24px 64px rgba(0,0,0,.28);
  animation: sp-rise .35s cubic-bezier(.16,1,.3,1);
}
@keyframes sp-rise {
  from { opacity: 0; transform: translateY(18px) }
  to { opacity: 1; transform: translateY(0) }
}

.sp-close {
  position: absolute; top: 16px; right: 18px; width: 34px; height: 34px;
  background: none; border: none; cursor: pointer; z-index: 4; padding: 0;
  display: flex; align-items: center; justify-content: center;
  color: #fff; opacity: .9; transition: opacity .2s, transform .2s;
}
.sp-close:hover { opacity: 1; transform: scale(1.08); }
.sp-close:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }
.sp-close svg { width: 22px; height: 22px; }

.sp-body {
  flex: 0 0 50%; max-width: 50%; min-width: 0;
  padding: 56px 48px 52px;
  display: flex; flex-direction: column; justify-content: center;
  text-align: center;
}
.sp-inner { max-width: 400px; margin: 0 auto; width: 100%; }

.sp-photo {
  flex: 0 0 50%; max-width: 50%; min-width: 0; min-height: 520px;
  background-size: cover; background-position: center; background-repeat: no-repeat;
  background-color: #e7e2ee;
}

.sp-step { display: none; }
.sp-step.sp-on { display: block; animation: sp-step .3s cubic-bezier(.16,1,.3,1); }
@keyframes sp-step {
  from { opacity: 0; transform: translateY(8px) }
  to { opacity: 1; transform: translateY(0) }
}

.sp-h {
  font-size: 38px; font-weight: 700; line-height: 1.15;
  color: var(--sp-green); margin: 0 0 20px;
}
.sp-p {
  font-size: 16px; line-height: 1.55; color: var(--sp-ink);
  margin: 0 0 26px;
}
.sp-p strong { font-weight: 700; }
.sp-p + .sp-p { margin-top: -8px; }

.sp-btn {
  display: block; width: auto; min-width: 200px; margin: 0 auto;
  background: var(--sp-green); color: #fff;
  border: none; border-radius: 999px; padding: 13px 32px;
  font-family: inherit; font-size: 16px; font-weight: 500; cursor: pointer;
  transition: background .18s;
}
.sp-btn:hover:not(:disabled) { background: var(--sp-green-dark); }
.sp-btn:focus-visible { outline: 2px solid var(--sp-green-dark); outline-offset: 3px; }
.sp-btn:disabled { opacity: .55; cursor: not-allowed; }

.sp-btn-plain {
  display: block; width: 100%; margin-top: 12px; background: none; border: none;
  font-family: inherit; font-size: 15px; color: var(--sp-muted); cursor: pointer;
  padding: 8px; text-decoration: underline; text-underline-offset: 3px;
}
.sp-btn-plain:hover { color: var(--sp-ink); }

.sp-input {
  width: 100%; max-width: 320px; margin: 0 auto 12px; display: block;
  padding: 13px 24px; border: 1px solid var(--sp-line);
  border-radius: 999px; font-family: inherit; font-size: 16px; color: var(--sp-ink);
  background: #fff; transition: border-color .18s;
}
.sp-input::placeholder { color: #a5a5a5; }
.sp-input:focus { outline: none; border-color: var(--sp-green); }
.sp-input.sp-bad { border-color: #BB1D0D; }

.sp-err { color: #BB1D0D; font-size: 14px; margin: 0 0 12px; }

.sp-gdpr { margin: 18px 0 0; font-size: 14px; }
.sp-gdpr a { color: var(--sp-ink); text-decoration: underline; text-underline-offset: 3px; }

.sp-hp {
  position: absolute !important; left: -9999px !important;
  width: 1px !important; height: 1px !important; opacity: 0 !important;
}

@media (max-width: 760px) {
  .sp-overlay { padding: 14px; }
  .sp-modal { flex-direction: column; max-width: 440px; }
  .sp-body { flex: 1 1 auto; max-width: 100%; padding: 48px 26px 34px; }
  .sp-photo { display: none; }
  .sp-close { color: var(--sp-ink); }
  .sp-h { font-size: 27px; }
  .sp-p { font-size: 15px; }
}

#sp-gift {
  position: fixed; bottom: 22px; right: 22px; width: 58px; height: 58px;
  border-radius: 50%; background: var(--sp-green); cursor: pointer;
  z-index: 999997; display: none;
  box-shadow: 0 6px 22px rgba(129,182,68,.4), 0 2px 8px rgba(0,0,0,.14);
  transition: transform .2s;
}
#sp-gift.sp-gift-on { display: block; }
#sp-gift:hover { transform: scale(1.08); }
#sp-gift:focus-visible { outline: 3px solid var(--sp-green-dark); outline-offset: 3px; }
#sp-gift .sp-gift-ring {
  position: absolute; inset: 0; border-radius: 50%; background: var(--sp-green);
  opacity: .45; z-index: 1; pointer-events: none;
  animation: sp-ring 2.2s ease-out infinite;
}
#sp-gift .sp-gift-ico {
  position: absolute; top: 50%; left: 50%; width: 26px; height: 26px;
  margin: -13px 0 0 -13px; z-index: 2; pointer-events: none; line-height: 0;
}
@keyframes sp-ring {
  0% { transform: scale(1); opacity: .45 }
  100% { transform: scale(1.5); opacity: 0 }
}
@media (prefers-reduced-motion: reduce) {
  .sp-overlay.sp-open, .sp-modal, .sp-step.sp-on { animation: none; }
  #sp-gift .sp-gift-ring { animation: none; opacity: 0; }
}
@media (max-width: 760px) {
  #sp-gift { bottom: 16px; right: 16px; width: 52px; height: 52px; }
}
