/* ================================================================
   Beehiiv Newsletter Signup — Frontend Styles
   ================================================================ */

/* ---- Reset for plugin elements ---- */
.beehiiv-nl-overlay *,
.beehiiv-nl-sticky *,
.beehiiv-nl-inline * {
  box-sizing: border-box;
}

/* ---- Popup Overlay ---- */
.beehiiv-nl-overlay {
  position: fixed;
  inset: 0;
  z-index: 999999;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.55);
  padding: 16px;
}

.beehiiv-nl-popup {
  position: relative;
  background: #fff;
  border-radius: 12px;
  max-width: 480px;
  width: 100%;
  padding: 40px 32px 32px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
  animation: beehiivSlideUp 0.3s ease;
}

@keyframes beehiivSlideUp {
  from { opacity: 0; transform: translateY(24px); }
  to   { opacity: 1; transform: translateY(0); }
}

.beehiiv-nl-popup-close {
  position: absolute;
  top: 12px;
  right: 16px;
  background: none;
  border: none;
  font-size: 28px;
  line-height: 1;
  cursor: pointer;
  color: #999;
  padding: 0;
  transition: color 0.15s;
}
.beehiiv-nl-popup-close:hover {
  color: #333;
}

.beehiiv-nl-popup-headline {
  margin: 0 0 8px;
  font-size: 24px;
  font-weight: 700;
  line-height: 1.2;
  color: #111;
}

.beehiiv-nl-popup-subhead {
  margin: 0 0 24px;
  font-size: 15px;
  line-height: 1.5;
  color: #555;
}

/* ---- Forms (shared between popup + inline) ---- */
.beehiiv-nl-form-row {
  display: flex;
  gap: 8px;
}

.beehiiv-nl-email {
  flex: 1;
  padding: 12px 14px;
  font-size: 15px;
  border: 1px solid #d0d0d0;
  border-radius: 6px;
  outline: none;
  transition: border-color 0.15s;
}
.beehiiv-nl-email:focus {
  border-color: #111;
}

.beehiiv-nl-submit {
  padding: 12px 24px;
  font-size: 15px;
  font-weight: 600;
  color: #fff;
  background: #111;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  white-space: nowrap;
  transition: background-color 0.15s;
}
.beehiiv-nl-submit:hover {
  background: #333;
}
.beehiiv-nl-submit:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

/* ---- Form Messages ---- */
.beehiiv-nl-form-msg {
  margin-top: 10px;
  font-size: 14px;
  min-height: 20px;
}
.beehiiv-nl-msg-success {
  color: #16a34a;
}
.beehiiv-nl-msg-error {
  color: #dc2626;
}

/* ---- Dismiss Link ---- */
.beehiiv-nl-dismiss-link {
  display: inline-block;
  margin-top: 16px;
  font-size: 13px;
  color: #999;
  text-decoration: underline;
  cursor: pointer;
  transition: color 0.15s;
}
.beehiiv-nl-dismiss-link:hover {
  color: #666;
}

/* ---- Sticky Bar ---- */
.beehiiv-nl-sticky {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 999998;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 14px 20px;
  background: #111;
  color: #fff;
  font-size: 15px;
  font-weight: 500;
  box-shadow: 0 -2px 12px rgba(0, 0, 0, 0.15);
}

.beehiiv-nl-sticky-text {
  cursor: pointer;
  transition: opacity 0.15s;
}
.beehiiv-nl-sticky-text:hover {
  opacity: 0.8;
}

.beehiiv-nl-sticky-close {
  background: none;
  border: none;
  color: #fff;
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
  padding: 0 4px;
  opacity: 0.6;
  transition: opacity 0.15s;
}
.beehiiv-nl-sticky-close:hover {
  opacity: 1;
}

/* ---- Inline Shortcode ---- */
.beehiiv-nl-inline {
  max-width: 540px;
  margin: 32px 0;
  padding: 28px;
  background: #f8f8f8;
  border-radius: 10px;
  border: 1px solid #e5e5e5;
}

.beehiiv-nl-inline-headline {
  margin: 0 0 6px;
  font-size: 20px;
  font-weight: 700;
  color: #111;
}

.beehiiv-nl-inline-subhead {
  margin: 0 0 18px;
  font-size: 14px;
  color: #555;
  line-height: 1.5;
}

/* ---- Responsive ---- */
@media (max-width: 520px) {
  .beehiiv-nl-popup {
    padding: 32px 20px 24px;
  }
  .beehiiv-nl-popup-headline {
    font-size: 20px;
  }
  .beehiiv-nl-form-row {
    flex-direction: column;
  }
  .beehiiv-nl-submit {
    width: 100%;
  }
}
