/* TIL GALLERY VIEWER & ALS IDENTITY 2026-08-24 */

/* The supplied transparent Als logo is dark artwork. Render it white over the
   signed dark banner shade without adding a plate or non-transparent box. */
body.til-gallery-viewer-active .til-partner-banner--als .til-partner-banner__logo{
  position:relative!important;
  z-index:5!important;
  display:block!important;
  visibility:visible!important;
  opacity:1!important;
  width:auto!important;
  height:auto!important;
  min-width:min(150px,42vw)!important;
  max-width:min(240px,58vw)!important;
  max-height:92px!important;
  margin:0 0 12px!important;
  object-fit:contain!important;
  object-position:left center!important;
  mix-blend-mode:normal!important;
  filter:brightness(0) invert(1) drop-shadow(0 3px 12px rgba(0,0,0,.38))!important;
}

/* Captions remain in the document for editorial reversibility, but are not
   painted over gallery thumbnails. Partner banners are deliberately excluded. */
body.til-gallery-viewer-active .til-photo-grid .til-photo-grid__item>figcaption,
body.til-gallery-viewer-active .til-photo-grid figure>figcaption,
body.til-gallery-viewer-active .til-destination-gallery figcaption,
body.til-gallery-viewer-active .til-destination-gallery .wp-element-caption{
  display:none!important;
}

body.til-gallery-viewer-active .til-gallery-lightbox__trigger{
  display:block;
  width:100%;
  height:100%;
  margin:0;
  padding:0;
  overflow:hidden;
  border:0;
  border-radius:inherit;
  background:transparent;
  color:inherit;
  cursor:zoom-in;
  appearance:none;
}

body.til-gallery-viewer-active .til-gallery-lightbox__trigger:focus-visible{
  outline:3px solid #8fd4d8;
  outline-offset:-5px;
}

body.til-gallery-viewer-active .til-gallery-lightbox__trigger img{
  display:block;
  width:100%;
  height:100%;
  transition:transform .35s ease;
}

body.til-gallery-viewer-active .til-destination-gallery .til-gallery-lightbox__trigger{
  display:flex;
  flex:1 1 100%;
  align-items:stretch;
}

body.til-gallery-viewer-active .til-gallery-lightbox__trigger:hover img,
body.til-gallery-viewer-active .til-gallery-lightbox__trigger:focus-visible img{
  transform:scale(1.025);
}

body.til-gallery-lightbox-open{
  overflow:hidden!important;
}

.til-gallery-lightbox{
  position:fixed;
  z-index:1000000;
  inset:0;
  display:none;
  box-sizing:border-box;
  padding:clamp(54px,6vw,86px) clamp(16px,4vw,64px) clamp(26px,4vw,54px);
  align-items:center;
  justify-content:center;
  background:rgba(3,24,29,.96);
  color:#fff;
  opacity:0;
}

.til-gallery-lightbox.is-open{
  display:flex;
  opacity:1;
}

.til-gallery-lightbox__stage{
  position:relative;
  display:flex;
  width:min(1540px,88vw);
  height:min(88vh,980px);
  align-items:center;
  justify-content:center;
}

.til-gallery-lightbox__image{
  display:block;
  width:auto;
  height:auto;
  max-width:100%;
  max-height:100%;
  border-radius:6px;
  object-fit:contain;
  box-shadow:0 22px 70px rgba(0,0,0,.42);
}

.til-gallery-lightbox__close,
.til-gallery-lightbox__nav{
  position:absolute;
  z-index:2;
  display:inline-flex;
  width:48px;
  height:48px;
  padding:0;
  align-items:center;
  justify-content:center;
  border:1px solid rgba(255,255,255,.5);
  border-radius:999px;
  background:rgba(4,43,51,.78);
  color:#fff;
  font-family:Arial,sans-serif;
  font-size:34px;
  font-weight:300;
  line-height:1;
  cursor:pointer;
  appearance:none;
  backdrop-filter:blur(8px);
}

.til-gallery-lightbox__close:hover,
.til-gallery-lightbox__close:focus-visible,
.til-gallery-lightbox__nav:hover,
.til-gallery-lightbox__nav:focus-visible{
  border-color:#fff;
  background:#fff;
  color:#08313a;
  outline:0;
}

.til-gallery-lightbox__close{
  top:14px;
  right:18px;
  font-size:31px;
}

.til-gallery-lightbox__nav--prev{
  top:50%;
  left:18px;
  transform:translateY(-50%);
}

.til-gallery-lightbox__nav--next{
  top:50%;
  right:18px;
  transform:translateY(-50%);
}

.til-gallery-lightbox__counter{
  position:absolute;
  right:0;
  bottom:-34px;
  left:0;
  color:rgba(255,255,255,.86);
  font-family:var(--til-sans,"Noto Sans",Arial,sans-serif);
  font-size:13px;
  font-weight:700;
  letter-spacing:.08em;
  line-height:1;
  text-align:center;
}

@media (max-width:782px){
  body.til-gallery-viewer-active .til-partner-banner--als .til-partner-banner__logo{
    min-width:min(138px,48vw)!important;
    max-width:min(210px,62vw)!important;
    max-height:78px!important;
  }

  .til-gallery-lightbox{
    padding:64px 12px 52px;
  }

  .til-gallery-lightbox__stage{
    width:100%;
    height:calc(100svh - 124px);
  }

  .til-gallery-lightbox__close,
  .til-gallery-lightbox__nav{
    width:44px;
    height:44px;
  }

  .til-gallery-lightbox__close{
    top:10px;
    right:10px;
  }

  .til-gallery-lightbox__nav--prev{
    left:8px;
  }

  .til-gallery-lightbox__nav--next{
    right:8px;
  }
}

@media (prefers-reduced-motion:reduce){
  body.til-gallery-viewer-active .til-gallery-lightbox__trigger img{
    transition:none;
  }
}
