/* Newsletter Popup: presentation is deliberately self-contained so it works with any template. */
.jnp[hidden] { display: none; }

.jnp {
  position: fixed;
  inset: 0;
  z-index: 2147483000;
  display: grid;
  place-items: center;
  padding: 1rem;
}

.jnp__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, .58);
}

.jnp__dialog {
  position: relative;
  box-sizing: border-box;
  width: fit-content;
  min-width: 20rem;
  max-width: calc(100vw - 2rem);
  max-height: calc(100vh - 2rem);
  overflow: auto;
  padding: 2.7rem 2rem 3rem;
  background: var(--jnp-background);
  color: var(--jnp-text);
  box-shadow: 0 1.4rem 3.5rem rgba(0, 0, 0, .34);
  font-family: Arial, Helvetica, sans-serif;
}

.jnp__dialog h2 {
  box-sizing: border-box;
  width: max-content;
  max-width: 100%;
  margin: 0 auto 2.1rem;
  padding: 0 2rem 1.4rem;
  border-bottom: 3px solid var(--jnp-accent);
  color: var(--jnp-text);
  font-size: 1.8rem;
  font-weight: 500;
  letter-spacing: .12em;
  line-height: 1.2;
  text-align: center;
}

.jnp__close {
  position: absolute;
  top: 1.1rem;
  right: 1.45rem;
  box-sizing: border-box;
  width: 2.35rem;
  height: 2.35rem;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--jnp-accent);
  cursor: pointer;
  font-size: 2.8rem;
  font-weight: 300;
  line-height: 1.85rem;
}

.jnp__close:hover,
.jnp__close:focus { opacity: .72; }

.jnp__promo-heading,
.jnp__message,
.jnp__supporting {
  margin: 0 auto 1rem;
  color: var(--jnp-text);
  text-align: center;
}

.jnp__promo-heading { font-size: 1.25rem; font-weight: 600; }
.jnp__message,
.jnp__supporting { max-width: 44rem; line-height: 1.5; }

.jnp__image {
  display: block;
  width: auto;
  max-width: 100%;
  height: auto;
  max-height: calc(100vh - 18rem);
  margin: 1.8rem auto 2.2rem;
  object-fit: contain;
}

.jnp__form {
  display: grid;
  width: 100%;
  margin: 1.8rem auto 0;
  gap: 1.25rem;
}

.jnp__form input[type="email"] {
  box-sizing: border-box;
  width: 100%;
  min-height: 5.6rem;
  padding: .8rem 1rem;
  border: 1px solid #ddd;
  border-radius: 0;
  background: #fff;
  color: var(--jnp-text);
  font: inherit;
  font-size: 1.25rem;
  text-align: center;
}

.jnp__form input[type="email"]:focus {
  outline: 2px solid var(--jnp-accent);
  outline-offset: 3px;
}

.jnp__form button {
  min-height: 4.5rem;
  margin-top: .75rem;
  padding: .75rem 1.25rem;
  border: 2px solid var(--jnp-accent);
  border-radius: 0;
  background: transparent;
  color: var(--jnp-text);
  cursor: pointer;
  font: inherit;
  font-size: 1.15rem;
  letter-spacing: .08em;
}

.jnp__form button:hover,
.jnp__form button:focus {
  background: var(--jnp-accent);
  color: #fff;
}

.jnp__footer {
  max-width: 44rem;
  margin: 2rem auto .65rem;
  color: var(--jnp-text);
  font-size: 1rem;
  line-height: 1.5;
  text-align: center;
}

.jnp__privacy {
  margin: 0 auto 1.35rem;
  color: var(--jnp-text);
  font-size: .85rem;
  line-height: 1.35;
  opacity: .72;
  text-align: center;
}

.jnp__privacy a,
.jnp__privacy a:visited {
  color: var(--jnp-text) !important;
  text-decoration: none;
}

.jnp__privacy a:hover,
.jnp__privacy a:focus { text-decoration: underline; }

.jnp__dismiss {
  display: flex;
  justify-content: center;
  gap: .6rem;
  color: var(--jnp-text);
  font-size: 1rem;
  text-align: center;
}

.jnp__dismiss input { width: 1.25rem; height: 1.25rem; margin: 0; }

@media (max-width: 600px) {
  .jnp { padding: .5rem; }
  .jnp__dialog { min-width: 0; width: 100%; max-width: calc(100vw - 1rem); padding: 2.5rem 1.25rem 2rem; }
  .jnp__dialog h2 { margin-bottom: 1.5rem; padding: 0 1.5rem 1rem; font-size: 1.35rem; }
  .jnp__close { top: .9rem; right: .8rem; }
  .jnp__image { max-height: calc(100vh - 17rem); margin: 1.25rem auto 1.6rem; }
  .jnp__form input[type="email"] { min-height: 4.3rem; }
  .jnp__footer { margin-top: 1.6rem; }
}
