/* Gallery: same look as the GridGallery gallery on lukakurashvili.com */
#ImGallery { display: block; }
.grid-gallery { text-align: center; margin: 0 -20px; }
.grid-gallery li { margin: 20px; }
.DispImage { display: block; height: auto; min-height: 20px; line-height: .8em; background: #fff; }
.ImgPlaceholder { position: relative; padding: 3px; border: 1px solid #dfdede; }
.ImgPlaceholder a { display: block; line-height: .4em; }
.ImgPlaceholder img.gg-thumb { display: block; width: 170px; height: auto; max-width: 100%; }
.ImgPlaceholder a:focus-visible { outline: 2px solid var(--green, #4f6b4c); outline-offset: 4px; }
img.gg-fade { opacity: 0; transition: opacity .6s ease; }
img.gg-fade.gg-loaded { opacity: 1; }

/* Lightbox (own code): white backdrop, framed image, grey caption, dark square controls */
.aeslb { position: fixed; inset: 0; z-index: 9999; outline: none; overflow: hidden; -webkit-tap-highlight-color: transparent; font-family: var(--font); }
.aeslb-bg { position: absolute; inset: 0; background: #fff; opacity: 0; transition: opacity .33s ease; }
.aeslb.is-open .aeslb-bg { opacity: 1; }
.aeslb-stage { position: absolute; inset: 0; }
.aeslb-img { position: absolute; display: block; max-width: none; border: 10px solid #fff; box-sizing: border-box; opacity: 0; user-select: none; }
.aeslb-caption { position: absolute; left: 0; right: 0; bottom: 0; padding: 10px 44px 24px; color: rgba(92, 92, 92, 1); font-size: 14px; line-height: 1.5; text-align: left; opacity: 0; transition: opacity .25s ease; }
.aeslb-toolbar { position: absolute; top: 0; right: 0; display: flex; z-index: 2; }
.aeslb-btn { display: inline-grid; place-items: center; width: 44px; height: 44px; padding: 10px; margin: 0; border: 0; border-radius: 0; background: rgba(30, 30, 30, .6); color: #ccc; cursor: pointer; transition: color .2s, opacity .25s, visibility .25s; }
.aeslb-btn:hover { color: #fff; }
.aeslb-btn:focus-visible { outline: 2px solid #4f6b4c; outline-offset: -2px; color: #fff; }
.aeslb-btn svg { width: 24px; height: 24px; display: block; }
.aeslb-btn[hidden] { display: none; }
.aeslb-prev, .aeslb-next { position: absolute; top: 50%; width: 40px; height: 40px; padding: 8px; margin-top: -20px; z-index: 2; }
.aeslb-prev { left: 10px; }
.aeslb-next { right: 10px; }
.aeslb-toolbar, .aeslb-prev, .aeslb-next { opacity: 0; }
.aeslb.is-open .aeslb-toolbar, .aeslb.is-open .aeslb-prev, .aeslb.is-open .aeslb-next, .aeslb.is-open .aeslb-caption { opacity: 1; }
.aeslb.is-open.is-idle .aeslb-toolbar, .aeslb.is-open.is-idle .aeslb-prev, .aeslb.is-open.is-idle .aeslb-next { opacity: 0; visibility: hidden; }
.aeslb.is-closing .aeslb-toolbar, .aeslb.is-closing .aeslb-prev, .aeslb.is-closing .aeslb-next, .aeslb.is-closing .aeslb-caption { opacity: 0; }
.aeslb.is-loading::after { content: ""; position: absolute; top: 50%; left: 50%; width: 44px; height: 44px; margin: -22px 0 0 -22px; border: 4px solid rgba(100, 100, 100, .25); border-bottom-color: #666; border-radius: 50%; animation: aeslb-spin .8s linear infinite; }
@keyframes aeslb-spin { to { transform: rotate(360deg); } }

/* Share dialog */
.aeslb-share-overlay { position: absolute; inset: 0; z-index: 5; display: grid; place-items: center; background: #fff; }
.aeslb-sharebox { position: relative; background: #f4f4f4; border-radius: 3px; max-width: 90%; padding: 30px; text-align: center; box-sizing: border-box; }
.aeslb-share-title { color: #222; font-size: 35px; font-weight: 700; margin: 0 0 20px; line-height: 1.2; font-family: var(--font); }
.aeslb-share-links { display: flex; flex-wrap: wrap; justify-content: center; gap: 5px 10px; margin: 0; }
.aeslb-share-btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-width: 130px; height: 40px; padding: 0 25px; border-radius: 3px; color: #fff; font-size: 14px; font-weight: 700; line-height: 40px; text-decoration: none; white-space: nowrap; box-sizing: border-box; }
.aeslb-share-btn:hover { color: #fff; filter: brightness(1.1); }
.aeslb-share-btn svg { width: 20px; height: 20px; }
.aeslb-share-fb { background: #3b5998; }
.aeslb-share-tw { background: #1da1f2; }
.aeslb-share-pin { background: #bd081c; }
.aeslb-share-input { display: block; width: 100%; margin: 10px 0 0; padding: 10px 15px; border: 0; border-bottom: 1px solid #d7d7d7; background: transparent; color: #5d5b5b; font: 14px var(--font); outline: none; box-sizing: border-box; }
.aeslb-share-close { position: absolute; top: 0; right: 0; background: transparent; color: #555; }
.aeslb-share-close:hover { color: #000; }

@media (max-width: 600px) {
  .aeslb-prev, .aeslb-next { top: auto; bottom: 12px; margin-top: 0; }
  .aeslb-caption { padding-right: 70px; padding-left: 60px; }
  .aeslb-share-title { font-size: 26px; }
}

@media (max-width: 480px) {
  .grid-gallery li { margin: 16px 10px; }
}
@media (prefers-reduced-motion: reduce) {
  img.gg-fade { opacity: 1; transition: none; }
  .aeslb-bg, .aeslb-caption, .aeslb-btn { transition: none; }
  .aeslb.is-loading::after { animation-duration: 2s; }
}
