/* popup.css - 팝업 스타일 수정 */

/* 팝업 컨테이너 */
#popupContainer {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 9999;
    pointer-events: none;
}

/* 팝업 모달 */
.popup-modal {
    position: absolute;
    background-color: #fff;
    border-radius: 5px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
    overflow: hidden;
    pointer-events: auto;
    cursor: move; /* 드래그 가능 표시 */
    will-change: transform, top, left;
    display: flex;             /* 추가 */
    flex-direction: column;    /* 추가 */
}

/* 팝업 헤더 */
.popup-header {
    background-color: var(--sub-color);
    color: white;
    padding: 10px 15px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: move; /* 드래그 핸들 */
}

.popup-header span {
    font-weight: 600;
    font-size: 14px;
}

/* 팝업 닫기 버튼 */
.popup-close {
    background: none;
    border: none;
    color: white;
    font-size: 20px;
    cursor: pointer;
    padding: 0;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.popup-close:hover {
    transform: scale(1.2);
}

/* 팝업 내용 */
.popup-content {
    padding: 15px;
    max-height: calc(100% - 90px);
    overflow-y: auto;
    flex: 1;                   /* 추가 */
}

/* TEXT 타입 팝업 스타일 */
.popup-content {
    font-size: 14px;
    line-height: 1.6;
    word-break: break-word;
}

/* IMAGE 타입 팝업 스타일 */
.popup-content.image-content {
    padding: 0;
    display: flex;
    justify-content: center;
    align-items: center;
}

.popup-content.image-content img {
    max-width: 100%;
    height: auto;
    display: block;
}

/* 팝업 푸터 (오늘 하루 보지 않기) */
.popup-footer {
    padding: 10px 15px;
    background-color: #f8f8f8;
    border-top: 1px solid #eee;
    font-size: 13px;
    color: var(--text-sub2);
    margin-top: auto;          /* 추가 */
}

.popup-footer label {
    display: flex;
    align-items: center;
    cursor: pointer;
}

.popup-footer input[type="checkbox"] {
    margin-right: 5px;
}

/* 반응형 스타일 */
@media (max-width: 768px) {
    .popup-modal {
        max-width: 90% !important;
        max-height: 80% !important;
    }
}

@media (max-width: 480px) {
    .popup-modal {
        max-width: 95% !important;
        max-height: 70% !important;
        top: 50% !important;
        left: 50% !important;
        transform: translate(-50%, -50%) !important;
    }

    .popup-header span {
        font-size: 13px;
    }

    .popup-content {
        padding: 10px;
    }
}