/**
 * MailerLite custom styling
 *
 * Use for embedded form, popup, and opt-in presentation overrides.
 */

/* MailerLite Modals & Overlays (Guide & Newsletter) */
#ssw-mailerlite-modal, 
#ssw-newsletter-modal,
/* Target the new MailerLite JS embed container inside your modal */
#ssw-newsletter-modal,
#ssw-mailerlite-modal {
  display: none;
}

#ssw-newsletter-modal.is-active,
#ssw-mailerlite-modal.is-active {
  display: flex !important;
  position: fixed !important;
  top: 0 !important;
  left: 0 !important;
  width: 100vw !important;
  height: 100vh !important;
  background: rgba(0, 0, 0, 0.75) !important;
  align-items: center !important;
  justify-content: center !important;
  z-index: 2147483647 !important;
}

/* Center and constrain the form box itself */
#ssw-newsletter-modal.is-active .ml-embedded,
#ssw-mailerlite-modal.is-active .ml-embedded {
  display: block !important;
  max-width: 500px !important;
  width: 90% !important;
  margin: auto !important;
  position: relative !important;
}

/* Ensure MailerLite container allows text link to display outside iframe bounds */
#mlb2-45844912,
#mlb2-198350706406590063 {
    overflow: visible !important;
    height: auto !important;
    padding-bottom: 20px !important;
}

/* High-Contrast Modal Close Text Link */
.ssw-text-close {
    cursor: pointer !important;
    text-transform: uppercase !important;
    font-size: 14px !important;
    font-weight: 600 !important;
    letter-spacing: 1px !important;
    color: #ffffff !important; /* Crisp white for dark overlays */
    text-decoration: underline !important;
    transition: all 0.2s ease-in-out !important;
    display: inline-block !important;
    margin-top: 15px !important;
    padding: 8px 16px !important;
    text-align: center !important;
    position: relative !important;
    z-index: 999999 !important;
}

.ssw-text-close:hover {
    color: #f0f0f0 !important;
    text-decoration: none !important;
    opacity: 0.85 !important;
}

/* Mobile Max-Width Adjustment for MailerLite Modal */
@media screen and (max-width: 767px) {
  #mlb2-45843317.ml-form-embedContainer .ml-form-embedWrapper.embedForm {
    max-width: 320px !important;
    width: 100% !important;
  }
}
/* Sleep Stack guide: in-card decline action and outside-click hint. */
#ssw-mailerlite-modal.is-active {
    overflow-y: auto !important;
    box-sizing: border-box !important;
    padding: 16px 0 !important;
    justify-content: safe center !important;
}

#ssw-mailerlite-modal .ssw-guide-decline {
    display: block !important;
    width: 100% !important;
    margin: 12px auto 0 !important;
    padding: 8px 4px !important;
    border: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
    color: #171717 !important;
    font-size: 14px !important;
    font-weight: 600 !important;
    line-height: 1.4 !important;
    text-align: center !important;
    text-decoration: underline !important;
    text-transform: none !important;
    cursor: pointer !important;
}

#ssw-mailerlite-modal .ssw-guide-decline:hover,
#ssw-mailerlite-modal .ssw-guide-decline:focus-visible {
    color: #aa6136 !important;
}

#ssw-mailerlite-modal .ssw-text-close-hint {
    color: #ffffff !important;
    font-size: 13px !important;
    font-weight: 400 !important;
    text-decoration: none !important;
    text-transform: none !important;
    letter-spacing: normal !important;
    cursor: default !important;
    margin: 6px 0 0 !important;
}
