/* Modern 2026 UI/UX - Glassmorphism, tailored colors, responsive grid */

:root {
    --grl-bg-color: rgba(255, 255, 255, 0.7);
    --grl-border-color: rgba(255, 255, 255, 0.2);
    --grl-text-primary: #1a1a2e;
    --grl-text-secondary: #4a4e69;
    --grl-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.07);
    --grl-star-color: #fbbc04;
    --grl-star-empty: #e0e0e0;
    --grl-font: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

/* Dark mode fallback, though typically inherited from theme. We can keep it adaptable. */
@media (prefers-color-scheme: dark) {
    :root {
        --grl-bg-color: rgba(30, 30, 40, 0.7);
        --grl-border-color: rgba(255, 255, 255, 0.05);
        --grl-text-primary: #f8f9fa;
        --grl-text-secondary: #adb5bd;
        --grl-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.3);
    }
}

.grl-reviews-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 24px;
    padding: 20px 0;
    font-family: var(--grl-font);
}

.grl-review-card {
    background: var(--grl-bg-color);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--grl-border-color);
    border-radius: 20px;
    padding: 24px;
    box-shadow: var(--grl-shadow);
    transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275), box-shadow 0.3s ease;
    display: flex;
    flex-direction: column;
}

.grl-review-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 45px 0 rgba(31, 38, 135, 0.15);
}

@media (prefers-color-scheme: dark) {
    .grl-review-card:hover {
        box-shadow: 0 15px 45px 0 rgba(0, 0, 0, 0.5);
    }
}

.grl-review-header {
    margin-bottom: 16px;
    position: relative;
}

.grl-header-link {
    display: flex;
    align-items: center;
    text-decoration: none;
    color: inherit;
    width: 100%;
}

.grl-header-link:hover .grl-author-name {
    text-decoration: underline;
}

.grl-author-avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    object-fit: cover;
    margin-right: 16px;
}

.grl-author-info {
    flex-grow: 1;
}

.grl-author-name {
    margin: 0 0 4px 0;
    font-size: 16px;
    font-weight: 600;
    color: var(--grl-text-primary);
}

.grl-stars {
    display: flex;
    gap: 2px;
}

.grl-star {
    color: var(--grl-star-color);
    font-size: 18px;
    line-height: 1;
}

.grl-star.grl-star-empty {
    color: var(--grl-star-empty);
}

.grl-google-icon {
    position: absolute;
    top: 0;
    right: 0;
    width: 24px;
    height: 24px;
}

.grl-google-icon img {
    width: 100%;
    height: 100%;
}

.grl-review-body {
    flex-grow: 1;
}

.grl-review-body p {
    font-size: 15px;
    line-height: 1.6;
    color: var(--grl-text-secondary);
    margin: 0;
    /* Optional: Limit lines */
    display: -webkit-box;
    -webkit-line-clamp: 4;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.grl-review-footer {
    margin-top: 16px;
    font-size: 13px;
    color: var(--grl-text-secondary);
    opacity: 0.8;
}

/* Fallback for Google icon if svg is missing */
.grl-google-icon::after {
    content: "G";
    font-weight: bold;
    color: #4285F4;
    display: block;
    text-align: center;
    line-height: 24px;
    font-size: 18px;
}
.grl-google-icon img {
    display: none; /* Hide img if fallback used */
}

/* Leave a Review Button */
.grl-leave-review-container {
    display: flex;
    justify-content: center;
    margin-top: 32px;
}

.grl-btn-leave-review {
    display: inline-flex;
    align-items: center;
    background: linear-gradient(135deg, #4285F4 0%, #3367D6 100%);
    color: #ffffff !important;
    text-decoration: none;
    font-weight: 600;
    font-size: 16px;
    padding: 14px 28px;
    border-radius: 30px;
    box-shadow: 0 4px 15px rgba(66, 133, 244, 0.4);
    transition: all 0.3s ease;
    font-family: var(--grl-font);
}

.grl-btn-leave-review:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(66, 133, 244, 0.6);
}

.grl-btn-icon {
    width: 20px;
    height: 20px;
    margin-right: 12px;
    filter: brightness(0) invert(1);
}
