/* ═══════════════════════════════════════════════════════
   LIGHTBOX.CSS — Site-wide modal for viewing a sample-report
   page-1 image full-size, with a link to download the PDF.
   Vanilla CSS, brand vocabulary only. Classes prefixed
   `pn-lightbox` (overlay) and `report-thumb` (triggers).
   ═══════════════════════════════════════════════════════ */

/* ── Trigger — wraps an .ft-report__image-frame so the
   existing thumbnail becomes clickable. Reset button chrome,
   add a hover/focus zoom badge as the "click to enlarge" cue. */
.report-thumb {
  display: block;
  width: 100%;
  padding: 0;
  border: none;
  background: none;
  cursor: zoom-in;
  position: relative;
  text-align: inherit;
}

.report-thumb__badge {
  position: absolute;
  bottom: 16px;
  right: 16px;
  z-index: 1;
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  border-radius: var(--radius-full);
  background: rgba(57, 55, 143, 0.85);
  color: #ffffff;
  opacity: 0;
  transform: scale(0.85);
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.report-thumb__badge svg {
  width: 18px;
  height: 18px;
}

.report-thumb:hover .report-thumb__badge,
.report-thumb:focus-visible .report-thumb__badge {
  opacity: 1;
  transform: scale(1);
}

.report-thumb:focus-visible {
  outline: 2px solid var(--color-coral);
  outline-offset: 4px;
  border-radius: var(--radius-xl);
}

/* Reset native <button> chrome for sample-report links that are now
   lightbox triggers instead of direct PDF anchors (guidance-prostatitis
   copy-column links). Only box-model/interactive properties — type,
   size, color, and alignment stay whatever .ft-report__download and its
   page-specific overrides already declare. */
button.ft-report__download {
  display: block;
  border: none;
  background: none;
  padding: 0;
  cursor: pointer;
  -webkit-appearance: none;
  appearance: none;
}

/* ── Overlay ───────────────────────────────────────────── */
.pn-lightbox {
  position: fixed;
  inset: 0;
  z-index: 2100;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(27, 42, 74, 0.82);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.32s ease, visibility 0s linear 0.32s;
}

.pn-lightbox[data-state="open"] {
  opacity: 1;
  visibility: visible;
  transition: opacity 0.32s ease, visibility 0s linear 0s;
}

.pn-lightbox__card {
  position: relative;
  width: 100%;
  max-width: 780px;
  max-height: 92vh;
  display: flex;
  flex-direction: column;
  border-radius: var(--radius-xl);
  background: #ffffff;
  box-shadow: var(--shadow-cinematic-lg);
  overflow: hidden;
  transform: translateY(16px) scale(0.98);
  opacity: 0;
  transition: transform 0.36s cubic-bezier(0.2, 0.7, 0.2, 1), opacity 0.32s ease;
}

.pn-lightbox[data-state="open"] .pn-lightbox__card {
  transform: translateY(0) scale(1);
  opacity: 1;
}

.pn-lightbox__frame {
  position: relative;
  overflow: auto;
  background: #f4f3fa;
  min-height: 0;
}

.pn-lightbox__img {
  display: block;
  width: 100%;
  height: auto;
}

.pn-lightbox__close {
  position: absolute;
  top: 14px;
  right: 14px;
  z-index: 2;
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  border: none;
  border-radius: var(--radius-full);
  background: rgba(255, 255, 255, 0.9);
  color: var(--color-purple);
  cursor: pointer;
  box-shadow: 0 4px 14px rgba(27, 42, 74, 0.25);
  transition: background 0.2s ease, color 0.2s ease, transform 0.2s ease;
}

.pn-lightbox__close:hover {
  background: #ffffff;
  color: var(--color-coral-dark);
  transform: rotate(90deg);
}

.pn-lightbox__close:focus-visible {
  outline: 2px solid var(--color-coral);
  outline-offset: 2px;
}

.pn-lightbox__close svg {
  width: 16px;
  height: 16px;
}

.pn-lightbox__caption {
  padding: 16px 20px;
  border-top: 1px solid rgba(57, 55, 143, 0.10);
  background: #ffffff;
}

.pn-lightbox__title {
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 600;
  color: var(--color-purple);
}

/* Mobile takeover — full-screen card */
@media (max-width: 600px) {
  .pn-lightbox {
    padding: 0;
  }
  .pn-lightbox__card {
    max-width: 100%;
    width: 100%;
    height: 100%;
    max-height: 100vh;
    border-radius: 0;
  }
}

/* Reduced motion — drop transitions, just opacity */
@media (prefers-reduced-motion: reduce) {
  .pn-lightbox,
  .pn-lightbox__card,
  .pn-lightbox__close,
  .report-thumb__badge {
    transition: opacity 0.2s ease, visibility 0s linear 0.2s;
    transform: none !important;
  }
  .pn-lightbox[data-state="open"] {
    transition: opacity 0.2s ease, visibility 0s linear 0s;
  }
}
