/*
 * NCQA Lightbox (2026-10) - styles for assets/js/ncqa-lightbox.js
 * Brand tokens come from :root (css/style/_tokens.scss); literal fallbacks match the same values.
 *   --ncqa-dark-blue-900 #00131f (backdrop), --ncqa-dark-blue-500 #003956 (focus ring), --ncqa-link-blue-700 #006488
 */
.ncqa-lightbox {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  max-width: none;
  max-height: none;
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
  color: #fff;
  overflow: hidden;
  opacity: 0;
  transition: opacity 0.25s ease;
}
.ncqa-lightbox:not([open]) {
  display: none;
}
.ncqa-lightbox.is-open {
  opacity: 1;
}
.ncqa-lightbox.is-closing {
  opacity: 0;
}
.ncqa-lightbox::backdrop {
  background: rgba(0, 19, 31, 0.88);
}
/* No <dialog>.showModal(): draw our own backdrop above the page */
.ncqa-lightbox--fallback {
  z-index: 2147483000;
  background: rgba(0, 19, 31, 0.88);
}

.ncqa-lightbox__stage {
  position: absolute;
  inset: 0;
  display: flex;
  padding: 56px 16px;
  box-sizing: border-box;
  overflow: auto;
  overscroll-behavior: contain;
}
.ncqa-lightbox__content {
  position: relative;
  margin: auto;
  max-width: 100%;
  text-align: left;
  outline: 0;
}

/* Images: contained to the viewport */
.ncqa-lightbox__figure {
  margin: 0;
  text-align: center;
}
.ncqa-lightbox__img {
  display: block;
  margin: 0 auto;
  max-width: 100%;
  max-height: calc(100vh - 150px);
  max-height: calc(100dvh - 150px);
  width: auto;
  height: auto;
  object-fit: contain;
  background: #fff;
}
.ncqa-lightbox__caption {
  padding: 10px 0 0;
  font-size: 15px;
  line-height: 1.35;
  color: #fff;
}
.popup--link-img {
  display: block;
}
.popup--link-img:focus,
.popup--link-img:focus-visible {
  outline: 2px solid var(--ncqa-dark-blue-500, #003956);
  outline-offset: 1px;
}

/* Video / iframe: responsive 16:9 */
.ncqa-lightbox__frame {
  width: min(92vw, 1100px, calc((100vh - 140px) * 16 / 9));
  aspect-ratio: 16 / 9;
  background: #000;
}
.ncqa-lightbox__frame iframe {
  display: block;
  width: 100%;
  height: 100%;
  border: 0;
}

/* Dialog-style content (ajax / inline / html): the page's own .popup markup supplies the white box */
.ncqa-lightbox__status,
.ncqa-lightbox__error {
  margin: 0;
  padding: 12px 18px;
  background: #fff;
  color: #333;
  border-radius: 4px;
}
.ncqa-lightbox.is-loading .ncqa-lightbox__status {
  background: transparent;
  color: #fff;
}

/* Buttons. The close button keeps the legacy .mfp-close class so existing per-popup colour overrides still apply. */
.ncqa-lightbox__close,
.ncqa-lightbox__nav {
  position: absolute;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: rgba(0, 57, 86, 0.72);
  color: #fff;
  font: 400 30px/1 "Lato", sans-serif;
  cursor: pointer;
  opacity: 1;
}
.ncqa-lightbox__close {
  top: 8px;
  right: 8px;
}
.ncqa-lightbox__close--inside {
  top: 6px;
  right: 6px;
  width: 40px;
  height: 40px;
  background: transparent;
  color: var(--ncqa-link-blue-700, #006488);
}
.ncqa-lightbox__nav {
  top: 50%;
  margin-top: -22px;
}
.ncqa-lightbox__nav--prev {
  left: 8px;
}
.ncqa-lightbox__nav--next {
  right: 8px;
}
.ncqa-lightbox__nav span {
  width: 12px;
  height: 12px;
  border: solid currentColor;
  border-width: 0 3px 3px 0;
}
.ncqa-lightbox__nav--prev span {
  transform: translateX(3px) rotate(135deg);
}
.ncqa-lightbox__nav--next span {
  transform: translateX(-3px) rotate(-45deg);
}
.ncqa-lightbox__close:hover,
.ncqa-lightbox__nav:hover {
  background: rgba(0, 57, 86, 0.95);
}
.ncqa-lightbox__close--inside:hover {
  background: rgba(0, 100, 136, 0.1);
}
.ncqa-lightbox__close:focus-visible,
.ncqa-lightbox__nav:focus-visible {
  outline: 2px solid #fff;
  outline-offset: 1px;
  box-shadow: 0 0 0 4px var(--ncqa-dark-blue-500, #003956);
}
.ncqa-lightbox__counter {
  position: absolute;
  top: 18px;
  left: 16px;
  font-size: 14px;
  line-height: 1;
  color: #fff;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.6);
}
.ncqa-lightbox__counter:empty {
  display: none;
}

/* Loading spinner */
.ncqa-lightbox.is-loading .ncqa-lightbox__content--image::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 32px;
  height: 32px;
  margin: -16px 0 0 -16px;
  border: 3px solid rgba(255, 255, 255, 0.3);
  border-top-color: #fff;
  border-radius: 50%;
  animation: ncqa-lightbox-spin 0.8s linear infinite;
}
@keyframes ncqa-lightbox-spin {
  to {
    transform: rotate(360deg);
  }
}

/* Education "partner" popup (mainClass: partner-popup): fixed-size panel, no outer close button */
.ncqa-lightbox.partner-popup .ncqa-lightbox__stage {
  padding: 0;
}
.ncqa-lightbox.partner-popup .ncqa-lightbox__content {
  width: 768px;
  height: 600px;
  max-height: 100%;
  overflow: auto;
}

@media (max-width: 767px) {
  .ncqa-lightbox__stage {
    padding: 56px 8px 24px;
  }
  .ncqa-lightbox__nav {
    top: auto;
    bottom: 12px;
    margin-top: 0;
  }
}

@media (prefers-reduced-motion: reduce) {
  .ncqa-lightbox,
  .ncqa-lightbox * {
    transition: none !important;
    animation: none !important;
  }
}
@media print {
  .ncqa-lightbox {
    display: none !important;
  }
}
