/* ==========================================================================
   BeStrong Opt-in System – Popup + Bottom Bar + Inline CTAs
   ========================================================================== */

/* --- Overlay --- */
#bs-optin-overlay {
  position: fixed;
  inset: 0;
  z-index: 99999;
  background: rgba(0, 0, 0, 0);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, background 0.3s ease, visibility 0.3s;
}

#bs-optin-overlay.bs-optin-visible {
  opacity: 1;
  visibility: visible;
  background: rgba(0, 0, 0, 0.6);
}

/* --- Popup --- */
.bs-optin-popup {
  background: #ffffff;
  border-radius: 16px;
  padding: 40px 32px;
  max-width: 440px;
  width: 90%;
  position: relative;
  transform: translateY(20px);
  transition: transform 0.3s ease;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.15);
  text-align: center;
}

#bs-optin-overlay.bs-optin-visible .bs-optin-popup {
  transform: translateY(0);
}

/* Close Button */
.bs-optin-close {
  position: absolute;
  top: 12px;
  right: 16px;
  background: none;
  border: none;
  font-size: 28px;
  color: #999;
  cursor: pointer;
  line-height: 1;
  padding: 4px 8px;
  transition: color 0.2s;
}

.bs-optin-close:hover {
  color: #1a3a3a;
}

/* --- Steps --- */
.bs-optin-step {
  display: none;
}

.bs-optin-step.bs-optin-active {
  display: block;
}

/* Headlines */
.bs-optin-headline {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 24px;
  font-weight: 700;
  color: #1a3a3a;
  margin: 0 0 12px;
  line-height: 1.3;
}

.bs-optin-desc {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 16px;
  color: #2c5555;
  margin: 0 0 24px;
  line-height: 1.5;
}

/* Yes Button (Primary CTA - Gelb) */
.bs-optin-yes,
.bs-optin-submit {
  display: block;
  width: 100%;
  padding: 14px 24px;
  font-family: 'Space Grotesk', sans-serif;
  font-size: 16px;
  font-weight: 600;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  transition: background 0.2s, transform 0.1s;
  background: #f3de97;
  color: #1a3a3a;
}

.bs-optin-yes:hover,
.bs-optin-submit:hover {
  background: #ebd47e;
  transform: translateY(-1px);
}

.bs-optin-yes:active,
.bs-optin-submit:active {
  transform: translateY(0);
}

.bs-optin-submit:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
}

/* No Button */
.bs-optin-no {
  display: block;
  width: 100%;
  padding: 12px 24px;
  margin-top: 10px;
  font-family: 'Space Grotesk', sans-serif;
  font-size: 14px;
  font-weight: 400;
  color: #999;
  background: none;
  border: none;
  cursor: pointer;
  transition: color 0.2s;
}

.bs-optin-no:hover {
  color: #1a3a3a;
}

/* Email Input */
.bs-optin-email {
  display: block;
  width: 100%;
  padding: 14px 16px;
  font-family: 'Space Grotesk', sans-serif;
  font-size: 16px;
  border: 2px solid rgba(26, 58, 58, 0.15);
  border-radius: 8px;
  margin-bottom: 12px;
  outline: none;
  transition: border-color 0.2s;
  color: #1a3a3a;
  background: #faf6f0;
  box-sizing: border-box;
}

.bs-optin-email:focus {
  border-color: #1a3a3a;
}

.bs-optin-email::placeholder {
  color: #999;
}

/* Error */
.bs-optin-error {
  color: #d32f2f;
  font-size: 13px;
  min-height: 18px;
  margin-bottom: 8px;
  text-align: left;
}

/* Privacy */
.bs-optin-privacy {
  font-size: 12px;
  color: #999;
  margin-top: 12px;
  line-height: 1.4;
}

.bs-optin-privacy a {
  color: #999;
  text-decoration: underline;
}

.bs-optin-privacy a:hover {
  color: #1a3a3a;
}

/* Success Icon */
.bs-optin-success-icon {
  width: 56px;
  height: 56px;
  line-height: 56px;
  font-size: 28px;
  background: #1a3a3a;
  color: #ffffff;
  border-radius: 50%;
  margin: 0 auto 16px;
}

/* --- Mobile Bottom Bar --- */
#bs-optin-bottombar {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 99998;
  background: #1a3a3a;
  color: #ffffff;
  display: flex;
  align-items: center;
  padding: 10px 16px;
  gap: 12px;
  transform: translateY(100%);
  transition: transform 0.3s ease;
  box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.15);
}

#bs-optin-bottombar.bs-bottombar-visible {
  transform: translateY(0);
}

.bs-bottombar-text {
  flex: 1;
  font-family: 'Space Grotesk', sans-serif;
  font-size: 14px;
  font-weight: 500;
  line-height: 1.3;
}

.bs-bottombar-cta {
  flex-shrink: 0;
  padding: 8px 18px;
  font-family: 'Space Grotesk', sans-serif;
  font-size: 13px;
  font-weight: 600;
  background: #f3de97;
  color: #1a3a3a;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  white-space: nowrap;
}

.bs-bottombar-close {
  flex-shrink: 0;
  background: none;
  border: none;
  color: rgba(255, 255, 255, 0.6);
  font-size: 22px;
  cursor: pointer;
  padding: 0 4px;
  line-height: 1;
}

.bs-bottombar-close:hover {
  color: #ffffff;
}

/* --- Inline CTA Form --- */
.bs-inline-cta {
  background: #faf6f0;
  border: 1px solid rgba(26, 58, 58, 0.1);
  border-radius: 12px;
  padding: 32px;
  margin: 40px 0;
  text-align: center;
}

.bs-inline-cta .bs-optin-headline {
  font-size: 22px;
}

.bs-inline-cta .bs-optin-desc {
  font-size: 15px;
  margin-bottom: 20px;
}

.bs-inline-cta .bs-inline-optin-form {
  max-width: 360px;
  margin: 0 auto;
}

.bs-inline-cta .bs-optin-email {
  background: #ffffff;
}

/* --- Responsive --- */
@media (max-width: 768px) {
  .bs-optin-popup {
    padding: 32px 24px;
    width: 92%;
    max-width: none;
    border-radius: 12px;
  }

  .bs-optin-headline {
    font-size: 20px;
  }

  .bs-optin-desc {
    font-size: 15px;
  }

  .bs-inline-cta {
    padding: 24px 20px;
    margin: 32px 0;
  }
}
