/**
 * 페이지 공유하기 모달 CSS
 * 반응형 디자인 적용
 */

/* 모달 배경 */
.share-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 9999;
    display: flex;
    justify-content: center;
    align-items: center;
}

/* 모달 컨텐츠 */
.share-modal-content {
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    max-width: 500px;
    width: 90%;
    max-height: 80vh;
    overflow-y: auto;
    animation: modalSlideIn 0.3s ease-out;
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* 모달 헤더 */
.share-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 25px 15px;
    border-bottom: 1px solid #e9ecef;
}

.share-modal-header h3 {
    margin: 0;
    font-size: 18px;
    font-weight: 600;
    color: #333;
}

/* 닫기 버튼 */
.share-modal-close {
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: #999;
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.2s ease;
}

.share-modal-close:hover {
    background-color: #f8f9fa;
    color: #333;
}

/* 모달 바디 */
.share-modal-body {
    padding: 20px 25px;
}

/* URL 공유 섹션 */
.share-url-section {
    margin-bottom: 25px;
}

.share-url-section label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: #555;
    font-size: 14px;
}

.share-url-container {
    display: flex;
    gap: 8px;
}

#share-url {
    flex: 1;
    padding: 10px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
    background-color: #f8f9fa;
    color: #666;
}

#share-url:focus {
    outline: none;
    border-color: #007bff;
    box-shadow: 0 0 0 2px rgba(0, 123, 255, 0.25);
}

.copy-btn {
    padding: 10px 16px;
    background-color: #007bff;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: background-color 0.2s ease;
    white-space: nowrap;
}

.copy-btn:hover {
    background-color: #0056b3;
}

.copy-btn:active {
    transform: translateY(1px);
}

/* SNS 공유 섹션 */
.share-social-section h4 {
    margin: 0 0 15px 0;
    font-size: 16px;
    font-weight: 500;
    color: #333;
}

.share-social-buttons {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.social-btn {
    flex: 1;
    min-width: 100px;
    padding: 12px 16px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.2s ease;
    text-align: center;
}

.facebook-btn {
    background-color: #1877f2;
    color: white;
}

.facebook-btn:hover {
    background-color: #165dd4;
}

.twitter-btn {
    background-color: #1da1f2;
    color: white;
}

.twitter-btn:hover {
    background-color: #0d8bd9;
}



/* 모바일 반응형 */
@media (max-width: 768px) {
    .share-modal-content {
        width: 95%;
        margin: 20px;
    }
    
    .share-modal-header,
    .share-modal-body {
        padding: 15px 20px;
    }
    
    .share-modal-header h3 {
        font-size: 16px;
    }
    
    .share-url-container {
        flex-direction: column;
    }
    
    .copy-btn {
        width: 100%;
    }
    
    .share-social-buttons {
        flex-direction: column;
    }
    
    .social-btn {
        width: 100%;
        min-width: auto;
    }
}

@media (max-width: 480px) {
    .share-modal-content {
        width: 100%;
        margin: 10px;
        border-radius: 0;
    }
    
    .share-modal-header,
    .share-modal-body {
        padding: 12px 15px;
    }
}

/* 헤더 공유 버튼 스타일 추가 */
#share-page-btn,
#mobile-share-page-btn {
    display: flex;
    align-items: center;
    gap: 4px;
}

#share-page-btn img,
#mobile-share-page-btn img {
    margin-right: 4px;
}

/* 호버 효과 */
#share-page-btn:hover,
#mobile-share-page-btn:hover {
    opacity: 0.8;
}

/* 복사 성공 피드백 */
.copy-success {
    background-color: #28a745 !important;
}

.copy-success:after {
    content: '✓';
    margin-left: 4px;
}

 