/**
 * Google Reviews Widget Pro v3.3.0
 * Clean Elfsight-inspired design with rainbow Google logo
 * Simplified and optimized for proper card display
 */

/* ========== GLOBAL WIDGET CONTAINER ========== */
.grwp-widget {
    width: 100%;
    font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    padding: 20px 0;
}

/* ========== BADGE LAYOUT (Compact Single) ========== */
.grwp-badge {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    background: #ffffff;
    padding: 12px 16px;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.grwp-scheme-dark .grwp-badge {
    background: #1e1e1e;
}

.grwp-badge-inner {
    display: flex;
    align-items: center;
    gap: 12px;
}

.grwp-google-icon svg {
    width: 32px;
    height: 32px;
}

.grwp-badge-rating {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.grwp-badge-score {
    font-size: 24px;
    font-weight: 700;
    color: #202124;
    line-height: 1;
}

.grwp-scheme-dark .grwp-badge-score {
    color: #ffffff;
}

.grwp-badge-stars {
    display: flex;
    gap: 0px;
    font-size: 18px;
    letter-spacing: -3px;
    line-height: 1;
}

.grwp-badge-stars span {
    font-weight: 900;
    color: #fbbc04;
}

.grwp-badge-stars .empty {
    color: #e5e7eb;
}

.grwp-scheme-dark .grwp-badge-stars .empty {
    color: rgba(255, 255, 255, 0.2);
}

.grwp-badge-count {
    font-size: 12px;
    color: #5f6368;
}

.grwp-scheme-dark .grwp-badge-count {
    color: rgba(255, 255, 255, 0.6);
}

/* ========== HEADER ========== */
.grwp-header {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 12px;
    margin-bottom: 24px;
}

.grwp-business-name {
    margin: 0;
    font-size: 20px;
    font-weight: 600;
    color: #111827;
    letter-spacing: 0.01em;
    width: 100%;
}

.grwp-scheme-dark .grwp-business-name {
    color: #ffffff;
}

.grwp-rating-summary {
    display: flex;
    align-items: center;
    gap: 8px;
}

.grwp-stars-large {
    display: flex;
    gap: 0px;
    font-size: 18px;
    letter-spacing: -3px;
    line-height: 1;
}

.grwp-stars-large span {
    font-weight: 900;
    color: #fbbf24;
}

.grwp-stars-large .empty {
    color: #e5e7eb;
}

.grwp-scheme-dark .grwp-stars-large .empty {
    color: rgba(255, 255, 255, 0.2);
}

.grwp-rating-text {
    font-size: 14px;
    color: #64748b;
    font-weight: 500;
}

.grwp-scheme-dark .grwp-rating-text {
    color: rgba(255, 255, 255, 0.7);
}

.grwp-view-all {
    display: flex;
    gap: 12px;
    align-items: center;
    justify-content: center;
}

.grwp-view-all a {
    font-size: 14px;
    font-weight: 500;
    color: var(--grwp-accent, #4285f4);
    text-decoration: none;
    transition: opacity 0.2s;
}

.grwp-view-all a:hover {
    opacity: 0.8;
}

.grwp-cta-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 10px 20px;
    background: var(--grwp-accent, #4285f4);
    color: #ffffff !important;
    text-decoration: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    transition: all 0.2s ease;
}

.grwp-cta-button:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

/* ========== CAROUSEL CONTAINER ========== */
.grwp-carousel-container {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
}

.grwp-carousel-container.grwp-no-nav {
    padding: 0;
}

.grwp-carousel {
    flex: 1;
    overflow: hidden;
    max-width: 100%;
}

.grwp-track {
    display: flex;
    flex-wrap: nowrap;
    gap: 8px;
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ========== REVIEW CARDS ========== */
.grwp-card {
    flex-shrink: 0;
    box-sizing: border-box;
    padding: 2px;
    text-decoration: none;
    color: inherit;
    display: block;
}

.grwp-card-inner {
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 16px;
    padding: 24px;
    height: 100%;
    display: flex;
    flex-direction: column;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
    transition: all 0.2s ease;
    cursor: pointer;
    box-sizing: border-box;
    max-width: 100%;
}

.grwp-card:hover .grwp-card-inner {
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
    transform: translateY(-4px);
    border-color: #d1d5db;
}

.grwp-scheme-dark .grwp-card-inner {
    background: #1f2937;
    border-color: #374151;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.grwp-scheme-dark .grwp-card:hover .grwp-card-inner {
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.5);
    border-color: #4b5563;
}

.grwp-card-content {
    display: flex;
    flex-direction: column;
    gap: 14px;
    height: 100%;
}

/* ========== AUTHOR SECTION ========== */
.grwp-author {
    display: flex;
    align-items: center;
    gap: 12px;
}

.grwp-avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    flex-shrink: 0;
    object-fit: cover;
}

.grwp-avatar-initial {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: var(--grwp-accent, #4285f4);
    color: #ffffff;
    font-weight: 600;
    font-size: 18px;
    flex-shrink: 0;
}

.grwp-author-info {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.grwp-author-name {
    font-weight: 600;
    font-size: 15px;
    color: #111827;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.grwp-scheme-dark .grwp-author-name {
    color: #ffffff;
}

.grwp-review-date {
    font-size: 13px;
    color: #6b7280;
    display: inline;
    white-space: nowrap;
}

.grwp-scheme-dark .grwp-review-date {
    color: #9ca3af;
}

/* Rainbow Google Logo - Elfsight Style - Keep Inline */
.grwp-google-logo {
    display: inline;
    font-weight: 600;
    font-size: 13px;
    background: linear-gradient(90deg, #4285f4 0%, #ea4335 33%, #fbbc04 66%, #34a853 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* ========== STARS ========== */
.grwp-stars {
    display: flex;
    gap: 0px;
    font-size: 16px;
    letter-spacing: -3px;
    line-height: 1;
}

.grwp-stars span {
    font-weight: 900;
}

.grwp-stars .full {
    color: #fbbf24;
}

.grwp-stars .empty {
    color: #e5e7eb;
}

.grwp-scheme-dark .grwp-stars .empty {
    color: rgba(255, 255, 255, 0.2);
}

/* ========== REVIEW TEXT ========== */
.grwp-text {
    font-size: 14px;
    line-height: 1.5;
    color: #374151;
    margin: 0;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.grwp-scheme-dark .grwp-text {
    color: #d1d5db;
}

.grwp-read-more {
    display: inline-block;
    color: var(--grwp-accent, #4285f4);
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    margin-top: 4px;
}

.grwp-card:hover .grwp-read-more {
    text-decoration: underline;
}

/* ========== NAVIGATION BUTTONS ========== */
.grwp-nav {
    background: #ffffff;
    border: 1px solid #e5e7eb;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
    color: #111827;
    flex-shrink: 0;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.grwp-nav:hover:not(:disabled) {
    background: #f9fafb;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.12);
    transform: scale(1.05);
}

.grwp-nav:disabled {
    cursor: not-allowed;
    opacity: 0.3;
}

.grwp-nav svg {
    margin-bottom: 2px;
}

.grwp-nav span {
    font-size: 9px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.grwp-scheme-dark .grwp-nav {
    background: #374151;
    border-color: #4b5563;
    color: #ffffff;
}

.grwp-scheme-dark .grwp-nav:hover:not(:disabled) {
    background: #4b5563;
}

/* ========== PAGINATION DOTS ========== */
.grwp-dots {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-top: 20px;
}

.grwp-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #d1d5db;
    cursor: pointer;
    transition: all 0.2s;
}

.grwp-dot:hover {
    background: #9ca3af;
}

.grwp-dot.active {
    background: var(--grwp-accent, #4285f4);
    width: 24px;
    border-radius: 4px;
}

.grwp-scheme-dark .grwp-dot {
    background: #4b5563;
}

.grwp-scheme-dark .grwp-dot:hover {
    background: #6b7280;
}

/* ========== RESPONSIVE DESIGN ========== */
@media (max-width: 1024px) {
    .grwp-card {
        flex: 0 0 50% !important;
    }
}

@media (max-width: 768px) {
    .grwp-card {
        padding: 4px;
        flex: 0 0 100% !important;
    }
    
    .grwp-card-inner {
        padding: 20px;
    }
    
    .grwp-avatar,
    .grwp-avatar-initial {
        width: 40px;
        height: 40px;
        font-size: 16px;
    }
    
    .grwp-nav {
        width: 40px;
        height: 40px;
    }
    
    .grwp-nav svg {
        width: 16px;
        height: 16px;
    }
    
    .grwp-nav span {
        font-size: 8px;
    }
    
    .grwp-business-name {
        font-size: 18px;
    }
}

@media (max-width: 480px) {
    .grwp-card-inner {
        padding: 16px;
    }
    
    .grwp-text {
        font-size: 13px;
        -webkit-line-clamp: 2;
    }
    
    .grwp-carousel-container {
        gap: 8px;
    }
    
    .grwp-nav {
        width: 36px;
        height: 36px;
    }
}
