/* 팝업 오버레이 */
.popup-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 9999;
    display: none;
}

/* 팝업 컨테이너 */
.popup-container {
    position: fixed;
    background: white;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    z-index: 10000;
    display: none;
    overflow: hidden;
}

/* 팝업 헤더 */
.popup-header {
    background: #134197;
    color: white;
    padding: 15px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.popup-title {
    font-size: 18px;
    font-weight: bold;
    margin: 0;
}

.popup-close {
    background: none;
    border: none;
    color: white;
    font-size: 24px;
    cursor: pointer;
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: background-color 0.2s;
}

.popup-close:hover {
    background: rgba(255, 255, 255, 0.2);
}

/* 팝업 내용 */
.popup-content {
    padding: 20px 20px 30px 20px; /* 하단 패딩을 30px로 증가 */
    height: calc(100% - 60px); /* 헤더 높이를 제외한 나머지 공간 */
    overflow: hidden; /* 스크롤 제거 */
    display: flex;
    flex-direction: column;
}

.popup-text {
    margin-bottom: 15px;
    line-height: 1.6;
    flex-shrink: 0; /* 텍스트는 크기 고정 */
}

.popup-image {
    max-width: 100%;
    max-height: 100%;
    width: auto;
    height: auto;
    object-fit: contain; /* 비율 유지하면서 컨테이너에 맞춤 */
    display: block;
    margin: 10px 0 20px 0; /* 하단 마진을 20px로 증가 */
    flex: 1; /* 남은 공간을 모두 차지 */
}

/* 팝업 위치별 스타일 */
.popup-center {
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

.popup-top-left {
    top: 20px;
    left: 20px;
}

.popup-top-right {
    top: 20px;
    right: 20px;
}

.popup-bottom-left {
    bottom: 20px;
    left: 20px;
}

.popup-bottom-right {
    bottom: 20px;
    right: 20px;
}

/* 반응형 */
@media (max-width: 768px) {
    .popup-container {
        width: 90% !important;
        max-width: 400px !important;
        height: 80vh !important; /* 고정 높이로 변경 */
        max-height: 80vh !important;
    }
    
    .popup-content {
        height: calc(80vh - 60px); /* 모바일에서도 고정 높이 */
    }
    
    .popup-top-left,
    .popup-top-right,
    .popup-bottom-left,
    .popup-bottom-right {
        top: 50% !important;
        left: 50% !important;
        right: auto !important;
        bottom: auto !important;
        transform: translate(-50%, -50%) !important;
    }
}

/* 팝업 애니메이션 */
.popup-container.show {
    animation: popupFadeIn 0.3s ease-out;
}

@keyframes popupFadeIn {
    from {
        opacity: 0;
        transform: scale(0.8) translate(-50%, -50%);
    }
    to {
        opacity: 1;
        transform: scale(1) translate(-50%, -50%);
    }
}

.popup-overlay.show {
    animation: overlayFadeIn 0.3s ease-out;
}

@keyframes overlayFadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
} 