.sw-lightbox {
position: fixed;
inset: 0;
z-index: 10000;
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
background: rgba(4, 17, 26, .955);
backdrop-filter: blur(18px);
opacity: 0;
visibility: hidden;
transition: opacity .22s ease;
padding: 32px;
}
.sw-lightbox.is-open {
opacity: 1;
visibility: visible;
}
body.sw-lightbox-open {
overflow: hidden;
}
.sw-lightbox__figure {
position: relative;
margin: 0;
max-width: min(92vw, 1200px);
max-height: 82vh;
display: flex;
flex-direction: column;
align-items: center;
gap: 14px;
}
.sw-lightbox__spinner {
position: absolute;
top: 50%;
left: 50%;
width: 44px;
height: 44px;
margin: -22px 0 0 -22px;
border: 3px solid rgba(255, 255, 255, .25);
border-top-color: #fff;
border-radius: 50%;
opacity: 0;
visibility: hidden;
pointer-events: none;
transition: opacity .15s ease;
animation: swLightboxDownloadSpin .8s linear infinite;
}
.sw-lightbox__figure.is-loading .sw-lightbox__spinner {
opacity: 1;
visibility: visible;
}
.sw-lightbox__img {
display: block;
max-width: 100%;
max-height: 78vh;
width: auto;
height: auto;
border-radius: 16px;
box-shadow: 0 32px 90px rgba(0, 0, 0, .35);
opacity: 0;
transform: scale(.96);
transition: opacity .25s ease, transform .25s ease;
}
.sw-lightbox__img.is-visible {
opacity: 1;
transform: scale(1);
}
.sw-lightbox__caption {
max-width: min(720px, calc(100vw - 300px));
color: rgba(255, 255, 255, .78);
font-size: 15px;
line-height: 1.45;
text-align: center;
}
.sw-lightbox__caption[hidden] {
display: none;
}
.sw-lightbox__icon-btn {
position: absolute;
top: 20px;
right: 20px;
width: 48px;
height: 48px;
border-radius: 50%;
border: none;
background: rgba(255, 255, 255, .14);
backdrop-filter: blur(12px);
color: #fff;
font-size: 16px;
cursor: pointer;
display: flex;
align-items: center;
justify-content: center;
text-decoration: none;
transition: background-color .2s ease, transform .2s ease;
}
.sw-lightbox__icon-btn:hover {
background: rgba(255, 255, 255, .24);
transform: scale(1.06);
}
.sw-lightbox__close {
font-size: 22px;
}
.sw-lightbox__download {
position: absolute;
right: 24px;
bottom: 24px;
display: inline-flex;
min-width: 132px;
min-height: 48px;
gap: 10px;
padding: 0 18px;
align-items: center;
justify-content: center;
border: 0;
border-radius: 999px;
color: #15191b;
background: #fff;
box-shadow: 0 14px 34px rgba(0, 0, 0, .25);
font: inherit;
font-size: 14px;
font-weight: 900;
cursor: pointer;
transition: background .2s ease, transform .2s ease;
}
.sw-lightbox__download:hover:not(:disabled) {
background: var(--yellow, #ffd21b);
transform: translateY(-2px);
}
.sw-lightbox__download-icon {
display: grid;
width: 24px;
height: 24px;
place-items: center;
border-radius: 50%;
color: #fff;
background: var(--navy, #17242d);
font-size: 12px;
line-height: 1;
}
@keyframes swLightboxDownloadSpin {
to { transform: rotate(360deg); }
}
@media (prefers-reduced-motion: reduce) {
.sw-lightbox__spinner {
animation-duration: .01ms !important;
}
}
.sw-lightbox__nav {
position: absolute;
top: 50%;
transform: translateY(-50%);
width: 48px;
height: 48px;
border-radius: 50%;
border: none;
background: rgba(255, 255, 255, .14);
backdrop-filter: blur(12px);
color: #fff;
font-size: 18px;
cursor: pointer;
display: flex;
align-items: center;
justify-content: center;
transition: background-color .2s ease, transform .2s ease;
}
.sw-lightbox__nav:hover {
background: rgba(255, 255, 255, .24);
transform: translateY(-50%) scale(1.06);
}
.sw-lightbox__nav--prev { left: 24px; }
.sw-lightbox__nav--next { right: 24px; }
@media (max-width: 700px) {
.sw-lightbox {
padding: 16px;
}
.sw-lightbox__nav {
width: 40px;
height: 40px;
}
.sw-lightbox__nav--prev { left: 10px; }
.sw-lightbox__nav--next { right: 10px; }
.sw-lightbox__download {
right: 14px;
bottom: 18px;
}
}
