/*
 * Google Reviews block
 * Single-class selectors only so themes can override easily.
 * Tweak via custom properties on .gr, e.g. .gr { --gr-accent: #c00; }
 */
.gr {
    --gr-star: #f5b301;
    --gr-star-empty: #d9dce1;
    --gr-text: inherit;
    --gr-muted: #6b7280;
    --gr-border: #e5e7eb;
    --gr-bg: #fff;
    --gr-radius: 12px;
    --gr-accent: #1a73e8;
    --gr-lines: 6;
    margin: 2em 0;
    color: var(--gr-text);
    line-height: 1.5;
    box-sizing: border-box;
}
.gr *,
.gr *::before,
.gr *::after {
    box-sizing: inherit;
}

/* Header */
.gr-header {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    justify-content: space-between;
    gap: .75em 1.5em;
    margin-bottom: 1.25em;
}
.gr-title {
    margin: 0 0 .25em;
    font-size: 1.25em;
    line-height: 1.3;
}
.gr-summary {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: .5em;
}
.gr-summary__score {
    font-size: 1.5em;
    font-weight: 700;
    line-height: 1;
}
.gr-summary__count {
    color: var(--gr-muted);
    font-size: .9em;
}

/* Stars: grey row with a gold row clipped on top (supports partial stars) */
.gr-stars {
    position: relative;
    display: inline-block;
    white-space: nowrap;
    line-height: 1;
    letter-spacing: .05em;
    vertical-align: middle;
}
.gr-stars__empty {
    color: var(--gr-star-empty);
}
.gr-stars__fill {
    position: absolute;
    top: 0;
    left: 0;
    overflow: hidden;
    color: var(--gr-star);
}
.gr-stars--lg {
    font-size: 1.35em;
}
.gr-stars--sm {
    font-size: .95em;
}

/* Attribution (required by Google) */
.gr-attribution {
    display: flex;
    align-items: center;
    gap: .35em;
    font-size: .85em;
    color: var(--gr-muted);
}
.gr-google {
    font-family: Arial, Helvetica, sans-serif;
    font-weight: 700;
    font-size: 1.15em;
    letter-spacing: -.02em;
}
.gr-g1 { color: #4285f4; }
.gr-g2 { color: #ea4335; }
.gr-g3 { color: #fbbc05; }
.gr-g4 { color: #34a853; }

/* Review list */
.gr-list {
    list-style: none;
    margin: 0;
    padding: 0;
}
.gr--cards .gr-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 1em;
}
.gr-review {
    margin: 0;
    padding: 1.1em 1.2em;
    background: var(--gr-bg);
    border: 1px solid var(--gr-border);
    border-radius: var(--gr-radius);
}
.gr--cards .gr-review {
    display: flex;
    flex-direction: column;
}
.gr--compact .gr-review {
    padding: 1em 0;
    background: none;
    border: 0;
    border-bottom: 1px solid var(--gr-border);
    border-radius: 0;
}
.gr--compact .gr-review:last-child {
    border-bottom: 0;
}
.gr-review__head {
    display: flex;
    align-items: center;
    gap: .75em;
}
.gr-review__avatar {
    flex: 0 0 40px;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
}
.gr-review__avatar--initial {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: var(--gr-accent);
    color: #fff;
    font-weight: 700;
}
.gr-review__meta {
    min-width: 0;
}
.gr-review__author {
    display: block;
    font-weight: 600;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
a.gr-review__author {
    color: inherit;
    text-decoration: none;
}
a.gr-review__author:hover,
a.gr-review__author:focus {
    text-decoration: underline;
}
.gr-review__rating {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: .5em;
}
.gr-review__time {
    color: var(--gr-muted);
    font-size: .85em;
}
.gr-review__text {
    margin: .75em 0 0;
    overflow-wrap: anywhere;
    /* Clamp long reviews; set --gr-lines: none on .gr to show everything */
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: var(--gr-lines);
    line-clamp: var(--gr-lines);
    overflow: hidden;
}
.gr--compact .gr-review__text {
    margin-left: calc(40px + .75em);
}

/* Footer */
.gr-footer {
    margin-top: 1.25em;
}
.gr-button {
    display: inline-block;
    padding: .6em 1.2em;
    border: 1px solid var(--gr-accent);
    border-radius: 999px;
    color: var(--gr-accent);
    text-decoration: none;
    font-weight: 600;
    transition: background-color .15s, color .15s;
}
.gr-button:hover,
.gr-button:focus {
    background: var(--gr-accent);
    color: #fff;
    text-decoration: none;
}

@media (max-width: 480px) {
    .gr--compact .gr-review__text {
        margin-left: 0;
    }
}
