/* gallery.css — photo gallery overlay (see gallery.js) */
html.jg-lock, html.jg-lock body { overflow: hidden !important; }

.jg { position: fixed; inset: 0; z-index: 100000; display: flex; align-items: center; justify-content: center;
  font-family: inherit; color: #fff; opacity: 0; transition: opacity .2s ease; }
.jg[hidden] { display: none; }
.jg.jg-open { opacity: 1; }
.jg-backdrop { position: absolute; inset: 0; background: rgba(8, 13, 30, .96); backdrop-filter: blur(3px); }
.jg-box { position: relative; width: min(1180px, 100vw - 32px); height: min(860px, 100dvh - 32px);
  display: flex; flex-direction: column; gap: 10px; }

.jg-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 40px; }
.jg-title b { display: block; font-size: 17px; font-weight: 600; letter-spacing: .02em; }
.jg-count { font-size: 13px; color: #aeb9d8; }
.jg button { font: inherit; color: inherit; cursor: pointer; }
.jg-close { flex: 0 0 auto; width: 42px; height: 42px; border-radius: 50%; border: 1px solid rgba(255,255,255,.4);
  background: rgba(255,255,255,.06); font-size: 26px; line-height: 1; display: grid; place-items: center; transition: background .2s; }
.jg-close:hover, .jg-close:focus-visible { background: rgba(255,255,255,.18); outline: none; }

.jg-stage { position: relative; flex: 1 1 auto; min-height: 0; border-radius: 10px; overflow: hidden;
  background: rgba(255,255,255,.03); touch-action: pan-y; user-select: none; }
.jg-img { margin: 0 !important; border-radius: 0 !important; position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; opacity: 0; transition: opacity .25s ease; }
.jg-img.jg-on { opacity: 1; }
.jg-nav { position: absolute; top: 50%; transform: translateY(-50%); width: 50px; height: 50px; border-radius: 50%;
  border: 0; background: rgba(8,13,30,.55); font-size: 34px; line-height: 1; display: grid; place-items: center; padding-bottom: 4px;
  transition: background .2s; }
.jg-nav:hover, .jg-nav:focus-visible { background: #c6a361; color: #16213f; outline: none; }
.jg-nav[hidden] { display: none; }
.jg-prev { left: 12px; } .jg-next { right: 12px; }
.jg-caption { position: absolute; left: 12px; bottom: 12px; max-width: calc(100% - 24px); background: rgba(8,13,30,.68);
  padding: 6px 12px; border-radius: 20px; font-size: 14px; }
.jg-caption[hidden] { display: none; }
.jg-error { position: absolute; inset: 0; display: grid; place-items: center; color: #aeb9d8; font-size: 15px; }
.jg-error[hidden] { display: none; }
.jg-loader { position: absolute; left: 50%; top: 50%; width: 36px; height: 36px; margin: -18px 0 0 -18px; border-radius: 50%;
  border: 3px solid rgba(255,255,255,.18); border-top-color: #c6a361; opacity: 0; animation: jg-spin .8s linear infinite; transition: opacity .2s; }
.jg-loader.jg-on { opacity: 1; transition-delay: .15s; }
@keyframes jg-spin { to { transform: rotate(360deg); } }

.jg-thumbs { flex: 0 0 auto; display: flex; gap: 8px; overflow-x: auto; padding: 2px 2px 4px; scrollbar-width: thin; }
.jg-thumbs[hidden] { display: none; }
.jg-thumb { flex: 0 0 96px; height: 64px; padding: 0; border: 0; border-radius: 6px; overflow: hidden; opacity: .5;
  background: rgba(255,255,255,.08); transition: opacity .2s, outline-color .2s; outline: 2px solid transparent; outline-offset: 0; }
.jg-thumb img { margin: 0 !important; width: 100%; height: 100%; object-fit: cover; display: block; }
.jg-thumb:hover, .jg-thumb:focus-visible { opacity: .85; }
.jg-thumb.jg-on { opacity: 1; outline-color: #c6a361; }

.jg-bottom { display: flex; justify-content: space-between; align-items: center; gap: 12px; font-size: 13px; color: #aeb9d8; min-height: 20px; }
.jg-full { color: #fff; text-decoration: none; border-bottom: 1px solid #c6a361; padding-bottom: 1px; }
.jg-full[hidden] { display: none; }

@media (max-width: 600px) {
  .jg-box { width: 100vw; height: 100dvh; padding: 10px 10px 12px; gap: 8px; }
  .jg-stage { border-radius: 0; margin: 0 -10px; }
  .jg-nav { width: 40px; height: 40px; font-size: 28px; }
  .jg-thumb { flex-basis: 72px; height: 50px; }
  .jg-hint { display: none; }
  .jg-bottom { justify-content: flex-end; }
}
@media (prefers-reduced-motion: reduce) { .jg, .jg-img { transition: none; } }

/* "View photos" button inside Show Details */
.row-actions { padding: 6px 0 4px 10px; }
.view-photos { display: inline-flex; align-items: center; gap: 8px; font: inherit; font-size: 15px; color: inherit; cursor: pointer;
  background: transparent; border: 2px solid currentColor; border-radius: 2em; padding: 6px 16px; transition: background .2s, color .2s; }
.view-photos svg { width: 18px; height: 18px; fill: currentColor; }
.view-photos:hover, .view-photos:focus-visible { background: #c6a361; border-color: #c6a361; color: #16213f; outline: none; }
.jg svg { transform: none !important; margin: 0 !important; }
