/* =========================================================================
   BW Google Reviews — Frontend Styles
   ========================================================================= */

.bw-gr-widget {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
    max-width: 960px;
    margin: 0 auto;
}

/* --- Entrance Animation --- */

.bw-gr-widget .bw-gr-summary,
.bw-gr-widget .bw-gr-review {
    opacity: 0;
    transform: translateY(20px);
    animation: bw-gr-fade-up 0.6s ease forwards;
}

.bw-gr-widget .bw-gr-summary {
    animation-delay: 0.1s;
}

.bw-gr-widget .bw-gr-review:nth-child(1) { animation-delay: 0.3s; }
.bw-gr-widget .bw-gr-review:nth-child(2) { animation-delay: 0.45s; }
.bw-gr-widget .bw-gr-review:nth-child(3) { animation-delay: 0.6s; }
.bw-gr-widget .bw-gr-review:nth-child(4) { animation-delay: 0.75s; }
.bw-gr-widget .bw-gr-review:nth-child(5) { animation-delay: 0.9s; }

@keyframes bw-gr-fade-up {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* --- Star Fill Animation (left to right) --- */

.bw-gr-stars .bw-gr-star,
.bw-gr-review-stars .bw-gr-star {
    opacity: 0;
    transform: scale(0.3);
    animation: bw-gr-star-pop 0.35s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}

.bw-gr-stars .bw-gr-star:nth-child(1),
.bw-gr-review-stars .bw-gr-star:nth-child(1) { animation-delay: 0.3s; }
.bw-gr-stars .bw-gr-star:nth-child(2),
.bw-gr-review-stars .bw-gr-star:nth-child(2) { animation-delay: 0.42s; }
.bw-gr-stars .bw-gr-star:nth-child(3),
.bw-gr-review-stars .bw-gr-star:nth-child(3) { animation-delay: 0.54s; }
.bw-gr-stars .bw-gr-star:nth-child(4),
.bw-gr-review-stars .bw-gr-star:nth-child(4) { animation-delay: 0.66s; }
.bw-gr-stars .bw-gr-star:nth-child(5),
.bw-gr-review-stars .bw-gr-star:nth-child(5) { animation-delay: 0.78s; }

@keyframes bw-gr-star-pop {
    0% {
        opacity: 0;
        transform: scale(0.3) rotate(-15deg);
    }
    70% {
        transform: scale(1.15) rotate(3deg);
    }
    100% {
        opacity: 1;
        transform: scale(1) rotate(0deg);
    }
}

/* --- Score Number Entrance --- */

.bw-gr-score-number {
    display: inline-block;
    opacity: 0;
    animation: bw-gr-score-in 0.5s ease forwards 0.2s;
}

@keyframes bw-gr-score-in {
    0% {
        opacity: 0;
        transform: scale(0.5);
    }
    60% {
        transform: scale(1.1);
    }
    100% {
        opacity: 1;
        transform: scale(1);
    }
}

/* --- Header: Google icon + "Google Reviews" title --- */

.bw-gr-header {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-bottom: 12px;
}

.bw-gr-header svg {
    flex-shrink: 0;
}

.bw-gr-header-title {
    font-size: 1.2rem;
    font-weight: 600;
    color: #202124;
}

/* --- Summary / Score (centered, no border) --- */

.bw-gr-summary {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 0 0 24px 0;
    margin-bottom: 20px;
}

.bw-gr-score {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.bw-gr-score-number {
    font-size: 2.8rem;
    font-weight: 800;
    line-height: 1;
    color: #1a2b4a;
    letter-spacing: -0.02em;
}

.bw-gr-stars {
    display: flex;
    align-items: center;
    gap: 2px;
}

.bw-gr-stars .bw-gr-star {
    filter: drop-shadow(0 1px 1px rgba(0, 0, 0, 0.1));
}

.bw-gr-review-count {
    font-size: 0.88rem;
    color: #70757a;
    font-weight: 500;
    text-align: center;
    margin-top: 4px;
}


/* --- Reviews Grid (side by side) --- */

.bw-gr-reviews {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
}

.bw-gr-review {
    background: #fff;
    border: 1px solid #e8e8e8;
    border-radius: 12px;
    padding: 18px 20px;
    transition: box-shadow 0.3s ease, transform 0.3s ease, border-color 0.3s ease;
    display: flex;
    flex-direction: column;
}

.bw-gr-review:hover {
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.08);
    transform: translateY(-2px);
    border-color: #FBBC04;
}

.bw-gr-review-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 8px;
}

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

.bw-gr-avatar-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    background: #1a2b4a;
    color: #fff;
    font-weight: 700;
    font-size: 1rem;
    text-transform: uppercase;
    border: none;
}

.bw-gr-review-meta {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.bw-gr-author {
    font-weight: 600;
    font-size: 0.88rem;
    color: #202124;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.bw-gr-time {
    font-size: 0.75rem;
    color: #9aa0a6;
    margin-top: 1px;
}

.bw-gr-review-stars {
    display: flex;
    align-items: center;
    gap: 2px;
    margin-bottom: 8px;
}

.bw-gr-review-stars .bw-gr-star {
    filter: drop-shadow(0 1px 1px rgba(0, 0, 0, 0.1));
}

.bw-gr-review-text {
    font-size: 0.85rem;
    line-height: 1.55;
    color: #3c4043;
    margin: 0;
    flex: 1;
}

/* --- Footer Link --- */

.bw-gr-footer {
    text-align: center;
    margin-top: 24px;
}

.bw-gr-link {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 0.9rem;
    font-weight: 500;
    color: #1a73e8;
    text-decoration: none;
    transition: color 0.2s ease;
}

.bw-gr-link:hover {
    color: #174ea6;
    text-decoration: underline;
}

.bw-gr-link-all {
    background: none;
    border: none;
    padding: 0;
}


/* --- Responsive --- */

@media (max-width: 768px) {
    .bw-gr-reviews {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 480px) {
    .bw-gr-score-number {
        font-size: 2rem;
    }

    .bw-gr-reviews {
        grid-template-columns: 1fr;
    }

    .bw-gr-review {
        padding: 14px 16px;
    }
}
