/* The newsletter shares the site's Inter type, square edges and orange accents. */
.sub-navigation > button[data-newsletter-open] {
  padding: 0;
  border: 0;
  margin: 0;
  background: transparent;
  color: var(--color-primary);
  font: inherit;
  cursor: pointer;
}

.sub-navigation > button[data-newsletter-open]:hover {
  color: var(--color-primary-hover);
}

.sub-navigation > button[data-newsletter-open]::before {
  content: "";
  display: inline-block;
  width: 1px;
  height: 12px;
  margin-right: var(--space-2);
  background: var(--color-primary);
}

html.newsletter-popup-open {
  overflow: hidden;
}

.newsletter-popup {
  width: min(488px, calc(100% - 32px));
  max-width: none;
  max-height: calc(100dvh - 32px);
  padding: 0;
  border: 0;
  margin: auto;
  overflow: auto;
  overscroll-behavior: contain;
  color: var(--color-text);
  background: var(--color-bg);
  box-shadow: 0 20px 80px #0003;
  font: inherit;
}

.newsletter-popup:not([open]) {
  display: none;
}

.newsletter-popup::backdrop {
  background: rgb(30 30 30 / 58%);
}

.newsletter-popup__panel {
  position: relative;
  padding: 36px;
  border-top: 6px solid var(--color-primary);
}

.newsletter-popup__close {
  position: absolute;
  top: 10px;
  right: 10px;
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: var(--color-text);
  cursor: pointer;
}

.newsletter-popup__close:hover {
  background: var(--color-light);
}

.newsletter-popup .newsletter-popup__eyebrow {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0 36px 20px 0;
  color: var(--color-primary-hover);
  font-size: 0.875rem;
  font-weight: 600;
  line-height: 1.5;
}

.newsletter-popup .newsletter-popup__title {
  margin: 0 0 16px;
  font-size: 2.125rem;
  font-weight: var(--font-weight-title);
  line-height: 1.15;
  outline: none;
}

.newsletter-popup .newsletter-popup__description {
  margin: 0 0 28px;
  color: var(--color-form-text);
  font-size: 1rem;
  line-height: 1.55;
}

.newsletter-popup__field > label {
  display: block;
  margin-bottom: 8px;
  font-size: 0.875rem;
  font-weight: 600;
}

.newsletter-popup input[type="email"] {
  display: block;
  width: 100%;
  min-height: 50px;
  padding: 12px 14px;
  border: 1px solid var(--color-form-border);
  border-radius: 0;
  background: var(--color-form-bg);
  color: var(--color-text);
  font: inherit;
  line-height: 1.5;
}

.newsletter-popup input[type="email"]::placeholder {
  color: var(--color-form-text);
  opacity: 1;
}

.newsletter-popup__permission {
  margin: 20px 0 24px;
}

.newsletter-popup__consent {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  cursor: pointer;
  font-size: 0.875rem;
  line-height: 1.5;
}

.newsletter-popup input[type="checkbox"] {
  flex: 0 0 18px;
  width: 18px;
  height: 18px;
  margin: 2px 0 0;
  accent-color: var(--color-text);
  cursor: pointer;
}

.newsletter-popup :is(button, input, a):focus-visible,
[data-newsletter-open]:focus-visible {
  outline: 2px solid var(--color-text);
  outline-offset: 3px;
}

.newsletter-popup input[type="email"]:focus-visible {
  border-color: var(--color-primary);
  outline: 1px solid var(--color-primary);
  outline-offset: 0;
}

.newsletter-popup [aria-invalid="true"] {
  border-color: #a12718;
}

.newsletter-popup .newsletter-popup__error {
  margin: 8px 0 0;
  color: #a12718;
  font-size: 0.875rem;
  line-height: 1.5;
}

.newsletter-popup .newsletter-popup__status {
  margin: 16px 0 0;
  padding: 12px 14px;
  border-left: 3px solid var(--color-primary);
  background: var(--color-light);
  font-size: 0.875rem;
  line-height: 1.5;
}

/* Keep the empty live region in the accessibility tree before it is updated. */
.newsletter-popup .newsletter-popup__status:empty {
  margin: 0;
  padding: 0;
  border: 0;
}

.newsletter-popup .newsletter-popup__privacy {
  margin: 20px 0 0;
  color: var(--color-form-text);
  font-size: 0.875rem;
  line-height: 1.6;
}

.newsletter-popup__privacy a {
  color: inherit;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.newsletter-popup__privacy a:hover {
  color: var(--color-text);
}

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

@media (max-width: 480px) {
  .newsletter-popup__panel {
    padding: 28px 24px;
  }

  .newsletter-popup .newsletter-popup__title {
    font-size: 1.875rem;
  }

  .newsletter-popup .newsletter-popup__description {
    margin-bottom: 24px;
  }
}
