/* 팝업 레이어 스타일 */

.popup-layer {
    position: fixed;
    z-index: 10000;
    background: white;
    border-radius: 8px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
    overflow: hidden;
    display: none;
}

.popup-layer.show {
    display: block !important;
}

/* 팝업 내용 */
.popup-content {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.popup-body {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
}

.popup-body img {
    max-width: 100%;
    height: auto;
}

/* 팝업 푸터 */
.popup-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 20px;
    background: #f8f9fa;
    border-top: 1px solid #dee2e6;
}

.popup-checkbox {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    margin: 0;
    user-select: none;
}

.popup-checkbox input[type="checkbox"] {
    width: 16px;
    height: 16px;
    cursor: pointer;
}

.popup-checkbox span {
    font-size: 13px;
    color: #495057;
}

.popup-close-btn {
    padding: 6px 16px;
    background: #6c757d;
    color: white;
    border: none;
    border-radius: 4px;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.2s;
}

.popup-close-btn:hover {
    background: #5a6268;
}

/* X 버튼 */
.popup-close-x {
    position: absolute;
    top: 10px;
    right: 10px;
    width: 32px;
    height: 32px;
    background: rgba(0, 0, 0, 0.6);
    color: white;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    transition: background 0.2s;
    z-index: 10;
}

.popup-close-x:hover {
    background: rgba(0, 0, 0, 0.8);
}

/* PC 스타일 */
@media (min-width: 769px) {
    .popup-layer {
        /* position과 크기는 JavaScript로 동적 설정 */
    }
}

/* 모바일 스타일 */
@media (max-width: 768px) {
    .popup-layer {
        left: 20px !important;
        right: 20px !important;
        top: 50% !important;
        transform: translateY(-50%) !important;
        width: auto !important;
        max-width: calc(100% - 40px) !important;
        max-height: 80vh;
    }
    
    .popup-body {
        padding: 15px;
        max-height: calc(80vh - 60px);
    }
    
    .popup-footer {
        flex-direction: column;
        gap: 10px;
        align-items: stretch;
        padding: 10px 15px;
    }
    
    .popup-checkbox {
        justify-content: center;
    }
    
    .popup-close-btn {
        width: 100%;
        padding: 10px;
        font-size: 14px;
    }
    
    .popup-close-x {
        top: 8px;
        right: 8px;
        width: 28px;
        height: 28px;
        font-size: 14px;
    }
}

/* 팝업 애니메이션 */
@keyframes popupFadeIn {
    from {
        opacity: 0;
        transform: scale(0.9);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.popup-layer.show {
    animation: popupFadeIn 0.3s ease;
}

