/* MCMS2 lightbox — themes may override these rules in their own style.css */

img.mcms-lightbox { max-width: 100%; height: auto; cursor: zoom-in; }
img.mcms-lightbox.mlb-linked { cursor: pointer; }          /* inside a link: the link wins */
img.mcms-lightbox:focus-visible { outline: 3px solid currentColor; outline-offset: 2px; }
a.mcms-lightbox { display: inline-block; cursor: zoom-in; line-height: 0; }   /* older markup */
a.mcms-lightbox img { max-width: 100%; height: auto; }

.mlb {
    position: fixed; inset: 0; z-index: 10000; display: none;
    background: rgba(10, 10, 12, .92); color: #fff;
    font: 15px/1.4 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}
.mlb.mlb-open { display: block; }
html.mlb-lock { overflow: hidden; }

.mlb-stage {
    position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center;
    padding: 64px 72px 28px;
}
.mlb-img { display: block; flex: none; max-width: 100%; max-height: 100%; object-fit: contain; box-shadow: 0 10px 40px rgba(0, 0, 0, .6); opacity: 0; transition: opacity .2s; }

/* caption + description: centred right under the picture (lightbox.js gives the picture the height left over) */
.mlb-text { flex: none; width: 100%; max-width: 52rem; margin-top: 16px; text-align: center; display: flex; flex-direction: column; gap: 6px; }
.mlb-caption { font-size: 1.3em; font-weight: 600; line-height: 1.3; color: #fff; overflow-wrap: anywhere; }
.mlb-caption:empty { display: none; }
.mlb-desc { font-size: 1.08em; line-height: 1.5; color: rgba(255, 255, 255, .82); white-space: pre-line; overflow-wrap: anywhere; max-height: 32vh; overflow: auto; }
.mlb-desc[hidden], .mlb:not(.mlb-has-text) .mlb-text { display: none; }
.mlb-counter { position: absolute; top: 24px; left: 22px; font-variant-numeric: tabular-nums; color: rgba(255, 255, 255, .6); }
.mlb-counter:empty { display: none; }

.mlb-btn {
    position: absolute; display: flex; align-items: center; justify-content: center;
    border: 0; border-radius: 50%; background: rgba(255, 255, 255, .08); color: #fff; cursor: pointer; padding: 0;
}
.mlb-btn:hover, .mlb-btn:focus-visible { background: rgba(255, 255, 255, .2); outline: none; }
.mlb-close { top: 14px; right: 14px; width: 44px; height: 44px; }
.mlb-prev, .mlb-next { top: 50%; width: 52px; height: 52px; margin-top: -52px; }
.mlb-prev { left: 8px; }
.mlb-next { right: 8px; }
.mlb-single .mlb-prev, .mlb-single .mlb-next { display: none; }

.mlb-spinner {
    position: absolute; top: 50%; left: 50%; width: 36px; height: 36px; margin: -18px 0 0 -18px;
    border: 3px solid rgba(255, 255, 255, .2); border-top-color: #fff; border-radius: 50%; animation: mlb-spin .8s linear infinite;
}
@keyframes mlb-spin { to { transform: rotate(360deg); } }

@media (max-width: 640px) {
    .mlb-stage { padding: 60px 10px 76px; }
    .mlb-caption { font-size: 1.12em; }
    .mlb-desc { font-size: 1em; max-height: 28vh; }
    .mlb-prev, .mlb-next { top: auto; bottom: 14px; margin: 0; width: 46px; height: 46px; }
}
