
.frlb {
  position: fixed;
  inset: 0;
  z-index: 999999;
  display: none;
  opacity: 0;
  transition: opacity .24s ease;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.frlb.is-open {
  display: block;
  opacity: 1;
}

.frlb__backdrop {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at top right, rgba(220,38,38,.14), transparent 28%),
    rgba(10,12,18,.94);
  backdrop-filter: blur(8px);
}

.frlb__shell {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  box-sizing: border-box;
}

.frlb__figure {
  position: relative;
  margin: 0;
  width: min(96vw, 1600px);
  max-width: 100%;
}

.frlb__stage {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: calc(100vh - 100px);
  text-align: center;
}

.frlb__image {
  display: block;
  margin: 0 auto;
  max-width: calc(100vw - 80px);
  max-height: calc(100vh - 120px);
  width: auto;
  height: auto;
  object-fit: contain;
  border-radius: 20px;
  box-shadow: 0 24px 80px rgba(0,0,0,.45);
  background: #fff;
}

.frlb__caption {
  margin: 14px auto 0;
  max-width: min(980px, 90vw);
  text-align: center;
  color: rgba(255,255,255,.94);
  font-size: 15px;
  line-height: 1.5;
}

.frlb__close,
.frlb__nav,
.frlb__print {
  position: fixed;
  z-index: 1000001;
  border: 0;
  cursor: pointer;
  color: #fff;
  background: rgba(255,255,255,.11);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.08), 0 12px 24px rgba(0,0,0,.18);
  backdrop-filter: blur(10px);
  transition: transform .18s ease, background .18s ease, opacity .18s ease;
}

.frlb__close:hover,
.frlb__nav:hover,
.frlb__print:not(:disabled):hover {
  transform: translateY(-2px);
  background: rgba(255,255,255,.17);
}

.frlb__print {
  top: 18px;
  right: 80px;
  min-height: 52px;
  padding: 0 18px;
  display: inline-flex;
  align-items: center;
  gap: 9px;
  border-radius: 16px;
  font-size: 14px;
  line-height: 1.2;
  font-weight: 700;
  white-space: nowrap;
}

.frlb__print:disabled { opacity: .5; cursor: progress; }
.frlb__print:focus-visible,
.frlb__close:focus-visible,
.frlb__nav:focus-visible {
  outline: 3px solid #fff;
  outline-offset: 3px;
}

.frlb__close {
  top: 18px;
  right: 18px;
  width: 52px;
  height: 52px;
  border-radius: 16px;
  font-size: 34px;
  line-height: 1;
}

.frlb__nav {
  top: 50%;
  transform: translateY(-50%);
  width: 64px;
  height: 64px;
  border-radius: 18px;
  font-size: 42px;
  line-height: 1;
}

.frlb__nav:hover {
  transform: translateY(calc(-50% - 2px));
}

.frlb__nav--prev { left: 18px; }
.frlb__nav--next { right: 18px; }

body.frlb-open {
  overflow: hidden;
}

img {
  cursor: zoom-in;
}

img.frlb-no-lightbox,
.no-lightbox img,
.wp-block-social-links img,
.custom-logo,
.site-logo img,
.avatar,
.emoji,
[role="presentation"] img,
.widget img[width="1"][height="1"] {
  cursor: auto;
}

@media (max-width: 900px) {
  .frlb__shell { padding: 18px; }
  .frlb__image {
    max-width: calc(100vw - 56px);
    max-height: calc(100vh - 110px);
    border-radius: 16px;
  }
  .frlb__nav {
    width: 48px;
    height: 48px;
    border-radius: 14px;
    font-size: 34px;
  }
}

@media (max-width: 640px) {
  .frlb__shell { padding: 12px; }
  .frlb__stage { min-height: calc(100vh - 84px); }
  .frlb__print {
    top: 10px;
    right: 64px;
    min-height: 44px;
    padding: 0 11px;
    border-radius: 12px;
    font-size: 12px;
    gap: 6px;
  }
  .frlb__print svg { width: 17px; height: 17px; }
  .frlb__close {
    top: 10px;
    right: 10px;
    width: 44px;
    height: 44px;
    border-radius: 14px;
    font-size: 28px;
  }
  .frlb__nav {
    width: 44px;
    height: 44px;
    font-size: 30px;
  }
  .frlb__nav--prev { left: 8px; }
  .frlb__nav--next { right: 8px; }
  .frlb__image {
    max-width: calc(100vw - 24px);
    max-height: calc(100vh - 96px);
  }
  .frlb__caption { font-size: 14px; }
}

/* Printing is deliberately limited to the image currently open in the lightbox.
   Visitors use their browser's Print / Save as PDF dialog. */
@page frlb-image-portrait { size: A4 portrait; margin: 8mm; }
@page frlb-image-landscape { size: A4 landscape; margin: 8mm; }
@media print {
  body.frlb-print-image { margin: 0 !important; padding: 0 !important; overflow: visible !important; background: white !important; }
  body.frlb-print-image > :not(#frlb) { display: none !important; }
  body.frlb-print-image #frlb {
    position: static !important; inset: auto !important;
    display: block !important; opacity: 1 !important;
    width: 100% !important; height: auto !important;
    margin: 0 !important; padding: 0 !important;
    background: white !important; overflow: visible !important;
  }
  body.frlb-print-image #frlb[data-frlb-print-orientation="portrait"] { page: frlb-image-portrait; }
  body.frlb-print-image #frlb[data-frlb-print-orientation="landscape"] { page: frlb-image-landscape; }
  body.frlb-print-image #frlb .frlb__shell,
  body.frlb-print-image #frlb .frlb__figure,
  body.frlb-print-image #frlb .frlb__stage {
    position: static !important;
    display: block !important;
    width: 100% !important; max-width: 100% !important;
    height: auto !important; min-height: 0 !important;
    margin: 0 !important; padding: 0 !important;
    background: white !important;
    box-shadow: none !important;
  }
  body.frlb-print-image #frlb .frlb__image {
    display: block !important; width: auto !important; height: auto !important;
    max-width: 100% !important; max-height: 275mm !important;
    margin: 0 auto !important; object-fit: contain !important;
    border-radius: 0 !important; box-shadow: none !important;
    break-inside: avoid;
  }
  body.frlb-print-image #frlb[data-frlb-print-orientation="landscape"] .frlb__image { max-height: 188mm !important; }
  body.frlb-print-image #frlb .frlb__backdrop,
  body.frlb-print-image #frlb .frlb__caption,
  body.frlb-print-image #frlb .frlb__close,
  body.frlb-print-image #frlb .frlb__nav,
  body.frlb-print-image #frlb .frlb__print { display: none !important; }
}
