/* Photo presentation on the place detail, shared by approved photos, posters and aerial views. */
.place-detail .place-gallery {
  min-width:0;
  --gallery-paper:#fffcf8;
  --gallery-ink:#1c2d40;
  --gallery-edge:#e7ddd3;
}
.place-gallery .gallery-layout {min-width:0}
.place-detail .place-gallery[hidden] {display:none}
.place-gallery .photos-grid {display:grid;grid-template-columns:minmax(0,1fr);gap:12px}
.place-gallery .photos-grid>.place-photo {margin:0;min-width:0}
.place-gallery .place-photo .photo-frame {
  position:relative;display:block;overflow:hidden;isolation:isolate;
  width:100%;aspect-ratio:1.68;border:0;border-radius:16px;background:#eee8dd;
}
.place-gallery .place-photo .photo-frame picture,
.place-gallery .place-photo .photo-frame img {
  display:block;width:100%;height:100%;max-width:none;max-height:none;aspect-ratio:auto;
}
.place-gallery .photos-grid .place-photo .photo-frame img {object-fit:cover}
.place-gallery .photos-grid .film-poster .photo-frame img,
.place-gallery .photos-grid .aerial-photo .photo-frame img {object-fit:contain}
.place-gallery .photos-grid .film-poster .photo-frame {background:#ece6dd}
.place-gallery .shared-video .video-action {
  position:absolute;z-index:1;display:inline-flex;align-items:center;
  border-radius:8px;background:#24252cdb;color:white;max-width:calc(100% - 70px);
  left:12px;bottom:12px;gap:7px;padding:7px 10px;font-size:.83rem;line-height:1.2;font-weight:600;
}
.place-gallery .place-photo .photo-credit,.large-photo .photo-credit {
  display:block;margin:5px 2px 0;font-size:.82rem;line-height:1.4;color:#57584f;overflow-wrap:anywhere;
}
.place-gallery .photo-credit span,.place-gallery .photo-credit a,
.large-photo .photo-credit span,.large-photo .photo-credit a {font:inherit;color:inherit}
.place-gallery .photo-credit a,.large-photo .photo-credit a {text-underline-offset:.15em}
.place-gallery .gallery-bar {display:flex;align-items:center;justify-content:flex-end;gap:9px;min-width:0}
.place-gallery .gallery-add {
  display:inline-flex;align-items:center;justify-content:center;gap:6px;flex:none;
  min-height:40px;padding:5px 10px;background:var(--gallery-paper);color:#415749;
  border:1px solid var(--gallery-edge);border-radius:9px;text-decoration:none;
  font:600 .83rem/1.18 var(--font-body,sans-serif);
}
.place-gallery .gallery-add:hover,.place-gallery .gallery-add:focus-visible {background:#f2f1e7;border-color:#baab97}
.place-gallery .gallery-bar:not(:has(.gallery-add:not([hidden]),.gallery-thumbs:not([hidden]))) {display:none}

.place-gallery[data-gallery-ready] .gallery-layout {
  display:grid;grid-template-columns:minmax(0,1fr);grid-template-areas:"media" "tools" "credit";
  gap:8px;align-items:center;
}
.place-gallery[data-gallery-ready] .gallery-layout:not(:has([data-gallery-slide])) {display:none}
.place-gallery[data-gallery-ready] .photos-grid,.place-gallery[data-gallery-ready] .place-photo:not([hidden]) {display:contents}
.place-gallery[data-gallery-ready] .place-photo .photo-frame {grid-area:media}
.place-gallery[data-gallery-ready] .place-photo .photo-credit {grid-area:credit;margin:0 1px}
.place-gallery[data-gallery-ready] .gallery-bar {grid-area:tools}
.place-gallery[data-gallery-ready] .gallery-layout:has(.gallery-thumbs[hidden]):has(.gallery-add:not([hidden])) {
  grid-template-columns:minmax(0,1fr) auto;grid-template-areas:"media media" "credit tools";
}
.place-gallery .gallery-controls {
  position:relative;z-index:1;grid-area:media;align-self:stretch;min-width:0;pointer-events:none;
}
.gallery-controls button,.gallery-viewer-nav button {pointer-events:auto}
.gallery-direction,.gallery-expand {
  display:grid;place-items:center;padding:0;border:0;cursor:pointer;
  font:600 1rem var(--font-body,sans-serif);
}
.gallery-controls .gallery-direction,.gallery-controls .gallery-expand {
  position:absolute;box-shadow:0 2px 10px #151c2733;
}
.gallery-direction {
  width:42px;height:42px;border-radius:50%;
  background:#fffcf4ef;color:#243345;
}
.gallery-controls .gallery-direction {top:50%;transform:translateY(-50%)}
.gallery-controls .gallery-prev {left:12px}
.gallery-controls .gallery-next {right:12px}
.gallery-direction::before {
  content:"";display:block;width:10px;height:10px;border:solid currentColor;border-width:2px 2px 0 0;
}
.gallery-prev::before {transform:translateX(2px) rotate(-135deg)}
.gallery-next::before {transform:translateX(-2px) rotate(45deg)}
.gallery-direction:hover,.gallery-direction:focus-visible {background:white;color:#9e4738}
.gallery-controls .gallery-expand {
  top:11px;right:11px;width:40px;height:40px;border-radius:11px;
  background:#282732bc;color:white;border:1px solid #ffffff52;
}
.gallery-expand:hover,.gallery-expand:focus-visible {background:#21232be6}
.gallery-expand>span {
  width:17px;height:17px;
  background:
    linear-gradient(currentColor,currentColor) left top/6px 2px,
    linear-gradient(currentColor,currentColor) left top/2px 6px,
    linear-gradient(currentColor,currentColor) right top/6px 2px,
    linear-gradient(currentColor,currentColor) right top/2px 6px,
    linear-gradient(currentColor,currentColor) left bottom/6px 2px,
    linear-gradient(currentColor,currentColor) left bottom/2px 6px,
    linear-gradient(currentColor,currentColor) right bottom/6px 2px,
    linear-gradient(currentColor,currentColor) right bottom/2px 6px;
  background-repeat:no-repeat;
}
.gallery-controls .gallery-position {
  position:absolute;left:50%;bottom:12px;transform:translateX(-50%);padding:4px 10px;
  border-radius:15px;background:#24252cd6;color:white;font:650 .79rem/1.3 var(--font-body,sans-serif);
  font-variant-numeric:tabular-nums;white-space:nowrap;
}
.gallery-layout:has(.shared-video:not([hidden])) .gallery-position {left:auto;right:12px;transform:none}
.gallery-thumbs {
  display:flex;align-items:center;gap:6px;flex:1;min-width:0;overflow-x:auto;
  padding:3px 2px;scrollbar-width:thin;scroll-padding-inline:3px;
}
.gallery-thumbnail {
  display:block;overflow:hidden;padding:0;flex:0 0 clamp(64px,7.6vw,110px);aspect-ratio:1.43;
  background:#eee8dc;border:2px solid transparent;border-radius:10px;color:#614330;
  text-align:center;font-weight:650;cursor:pointer;
}
.gallery-thumbnail img {display:block;width:100%;height:100%;object-fit:cover}
.gallery-thumbnail.poster-thumbnail img {object-fit:contain}
.gallery-thumbnail[aria-pressed=true] {border-color:#dc644f;box-shadow:0 0 0 1px #dc644f}
.gallery-thumbnail:focus-visible {outline-offset:-3px}
.gallery-bar:has(.gallery-thumbs:not([hidden])) .gallery-add {align-self:center;margin:3px 0;text-align:center}
.place-gallery .photo-invite {margin-top:0}
.place-gallery .gallery-layout:has([data-gallery-slide])+.photo-invite {margin-top:16px}

dialog#photo-viewer {
  width:min(96vw,980px);max-width:calc(100vw - 18px);max-height:94svh;overflow:auto;
  border:1px solid #ede3d7;border-radius:16px;padding:12px;background:#fffbf5;color:#202d3f;
}
dialog#photo-viewer::backdrop {background:#141b25d9}
dialog#photo-viewer .close-photo {
  position:absolute;z-index:2;top:18px;right:18px;display:grid;place-items:center;width:42px;height:42px;min-height:0;
  padding:0;border:1px solid #ffffff57;border-radius:12px;background:#292b33ce;color:white;
}
dialog#photo-viewer .large-photo figure {margin:0;position:relative}
dialog#photo-viewer .large-photo img {
  display:block;width:100%;height:auto;max-height:74svh;object-fit:contain;background:#f0e9df;border-radius:9px;
}
dialog#photo-viewer .large-photo figcaption {margin:8px 3px 0;font-size:.91rem}
.large-photo figcaption .gallery-image-title {display:block;color:#263341;font-size:1rem;line-height:1.35;margin:0 0 3px}
.gallery-viewer-nav {display:flex;align-items:center;justify-content:center;gap:18px;margin-top:7px;font-variant-numeric:tabular-nums}
.gallery-viewer-nav .gallery-direction {background:#ebe6dc;width:40px;height:40px}
.lightbox-unavailable {margin:2rem auto;padding:1rem;text-align:center}
@media(max-width:600px) {
  .place-gallery .place-photo .photo-frame {aspect-ratio:1.48;border-radius:13px}
  .place-gallery .gallery-add {min-height:43px}
  .gallery-controls .gallery-direction {width:38px;height:38px}
  .gallery-controls .gallery-prev {left:8px}
  .gallery-controls .gallery-next {right:8px}
  .gallery-controls .gallery-expand {top:8px;right:8px}
  .gallery-bar:has(.gallery-thumbs:not([hidden])) .gallery-add {max-width:94px;padding-inline:8px;font-size:.82rem}
  .gallery-controls .gallery-expand::after,.gallery-controls .gallery-direction::after {content:"";position:absolute;inset:-3px}
}
@media(forced-colors:active) {
  .gallery-thumbnail[aria-pressed=true] {outline:3px solid Highlight;outline-offset:-3px}
  .gallery-expand {forced-color-adjust:none}
}
