/**
 * New-window link indicator (WCAG technique F22). See inc/new-window-links.php.
 */

/* Visually hidden "(opens in a new window)" note, still read by screen readers. */
.pmcscm-new-window-note {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/*
 * Fallback icon, matching the theme link-icon-base mixin, for every
 * new-window link including image links. :where() keeps the specificity at
 * zero, so components that already draw this icon or style their own ::after
 * keep their design. The footer resident services button is excluded: it
 * already shows the large new-window glyph, and extra width there squeezes
 * the footer grid.
 */
:where(a[target="_blank"]:not(.block-site-wide-footer__links--service-link))::after {
  content: "";
  display: inline-block;
  flex-shrink: 0;
  width: 0.75rem;
  height: 0.75rem;
  margin-left: 0.25rem;
  background-color: currentColor;
  -webkit-mask-image: url("../assets/external.svg");
  mask-image: url("../assets/external.svg");
  -webkit-mask-position: center;
  mask-position: center;
  -webkit-mask-repeat: no-repeat;
  mask-repeat: no-repeat;
  -webkit-mask-size: 100%;
  mask-size: 100%;
}

/*
 * Footer social icons are fixed-size blocks and the footer address is a
 * tight flex row: pin the icon just outside the link so it takes no width.
 */
.block-site-wide-footer__social-media a[target="_blank"],
a.block-site-wide-footer__address[target="_blank"] {
  position: relative;
}

.block-site-wide-footer__social-media a[target="_blank"]::after,
a.block-site-wide-footer__address[target="_blank"]::after {
  position: absolute;
  left: 100%;
}

.block-site-wide-footer__social-media a[target="_blank"]::after {
  top: -0.25rem;
}

/* Address: beside the map pin, inside the link, so it never reaches the buttons. */
a.block-site-wide-footer__address[target="_blank"]::after {
  top: -0.375rem;
  left: 1.0625rem;
  margin-left: 0;
}
