/* ---------------------------------------------------------------
 * 팝업 스타일
 *
 * 의존성: style.css (:root CSS 커스텀 프로퍼티)
 * --------------------------------------------------------------- */

/* mfp-hide 초기 숨김 (Magnific Popup CSS 없이 동작) */
.mfp-hide { display: none !important; }

/* ── 팝업 공통 ─────────────────────────────────────── */
.vb-popup-item {
    position: relative;
    background: var(--white-color);
    box-shadow: 0 8px 40px rgba(0,0,0,.2);
    border-radius: 4px;
    overflow: hidden;
}
.vb-popup-close {
    position: absolute;
    top: 6px;
    right: 6px;
    width: 30px;
    height: 30px;
    line-height: 30px;
    font-size: 22px;
    color: var(--muted-color);
    opacity: 1;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
    text-align: center;
    z-index: 10;
}
.vb-popup-close:hover { color: var(--black-color); }
.vb-popup-title {
    padding: 20px 24px 0;
    font-size: 1.8rem;
    font-weight: 600;
    color: var(--black-color);
    line-height: 1.4;
}
.vb-popup-body {
    padding: 24px;
    overflow-y: auto;
    max-height: 80vh;
}
/* 제목 바로 다음에 본문이 올 경우 상단 패딩 축소 */
.vb-popup-title + .vb-popup-body {
    padding-top: 12px;
}
.vb-popup-body img { max-width: 100%; height: auto; display: block; }
/* reset.css의 * { margin: 0 } 으로 제거된 단락 여백 복원 */
.vb-popup-body p { margin-bottom: 1em; }
.vb-popup-body p:last-child { margin-bottom: 0; }
.vb-popup-body ul,
.vb-popup-body ol { padding-left: 1.5em; margin-bottom: 1em; }
.vb-popup-body li { margin-bottom: 0.25em; }
.vb-popup-footer {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 12px;
    padding: 8px 16px;
    border-top: 1px solid var(--border-color);
    background: var(--bg-color);
}
.vb-popup-hide-today,
.vb-popup-hide-week {
    font-size: 14px;
    color: var(--muted-color);
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px 0;
    text-decoration: underline;
}
.vb-popup-hide-today:hover,
.vb-popup-hide-week:hover { color: var(--black-color); }

/* ── 팝업 오버레이 ─────────────────────────────────── */
.vb-popup-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 99990;
    background: rgba(11,11,11,0.8);
    opacity: 0;
    transition: opacity 0.2s ease;
}
.vb-popup-overlay.is-visible { opacity: 1; }
.vb-popup-overlay--transparent {
    pointer-events: none;
    background: transparent;
}

/* ── 팝업 프레임 공통 ──────────────────────────────── */
.vb-popup-frame { position: fixed; }

/* 정중앙 */
.vb-popup-frame.vb-pf-center {
    top: 50%;
    left: 50%;
    transform: translate(
        calc(-50% + var(--vb-off, 0px)),
        calc(-50% + var(--vb-off, 0px))
    );
}

/* 좌측 상단 */
.vb-popup-frame.vb-pf-top-left {
    top:  calc(32px + var(--vb-off, 0px));
    left: calc(32px + var(--vb-off, 0px));
}

/* 우측 상단 */
.vb-popup-frame.vb-pf-top-right {
    top:   calc(32px + var(--vb-off, 0px));
    right: calc(32px + var(--vb-off, 0px));
}

/* 좌측 중앙 */
.vb-popup-frame.vb-pf-center-left {
    top:  50%;
    left: calc(32px + var(--vb-off, 0px));
    transform: translateY(calc(-50% + var(--vb-off, 0px)));
}

/* 우측 중앙 */
.vb-popup-frame.vb-pf-center-right {
    top:   50%;
    right: calc(32px + var(--vb-off, 0px));
    transform: translateY(calc(-50% + var(--vb-off, 0px)));
}

/* 좌측 하단 */
.vb-popup-frame.vb-pf-bottom-left {
    bottom: calc(32px + var(--vb-off, 0px));
    left:   calc(32px + var(--vb-off, 0px));
}

/* 우측 하단 */
.vb-popup-frame.vb-pf-bottom-right {
    bottom: calc(32px + var(--vb-off, 0px));
    right:  calc(32px + var(--vb-off, 0px));
}
