/* Frontend Styles */
.lgr-reviews-container {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, sans-serif;
    margin: 30px 0;
}

/* Header */
.lgr-header {
    background: #fff;
    border-radius: 12px;
    padding: 30px;
    margin-bottom: 30px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

.lgr-header-content {
    display: flex;
    align-items: center;
    gap: 20px;
}

.lgr-business-logo {
    width: 80px;
    height: 80px;
    border-radius: 12px;
    object-fit: cover;
    border: 2px solid #f0f0f0;
}

.lgr-header-info {
    flex: 1;
}

.lgr-business-name {
    margin: 0 0 10px 0;
    font-size: 28px;
    font-weight: 600;
    color: #1a1a1a;
}

.lgr-header-rating {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 8px;
}

.lgr-rating-value {
    font-size: 24px;
    font-weight: 700;
    color: #1a1a1a;
}

.lgr-stars {
    display: inline-flex;
    gap: 2px;
    font-size: 20px;
}

.lgr-star-full {
    color: #fbbc04;
}

.lgr-star-half {
    color: #fbbc04;
    opacity: 0.5;
}

.lgr-star-empty {
    color: #e0e0e0;
}

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

.lgr-google-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: #666;
    font-size: 13px;
}

/* Reviews Grid */
.lgr-reviews-grid {
    display: grid !important;
    gap: 24px !important;
    margin-bottom: 30px;
    grid-template-columns: 1fr !important; /* Default 1 column */
}

/* Column layouts - NUCLEAR option with max specificity */
body .lgr-reviews-container.lgr-style-grid.lgr-columns-1 .lgr-reviews-grid,
.lgr-reviews-container.lgr-style-grid.lgr-columns-1 .lgr-reviews-grid,
div.lgr-reviews-container.lgr-style-grid.lgr-columns-1 div.lgr-reviews-grid {
    display: grid !important;
    grid-template-columns: 1fr !important;
}

body .lgr-reviews-container.lgr-style-grid.lgr-columns-2 .lgr-reviews-grid,
.lgr-reviews-container.lgr-style-grid.lgr-columns-2 .lgr-reviews-grid,
div.lgr-reviews-container.lgr-style-grid.lgr-columns-2 div.lgr-reviews-grid {
    display: grid !important;
    grid-template-columns: repeat(2, 1fr) !important;
}

body .lgr-reviews-container.lgr-style-grid.lgr-columns-3 .lgr-reviews-grid,
.lgr-reviews-container.lgr-style-grid.lgr-columns-3 .lgr-reviews-grid,
div.lgr-reviews-container.lgr-style-grid.lgr-columns-3 div.lgr-reviews-grid {
    display: grid !important;
    grid-template-columns: repeat(3, 1fr) !important;
}

body .lgr-reviews-container.lgr-style-grid.lgr-columns-4 .lgr-reviews-grid,
.lgr-reviews-container.lgr-style-grid.lgr-columns-4 .lgr-reviews-grid,
div.lgr-reviews-container.lgr-style-grid.lgr-columns-4 div.lgr-reviews-grid {
    display: grid !important;
    grid-template-columns: repeat(4, 1fr) !important;
}

/* Also for masonry */
.lgr-reviews-container.lgr-style-masonry .lgr-reviews-grid {
    display: block;
    column-count: 3;
    column-gap: 24px;
}

.lgr-reviews-container.lgr-style-masonry.lgr-columns-1 .lgr-reviews-grid {
    column-count: 1 !important;
}

.lgr-reviews-container.lgr-style-masonry.lgr-columns-2 .lgr-reviews-grid {
    column-count: 2 !important;
}

.lgr-reviews-container.lgr-style-masonry.lgr-columns-3 .lgr-reviews-grid {
    column-count: 3 !important;
}

.lgr-reviews-container.lgr-style-masonry.lgr-columns-4 .lgr-reviews-grid {
    column-count: 4 !important;
}

/* Review Item */
.lgr-review-item {
    background: #fff;
    border-radius: 12px;
    padding: 24px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    transition: all 0.3s ease;
}

.lgr-review-item:hover {
    box-shadow: 0 4px 16px rgba(0,0,0,0.12);
    transform: translateY(-2px);
}

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

.lgr-reviewer-info {
    display: flex;
    gap: 12px;
}

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

.lgr-reviewer-photo-placeholder {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    font-weight: 600;
    width: 52px;
    height: 52px;
    border-radius: 50%;
    flex-shrink: 0;
}

.lgr-reviewer-details {
    flex: 1;
}

.lgr-reviewer-name {
    font-weight: 600;
    font-size: 16px;
    color: #1a1a1a;
    margin-bottom: 4px;
}

.lgr-review-stars {
    display: flex;
    gap: 2px;
    font-size: 16px;
}

.lgr-review-date {
    font-size: 13px;
    color: #999;
    white-space: nowrap;
}

.lgr-review-text {
    color: #333;
    line-height: 1.6;
    margin-bottom: 16px;
    font-size: 15px;
}

.lgr-review-reply {
    background: #f8f9fa;
    border-left: 3px solid #4285f4;
    padding: 12px 16px;
    border-radius: 8px;
    margin-top: 16px;
    font-size: 14px;
}

.lgr-reply-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 8px;
    font-size: 13px;
}

.lgr-reply-date {
    color: #999;
}

.lgr-reply-text {
    color: #555;
    line-height: 1.5;
}

.lgr-review-footer {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid #f0f0f0;
}

.lgr-google-text {
    font-size: 12px;
    color: #999;
}

/* List Style */
.lgr-style-list .lgr-reviews-grid {
    grid-template-columns: 1fr;
}

.lgr-style-list .lgr-review-item {
    display: flex;
    flex-direction: row;
    gap: 20px;
}

.lgr-style-list .lgr-reviewer-photo {
    width: 52px;
    height: 52px;
}

/* Masonry Style Items */
.lgr-style-masonry .lgr-review-item {
    break-inside: avoid;
    margin-bottom: 24px;
}

/* Slider Style */
.lgr-style-slider .lgr-reviews-grid {
    display: flex;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    gap: 24px;
    padding-bottom: 16px;
}

.lgr-style-slider .lgr-review-item {
    min-width: 350px;
    scroll-snap-align: start;
    flex-shrink: 0;
}

.lgr-style-slider .lgr-reviews-grid::-webkit-scrollbar {
    height: 8px;
}

.lgr-style-slider .lgr-reviews-grid::-webkit-scrollbar-track {
    background: #f0f0f0;
    border-radius: 4px;
}

.lgr-style-slider .lgr-reviews-grid::-webkit-scrollbar-thumb {
    background: #4285f4;
    border-radius: 4px;
}

/* Load More Button */
.lgr-load-more-container {
    text-align: center;
    margin-top: 30px;
}

.lgr-load-more-btn {
    background: #4285f4;
    color: #fff;
    border: none;
    border-radius: 8px;
    padding: 14px 32px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(66, 133, 244, 0.3);
}

.lgr-load-more-btn:hover {
    background: #3367d6;
    box-shadow: 0 4px 16px rgba(66, 133, 244, 0.4);
    transform: translateY(-1px);
}

.lgr-load-more-btn:active {
    transform: translateY(0);
}

.lgr-load-more-btn:disabled {
    background: #ccc;
    cursor: not-allowed;
    transform: none;
}

.lgr-btn-loading {
    display: none;
}

.lgr-load-more-btn.loading .lgr-btn-text {
    display: none;
}

.lgr-load-more-btn.loading .lgr-btn-loading {
    display: inline;
}

/* Dark Theme */
.lgr-theme-dark {
    background: #1a1a1a;
    color: #fff;
    padding: 30px;
    border-radius: 12px;
}

.lgr-theme-dark .lgr-header {
    background: #2a2a2a;
}

.lgr-theme-dark .lgr-business-name {
    color: #fff;
}

.lgr-theme-dark .lgr-review-item {
    background: #2a2a2a;
    color: #e0e0e0;
}

.lgr-theme-dark .lgr-reviewer-name {
    color: #fff;
}

.lgr-theme-dark .lgr-review-text {
    color: #e0e0e0;
}

.lgr-theme-dark .lgr-review-reply {
    background: #333;
}

.lgr-theme-dark .lgr-review-footer {
    border-top-color: #444;
}

/* No Reviews Message */
.lgr-no-reviews {
    text-align: center;
    padding: 60px 20px;
    color: #999;
    font-size: 16px;
}

/* Responsive */
@media (max-width: 1200px) {
    body .lgr-reviews-container.lgr-style-grid.lgr-columns-4 .lgr-reviews-grid,
    .lgr-reviews-container.lgr-style-grid.lgr-columns-4 .lgr-reviews-grid,
    div.lgr-reviews-container.lgr-style-grid.lgr-columns-4 div.lgr-reviews-grid {
        grid-template-columns: repeat(3, 1fr) !important;
    }

    .lgr-reviews-container.lgr-style-masonry.lgr-columns-4 .lgr-reviews-grid {
        column-count: 3 !important;
    }
}

@media (max-width: 960px) {
    body .lgr-reviews-container.lgr-style-grid.lgr-columns-3 .lgr-reviews-grid,
    body .lgr-reviews-container.lgr-style-grid.lgr-columns-4 .lgr-reviews-grid,
    .lgr-reviews-container.lgr-style-grid.lgr-columns-3 .lgr-reviews-grid,
    .lgr-reviews-container.lgr-style-grid.lgr-columns-4 .lgr-reviews-grid,
    div.lgr-reviews-container.lgr-style-grid.lgr-columns-3 div.lgr-reviews-grid,
    div.lgr-reviews-container.lgr-style-grid.lgr-columns-4 div.lgr-reviews-grid {
        grid-template-columns: repeat(2, 1fr) !important;
    }

    .lgr-reviews-container.lgr-style-masonry.lgr-columns-3 .lgr-reviews-grid,
    .lgr-reviews-container.lgr-style-masonry.lgr-columns-4 .lgr-reviews-grid {
        column-count: 2 !important;
    }
}

@media (max-width: 640px) {
    .lgr-header-content {
        flex-direction: column;
        text-align: center;
    }

    .lgr-business-name {
        font-size: 22px;
    }

    body .lgr-reviews-container.lgr-style-grid.lgr-columns-2 .lgr-reviews-grid,
    body .lgr-reviews-container.lgr-style-grid.lgr-columns-3 .lgr-reviews-grid,
    body .lgr-reviews-container.lgr-style-grid.lgr-columns-4 .lgr-reviews-grid,
    .lgr-reviews-container.lgr-style-grid.lgr-columns-2 .lgr-reviews-grid,
    .lgr-reviews-container.lgr-style-grid.lgr-columns-3 .lgr-reviews-grid,
    .lgr-reviews-container.lgr-style-grid.lgr-columns-4 .lgr-reviews-grid,
    div.lgr-reviews-container.lgr-style-grid.lgr-columns-2 div.lgr-reviews-grid,
    div.lgr-reviews-container.lgr-style-grid.lgr-columns-3 div.lgr-reviews-grid,
    div.lgr-reviews-container.lgr-style-grid.lgr-columns-4 div.lgr-reviews-grid {
        grid-template-columns: 1fr !important;
    }

    .lgr-reviews-container.lgr-style-masonry .lgr-reviews-grid {
        column-count: 1 !important;
    }

    .lgr-style-slider .lgr-review-item {
        min-width: 280px;
    }

    .lgr-style-list .lgr-review-item {
        flex-direction: column;
    }
}
