/* content-modal-styles.css - 모달 스타일 개선 */

/* 모달 이미지 컨테이너 스타일 개선 */
.content-modal-image-container {
    position: relative;
    height: 300px; /* 고정 높이 설정 */
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #f5f7f9;
    margin: -20px -20px 20px; /* 기존 마진 유지 */
}

.content-modal-image-container img {
    width: 100%;
    height: 100%;
    object-fit: cover; /* 이미지 비율 유지하면서 컨테이너 채우기 */
    object-position: center; /* 이미지 중앙 정렬 */
}

/* 공유 버튼 스타일 */
.btn-share {
    padding: 10px 20px;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    background-color: #9775fa; /* 보라색 계열 */
    border: none;
    color: white;
    display: flex;
    align-items: center;
    gap: 8px;
}

.btn-share:hover {
    background-color: #7048e8;
    transform: translateY(-1px);
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.btn-share:disabled {
    opacity: 0.7;
    cursor: not-allowed;
}

.btn-share i {
    font-size: 16px;
}

/* 모달 푸터 스타일 개선 */
.content-modal-footer {
    display: flex;
    justify-content: space-between;
    padding: 15px 20px;
    border-top: 1px solid var(--gray);
    gap: 10px; /* 버튼 사이 간격 */
}

/* 모바일 환경 대응 */
@media (max-width: 767px) {
    .content-modal-image-container {
        height: 250px; /* 모바일에서는 높이 축소 */
    }

    .content-modal-footer {
        flex-wrap: wrap; /* 모바일에서 버튼 줄바꿈 허용 */
    }

    .btn-close, .btn-share, .btn-original {
        flex: 1 1 auto;
        text-align: center;
        justify-content: center;
        min-width: 100px;
        padding: 8px 10px;
        font-size: 13px;
    }
}

/* 작은 모바일 화면 대응 */
@media (max-width: 480px) {
    .content-modal-image-container {
        height: 200px; /* 더 작은 화면에서 높이 추가 축소 */
    }

    .content-modal-footer {
        flex-direction: column; /* 세로 정렬 */
    }

    .btn-close, .btn-share, .btn-original {
        width: 100%;
        margin-bottom: 8px;
    }

    .btn-close {
        order: 3; /* 닫기 버튼을 마지막으로 배치 */
    }

    .btn-share {
        order: 1; /* 공유 버튼을 첫번째로 배치 */
    }

    .btn-original {
        order: 2; /* 원문 보기 버튼을 두번째로 배치 */
    }
}