/* Google Reviews Carousel - Frontend Styles */

/* Container */
.grc-container {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    max-width: 100%;
    margin: 2rem auto;
}

/* Header */
.grc-header {
    text-align: center;
    margin-bottom: 2rem;
}

.grc-title {
    font-size: 2rem;
    font-weight: 600;
    color: #1a1a1a;
    margin: 0 0 1.5rem 0;
    line-height: 1.2;
}

/* Google Summary Section */
.grc-summary {
    background: #f8f9fa;
    border-radius: 12px;
    padding: 1.5rem;
    margin-bottom: 2rem;
}

.grc-summary-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 1.5rem;
}

.grc-google-logo {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.grc-google-logo svg {
    width: 32px;
    height: 32px;
}

.grc-google-text {
    font-size: 1.125rem;
    font-weight: 500;
    color: #5f6368;
}

.grc-rating-summary {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.grc-rating-number {
    font-size: 1.5rem;
    font-weight: 600;
    color: #1a1a1a;
}

.grc-total-reviews {
    color: #5f6368;
    font-size: 0.875rem;
    margin-left: 0.25rem;
}

/* Stars */
.grc-stars {
    display: inline-flex;
    gap: 0.125rem;
}

.grc-star {
    font-size: 1.125rem;
    line-height: 1;
}

.grc-star-full {
    color: #fbbf24;
}

.grc-star-half {
    position: relative;
    color: #e5e7eb;
}

.grc-star-half::before {
    content: "★";
    position: absolute;
    left: 0;
    top: 0;
    width: 50%;
    overflow: hidden;
    color: #fbbf24;
}

.grc-star-empty {
    color: #e5e7eb;
}

/* Review Button */
.grc-review-button {
    background: #1a73e8;
    color: white;
    padding: 0.625rem 1.25rem;
    border-radius: 24px;
    text-decoration: none;
    font-size: 0.875rem;
    font-weight: 500;
    transition: all 0.2s ease;
    display: inline-block;
}

.grc-review-button:hover {
    background: #1557b0;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(26, 115, 232, 0.25);
}

/* Review Card */
.grc-review-card {
    background: white;
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    height: 100%;
    display: flex;
    flex-direction: column;
    transition: all 0.3s ease;
}

.grc-review-card:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    transform: translateY(-2px);
}

/* Review Header */
.grc-review-header {
    margin-bottom: 1rem;
}

.grc-reviewer-info {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.grc-reviewer-photo {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
}

.grc-default-photo {
    background: #e5e7eb;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    color: #6b7280;
    font-size: 1.125rem;
}

.grc-reviewer-details {
    flex: 1;
    min-width: 0;
}

.grc-reviewer-name {
    font-size: 0.9375rem;
    font-weight: 500;
    color: #1a1a1a;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.grc-verified {
    color: #1a73e8;
    font-size: 0.875rem;
}

.grc-review-date {
    font-size: 0.8125rem;
    color: #6b7280;
    display: block;
    margin-top: 0.125rem;
}

/* Review Rating */
.grc-review-rating {
    margin-bottom: 0.75rem;
}

.grc-review-rating .grc-stars {
    gap: 0.0625rem;
}

.grc-review-rating .grc-star {
    font-size: 0.9375rem;
}

/* Review Text */
.grc-review-text {
    font-size: 0.875rem;
    line-height: 1.5;
    color: #374151;
    flex: 1;
    display: -webkit-box;
    -webkit-line-clamp: 4;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Carousel Mode Specific */
.grc-carousel-mode .swiper {
    padding-bottom: 3rem;
}

.grc-carousel-mode .swiper-slide {
    height: auto;
}

.grc-carousel-mode .swiper-pagination {
    bottom: 0;
}

.grc-carousel-mode .swiper-pagination-bullet {
    width: 8px;
    height: 8px;
    background: #d1d5db;
    opacity: 1;
    transition: all 0.3s ease;
}

.grc-carousel-mode .swiper-pagination-bullet-active {
    background: #1a73e8;
    width: 24px;
    border-radius: 4px;
}

.grc-carousel-mode .swiper-button-next,
.grc-carousel-mode .swiper-button-prev {
    color: #1a73e8;
    width: 40px;
    height: 40px;
    background: white;
    border-radius: 50%;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.grc-carousel-mode .swiper-button-next::after,
.grc-carousel-mode .swiper-button-prev::after {
    font-size: 18px;
}

/* Grid Mode */
.grc-grid {
    display: grid;
    gap: 1.5rem;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
}

.grc-grid[data-columns="2"] {
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    max-width: 800px;
    margin: 0 auto;
}

.grc-grid[data-columns="3"] {
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}

.grc-grid[data-columns="4"] {
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
}

/* List Mode */
.grc-list {
    max-width: 800px;
    margin: 0 auto;
}

.grc-list-item {
    margin-bottom: 1.5rem;
}

.grc-list-mode .grc-review-text {
    -webkit-line-clamp: unset;
    max-height: none;
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .grc-title {
        font-size: 1.5rem;
    }
    
    .grc-summary-inner {
        flex-direction: column;
        text-align: center;
    }
    
    .grc-rating-summary {
        flex-direction: column;
    }
    
    .grc-grid {
        grid-template-columns: 1fr;
    }
    
    .grc-carousel-mode .swiper-button-next,
    .grc-carousel-mode .swiper-button-prev {
        display: none;
    }
    
    .grc-review-card {
        padding: 1.25rem;
    }
}

@media (max-width: 480px) {
    .grc-title {
        font-size: 1.25rem;
    }
    
    .grc-summary {
        padding: 1rem;
    }
    
    .grc-review-button {
        font-size: 0.8125rem;
        padding: 0.5rem 1rem;
    }
}

/* No reviews message */
.grc-no-reviews {
    text-align: center;
    padding: 3rem 1rem;
    background: #f9fafb;
    border-radius: 8px;
    color: #6b7280;
}

/* Loading state */
.grc-loading {
    text-align: center;
    padding: 2rem;
}

.grc-loading::after {
    content: "";
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid #e5e7eb;
    border-top-color: #1a73e8;
    border-radius: 50%;
    animation: grc-spin 0.8s linear infinite;
}

@keyframes grc-spin {
    to { transform: rotate(360deg); }
}
