/* ============================================
   BookSpace Campaign Popup
   ============================================ */

/* Overlay */
#bs-popup-overlay {
  position: fixed;
  inset: 0;
  z-index: 100000;
  background: rgba(0, 0, 0, 0);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  transition: background 0.3s ease;
  pointer-events: none;
}
#bs-popup-overlay.bs-popup-visible {
  background: rgba(0, 0, 0, 0.5);
  pointer-events: auto;
}

/* Popup container */
#bs-popup {
  position: relative;
  background: #fff;
  border-radius: 16px;
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.2);
  max-width: 880px;
  width: 100%;
  overflow: hidden;
  opacity: 0;
  transform: translateY(20px) scale(0.97);
  transition: opacity 0.3s ease, transform 0.3s ease;
}
#bs-popup-overlay.bs-popup-visible #bs-popup {
  opacity: 1;
  transform: translateY(0) scale(1);
}

/* Close button */
#bs-popup-close {
  position: absolute;
  top: 12px;
  right: 14px;
  z-index: 10;
  background: none;
  border: none;
  font-size: 28px;
  line-height: 1;
  color: #94a3b8;
  cursor: pointer;
  padding: 4px 8px;
  border-radius: 8px;
  transition: color 0.15s, background 0.15s;
}
#bs-popup-close:hover {
  color: #334155;
  background: #f1f5f9;
}

/* Content layout */
#bs-popup-content {
  display: flex;
}

/* Left — form side */
#bs-popup-left {
  flex: 1;
  padding: 36px 44px 36px 40px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

/* Right — image side */
#bs-popup-right {
  width: 380px;
  flex-shrink: 0;
  background: #f8fafc;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}
#bs-popup-right img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Campaign name (heading) */
.bs-popup-campaign-name {
  font-family: 'Instrument Sans', -apple-system, BlinkMacSystemFont, sans-serif;
  font-size: 2rem;
  font-weight: 600;
  color: #0f172a;
  letter-spacing: -0.025em;
  line-height: 1.15;
  margin: 0 0 6px;
  text-align: center;
}

/* Title (offer) */
.bs-popup-title {
  font-family: 'Instrument Sans', -apple-system, BlinkMacSystemFont, sans-serif;
  font-size: 1.8rem;
  font-weight: 600;
  color: #475569;
  line-height: 1.15;
  letter-spacing: -0.025em;
  margin: 0 0 16px;
  text-align: center;
}

/* Benefit bullets */
.bs-popup-benefits {
  list-style: none;
  padding: 0;
  margin: 0 0 20px;
  display: inline-block;
  text-align: left;
  width: 100%;
}
#bs-popup-left .bs-popup-benefits {
  display: flex;
  flex-direction: column;
  align-items: center;
}
.bs-popup-benefits li {
  position: relative;
  padding-left: 24px;
  font-size: 0.95rem;
  color: #334155;
  line-height: 1.7;
}
.bs-popup-benefits li::before {
  content: '✓';
  position: absolute;
  left: 0;
  color: #16a34a;
  font-weight: 700;
}

/* Countdown timer */
.bs-popup-timer {
  margin-bottom: 20px;
  text-align: center;
}
.bs-popup-timer-label {
  font-size: 0.75rem;
  color: #94a3b8;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-weight: 500;
  margin-bottom: 10px;
}
.bs-popup-timer-digits {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}
.bs-popup-timer-block {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  padding: 10px 16px;
  text-align: center;
  min-width: 64px;
}
.bs-popup-timer-num {
  display: block;
  font-size: 1.75rem;
  font-weight: 700;
  color: #0f172a;
  font-variant-numeric: tabular-nums;
  font-family: 'Instrument Sans', -apple-system, BlinkMacSystemFont, sans-serif;
  line-height: 1.1;
  letter-spacing: 0.02em;
}
.bs-popup-timer-unit {
  display: block;
  font-size: 0.65rem;
  color: #94a3b8;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-top: 2px;
}
.bs-popup-timer-sep {
  font-size: 1.5rem;
  font-weight: 700;
  color: #334155;
  line-height: 1;
  padding-bottom: 12px;
}

/* Steps */
.bs-popup-step {
  text-align: center;
}

/* Form (step 2) */
.bs-popup-form {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 0;
}
#bs-popup-email {
  flex: 1;
  padding: 12px 16px;
  border: 1.5px solid #e2e8f0;
  border-radius: 10px;
  font-size: 15px;
  font-family: inherit;
  outline: none;
  transition: border-color 0.15s;
}
#bs-popup-email:focus {
  border-color: #2563eb;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}
#bs-popup-email::placeholder {
  color: #94a3b8;
}

/* Submit button */
.bs-popup-submit {
  display: block;
  width: 100%;
  padding: 14px 28px;
  background: var(--color-cta, #41a63e);
  color: #fff;
  border: none;
  border-radius: 10px;
  font-size: 16px;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.15s;
}
.bs-popup-submit:hover {
  background: var(--color-cta-hover, #379334);
}
.bs-popup-submit:disabled {
  cursor: default;
}



/* No thanks link */
.bs-popup-no-thanks {
  display: block;
  width: 100%;
  background: none;
  border: none;
  color: #94a3b8;
  font-size: 0.8rem;
  font-family: inherit;
  cursor: pointer;
  padding: 10px 0 0;
  transition: color 0.15s;
  text-decoration: underline;
  text-underline-offset: 2px;
}
.bs-popup-no-thanks:hover {
  color: #64748b;
}

/* Social proof */
.bs-popup-social-proof {
  font-size: 0.8rem;
  color: #94a3b8;
  margin: 14px 0 0;
  text-align: left;
}

/* Spinner */
.bs-popup-spinner {
  display: inline-block;
  width: 20px;
  height: 20px;
  border: 2.5px solid rgba(255, 255, 255, 0.3);
  border-top-color: #fff;
  border-radius: 50%;
  animation: bs-spin 0.6s linear infinite;
}
@keyframes bs-spin {
  to { transform: rotate(360deg); }
}

/* Success state */
.bs-popup-success {
  text-align: center;
  padding: 20px 0;
}
.bs-popup-success-emoji {
  font-size: 3rem;
  margin: 0 0 16px;
  line-height: 1;
}
.bs-popup-success-title {
  font-family: 'Instrument Sans', -apple-system, BlinkMacSystemFont, sans-serif;
  font-size: 1.8rem;
  font-weight: 600;
  color: #0f172a;
  line-height: 1.2;
  letter-spacing: -0.025em;
  margin: 0 0 10px;
}
.bs-popup-success-subtitle {
  font-size: 1.15rem;
  color: #64748b;
  margin: 0 0 24px;
  line-height: 1.5;
}
.bs-popup-success-cta {
  display: inline-block;
  text-decoration: none;
  text-align: center;
  width: auto;
  padding: 14px 36px;
}

/* ──────────────────────────────────────────────
   Sticky button (bottom-left)
   ──────────────────────────────────────────────*/
.bs-sticky-offer {
  position: fixed;
  bottom: 20px;
  left: 20px;
  z-index: 99999;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 14px 22px;
  font-size: 15px;
  font-weight: 600;
  font-family: 'Instrument Sans', -apple-system, BlinkMacSystemFont, sans-serif;
  color: #fff;
  background: var(--color-cta, #41a63e);
  border: none;
  border-radius: 12px;
  cursor: pointer;
  box-shadow: 0 6px 20px rgba(65, 166, 62, 0.3);
  opacity: 0;
  transform: translateY(10px);
  transition: opacity 0.4s ease, transform 0.4s ease, background 0.15s;
  pointer-events: none;
}
.bs-sticky-offer.visible {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}
.bs-sticky-offer:hover {
  background: var(--color-cta-hover, #379334);
}

/* ──────────────────────────────────────────────
   Mobile
   ──────────────────────────────────────────────*/
@media (max-width: 767px) {
  #bs-popup {
    max-width: 100%;
    border-radius: 12px;
  }
  #bs-popup-right {
    display: none;
  }
  #bs-popup-left {
    padding: 36px 24px 28px;
  }
  .bs-popup-campaign-name {
    font-size: 1.5rem;
  }
  .bs-popup-title {
    font-size: 1.3rem;
  }
  .bs-popup-form {
    flex-direction: column;
  }
  #bs-popup-step2 .bs-popup-submit {
    width: 100%;
  }
  .bs-sticky-offer {
    left: 16px;
    bottom: 16px;
    padding: 12px 18px;
    font-size: 14px;
  }
}
