/* Facebook Reviews Style - 1:1 Replication */

/* Facebook Fonts */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap');

/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background-color: #f0f2f5;
    color: #050505;
    line-height: 1.5;
}

/* Facebook Reviews Container - 全宽 */
.facebook-reviews-container {
    width: 100%;
    max-width: 100%;
    margin: 0;
    padding: 20px;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    position: relative;
    box-sizing: border-box;
}

/* Facebook Header */
.facebook-reviews-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 24px;
    padding-bottom: 16px;
    border-bottom: 1px solid #e4e6ea;
}

.facebook-header-left {
    flex: 1;
}

.facebook-title {
    display: flex;
    align-items: center;
    margin-bottom: 8px;
}

.facebook-title-text {
    font-size: 24px;
    font-weight: 700;
    color: #050505;
}

.facebook-title-text .facebook-brand {
    color: #1877f2;
}

.facebook-rating-summary {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 4px;
}

.facebook-overall-rating {
    font-size: 32px;
    font-weight: 700;
    color: #050505;
}

.facebook-stars {
    display: flex;
    gap: 2px;
}

.facebook-star {
    color: #ffc107;
    font-size: 20px;
}

.facebook-review-count {
    font-size: 16px;
    color: #65676b;
    margin-left: 8px;
}

.facebook-write-review-btn {
    background: #1877f2;
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.facebook-write-review-btn:hover {
    background: #166fe5;
}

/* Reviews Carousel */
.facebook-reviews-carousel {
    position: relative;
    overflow: hidden;
}

.facebook-reviews-track {
    display: flex;
    transition: transform 0.3s ease;
    gap: 16px;
}

.facebook-review-card {
    min-width: 320px;
    background: #fff;
    border: 1px solid #e4e6ea;
    border-radius: 8px;
    padding: 16px;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
    transition: box-shadow 0.2s ease;
}

.facebook-review-card:hover {
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

/* AI Summary Card */
.facebook-ai-summary-card {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
}

.facebook-ai-summary-header {
    display: flex;
    align-items: center;
    margin-bottom: 12px;
}

.facebook-ai-icon {
    width: 32px;
    height: 32px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 8px;
    font-size: 16px;
}

.facebook-ai-title {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 2px;
}

.facebook-ai-subtitle {
    font-size: 12px;
    opacity: 0.8;
}

.facebook-ai-stars {
    margin-bottom: 12px;
}

.facebook-ai-summary-points {
    list-style: none;
}

.facebook-ai-summary-points li {
    font-size: 14px;
    margin-bottom: 6px;
    padding-left: 16px;
    position: relative;
}

.facebook-ai-summary-points li::before {
    content: "•";
    position: absolute;
    left: 0;
    color: rgba(255, 255, 255, 0.8);
}

/* Regular Review Card */
.facebook-review-header {
    display: flex;
    align-items: flex-start;
    margin-bottom: 12px;
}

.facebook-reviewer-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    margin-right: 12px;
    flex-shrink: 0;
    overflow: hidden;
    background-size: cover;
    background-position: center;
}

.facebook-reviewer-info {
    flex: 1;
    min-width: 0;
}

.facebook-reviewer-name {
    font-size: 14px;
    font-weight: 600;
    color: #050505;
    margin-bottom: 2px;
    display: flex;
    align-items: center;
    gap: 4px;
}

.facebook-logo {
    width: 12px;
    height: 12px;
    background: #1877f2;
    border-radius: 2px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 8px;
    font-weight: bold;
}

.facebook-verified {
    width: 14px;
    height: 14px;
    background: #1877f2;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 8px;
}

.facebook-review-date {
    font-size: 12px;
    color: #65676b;
    margin-bottom: 4px;
}

.facebook-review-stars {
    display: flex;
    gap: 1px;
    margin-bottom: 8px;
}

.facebook-review-content {
    font-size: 14px;
    line-height: 1.4;
    color: #050505;
    margin-bottom: 8px;
    word-wrap: break-word;
}

.facebook-review-content.truncated {
    max-height: 60px;
    overflow: hidden;
    position: relative;
}

.facebook-review-content.truncated::after {
    content: "";
    position: absolute;
    bottom: 0;
    right: 0;
    width: 40px;
    height: 20px;
    background: linear-gradient(transparent, #fff);
}

.facebook-read-more {
    color: #1877f2;
    font-size: 14px;
    font-weight: 500;
    text-decoration: none;
    cursor: pointer;
}

.facebook-read-more:hover {
    text-decoration: underline;
}

.facebook-original-link {
    font-size: 12px;
    color: #65676b;
    text-decoration: none;
    margin-top: 8px;
    display: inline-block;
}

.facebook-original-link:hover {
    text-decoration: underline;
}

/* Navigation */
.facebook-nav-arrows {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.9);
    border: 1px solid #e4e6ea;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 18px;
    color: #65676b;
    transition: all 0.2s ease;
    z-index: 10;
}

.facebook-nav-arrows:hover {
    background: #fff;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    color: #1877f2;
}

.facebook-nav-prev {
    left: -20px;
}

.facebook-nav-next {
    right: -20px;
}

.facebook-nav-arrows.disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Pagination Dots */
.facebook-pagination {
    display: flex;
    justify-content: center;
    gap: 6px;
    margin-top: 20px;
}

.facebook-pagination-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #e4e6ea;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.facebook-pagination-dot.active {
    background: #1877f2;
}

/* Load More Button */
.facebook-load-more {
    text-align: center;
    margin-top: 24px;
    padding-top: 16px;
    border-top: 1px solid #e4e6ea;
}

.facebook-load-more-btn {
    background: #1877f2;
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.facebook-load-more-btn:hover {
    background: #166fe5;
}

.facebook-load-more-btn:disabled {
    background: #e4e6ea;
    color: #65676b;
    cursor: not-allowed;
}

.facebook-loading-spinner {
    display: inline-block;
    width: 16px;
    height: 16px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: white;
    animation: facebook-spin 1s linear infinite;
    margin-right: 8px;
}

@keyframes facebook-spin {
    to { transform: rotate(360deg); }
}

/* Responsive Design */
@media (max-width: 768px) {
    .facebook-reviews-container {
        padding: 16px;
        margin: 0;
        border-radius: 0;
    }
    
    .facebook-reviews-header {
        flex-direction: column;
        gap: 16px;
    }
    
    .facebook-write-review-btn {
        align-self: flex-start;
    }
    
    .facebook-review-card {
        min-width: 280px;
    }
    
    .facebook-nav-arrows {
        width: 36px;
        height: 36px;
        font-size: 16px;
    }
    
    .facebook-nav-prev {
        left: -18px;
    }
    
    .facebook-nav-next {
        right: -18px;
    }
}

@media (max-width: 480px) {
    .facebook-reviews-container {
        padding: 12px;
    }
    
    .facebook-title-text {
        font-size: 20px;
    }
    
    .facebook-overall-rating {
        font-size: 28px;
    }
    
    .facebook-review-card {
        min-width: 260px;
        padding: 12px;
    }
    
    .facebook-nav-arrows {
        display: none;
    }
}

/* Animation for new reviews */
.facebook-review-card {
    animation: facebook-fade-in 0.3s ease-out;
}

@keyframes facebook-fade-in {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Custom scrollbar */
.facebook-reviews-track::-webkit-scrollbar {
    display: none;
}

.facebook-reviews-track {
    -ms-overflow-style: none;
    scrollbar-width: none;
}
