/* Google Reviews Style - 1:1 Replication */

/* Google Fonts */
@import url('https://fonts.googleapis.com/css2?family=Google+Sans:wght@400;500;700&family=Roboto:wght@300;400;500;700&display=swap');

/* Avatar Styles */
.avatar {
    flex-shrink: 0;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.avatar:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.avatar-google {
    font-family: "Google Sans", "Roboto", Arial, sans-serif;
}

.avatar-facebook {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

.avatar-gradient {
    background-size: 200% 200%;
    animation: gradient-shift 3s ease infinite;
}

@keyframes gradient-shift {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

.avatar-modern {
    position: relative;
    overflow: hidden;
}

.avatar-modern::before {
    content: "";
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(45deg, transparent 30%, rgba(255,255,255,0.1) 50%, transparent 70%);
    transform: rotate(45deg);
    animation: shimmer 2s infinite;
}

@keyframes shimmer {
    0% { transform: rotate(45deg) translateX(-100%); }
    100% { transform: rotate(45deg) translateX(100%); }
}

/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Google Sans', 'Roboto', Arial, sans-serif;
    background-color: #f8f9fa;
    color: #202124;
    line-height: 1.5;
}

/* Google Reviews Container - 全宽 */
.google-reviews-container {
    width: 100%;
    max-width: 100%;
    margin: 0;
    padding: 24px;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.12);
    box-sizing: border-box;
}

/* Google Header */
.google-reviews-header {
    display: flex;
    align-items: center;
    margin-bottom: 24px;
    padding-bottom: 16px;
    border-bottom: 1px solid #dadce0;
}

.google-logo {
    width: 24px;
    height: 24px;
    margin-right: 12px;
    background: linear-gradient(135deg, #4285f4 0%, #34a853 25%, #fbbc04 50%, #ea4335 75%);
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: bold;
    font-size: 12px;
}

.google-logo::before {
    content: "G";
}

.google-header-text {
    flex: 1;
}

.google-business-name {
    font-size: 20px;
    font-weight: 500;
    color: #202124;
    margin-bottom: 4px;
}

.google-business-address {
    font-size: 14px;
    color: #5f6368;
    margin-bottom: 8px;
}

.google-rating-summary {
    display: flex;
    align-items: center;
    gap: 8px;
}

.google-overall-rating {
    font-size: 18px;
    font-weight: 500;
    color: #202124;
}

.google-stars {
    display: flex;
    gap: 1px;
}

.google-star {
    color: #fbbc04;
    font-size: 16px;
}

.google-review-count {
    font-size: 14px;
    color: #5f6368;
}

/* Reviews List */
.google-reviews-list {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

/* Individual Review Card */
.google-review-card {
    padding: 16px 0;
    border-bottom: 1px solid #f1f3f4;
}

.google-review-card:last-child {
    border-bottom: none;
}

.google-review-header {
    display: flex;
    align-items: flex-start;
    margin-bottom: 8px;
}

.google-reviewer-avatar {
    margin-right: 12px;
    flex-shrink: 0;
}

.google-reviewer-info {
    flex: 1;
    min-width: 0;
}

.google-reviewer-name {
    font-size: 14px;
    font-weight: 500;
    color: #202124;
    margin-bottom: 2px;
}

.google-review-date {
    font-size: 12px;
    color: #5f6368;
    margin-bottom: 4px;
}

.google-review-stars {
    display: flex;
    gap: 1px;
    margin-bottom: 8px;
}

.google-review-star {
    color: #fbbc04;
    font-size: 14px;
}

.google-review-content {
    font-size: 14px;
    line-height: 1.5;
    color: #202124;
    margin-bottom: 12px;
    word-wrap: break-word;
}

/* Review Photos */
.google-review-photos {
    display: flex;
    gap: 8px;
    margin-bottom: 12px;
    overflow-x: auto;
    padding-bottom: 4px;
}

.google-review-photo {
    width: 80px;
    height: 80px;
    border-radius: 4px;
    object-fit: cover;
    cursor: pointer;
    transition: opacity 0.2s ease;
    flex-shrink: 0;
}

.google-review-photo:hover {
    opacity: 0.8;
}

/* Review Categories/Tags */
.google-review-categories {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 8px;
}

.google-category-tag {
    background: #f1f3f4;
    color: #5f6368;
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 400;
    text-transform: capitalize;
}

/* Load More Button */
.google-load-more {
    text-align: center;
    margin-top: 24px;
    padding-top: 16px;
    border-top: 1px solid #f1f3f4;
}

.google-load-more-btn {
    background: #fff;
    color: #1a73e8;
    border: 1px solid #dadce0;
    padding: 8px 16px;
    border-radius: 4px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

.google-load-more-btn:hover {
    background: #f8f9fa;
    border-color: #1a73e8;
}

.google-load-more-btn:disabled {
    color: #5f6368;
    cursor: not-allowed;
    background: #f8f9fa;
}

.google-loading-spinner {
    display: inline-block;
    width: 16px;
    height: 16px;
    border: 2px solid #dadce0;
    border-radius: 50%;
    border-top-color: #1a73e8;
    animation: google-spin 1s linear infinite;
    margin-right: 8px;
}

@keyframes google-spin {
    to { transform: rotate(360deg); }
}

/* No Reviews State */
.google-no-reviews {
    text-align: center;
    padding: 40px 20px;
    color: #5f6368;
}

.google-no-reviews h3 {
    font-size: 16px;
    font-weight: 500;
    margin-bottom: 8px;
    color: #202124;
}

.google-no-reviews p {
    font-size: 14px;
}

/* Photo Modal - Google Style */
.google-photo-modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(4px);
}

.google-photo-modal.show {
    display: flex;
    align-items: center;
    justify-content: center;
}

.google-modal-content {
    position: relative;
    max-width: 90%;
    max-height: 90%;
    background: #fff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}

.google-modal-photo {
    width: 100%;
    height: auto;
    display: block;
}

.google-modal-close {
    position: absolute;
    top: 12px;
    right: 12px;
    background: rgba(0, 0, 0, 0.6);
    color: white;
    border: none;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s ease;
}

.google-modal-close:hover {
    background: rgba(0, 0, 0, 0.8);
}

.google-modal-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0, 0, 0, 0.6);
    color: white;
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s ease;
}

.google-modal-nav:hover {
    background: rgba(0, 0, 0, 0.8);
}

.google-modal-prev {
    left: 12px;
}

.google-modal-next {
    right: 12px;
}

/* Responsive Design */
@media (min-width: 1200px) {
    .google-reviews-container {
        padding: 32px;
    }
    
    .google-reviews-list {
        gap: 24px;
    }
    
    .google-review-card {
        padding: 20px 0;
    }
    
    .google-review-content {
        font-size: 15px;
        line-height: 1.6;
    }
    
    .google-review-photos {
        gap: 12px;
    }
    
    .google-review-photo {
        width: 100px;
        height: 100px;
    }
}

@media (max-width: 768px) {
    .google-reviews-container {
        padding: 16px;
        margin: 0;
        border-radius: 0;
    }
    
    .google-reviews-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }
    
    .google-logo {
        margin-right: 0;
        margin-bottom: 8px;
    }
    
    .google-review-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }
    
    .google-reviewer-avatar {
        margin-right: 0;
        margin-bottom: 8px;
    }
    
    .google-review-photos {
        gap: 6px;
    }
    
    .google-review-photo {
        width: 70px;
        height: 70px;
    }
}

@media (max-width: 480px) {
    .google-reviews-container {
        padding: 12px;
    }
    
    .google-business-name {
        font-size: 18px;
    }
    
    .google-review-content {
        font-size: 13px;
    }
    
    .google-review-photo {
        width: 60px;
        height: 60px;
    }
}

/* Animation for new reviews */
.google-review-card {
    animation: google-fade-in 0.3s ease-out;
}

@keyframes google-fade-in {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Custom scrollbar for photo gallery */
.google-review-photos::-webkit-scrollbar {
    height: 4px;
}

.google-review-photos::-webkit-scrollbar-track {
    background: #f1f3f4;
    border-radius: 2px;
}

.google-review-photos::-webkit-scrollbar-thumb {
    background: #dadce0;
    border-radius: 2px;
}

.google-review-photos::-webkit-scrollbar-thumb:hover {
    background: #bdc1c6;
}
