/* ShelterGallery front end. Colors come from the theme palette; designs restyle around it. */
.shelter-gallery__notice { font-size: .95em; opacity: .85; }
.shelter-gallery__heading { margin: 0 0 .6em; }
.shelter-gallery__items { margin: 0; padding: 0; }
.shelter-gallery__item { margin: 0; }
.shelter-gallery__link { display: block; }
.shelter-gallery__item img { display: block; width: 100%; height: auto; border-radius: var(--shgal-radius, 16px); }
.shelter-gallery__caption { font-size: .9em; margin-top: .4em; opacity: .85; }

.shelter-gallery--grid .shelter-gallery__items { display: grid; grid-template-columns: repeat(var(--shgal-cols, 4), minmax(0, 1fr)); gap: var(--shgal-gap, 16px); }
.shelter-gallery--grid .shelter-gallery__item img { aspect-ratio: 4 / 3; object-fit: cover; }
.shelter-gallery--masonry .shelter-gallery__items { column-count: var(--shgal-cols, 4); column-gap: var(--shgal-gap, 16px); }
.shelter-gallery--masonry .shelter-gallery__item { break-inside: avoid; margin-bottom: var(--shgal-gap, 16px); }
.shelter-gallery--strip .shelter-gallery__items { display: flex; gap: var(--shgal-gap, 16px); overflow-x: auto; scroll-snap-type: x mandatory; padding-bottom: 8px; }
.shelter-gallery--strip .shelter-gallery__item { flex: 0 0 calc(100% / var(--shgal-cols, 4) - var(--shgal-gap, 16px)); min-width: 200px; scroll-snap-align: start; }
.shelter-gallery--strip .shelter-gallery__item img { aspect-ratio: 4 / 3; object-fit: cover; }
@media (max-width: 900px) {
	.shelter-gallery--grid .shelter-gallery__items { grid-template-columns: repeat(2, minmax(0, 1fr)); }
	.shelter-gallery--masonry .shelter-gallery__items { column-count: 2; }
}

.shelter-gallery-albums__list { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 20px; }
.shelter-gallery-albums__cover { display: block; position: relative; text-decoration: none; color: inherit; border-radius: 16px; overflow: hidden; background: var(--wp--preset--color--blue-light, #eef6f9); }
.shelter-gallery-albums__cover img { display: block; width: 100%; height: auto; aspect-ratio: 4 / 3; object-fit: cover; }
.shelter-gallery-albums__title { display: block; padding: 12px 14px 0; font-weight: 700; font-size: 1.1rem; }
.shelter-gallery-albums__count { display: block; padding: 0 14px 12px; font-size: .9em; opacity: .8; }

.shgal-lb { position: fixed; inset: 0; z-index: 100000; background: rgba(0, 0, 0, .9); display: flex; align-items: center; justify-content: center; padding: 24px 64px; }
.shgal-lb[hidden] { display: none; }
.shgal-lb__fig { margin: 0; max-width: 100%; max-height: 100%; display: flex; flex-direction: column; align-items: center; gap: 10px; }
.shgal-lb__img { max-width: 100%; max-height: calc(100vh - 140px); object-fit: contain; }
.shgal-lb__cap { color: #fff; text-align: center; max-width: 70ch; }
.shgal-lb__count { position: absolute; bottom: 14px; left: 0; right: 0; margin: 0; text-align: center; color: #fff; opacity: .8; font-size: .9em; }
.shgal-lb button { position: absolute; background: rgba(255, 255, 255, .15); color: #fff; border: 0; width: 44px; height: 44px; border-radius: 50%; font-size: 28px; line-height: 1; cursor: pointer; }
.shgal-lb button:hover, .shgal-lb button:focus-visible { background: rgba(255, 255, 255, .35); outline: 2px solid #fff; }
.shgal-lb__close { top: 14px; right: 14px; }
.shgal-lb__prev { left: 10px; top: 50%; transform: translateY(-50%); }
.shgal-lb__next { right: 10px; top: 50%; transform: translateY(-50%); }
.shgal-lb button[hidden] { display: none; }
html.shgal-lb-open { overflow: hidden; }
@media (max-width: 600px) { .shgal-lb { padding: 56px 8px 40px; } }

.shelter-gallery__item[hidden], .shelter-gallery__filters[hidden], .shelter-gallery__none[hidden] { display: none; }
.shelter-gallery__filters { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 20px; }
.shelter-gallery__chip { appearance: none; border: 2px solid var(--wp--preset--color--blue, #3d8196); background: #fff; color: inherit; font: inherit; font-weight: 600; padding: 8px 16px; border-radius: 999px; cursor: pointer; }
.shelter-gallery__chip:hover { background: var(--wp--preset--color--blue-light, #eef6f9); }
.shelter-gallery__chip[aria-pressed="true"] { background: var(--wp--preset--color--blue, #3d8196); color: #fff; }
.shelter-gallery__chip:focus-visible { outline: 3px solid currentColor; outline-offset: 2px; }
.shelter-gallery__count { font-weight: 400; opacity: .8; margin-left: 2px; }
.shelter-gallery__none { opacity: .8; }

.shgal-lb__media { width: min(92vw, 1100px); aspect-ratio: 16 / 9; max-height: calc(100vh - 140px); background: #000; }
.shgal-lb__media[hidden], .shgal-lb__img[hidden] { display: none; }
.shgal-lb__player { width: 100%; height: 100%; border: 0; display: block; }

.shelter-gallery__item--video .shelter-gallery__link { position: relative; }
.shelter-gallery__ph { display: block; width: 100%; aspect-ratio: 16 / 9; background: var(--wp--preset--color--blue, #3d8196); border-radius: var(--shgal-radius, 16px); }
.shelter-gallery__badge, .shelter-video__badge { position: absolute; left: 50%; top: 50%; width: 64px; height: 64px; margin: -32px 0 0 -32px; border-radius: 50%; background: rgba(0, 0, 0, .62); box-shadow: 0 0 0 3px #fff inset; }
.shelter-gallery__badge::after, .shelter-video__badge::after { content: ""; position: absolute; left: 25px; top: 19px; border-style: solid; border-width: 13px 0 13px 21px; border-color: transparent transparent transparent #fff; }
.shelter-gallery__item--video .shelter-gallery__link:hover .shelter-gallery__badge, .shelter-video__play:hover .shelter-video__badge { background: rgba(0, 0, 0, .8); }
.shelter-gallery__duration { font-weight: 400; opacity: .8; margin-left: 4px; }
.shelter-gallery--grid .shelter-gallery__item--video img, .shelter-gallery--strip .shelter-gallery__item--video img { aspect-ratio: 16 / 9; }

.shelter-video { position: relative; width: 100%; aspect-ratio: 16 / 9; background: #000; border-radius: 20px; overflow: hidden; margin: 0 0 1em; }
.shelter-video__play { display: block; position: absolute; inset: 0; }
.shelter-video__play img { display: block; width: 100%; height: 100%; object-fit: cover; }
.shelter-video iframe, .shelter-video__file { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.shelter-video__meta { margin: 0 0 1em; opacity: .85; }
.shelter-video__tag { display: inline-block; padding: 2px 10px; margin-left: 4px; border: 1px solid currentColor; border-radius: 999px; font-size: .85em; }
.shelter-video__transcript { margin: 1em 0; }
.shelter-video__transcript summary { cursor: pointer; font-weight: 600; }
