/**
 * 보롬 팝업 - 프론트엔드 스타일 (공통닫기 구조)
 */

/* 컨테이너 + 오버레이 */
#borom-popup-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 99999;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 20px;
    box-sizing: border-box;
    background: var(--popup-overlay-color, rgba(0, 0, 0, 0.5));
}

#borom-popup-container:empty {
    display: none;
}

/* 팝업들 래퍼 */
.borom-popups-wrapper {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    justify-content: center;
    align-items: center;
}

/* 레이아웃 위치 */
.borom-popup-layout-center .borom-popups-wrapper {
    justify-content: center;
}

.borom-popup-layout-left .borom-popups-wrapper {
    justify-content: flex-start;
}

.borom-popup-layout-right .borom-popups-wrapper {
    justify-content: flex-end;
}

/* 팝업 아이템 */
.borom-popup-item {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.borom-popup-item.borom-popup-active {
    opacity: 1;
    transform: translateY(0);
}

.borom-popup-item.borom-popup-closing {
    opacity: 0;
    transform: scale(0.95);
}

/* 팝업 래퍼 */
.borom-popup-wrapper {
    width: var(--popup-width, 400px);
    max-width: 90vw;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
    overflow: hidden;
}

/* 콘텐츠 */
.borom-popup-content figure {
    margin: 0;
}
.borom-popup-content {
    line-height: 1;
}

.borom-popup-content figure a {
    display: block;
    width: 100%;
    height: 100%;
}
.borom-popup-content img {
    display: block;
    max-width: 100%;
    height: auto;
}

.borom-popup-content a {
    display: block;
}

/* 개별 푸터 (공통닫기 비활성 시) */
.borom-popup-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 15px;
    background: var(--footer-bg, #1a1a1a);
    gap: 10px;
}

/* 안보기 버튼 */
.borom-popup-dont-show {
    background: transparent;
    border: none;
    color: var(--footer-text-color, #fff);
    font-size: 13px;
    cursor: pointer;
    padding: 5px 0;
    opacity: 0.8;
}

.borom-popup-dont-show:hover {
    opacity: 1;
    text-decoration: underline;
}

/* 닫기 버튼 */
.borom-popup-close {
    display: flex;
    align-items: center;
    gap: 4px;
    background: var(--close-bg, #333);
    color: var(--close-color, #fff);
    border: none;
    padding: 8px 15px;
    border-radius: 4px;
    font-size: 13px;
    cursor: pointer;
    transition: background 0.2s;
}

.borom-popup-close:hover {
    filter: brightness(1.2);
}

.borom-popup-close svg {
    width: 12px;
    height: 12px;
    flex-shrink: 0;
}

/* ===== 공통 닫기 버튼 (팝업 외부) ===== */
.borom-common-close-buttons {
    display: flex;
    gap: 15px;
    margin-top: 20px;
    justify-content: center;
}

.borom-common-dont-show {
    background: rgba(255, 255, 255, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: #fff;
    font-size: 14px;
    padding: 12px 24px;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s;
}

.borom-common-dont-show:hover {
    background: rgba(255, 255, 255, 0.25);
}

.borom-common-close {
    display: flex;
    align-items: center;
    gap: 6px;
    background: #fff;
    color: #333;
    border: none;
    padding: 12px 24px;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.borom-common-close:hover {
    background: #f0f0f0;
}

.borom-common-close svg {
    width: 14px;
    height: 14px;
}

/* 반응형 */
@media (max-width: 768px) {
    .borom-popups-wrapper {
        flex-direction: column;
        justify-content: center !important;
        align-items: center !important;
    }

    .borom-popup-item {
        width: 100%;
        max-width: 95vw;
    }

    .borom-popup-wrapper {
        width: 100% !important;
        max-width: none;
    }

    .borom-common-close-buttons {
        flex-direction: row;
        width: 100%;
        max-width: 95vw;
    }

    .borom-common-dont-show,
    .borom-common-close {
        flex: 1;
        justify-content: center;
    }
}