/* OKN Galleries — front end. The look follows NextGEN's classic stylesheet:
   a white 4px mat and a thin grey border, thumbnails in a wrapping row. */
.okn-gallery { display: flex; flex-wrap: wrap; align-items: flex-start; gap: 5px; margin: 10px 0 1.5em; clear: both; }
.okn-gallery .ngg-gallery-thumbnail-box, .okn-gallery .ngg-gallery-thumbnail { float: none; margin: 0; }
.okn-gallery img, .okn-singlepic img, .okn-album img, .okn-browser img { display: block; max-width: 100%; height: auto; margin: 0; padding: 4px; background: #fff; border: 1px solid #a9a9a9; box-sizing: content-box; }
.okn-gallery a:hover img, .okn-gallery a:focus img, .okn-singlepic a:hover img, .okn-singlepic a:focus img, .okn-album a:hover img, .okn-album a:focus img { background: #a9a9a9; }
.okn-gallery-caption { display: block; margin-top: 3px; font-size: .8em; line-height: 1.3; text-align: center; }
.okn-gallery-pages { display: flex; flex-wrap: wrap; gap: 6px; justify-content: center; margin: 0 0 1.5em; clear: both; }
.okn-gallery-pages a, .okn-gallery-pages span { min-width: 1.8em; padding: 2px 6px; text-align: center; border: 1px solid #a9a9a9; text-decoration: none; }
.okn-gallery-pages .current { font-weight: bold; background: #eee; }

.okn-singlepic { display: block; }
/* (two class names on each rule below so they outrank the :not() one, whatever the order) */
.okn-singlepic:not(.okn-singlepic-themed) { margin: 1em 0; }
.okn-singlepic-center { text-align: center; }
.okn-singlepic-center img { margin: 0 auto; }
.okn-singlepic.okn-singlepic-left { float: left; margin: 0 1em 1em 0; max-width: 100%; }
.okn-singlepic.okn-singlepic-right { float: right; margin: 0 0 1em 1em; max-width: 100%; }
.okn-singlepic-caption { display: block; margin-top: 4px; font-size: .85em; font-style: italic; }
/* border=0: the picture alone, without the white mat and grey line. */
.okn-singlepic-plain img { padding: 0; border: 0; background: none; }
/* float=inline: sits in a line of text or a table cell like an ordinary image. */
.okn-singlepic.okn-singlepic-inline { display: inline-block; margin: 0; vertical-align: baseline; }
/* caption=theme: the box carries WordPress's own caption classes, so the theme styles it -
   margins included, which is why this plugin sets none on it. Only make the caption a line of its own. */
.okn-singlepic-themed .wp-caption-text { display: block; }
.okn-gallery picture, .okn-singlepic picture, .okn-album picture, .okn-browser picture, .okn-slide picture { display: block; }

.okn-album { display: flex; flex-wrap: wrap; gap: 14px; margin: 10px 0 1.5em; clear: both; }
.okn-album-entry { width: 140px; font-size: .9em; line-height: 1.3; }
.okn-album-entry a { display: block; text-decoration: none; }
.okn-album-title { display: block; margin-top: 4px; font-weight: bold; }
.okn-album-count, .okn-album-desc { display: block; font-size: .85em; opacity: .8; }
.okn-album-back { margin: 0 0 .5em; }

.okn-slideshow { margin: 10px auto 1.5em; clear: both; }
.okn-slideshow-stage { position: relative; width: 100%; overflow: hidden; background: #111; }
.okn-slide { position: absolute; inset: 0; margin: 0; display: flex; align-items: center; justify-content: center; opacity: 0; visibility: hidden; transition: opacity .6s ease, visibility .6s; }
.okn-slide.is-current { opacity: 1; visibility: visible; }
.okn-slide img { max-width: 100%; max-height: 100%; width: auto; height: auto; object-fit: contain; padding: 0; border: 0; background: none; }
.okn-slide figcaption { position: absolute; left: 0; right: 0; bottom: 0; padding: 6px 10px; font-size: .85em; color: #fff; background: rgba(0, 0, 0, .6); }
.okn-slideshow-bar { display: flex; gap: 6px; justify-content: center; margin-top: 6px; }
.okn-slideshow-bar[hidden] { display: none; }
.okn-slideshow-bar button { font: inherit; font-size: .85em; padding: 3px 10px; cursor: pointer; }
@media (prefers-reduced-motion: reduce) { .okn-slide { transition: none; } }

.okn-browser { margin: 10px 0 1.5em; text-align: center; clear: both; }
.okn-browser-pic img { margin: 0 auto; }
.okn-browser-nav { display: flex; gap: 16px; justify-content: center; align-items: center; margin-top: 8px; }
.okn-browser-caption { margin: 6px 0 0; font-style: italic; }

.okn-tagcloud a { margin-right: .5em; white-space: nowrap; }

.okn-lightbox { position: fixed; inset: 0; z-index: 100000; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; padding: 16px; background: rgba(0, 0, 0, .88); color: #fff; font: 14px/1.4 system-ui, sans-serif; }
.okn-lightbox[hidden] { display: none; }
.okn-lightbox img { max-width: 100%; max-height: calc(100vh - 110px); object-fit: contain; background: #222; }
.okn-lightbox p { margin: 0; max-width: 60em; text-align: center; }
.okn-lightbox button { font: inherit; color: #fff; background: rgba(255, 255, 255, .14); border: 1px solid rgba(255, 255, 255, .5); border-radius: 3px; padding: 6px 12px; cursor: pointer; }
.okn-lightbox button:hover, .okn-lightbox button:focus { background: rgba(255, 255, 255, .3); }
.okn-lightbox-bar { display: flex; gap: 8px; align-items: center; }
