/* Background overlay (non-blocking) */
.overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: none;
    justify-content: flex-start; /* aligns the popup to the left */
    align-items: flex-start; /* aligns the popup to the top */
    z-index: 999;
    pointer-events: none; /* allows clicks to pass through to elements behind the overlay */
}

/* Pop-up styling */
.popup {
    background-color: #fff;
    border: 1px solid #ccc;
    margin: 20px; /* space from top and left */
    box-shadow: 0px 4px 8px rgba(0, 0, 0, 0.2);
    position: relative;
    overflow: hidden;
    width: 90%; /* default width for mobile, adjusted in media queries */
    max-width: 400px; /* maximum width for larger screens */
    display: flex;
    flex-direction: column;
    align-items: center;
    pointer-events: auto; /* keeps the pop-up itself clickable */
}

/* Responsive Image in the Pop-up */
.popup img {
    width: 100%;
    height: auto;
    display: block;
}

/* Close checkbox button aligned to the far right */
.close-btn {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    width: 100%;
    padding: 10px;
    background: #333;
    color: #fff;
    font-size: 14px;
}

.close-btn label {
    cursor: pointer;
}

.close-btn input[type="checkbox"] {
    margin-right: 5px;
    cursor: pointer;
}

/* Responsive adjustments */
/* Desktop */
@media (min-width: 1024px) {
    .popup {
        width: 30%; /* adjust as necessary for desktop */
    }
}

/* Tablet */
@media (min-width: 768px) and (max-width: 1023px) {
    .popup {
        width: 60%; /* adjust as necessary for tablet */
    }
}

/* Mobile */
@media (max-width: 767px) {
    .popup {
        width: 90%; /* almost full width on mobile */
    }
}
/* 팝업 설정 부분 종료 */