/* Two-view location gallery: in the article, then directly fullscreen. */
.a360-loc1-gallery {
  --loc1-navy: var(--a360-navy, #0c2435);
  --loc1-gold: var(--a360-gold, #c9a663);
  --loc1-muted: var(--a360-muted, #56616b);
  width: 100%;
}

.a360-loc1-gallery .a360-loc1-gallery-hero {
  position: relative;
  display: block;
  width: 100%;
  aspect-ratio: 16 / 10;
  padding: 0;
  overflow: hidden;
  border: 0;
  border-radius: 2px;
  color: white;
  background: var(--loc1-navy);
  cursor: zoom-in;
  touch-action: pan-y;
}

.a360-loc1-gallery-hero > img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  user-select: none;
  -webkit-user-drag: none;
}

.a360-loc1-gallery-hero-action {
  position: absolute;
  right: clamp(12px, 2vw, 24px);
  bottom: clamp(12px, 2vw, 24px);
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 12px 17px;
  color: white;
  background: rgba(8, 30, 45, .92);
  font: 700 11px/1.2 var(--a360-sans, Arial, sans-serif);
  letter-spacing: .1em;
  text-transform: uppercase;
}

.a360-loc1-gallery .a360-loc1-gallery-hero:hover .a360-loc1-gallery-hero-action,
.a360-loc1-gallery .a360-loc1-gallery-hero:focus-visible .a360-loc1-gallery-hero-action {
  background: var(--loc1-navy);
  color: var(--loc1-gold);
}

.a360-loc1-gallery-rail {
  display: flex;
  gap: 10px;
  width: 100%;
  margin-top: 12px;
  padding: 2px 2px 12px;
  overflow-x: auto;
  overscroll-behavior-inline: contain;
  scroll-snap-type: x proximity;
  scrollbar-color: var(--loc1-gold) transparent;
  scrollbar-width: thin;
}

.a360-loc1-gallery .a360-loc1-gallery-thumb {
  position: relative;
  flex: 0 0 clamp(104px, 13vw, 160px);
  height: clamp(74px, 9vw, 106px);
  padding: 0;
  border: 0;
  border-radius: 2px;
  background: transparent;
  cursor: zoom-in;
  scroll-snap-align: start;
  transition: box-shadow .2s ease, opacity .2s ease;
}

.a360-loc1-gallery-thumb > img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.a360-loc1-gallery .a360-loc1-gallery-thumb.is-active,
.a360-loc1-gallery .a360-loc1-gallery-thumb[aria-pressed="true"] {
  box-shadow: 0 0 0 3px var(--loc1-gold);
}

.a360-loc1-gallery .a360-loc1-gallery-thumb:hover:not(.is-active) { opacity: .82; }

.a360-loc1-gallery-caption {
  margin: 4px 0 0;
  color: var(--loc1-muted);
  font: 400 13px/1.5 var(--a360-sans, Arial, sans-serif);
}

html.a360-loc1-gallery-modal-open,
body.a360-loc1-gallery-modal-open { overflow: hidden; }

.a360-loc1-gallery-lightbox {
  --loc1-gold: var(--a360-gold, #c9a663);
  box-sizing: border-box;
  position: fixed;
  inset: 0;
  display: flex;
  flex-direction: column;
  width: 100vw;
  max-width: none;
  height: 100vh;
  height: 100dvh;
  max-height: none;
  margin: 0;
  padding: 0;
  overflow: hidden;
  border: 0;
  border-radius: 0;
  color: white;
  background: #050505;
  font-family: var(--a360-sans, Arial, sans-serif);
  overscroll-behavior: contain;
}

.a360-loc1-gallery-lightbox:not([open]) { display: none; }
.a360-loc1-gallery-lightbox::backdrop { background: rgba(0, 0, 0, .86); }
.a360-loc1-gallery-lightbox button { box-sizing: border-box; font-family: inherit; cursor: pointer; }
.a360-loc1-gallery-lightbox :focus-visible,
.a360-loc1-gallery :focus-visible { outline: 3px solid var(--loc1-gold); outline-offset: 3px; }

.a360-loc1-gallery-full-bar {
  position: absolute;
  z-index: 3;
  inset: 0;
  pointer-events: none;
}

.a360-loc1-gallery-full-count {
  position: absolute;
  right: 50%;
  bottom: max(15px, env(safe-area-inset-bottom));
  transform: translateX(50%);
  margin: 0;
  padding: 5px 10px;
  border-radius: 20px;
  color: white;
  background: rgba(0, 0, 0, .45);
  font: 700 11px/1.3 var(--a360-sans, Arial, sans-serif);
  letter-spacing: .12em;
  text-transform: uppercase;
}

.a360-loc1-gallery-full-close {
  position: absolute;
  top: max(16px, env(safe-area-inset-top));
  right: max(16px, env(safe-area-inset-right));
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  padding: 0;
  pointer-events: auto;
  border: 1px solid rgba(255, 255, 255, .86);
  border-radius: 50%;
  color: white;
  background: rgba(0, 0, 0, .55);
  font: 400 30px/1 var(--a360-sans, Arial, sans-serif);
  transition: background-color .2s ease, border-color .2s ease;
}

.a360-loc1-gallery-full-close:hover {
  border-color: white;
  background: rgba(0, 0, 0, .8);
}

.a360-loc1-gallery-full-close span { margin-top: -3px; }

.a360-loc1-gallery-full-stage {
  position: relative;
  display: flex;
  flex: 1 1 auto;
  min-height: 0;
  align-items: center;
  justify-content: center;
  padding: 0;
  touch-action: pan-y;
  overscroll-behavior-x: contain;
}

.a360-loc1-gallery-full-stage img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  user-select: none;
  -webkit-user-drag: none;
}

.a360-loc1-gallery-full-nav {
  position: absolute;
  top: 50%;
  display: grid;
  place-items: center;
  width: 54px;
  height: 54px;
  padding: 0;
  transform: translateY(-50%);
  border: 1px solid rgba(255, 255, 255, .8);
  border-radius: 50%;
  color: white;
  background: rgba(0, 0, 0, .5);
  font: 300 36px/1 Georgia, serif;
  backdrop-filter: blur(5px);
  -webkit-backdrop-filter: blur(5px);
  transition: background-color .2s ease, border-color .2s ease;
}

.a360-loc1-gallery-full-nav:hover { border-color: white; background: rgba(0, 0, 0, .78); }
.a360-loc1-gallery-full-prev { left: max(var(--a360-photo-edge, 14px), env(safe-area-inset-left)); }
.a360-loc1-gallery-full-next { right: max(var(--a360-photo-edge, 14px), env(safe-area-inset-right)); }

.a360-loc1-gallery-full-caption {
  position: absolute;
  z-index: 2;
  left: max(var(--a360-photo-edge, 16px), env(safe-area-inset-left));
  bottom: max(14px, env(safe-area-inset-bottom));
  max-width: min(55ch, calc(100vw - 150px));
  margin: 0;
  padding: 6px 9px;
  color: rgba(255, 255, 255, .9);
  background: rgba(0, 0, 0, .45);
  font: 400 12px/1.4 var(--a360-sans, Arial, sans-serif);
}

@media (max-width: 700px) {
  .a360-loc1-gallery .a360-loc1-gallery-hero { aspect-ratio: 4 / 3; }
  .a360-loc1-gallery-rail { gap: 7px; }
  .a360-loc1-gallery .a360-loc1-gallery-thumb { flex-basis: 98px; height: 74px; }
  .a360-loc1-gallery-full-close { width: 44px; height: 44px; }
  .a360-loc1-gallery-full-nav { width: 44px; height: 44px; font-size: 29px; }
  .a360-loc1-gallery-full-caption {
    right: 12px;
    bottom: calc(max(12px, env(safe-area-inset-bottom)) + 30px);
    left: 12px;
    max-width: none;
    text-align: center;
    font-size: 11px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .a360-loc1-gallery .a360-loc1-gallery-thumb { transition: none; }
  .a360-loc1-gallery-rail { scroll-behavior: auto; }
  .a360-loc1-gallery-full-close,
  .a360-loc1-gallery-full-nav { transition: none; }
}
