/*
 * Structural / functional popup CSS.
 * Site-specific colours, typography and decorative styling may be overridden
 * in the site/theme CSS.
 */

.zd-mailerlite-popup[hidden] {
  display: none !important;
}

.zd-mailerlite-popup {
  position: fixed;
  inset: 0;
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
  padding: 1rem;
  overflow: auto;
  background: rgba(0, 0, 0, 0.48);
}

.zd-mailerlite-popup__panel {
  position: relative !important;
  box-sizing: border-box;
  width: min(100%, 42rem);
  max-height: calc(100vh - 2rem);
  overflow: auto;
  padding: 2rem;
  background: #fff;
}

/*
 * Keep the close control independent of broad site-theme button rules.
 * The site/theme may still override visual details with a more specific rule.
 */
.zd-mailerlite-popup .zd-mailerlite-popup__panel > .zd-mailerlite-popup__close {
  all: unset !important;
  -webkit-appearance: none !important;
  appearance: none !important;
  position: absolute !important;
  top: 0.55rem !important;
  right: 0.75rem !important;
  left: auto !important;
  bottom: auto !important;
  z-index: 5 !important;
  display: block !important;
  width: 2rem !important;
  min-width: 2rem !important;
  max-width: 2rem !important;
  height: 2rem !important;
  min-height: 2rem !important;
  max-height: 2rem !important;
  margin: 0 !important;
  padding: 0 !important;
  border: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
  color: inherit !important;
  font-size: 2rem !important;
  line-height: 1.8rem !important;
  text-align: center !important;
  cursor: pointer !important;
  overflow: visible !important;
}

.zd-mailerlite-popup .zd-mailerlite-popup__panel > .zd-mailerlite-popup__close::before,
.zd-mailerlite-popup .zd-mailerlite-popup__panel > .zd-mailerlite-popup__close::after {
  content: none !important;
  display: none !important;
}

.zd-mailerlite-popup .zd-mailerlite-popup__panel > .zd-mailerlite-popup__close:focus-visible {
  outline: 1px solid currentColor !important;
  outline-offset: 2px !important;
}

html.zd-mailerlite-popup-open {
  overflow: hidden;
}

@media (max-width: 600px) {
  .zd-mailerlite-popup {
    align-items: flex-start;
    padding: 0.5rem;
  }

  .zd-mailerlite-popup__panel {
    width: 100%;
    max-height: calc(100vh - 1rem);
    padding: 1.5rem 1rem 1rem;
  }
}
