/* Ticket107436 R2: active Hypermedia template + its own lightGallery only. */
#pb-site .pb-hm-detail .detail__album.row:not([data-pb-hm-gallery="text"]){display:grid;grid-template-columns:repeat(6,minmax(0,1fr));gap:12px;margin:0;padding:12px 0;min-width:0}
#pb-site .pb-hm-detail .detail__album.row:not([data-pb-hm-gallery="text"]):before,#pb-site .pb-hm-detail .detail__album.row:not([data-pb-hm-gallery="text"]):after{display:none}
#pb-site .pb-hm-detail .detail__album.row:not([data-pb-hm-gallery="text"])>.detail__album__item{float:none;min-width:0;max-width:100%;width:auto;padding:0;margin:0}
#pb-site .pb-hm-detail .detail__album__image{width:100%;aspect-ratio:4/3;overflow:hidden}
#pb-site .pb-hm-detail .detail__album__image img{display:block;width:100%;height:100%;object-fit:contain;margin:0}
#pb-site .pb-hm-detail .article__video{max-width:100%;margin:0 auto;min-width:0}
#pb-site .pb-hm-detail .article__video video,#pb-site .pb-hm-detail .article__video iframe{display:block;width:100%;max-width:100%;height:auto;max-height:70vh;object-fit:contain;margin:0 auto}
#pb-site .pb-hm-detail .article__video audio{display:block;width:min(100%,720px);min-height:54px;max-width:100%;margin:15px auto}
#pb-site .pb-hm-detail .article__image__container img{max-width:100%;width:auto;height:auto;object-fit:contain}
#pb-site .pb-hm-detail .related__articles__list,#pb-site .pb-hm-detail .related__articles__list>li{list-style:none!important}
#pb-site .pb-hm-detail .related__articles__list>li:before,#pb-site .pb-hm-detail .related__articles__list>li::marker{content:none!important;display:none!important}
@media(max-width:767px){#pb-site .pb-hm-detail .detail__album.row:not([data-pb-hm-gallery="text"]){grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}}

/* Retest 484: restore item spacing while retaining removal of bullets. */
#pb-site .pb-hm-detail .related__articles__list>li{margin:0;padding:8px 0}
#pb-site .pb-hm-detail .related__articles__list>li>a{gap:13px}
/* No fixed image/video stretch: the active player's original DOM is retained.
   Measured available space is applied only to the opened Hypermedia gallery. */
.lg-outer.pb-hm-lightbox{--pb-lg-top:48px;--pb-lg-bottom:132px}
.lg-outer.pb-hm-lightbox .lg-content{top:var(--pb-lg-top)!important;bottom:var(--pb-lg-bottom)!important;height:auto!important}
.lg-outer.pb-hm-lightbox>.lg-inner{top:var(--pb-lg-top)!important;bottom:var(--pb-lg-bottom)!important;height:auto!important}
.lg-outer.pb-hm-lightbox .lg-item{height:100%}
.lg-outer.pb-hm-lightbox .lg-item img.lg-image{width:auto!important;height:auto!important;max-width:calc(100% - 32px)!important;max-height:100%!important;object-fit:contain}
.lg-outer.pb-hm-lightbox .lg-video-cont.pb-hm-sized{width:var(--pb-media-width)!important;max-width:calc(100% - 32px)!important;height:var(--pb-media-height)!important;max-height:100%;padding:0!important;display:inline-block;vertical-align:middle}
.lg-outer.pb-hm-lightbox .pb-hm-sized>.lg-video{position:relative;width:100%;height:100%;padding:0!important;line-height:0;overflow:visible}
.lg-outer.pb-hm-lightbox .pb-hm-sized .lg-video-poster,
.lg-outer.pb-hm-lightbox .pb-hm-sized .lg-video>video,
.lg-outer.pb-hm-lightbox .pb-hm-sized .lg-video>iframe{position:absolute!important;inset:0!important;width:100%!important;height:100%!important;max-width:100%;max-height:100%;object-fit:contain!important;margin:0!important}
.lg-outer.pb-hm-lightbox .pb-hm-audio-slide .lg-video-cont{width:min(720px,calc(100% - 32px))!important;height:80px!important;max-width:calc(100% - 32px)!important;padding:0!important;display:inline-block;vertical-align:middle}
.lg-outer.pb-hm-lightbox .pb-hm-audio-slide .lg-video{display:flex;align-items:center;justify-content:center;height:80px!important;width:100%;padding:0!important;position:relative}
.lg-outer.pb-hm-lightbox .pb-hm-audio-slide .lg-video audio,
.lg-outer.pb-hm-lightbox .pb-hm-audio-slide .lg-video video{position:static!important;inset:auto!important;display:block!important;width:100%!important;height:54px!important;min-height:54px;max-height:54px;margin:0!important}
.lg-outer.pb-hm-lightbox .lg-sub-html{max-height:64px;overflow:auto;bottom:var(--pb-lg-thumbs,0px)!important;line-height:1.8}
.lg-outer.pb-hm-lightbox .lg-thumb-outer{bottom:0!important}

/* Ticket107436 R4 / 485: mobile active-audio controls do not intersect the nav arrows. */
@media(max-width:767px){
 .lg-outer.pb-hm-lightbox.pb-hm-audio-active .lg-prev,
 .lg-outer.pb-hm-lightbox.pb-hm-audio-active .lg-next{top:var(--pb-audio-nav-top,calc(50% - 22px))!important;bottom:auto!important;transform:none!important;margin-top:0!important;height:44px;min-height:44px;padding-block:0;box-sizing:border-box}
 .lg-outer.pb-hm-lightbox .pb-hm-audio-slide .lg-video-cont{transform:translateY(var(--pb-audio-offset,0px))}
}

/* Hypermedia posts comment confirmation through toastr, whose container lives directly under body. */
body:has(#pb-site .pb-hm-detail) #toast-container > .toast-success {
  display:block; color:#164b36!important; background-color:#e8f6ec!important;
  border:1px solid #8bb89b; opacity:1;
}
body:has(#pb-site .pb-hm-detail) #toast-container > .toast-success :is(.toast-title,.toast-message,.toast-close-button) { color:#164b36!important; }
