/* ⚠️ This file opened with `html {font-size: 16px;}` until 2026-08-31 - a WIDGET stylesheet setting
   the whole document's root size, and a byte-identical copy of the one `common.css` sets two files
   earlier in the same load order. Identical, so it changed nothing; what it did was make the root
   size uncorrectable in the file that owns it, and put a page-wide declaration in the one
   stylesheet that is loaded on pages the gallery does not otherwise touch. See incidental #330. */
div.mod-fwmg-slideshow  {
    margin: 0 0 20px;
    position: relative;
}
div.mod-fwmg-slideshow .mod-fwmg-slideshow-big-image {
    width: 100%;
    position: absolute;
	text-align: center;
    background-color: white;
}
div.mod-fwmg-slideshow .mod-fwmg-slideshow-big-image img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}
div.mod-fwmg-slideshow .fwmg-slideshow-image-fill .mod-fwmg-slideshow-big-image img {
    object-fit: cover;
}
div.mod-fwmg-slideshow .mod-fwmg-slideshow-big-image-description {
    color: #777;
    text-decoration: none;
    width: 30rem;
    position: absolute;
    padding: 1rem 1.5rem;
    right: 3.5rem;
    bottom: 10rem;
    text-align: left;
    background-color: rgba(255, 255, 255, 0.85);
}

/* Thumbnail styles based on bottom option */
div.mod-fwmg-slideshow .mod-fwmg-slideshow-thumb-wrpper {
    overflow-x: hidden;
    position: absolute;
    width: 100%;
    padding: .25rem 2rem;
    bottom: 1rem;
    left: 0;
    z-index: 100;
    background-color: rgba(255, 255, 255, 0.25);
}
div.mod-fwmg-slideshow .mod-fwmg-slideshow-thumb-move-prev,
div.mod-fwmg-slideshow .mod-fwmg-slideshow-thumb-move-next {
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    line-height: 100%;
    width: 2rem;
    z-index: 120;
    text-align: center;
    background: #fff;
    cursor: pointer;
    display: none;
    z-index: 20000;
}
div.mod-fwmg-slideshow .mod-fwmg-slideshow-thumb-move-next {
    left: auto;
    right: 0;
}
div.mod-fwmg-slideshow .mod-fwmg-slideshow-thumb-film {
    display: flex;
    flex-direction: row;
}
div.mod-fwmg-slideshow .mod-fwmg-slideshow-thumb-img {
    margin: .12rem .25rem;
    z-index: 110;
    text-align: center;
}
/* ⚠️ The thumbnail FILLS its box, and the box is square (see `--fwmg-ss-thumb` below).
   Until 2026-08-29 the two rules that stood here told the picture to match the box on ONE axis and
   left the other `none` - `max-height:100%; max-width:none` for a horizontal strip - so an 80 px box
   held a 120 px picture and the row ran together into one band instead of a strip of thumbnails. The
   `object-fit: cover` beneath them could not help: it has nothing to crop to while a side is free.
   The fix is both halves, and neither works alone - the rendition is a square crop now too (#236). */
div.mod-fwmg-slideshow .mod-fwmg-slideshow-thumb-img img {
    cursor: pointer;
    width: 100%;
    height: 100%;
    object-fit: cover;
}
div.mod-fwmg-slideshow .mod-fwmg-slideshow-thumb-img:hover {
    transform: scale(1.1);
    opacity: 1;
    z-index: 10000;
    /* transition: .2s all linear; */
}
div.mod-fwmg-slideshow .mod-fwmg-slideshow-thumb-img:hover,
div.mod-fwmg-slideshow .mod-fwmg-slideshow-thumb-img.image-selected {
    background: #f7e9c7;
    border-color: #daa520;
}
div.mod-fwmg-slideshow .mod-fwmg-slideshow-thumb-img img:hover,
div.mod-fwmg-slideshow .mod-fwmg-slideshow-thumb-img.image-selected img {
    opacity: 1;
}

/* Thumbnail styles for left & right options based on left */
div.mod-fwmg-slideshow.thumbnail-position-left .mod-fwmg-slideshow-big-image-description {
    right: 3.5rem;
    bottom: 3.5rem;
}
div.mod-fwmg-slideshow.thumbnail-position-left .mod-fwmg-slideshow-thumb-wrpper,
div.mod-fwmg-slideshow.thumbnail-position-right .mod-fwmg-slideshow-thumb-wrpper {
    width: auto;
    height: 100%;
    padding: 2rem .25rem;
    top: 0;
    bottom: auto;
    left: 3rem;
    overflow: hidden;
}
div.mod-fwmg-slideshow.thumbnail-position-left .mod-fwmg-slideshow-thumb-move-prev,
div.mod-fwmg-slideshow.thumbnail-position-left .mod-fwmg-slideshow-thumb-move-next,
div.mod-fwmg-slideshow.thumbnail-position-right .mod-fwmg-slideshow-thumb-move-prev,
div.mod-fwmg-slideshow.thumbnail-position-right .mod-fwmg-slideshow-thumb-move-next {
    padding: 0;
    height: 2rem;
    width: 100%;
    text-align: center;
    line-height: 2rem;
}
div.mod-fwmg-slideshow.thumbnail-position-left .mod-fwmg-slideshow-thumb-move-next,
div.mod-fwmg-slideshow.thumbnail-position-right .mod-fwmg-slideshow-thumb-move-next {
    top: auto;
    bottom: 0;
}
div.mod-fwmg-slideshow.thumbnail-position-left .mod-fwmg-slideshow-thumb-film,
div.mod-fwmg-slideshow.thumbnail-position-right .mod-fwmg-slideshow-thumb-film {
    flex-direction: column;
}

/* Thumbnail styles for right option */
div.mod-fwmg-slideshow.thumbnail-position-right .mod-fwmg-slideshow-big-image-description {
    left: 3.5rem;
    bottom: 3.5rem;
    right: auto;
}
div.mod-fwmg-slideshow.thumbnail-position-right .mod-fwmg-slideshow-thumb-wrpper {
    left: auto;
    right: 3rem;
}

/* top progressbar */
.mod-fwmg-slideshow-bar-timer {
    position: absolute;
    z-index: 100;
    height: 4px;
    border: 0;
    background-color: #FFBE24;
    top: 0;
    left: 0;
    width: 0;
}
/* top position */
div.mod-fwmg-slideshow.thumbnail-position-top .mod-fwmg-slideshow-thumb-wrpper {
    top: 1rem;
    bottom: auto;
}
div.mod-fwmg-slideshow.thumbnail-position-top .mod-fwmg-slideshow-big-image-description {
    top: 10rem;
    bottom: auto;
}
.mod-fwmg-slideshow-controls {
    position: absolute;
    top: .75rem;
    right: .75rem;
    z-index: 110;
    background-color: rgba(0, 0, 0, 0.7);
}
div.mod-fwmg-slideshow.thumbnail-position-right .mod-fwmg-slideshow-controls {
    left: .75rem;
    right: auto;
}
.mod-fwmg-slideshow-controls button {
    color: #fff;
    line-height: 1.5;
    font-size: 1rem;
    padding: .5rem 1rem;
    margin: 0 0 0 1px;
    border: 0;
    border-radius: .25rem;
    background-color: transparent;
}
.mod-fwmg-slideshow-controls button:focus {
    border: 0;
    box-shadow: none;
    outline: none;
}
.mod-fwmg-slideshow-controls button.active {
    color: #FFBE24;
}
.mod-fwmg-slideshow-big-move-prev,
.mod-fwmg-slideshow-big-move-next {
    width: 45px;
    height: 70px;
    line-height: 70px;
    text-align: center;
    z-index: 10000;
    top: 50%;
    margin-top: -35px;
    position: absolute;
    background: #000000;
    opacity: 0;
    color: #ffffff;
    font-size: 2rem;
}
.mod-fwmg-slideshow-big-move-next {
    right: 0;
}
div.mod-fwmg-slideshow:hover .mod-fwmg-slideshow-big-move-prev,
div.mod-fwmg-slideshow:hover .mod-fwmg-slideshow-big-move-next {
    opacity: 0.8;
    cursor: pointer;
}
.mod-fwmg-slideshow-controls button:hover,
div.mod-fwmg-slideshow:hover .mod-fwmg-slideshow-big-move-prev:hover,
div.mod-fwmg-slideshow:hover .mod-fwmg-slideshow-big-move-next:hover {
    color: #FFBE24;
}

@media (max-width: 768px) {
    div.mod-fwmg-slideshow {
        margin-bottom: 150px;
    }
    #fwgallery .mod-fwmg-slideshow .mod-fwmg-slideshow-big-image-description {
        display: block;
        position: relative;
        width: 100%;
        top: 0;
        left: 0;
    }
}
/* ==========================================================================
   Transitions for fwmg-slideshow-view.js (2026-08-19).

   The rewritten component swaps two layers by TOGGLING CLASSES and commits its
   state immediately; what happens visually afterwards is entirely the browser's
   business. That is the point: the previous generation drove the effect from
   JavaScript and kept a "busy" flag until an animation callback fired, so an
   effect that never finished froze the slideshow for good. Nothing here can do
   that - a transition that is interrupted, skipped or never started leaves the
   component in exactly the state it had already committed.
   ========================================================================== */
div.mod-fwmg-slideshow .mod-fwmg-slideshow-big-image {
    opacity: 0;
    z-index: 1;
}
div.mod-fwmg-slideshow .mod-fwmg-slideshow-big-image.is-entering {
    opacity: 1;
    z-index: 2;
}
div.mod-fwmg-slideshow .mod-fwmg-slideshow-big-image.is-leaving {
    opacity: 0;
    z-index: 1;
}

/* fade */
div.mod-fwmg-slideshow .fwmg-effect-fade.is-entering,
div.mod-fwmg-slideshow .fwmg-effect-fade.is-leaving { transition: opacity .6s ease; }

/* slide - the entering layer arrives from its side, the leaving one just fades under it */
div.mod-fwmg-slideshow .fwmg-effect-slide-left.is-entering,
div.mod-fwmg-slideshow .fwmg-effect-slide-right.is-entering,
div.mod-fwmg-slideshow .fwmg-effect-slide-up.is-entering,
div.mod-fwmg-slideshow .fwmg-effect-slide-down.is-entering {
    animation: fwmg-slide-in .6s ease both;
}
div.mod-fwmg-slideshow .fwmg-effect-slide-left.is-entering  { --fwmg-from:  100%, 0; }
div.mod-fwmg-slideshow .fwmg-effect-slide-right.is-entering { --fwmg-from: -100%, 0; }
div.mod-fwmg-slideshow .fwmg-effect-slide-up.is-entering    { --fwmg-from: 0,  100%; }
div.mod-fwmg-slideshow .fwmg-effect-slide-down.is-entering  { --fwmg-from: 0, -100%; }

@keyframes fwmg-slide-in {
    from { opacity: 1; transform: translate(var(--fwmg-from, 100%, 0)); }
    to   { opacity: 1; transform: translate(0, 0); }
}

/* `none` - an instant swap, and what a visitor who asked for less motion gets for every effect. */
div.mod-fwmg-slideshow .fwmg-effect-none.is-entering,
div.mod-fwmg-slideshow .fwmg-effect-none.is-leaving { transition: none; animation: none; }

@media (prefers-reduced-motion: reduce) {
    div.mod-fwmg-slideshow .mod-fwmg-slideshow-big-image {
        transition: none !important;
        animation: none !important;
    }
}

/* The film scrolls itself (the component calls scrollIntoView) instead of being positioned by hand with
   measured margins, which is what the previous generation did on every mousemove. */
div.mod-fwmg-slideshow .mod-fwmg-slideshow-thumb-film {
    scroll-behavior: smooth;
}

/* ── The three heights, the thumbnail size, and the two modes the settings can ask for ──────────────
   Added 2026-08-20 with the slideshow settings port. The previous generation offered a height per
   breakpoint (`slideshow_height`, `_medium`, `_small`) and a thumbnail edge in px; one inline height on
   the element could only ever honour the first of those, so the numbers arrive as custom properties and
   the breakpoints live here, where a stylesheet can see them. */
div.mod-fwmg-slideshow {
    height: var(--fwmg-ss-h, 800px);
}
@media (max-width: 960px) {
    div.mod-fwmg-slideshow { height: var(--fwmg-ss-h-md, 400px); }
}
@media (max-width: 640px) {
    div.mod-fwmg-slideshow { height: var(--fwmg-ss-h-sm, 250px); }
}
div.mod-fwmg-slideshow .mod-fwmg-slideshow-big-wrapper,
div.mod-fwmg-slideshow .mod-fwmg-slideshow-big-image {
    height: 100%;
}
/* border-box, or the strip's own padding is added to its 100% width and it hangs 64px past the picture
   it belongs to - measured, and true in every layout the previous generation offered. */
div.mod-fwmg-slideshow .mod-fwmg-slideshow-thumb-wrpper {
    box-sizing: border-box;
}
div.mod-fwmg-slideshow.thumbnail-position-top .mod-fwmg-slideshow-thumb-wrpper,
div.mod-fwmg-slideshow.thumbnail-position-bottom .mod-fwmg-slideshow-thumb-wrpper {
    height: calc(var(--fwmg-ss-thumb, 80px) + 1rem);
}
div.mod-fwmg-slideshow.thumbnail-position-left .mod-fwmg-slideshow-thumb-wrpper,
div.mod-fwmg-slideshow.thumbnail-position-right .mod-fwmg-slideshow-thumb-wrpper {
    width: calc(var(--fwmg-ss-thumb, 80px) + 1rem);
}
div.mod-fwmg-slideshow .mod-fwmg-slideshow-thumb-img {
    width: var(--fwmg-ss-thumb, 80px);
    height: var(--fwmg-ss-thumb, 80px);
    flex: 0 0 auto;
}

/* `slideshow_navigation` - thumbnails as separate BUTTONS (the default) or as a continuous carousel
   strip. The difference is the gap and the frame, which is all it ever was. */
div.mod-fwmg-slideshow.fwmg-ss-thumbs-carousel .mod-fwmg-slideshow-thumb-img {
    margin: 0;
    border-radius: 0;
}
div.mod-fwmg-slideshow.fwmg-ss-thumbs-carousel .mod-fwmg-slideshow-thumb-wrpper {
    padding: 0;
    bottom: 0;
    left: 0;
    right: 0;
    width: 100%;
}

/* `slideshow_show_big_image` off - the strip IS the slideshow, which is what that switch is for:
   a quick preview of an album without a stage above it. */
div.mod-fwmg-slideshow.fwmg-ss-strip-only {
    height: calc(var(--fwmg-ss-thumb, 80px) + 1rem);
}
div.mod-fwmg-slideshow.fwmg-ss-strip-only .mod-fwmg-slideshow-thumb-wrpper {
    position: relative;
    bottom: auto;
    top: auto;
    left: auto;
    right: auto;
    padding: .25rem;
}

/* The album's own name and description above the show - `slideshow_show_category_info`. */
.mod-fwmg-slideshow-category-info {
    margin: 0 0 .75rem;
}
.mod-fwmg-slideshow-category-name {
    display: block;
    font-size: 1.25rem;
    font-weight: 600;
}
.mod-fwmg-slideshow-category-descr {
    display: block;
    color: #777;
}

/* The caption's parts, each its own stored switch. */
.mod-fwmg-slideshow-title { display: block; font-weight: 600; }
.mod-fwmg-slideshow-descr { display: block; margin-top: .25rem; }
.mod-fwmg-slideshow-meta {
    display: flex;
    gap: .75rem;
    align-items: center;
    margin-top: .5rem;
    font-size: .85em;
}
.mod-fwmg-slideshow-download { text-decoration: none; }
.mod-fwmg-slideshow-type {
    position: absolute;
    right: .75rem;
    bottom: .5rem;
    opacity: .6;
}
