/**
 * 성수야 V2 - 소셜 기능 스타일시트
 */

/* 리뷰 시스템 전체 컨테이너 */
.review-system {
    margin-top: 40px;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 12px;
}

/* 평점 요약 섹션 */
.rating-summary {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: white;
    padding: 25px;
    border-radius: 10px;
    margin-bottom: 20px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.avg-rating {
    display: flex;
    align-items: center;
    gap: 15px;
}

.avg-rating .number {
    font-size: 48px;
    font-weight: bold;
    color: #333;
    line-height: 1;
}

.avg-rating .stars-wrapper {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.stars {
    display: inline-flex;
    gap: 2px;
}

.star {
    font-size: 20px;
    color: #ddd;
}

.star.full {
    color: #ffc107;
}

.star.half {
    position: relative;
    color: #ddd;
}

.star.half::before {
    content: '★';
    position: absolute;
    left: 0;
    top: 0;
    width: 50%;
    overflow: hidden;
    color: #ffc107;
}

.avg-rating .total {
    color: #666;
    font-size: 14px;
}

.write-review-btn {
    background: #2c3e50;
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 6px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.3s;
}

.write-review-btn:hover {
    background: #34495e;
}

/* SNS 공유 섹션 */
.share-section {
    background: white;
    padding: 25px;
    border-radius: 10px;
    margin-top: 30px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.share-section h3 {
    margin: 0 0 20px 0;
    font-size: 20px;
    color: #333;
    text-align: center;
}

.share-buttons {
    display: flex;
    justify-content: center;
    gap: 15px;
    flex-wrap: wrap;
}

.share-button {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s;
    position: relative;
    overflow: hidden;
    border: none;
    text-decoration: none;
}

.share-button::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-size: 60%;
    background-position: center;
    background-repeat: no-repeat;
}

.share-button:hover {
    transform: scale(1.1);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
}

/* 각 SNS 로고 스타일 */
.share-button.kakao {
    background: #FEE500;
}

.share-button.kakao::before {
    background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M12 3c5.514 0 10 3.476 10 7.747 0 4.272-4.48 7.748-9.986 7.748-.62 0-1.092-.046-1.759-.097-1 .776-1.774 1.403-3.485 1.962.26-1.383-.113-2.259-.514-3.259-2.383-1.505-4.256-3.411-4.256-6.354 0-4.271 4.486-7.747 10-7.747z"/></svg>');
}

.share-button.facebook {
    background: #1877f2;
}

.share-button.facebook::before {
    background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="white"><path d="M24 12.073c0-6.627-5.373-12-12-12s-12 5.373-12 12c0 5.99 4.388 10.954 10.125 11.854v-8.385H7.078v-3.47h3.047V9.43c0-3.007 1.792-4.669 4.533-4.669 1.312 0 2.686.235 2.686.235v2.953H15.83c-1.491 0-1.956.925-1.956 1.874v2.25h3.328l-.532 3.47h-2.796v8.385C19.612 23.027 24 18.062 24 12.073z"/></svg>');
}

.share-button.twitter {
    background: #000;
}

.share-button.twitter::before {
    background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="white"><path d="M18.244 2.25h3.308l-7.227 8.26 8.502 11.24H16.17l-5.214-6.817L4.99 21.75H1.68l7.73-8.835L1.254 2.25H8.08l4.713 6.231zm-1.161 17.52h1.833L7.084 4.126H5.117z"/></svg>');
}

.share-button.instagram {
    background: radial-gradient(circle at 30% 107%, #fdf497 0%, #fdf497 5%, #fd5949 45%, #d6249f 60%, #285AEB 90%);
}

.share-button.instagram::before {
    background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="white"><path d="M12 2.163c3.204 0 3.584.012 4.85.07 3.252.148 4.771 1.691 4.919 4.919.058 1.265.069 1.645.069 4.849 0 3.205-.012 3.584-.069 4.849-.149 3.225-1.664 4.771-4.919 4.919-1.266.058-1.644.07-4.85.07-3.204 0-3.584-.012-4.849-.07-3.26-.149-4.771-1.699-4.919-4.92-.058-1.265-.07-1.644-.07-4.849 0-3.204.013-3.583.07-4.849.149-3.227 1.664-4.771 4.919-4.919 1.266-.057 1.645-.069 4.849-.069zm0-2.163c-3.259 0-3.667.014-4.947.072-4.358.2-6.78 2.618-6.98 6.98-.059 1.281-.073 1.689-.073 4.948 0 3.259.014 3.668.072 4.948.2 4.358 2.618 6.78 6.98 6.98 1.281.058 1.689.072 4.948.072 3.259 0 3.668-.014 4.948-.072 4.354-.2 6.782-2.618 6.979-6.98.059-1.28.073-1.689.073-4.948 0-3.259-.014-3.667-.072-4.947-.196-4.354-2.617-6.78-6.979-6.98-1.281-.059-1.69-.073-4.949-.073zM5.838 12a6.162 6.162 0 1 1 12.324 0 6.162 6.162 0 0 1-12.324 0zM12 16a4 4 0 1 1 0-8 4 4 0 0 1 0 8zm4.965-10.405a1.44 1.44 0 1 1 2.881.001 1.44 1.44 0 0 1-2.881-.001z"/></svg>');
}

.share-button.copy-link {
    background: #6c757d;
}

.share-button.copy-link::before {
    background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="white"><path d="M10.59 13.41c.41.39.41 1.03 0 1.42-.39.39-1.03.39-1.42 0a5.003 5.003 0 0 1 0-7.07l3.54-3.54a5.003 5.003 0 0 1 7.07 0 5.003 5.003 0 0 1 0 7.07l-1.49 1.49c.01-.82-.12-1.64-.4-2.42l.47-.48a2.982 2.982 0 0 0 0-4.24 2.982 2.982 0 0 0-4.24 0l-3.53 3.53a2.982 2.982 0 0 0 0 4.24zm2.82-4.24c.39-.39 1.03-.39 1.42 0a5.003 5.003 0 0 1 0 7.07l-3.54 3.54a5.003 5.003 0 0 1-7.07 0 5.003 5.003 0 0 1 0-7.07l1.49-1.49c-.01.82.12 1.64.4 2.43l-.47.47a2.982 2.982 0 0 0 0 4.24 2.982 2.982 0 0 0 4.24 0l3.53-3.53a2.982 2.982 0 0 0 0-4.24.973.973 0 0 1 0-1.42z"/></svg>');
}

/* 툴팁 */
.share-button::after {
    content: attr(data-tooltip);
    position: absolute;
    bottom: -35px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0, 0, 0, 0.8);
    color: white;
    padding: 5px 10px;
    border-radius: 4px;
    font-size: 12px;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s;
}

.share-button:hover::after {
    opacity: 1;
}

.secondary-shares {
    display: flex;
    gap: 10px;
    justify-content: center;
}

.share-icon-btn {
    width: 40px;
    height: 40px;
    border: 1px solid #ddd;
    background: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s;
    font-weight: bold;
}

.share-icon-btn:hover {
    border-color: #333;
    background: #f5f5f5;
}

.share-utilities {
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid #eee;
    display: flex;
    gap: 10px;
    justify-content: center;
}

.util-btn {
    display: flex;
    align-items: center;
    gap: 5px;
    padding: 8px 16px;
    border: 1px solid #ddd;
    background: white;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s;
}

.util-btn:hover {
    border-color: #333;
    background: #f5f5f5;
}

.qr-code-section {
    margin-top: 20px;
    text-align: center;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 8px;
}

.qr-code {
    max-width: 200px;
    height: auto;
    margin: 0 auto 10px;
    display: block;
}

/* 언어 필터 */
.language-filter {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.language-filter button {
    padding: 8px 16px;
    border: 1px solid #ddd;
    background: white;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s;
    font-size: 14px;
}

.language-filter button.active {
    background: #2c3e50;
    color: white;
    border-color: #2c3e50;
}

.language-filter button[data-lang]::before {
    content: '';
    display: inline-block;
    width: 20px;
    height: 15px;
    margin-right: 5px;
    background-size: contain;
    vertical-align: middle;
}

/* 리뷰 작성 폼 */
.review-form {
    background: white;
    padding: 25px;
    border-radius: 10px;
    margin-bottom: 20px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.review-form h3 {
    margin: 0 0 20px 0;
    font-size: 20px;
    color: #333;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #333;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 10px 15px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 14px;
    transition: border-color 0.3s;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #2c3e50;
}

.form-group textarea {
    resize: vertical;
    min-height: 100px;
}

.rating-input {
    display: flex;
    gap: 5px;
    margin-bottom: 10px;
}

.star-button {
    font-size: 32px;
    background: none;
    border: none;
    cursor: pointer;
    color: #ddd;
    transition: all 0.2s;
    padding: 0 5px;
}

.star-button:hover,
.star-button.active {
    color: #ffc107;
    transform: scale(1.1);
}

.error {
    display: block;
    color: #dc3545;
    font-size: 13px;
    margin-top: 5px;
}

.form-actions {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
    margin-top: 25px;
}

.form-actions button {
    padding: 10px 20px;
    border: none;
    border-radius: 6px;
    font-size: 16px;
    cursor: pointer;
    transition: all 0.3s;
}

.form-actions button[type="button"] {
    background: #f5f5f5;
    color: #333;
}

.form-actions button[type="submit"] {
    background: #2c3e50;
    color: white;
}

.form-actions button:hover {
    opacity: 0.9;
}

.form-actions button:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* 리뷰 목록 */
.reviews-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.review-card {
    background: white;
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.review-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 15px;
}

.review-author {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.author-name {
    font-weight: 600;
    color: #333;
}

.review-date {
    color: #666;
    font-size: 14px;
}

.review-language {
    background: #e9ecef;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 12px;
    color: #666;
}

.review-rating .stars {
    font-size: 16px;
}

.review-content {
    margin-bottom: 15px;
}

.review-text {
    color: #333;
    line-height: 1.6;
    margin: 0;
}

.translate-btn {
    margin-top: 10px;
    padding: 5px 12px;
    border: 1px solid #ddd;
    background: white;
    border-radius: 4px;
    font-size: 13px;
    cursor: pointer;
    transition: all 0.3s;
}

.translate-btn:hover {
    border-color: #2c3e50;
    color: #2c3e50;
}

/* 이미지 업로드 섹션 */
.image-upload-section {
    margin-top: 20px;
}

.image-upload-area {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
    align-items: center;
}

.uploaded-images {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.uploaded-image {
    position: relative;
    width: 80px;
    height: 80px;
}

.uploaded-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 8px;
    border: 2px solid #e0e0e0;
}

.remove-image {
    position: absolute;
    top: -8px;
    right: -8px;
    width: 24px;
    height: 24px;
    background: #dc3545;
    color: white;
    border: none;
    border-radius: 50%;
    font-size: 18px;
    line-height: 1;
    cursor: pointer;
    transition: background 0.3s;
}

.remove-image:hover {
    background: #c82333;
}

.upload-button {
    display: inline-block;
    cursor: pointer;
}

.upload-btn-content {
    background: #f8f9fa;
    border: 2px dashed #dee2e6;
    padding: 20px 30px;
    border-radius: 8px;
    text-align: center;
    transition: all 0.3s;
    font-size: 16px;
    color: #6c757d;
}

.upload-button:hover .upload-btn-content {
    background: #e9ecef;
    border-color: #adb5bd;
    color: #495057;
}

/* 리뷰 이미지 표시 */
.review-images {
    display: flex;
    gap: 10px;
    margin-top: 15px;
    flex-wrap: wrap;
}

.review-images img {
    width: 120px;
    height: 120px;
    object-fit: cover;
    border-radius: 8px;
    cursor: pointer;
    transition: transform 0.3s;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.review-images img:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
}

.review-actions {
    display: flex;
    gap: 10px;
    padding-top: 15px;
    border-top: 1px solid #eee;
}

.reaction-btn,
.report-btn {
    padding: 5px 12px;
    border: 1px solid #ddd;
    background: white;
    border-radius: 4px;
    font-size: 13px;
    cursor: pointer;
    transition: all 0.3s;
}

.reaction-btn:hover {
    border-color: #2c3e50;
    background: #f8f9fa;
}

.reaction-btn.active {
    background: #2c3e50;
    color: white;
    border-color: #2c3e50;
}

.report-btn:hover {
    border-color: #dc3545;
    color: #dc3545;
}

/* 로딩 및 빈 상태 */
.reviews-loading,
.reviews-empty {
    text-align: center;
    padding: 40px;
    color: #666;
}

.spinner {
    width: 40px;
    height: 40px;
    margin: 0 auto 20px;
    border: 3px solid #f3f3f3;
    border-top: 3px solid #2c3e50;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* 더 보기 버튼 */
.load-more-wrapper {
    text-align: center;
    margin-top: 20px;
}

.load-more-btn {
    padding: 10px 30px;
    border: 1px solid #ddd;
    background: white;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s;
}

.load-more-btn:hover {
    border-color: #2c3e50;
    background: #f8f9fa;
}

.load-more-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* 반응형 디자인 */
@media (max-width: 768px) {
    .rating-summary {
        flex-direction: column;
        gap: 20px;
        text-align: center;
    }
    
    .avg-rating {
        flex-direction: column;
    }
    
    .primary-shares {
        grid-template-columns: 1fr;
    }
    
    .language-filter {
        justify-content: center;
    }
    
    .review-header {
        flex-direction: column;
        gap: 10px;
    }
    
    .form-actions {
        flex-direction: column;
    }
    
    .form-actions button {
        width: 100%;
    }
}

/* 다크모드 지원 (선택사항) */
@media (prefers-color-scheme: dark) {
    .review-system {
        background: #1a1a1a;
    }
    
    .rating-summary,
    .share-section,
    .review-form,
    .review-card {
        background: #2a2a2a;
        color: #f0f0f0;
    }
    
    .form-group input,
    .form-group textarea {
        background: #333;
        border-color: #444;
        color: #f0f0f0;
    }
}
