/* ???????????????????????????????????????????????????????
   Generic Image Lightbox  —  img-lightbox.css
   Usage: add data-lightbox="true" (+ optional data-caption)
          to any <img> or its wrapper, OR call
          SMFLightbox.open(src, caption) from JS anywhere.
   Theme: #ff5e14 orange  |  #010e2a navy
??????????????????????????????????????????????????????? */

/* ?? Overlay ???????????????????????????????????????? */
#smfLightbox {
    display: none;
    position: fixed; inset: 0; z-index: 99999;
    background: rgba(0, 0, 0, .92);
    align-items: center; justify-content: center;
    padding: 20px;
    flex-direction: column;
    gap: 14px;
}
#smfLightbox.smf-lb-open {
    display: flex;
    animation: smfLbFadeIn .2s ease;
}
@keyframes smfLbFadeIn {
    from { opacity: 0; }
    to   { opacity: 1; }
}

/* ?? Close button ??????????????????????????????????? */
#smfLbClose {
    position: absolute; top: 16px; right: 20px;
    width: 44px; height: 44px; border-radius: 50%;
    border: 1.5px solid rgba(255,255,255,.3);
    background: rgba(255,255,255,.08);
    color: #fff; font-size: 20px;
    display: flex; align-items: center; justify-content: center;
    cursor: pointer; transition: background .2s, transform .2s;
    z-index: 10; line-height: 1;
}
#smfLbClose:hover { background: rgba(255,255,255,.22); transform: rotate(90deg); }

/* ?? Image wrapper ?????????????????????????????????? */
#smfLbImgWrap {
    max-width: 96vw; max-height: 90vh;
    display: flex; align-items: center; justify-content: center;
    position: relative;
}
#smfLbImgWrap.smf-lb-animate {
    animation: smfLbZoomIn .3s cubic-bezier(.34, 1.56, .64, 1);
}
@keyframes smfLbZoomIn {
    from { transform: scale(.65); opacity: 0; }
    to   { transform: scale(1);   opacity: 1; }
}
#smfLbImg {
    max-width: 96vw; max-height: 90vh;
    width: auto; height: auto;
    object-fit: contain; border-radius: 10px;
    display: block;
    box-shadow: 0 24px 72px rgba(0, 0, 0, .55);
    user-select: none;
}

/* ?? Caption ???????????????????????????????????????? */
#smfLbCaption {
    color: rgba(255,255,255,.8);
    font-size: 13.5px; font-weight: 600;
    text-align: center;
    padding: 6px 24px; border-radius: 20px;
    background: rgba(255,255,255,.07);
    backdrop-filter: blur(8px);
    max-width: 80vw;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
    min-height: 32px;
}
#smfLbCaption:empty { display: none; }

/* ?? Zoom hint on lightbox-enabled images ??????????? */
[data-lightbox] {
    cursor: zoom-in;
}
[data-lightbox]:hover img,
.smf-zoomable:hover img {
    transform: scale(1.04);
    transition: transform .35s ease;
}
