/**
 * CoalaCoding — 본문 이미지 라이트박스.
 *  마크업은 assets/js/cc-lightbox.js 가 동적으로 생성한다.
 */

/* 본문 이미지: 클릭 가능함을 커서로 표시 */
.entry-content img:not(.cc-no-lightbox) {
    cursor: zoom-in;
}

/* 오버레이 */
.cc-lightbox {
    position: fixed;
    inset: 0;
    z-index: 99999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    background: rgba(10, 12, 16, 0.92);
    opacity: 0;
    transition: opacity 0.18s ease;
    cursor: zoom-out;
}
.cc-lightbox.is-open {
    opacity: 1;
}

.cc-lightbox__img {
    max-width: min(96vw, 1600px);
    max-height: 90vh;
    width: auto;
    height: auto;
    border-radius: 8px;
    box-shadow: 0 8px 40px rgba(0, 0, 0, 0.6);
    transform: scale(0.97);
    transition: transform 0.18s ease;
    cursor: default;
}
.cc-lightbox.is-open .cc-lightbox__img {
    transform: scale(1);
}

/* 캡션 (img alt / figcaption) */
.cc-lightbox__caption {
    position: absolute;
    left: 50%;
    bottom: 1.25rem;
    transform: translateX(-50%);
    max-width: 80vw;
    padding: 0.35rem 0.9rem;
    border-radius: 6px;
    background: rgba(0, 0, 0, 0.55);
    color: #e6e8eb;
    font-size: 0.85rem;
    line-height: 1.5;
    text-align: center;
}
.cc-lightbox__caption:empty {
    display: none;
}

/* 닫기 버튼 */
.cc-lightbox__close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    width: 2.5rem;
    height: 2.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    border: none;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.12);
    color: #fff;
    font-size: 1.1rem;
    cursor: pointer;
    transition: background 0.15s ease;
}
.cc-lightbox__close:hover {
    background: rgba(255, 255, 255, 0.25);
}

/* 라이트박스 열린 동안 본문 스크롤 잠금 */
body.cc-lightbox-open {
    overflow: hidden;
}
