/* =====================================================================
   Google Reviews — standalone front-end styles
   All classes are prefixed with `gr-` and require no CSS framework.
   ===================================================================== */

:root {
    --gr-card-bg: #f9fafb;
    --gr-badge-bg: #dbeafe;
    --gr-badge-color: #1e40af;
    --gr-primary: #1e40af;
    --gr-primary-contrast: #ffffff;
    --gr-star: #fbbf24;
    --gr-text: #111827;
    --gr-text-muted: #6b7280;
    --gr-radius: 8px;
}

/* Google logo mark (full colour "G") ---------------------------------- */
.gr-logo-google {
    display: inline-block;
    width: 1.6rem;
    height: 1.6rem;
    background-repeat: no-repeat;
    background-position: center;
    background-size: contain;
    background-image: url("data:image/svg+xml,%3Csvg enable-background='new 0 0 512 512' viewBox='0 0 512 512' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='m120 256c0-25.367 6.989-49.13 19.131-69.477v-86.308h-86.308c-34.255 44.488-52.823 98.707-52.823 155.785s18.568 111.297 52.823 155.785h86.308v-86.308c-12.142-20.347-19.131-44.11-19.131-69.477z' fill='%23fbbd00'/%3E%3Cpath d='m256 392-60 60 60 60c57.079 0 111.297-18.568 155.785-52.823v-86.216h-86.216c-20.525 12.186-44.388 19.039-69.569 19.039z' fill='%230f9d58'/%3E%3Cpath d='m139.131 325.477-86.308 86.308c6.782 8.808 14.167 17.243 22.158 25.235 48.352 48.351 112.639 74.98 181.019 74.98v-120c-49.624 0-93.117-26.72-116.869-66.523z' fill='%2331aa52'/%3E%3Cpath d='m512 256c0-15.575-1.41-31.179-4.192-46.377l-2.251-12.299h-249.557v120h121.452c-11.794 23.461-29.928 42.602-51.884 55.638l86.216 86.216c8.808-6.782 17.243-14.167 25.235-22.158 48.352-48.353 74.981-112.64 74.981-181.02z' fill='%233c79e6'/%3E%3Cpath d='m352.167 159.833 10.606 10.606 84.853-84.852-10.606-10.606c-48.352-48.352-112.639-74.981-181.02-74.981l-60 60 60 60c36.326 0 70.479 14.146 96.167 39.833z' fill='%23cf2d48'/%3E%3Cpath d='m256 120v-120c-68.38 0-132.667 26.629-181.02 74.98-7.991 7.991-15.376 16.426-22.158 25.235l86.308 86.308c23.753-39.803 67.246-66.523 116.87-66.523z' fill='%23eb4132'/%3E%3C/svg%3E");
}

/* Stars --------------------------------------------------------------- */
.gr-stars {
    display: inline-flex;
    align-items: center;
    gap: 0.15rem;
    line-height: 1;
}

.gr-star {
    display: inline-block;
    width: 1rem;
    height: 1rem;
    background-color: var(--gr-star);
    mask-repeat: no-repeat;
    mask-size: contain;
    -webkit-mask-repeat: no-repeat;
    -webkit-mask-size: contain;
}

.gr-star--full {
    mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 576 512'%3E%3Cpath d='M316.9 18C311.6 7 300.4 0 288.1 0s-23.4 7-28.8 18L195 150.3 51.4 171.5c-12 1.8-22 10.2-25.7 21.7s-.7 24.2 7.9 32.7L137.8 329 113.2 474.7c-2 12 3 24.2 12.9 31.3s23 8 33.8 2.3l128.3-68.5 128.3 68.5c10.8 5.7 23.9 4.9 33.8-2.3s14.9-19.3 12.9-31.3L438.5 329 542.7 225.9c8.6-8.5 11.7-21.2 7.9-32.7s-13.7-19.9-25.7-21.7L381.2 150.3 316.9 18z'/%3E%3C/svg%3E");
    -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 576 512'%3E%3Cpath d='M316.9 18C311.6 7 300.4 0 288.1 0s-23.4 7-28.8 18L195 150.3 51.4 171.5c-12 1.8-22 10.2-25.7 21.7s-.7 24.2 7.9 32.7L137.8 329 113.2 474.7c-2 12 3 24.2 12.9 31.3s23 8 33.8 2.3l128.3-68.5 128.3 68.5c10.8 5.7 23.9 4.9 33.8-2.3s14.9-19.3 12.9-31.3L438.5 329 542.7 225.9c8.6-8.5 11.7-21.2 7.9-32.7s-13.7-19.9-25.7-21.7L381.2 150.3 316.9 18z'/%3E%3C/svg%3E");
}

.gr-star--half {
    mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 640 512'%3E%3Cpath d='M341.5 13.5C337.5 5.2 329.1 0 319.9 0s-17.6 5.2-21.6 13.5L229.7 154.8 76.5 177.5c-9 1.3-16.5 7.6-19.3 16.3s-.5 18.1 5.9 24.5L174.2 328.4 148 483.9c-1.5 9 2.2 18.1 9.7 23.5s17.3 6 25.3 1.7l137-73.2 137 73.2c8.1 4.3 17.9 3.7 25.3-1.7s11.2-14.5 9.7-23.5L465.6 328.4 576.8 218.2c6.5-6.4 8.7-15.9 5.9-24.5s-10.3-14.9-19.3-16.3L410.1 154.8 341.5 13.5zM320 384.7V79.1l52.5 108.1c3.5 7.1 10.2 12.1 18.1 13.3l118.3 17.5L423 303c-5.5 5.5-8.1 13.3-6.8 21l20.2 119.6L331.2 387.5c-3.5-1.9-7.4-2.8-11.2-2.8z'/%3E%3C/svg%3E");
    -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 640 512'%3E%3Cpath d='M341.5 13.5C337.5 5.2 329.1 0 319.9 0s-17.6 5.2-21.6 13.5L229.7 154.8 76.5 177.5c-9 1.3-16.5 7.6-19.3 16.3s-.5 18.1 5.9 24.5L174.2 328.4 148 483.9c-1.5 9 2.2 18.1 9.7 23.5s17.3 6 25.3 1.7l137-73.2 137 73.2c8.1 4.3 17.9 3.7 25.3-1.7s11.2-14.5 9.7-23.5L465.6 328.4 576.8 218.2c6.5-6.4 8.7-15.9 5.9-24.5s-10.3-14.9-19.3-16.3L410.1 154.8 341.5 13.5zM320 384.7V79.1l52.5 108.1c3.5 7.1 10.2 12.1 18.1 13.3l118.3 17.5L423 303c-5.5 5.5-8.1 13.3-6.8 21l20.2 119.6L331.2 387.5c-3.5-1.9-7.4-2.8-11.2-2.8z'/%3E%3C/svg%3E");
}

.gr-star--empty {
    background-color: #d1d5db;
    mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 576 512'%3E%3Cpath d='M316.9 18C311.6 7 300.4 0 288.1 0s-23.4 7-28.8 18L195 150.3 51.4 171.5c-12 1.8-22 10.2-25.7 21.7s-.7 24.2 7.9 32.7L137.8 329 113.2 474.7c-2 12 3 24.2 12.9 31.3s23 8 33.8 2.3l128.3-68.5 128.3 68.5c10.8 5.7 23.9 4.9 33.8-2.3s14.9-19.3 12.9-31.3L438.5 329 542.7 225.9c8.6-8.5 11.7-21.2 7.9-32.7s-13.7-19.9-25.7-21.7L381.2 150.3 316.9 18z'/%3E%3C/svg%3E");
    -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 576 512'%3E%3Cpath d='M316.9 18C311.6 7 300.4 0 288.1 0s-23.4 7-28.8 18L195 150.3 51.4 171.5c-12 1.8-22 10.2-25.7 21.7s-.7 24.2 7.9 32.7L137.8 329 113.2 474.7c-2 12 3 24.2 12.9 31.3s23 8 33.8 2.3l128.3-68.5 128.3 68.5c10.8 5.7 23.9 4.9 33.8-2.3s14.9-19.3 12.9-31.3L438.5 329 542.7 225.9c8.6-8.5 11.7-21.2 7.9-32.7s-13.7-19.9-25.7-21.7L381.2 150.3 316.9 18z'/%3E%3C/svg%3E");
}

/* Score badge --------------------------------------------------------- */
.gr-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 2.25rem;
    height: 2rem;
    padding: 0 0.5rem;
    border-radius: 0.375rem;
    background-color: var(--gr-badge-bg);
    color: var(--gr-badge-color);
    font-weight: 600;
    font-size: 1rem;
    line-height: 1;
}

/* Button -------------------------------------------------------------- */
.gr-button {
    display: inline-block;
    padding: 0.45rem 0.9rem;
    border-radius: 0.375rem;
    background-color: var(--gr-primary);
    color: var(--gr-primary-contrast);
    font-size: 0.875rem;
    line-height: 1.4;
    text-decoration: none;
    transition: opacity 0.15s ease;
}

.gr-button:hover,
.gr-button:focus {
    opacity: 0.9;
    color: var(--gr-primary-contrast);
}

/* =====================================================================
   Reviews component / archive
   ===================================================================== */
.gr-header {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.gr-header__main {
    flex: 1 1 320px;
}

.gr-header__aside {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    justify-content: space-between;
    gap: 1rem;
}

.gr-header__stats {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 0.75rem;
}

.gr-header__count,
.gr-header__sub {
    color: var(--gr-text-muted);
    font-size: 0.9rem;
}

.gr-header__title {
    margin: 0 0 0.25rem;
}

.gr-header__sub {
    margin: 0;
}

.gr-reviews__logo {
    width: 6rem;
    height: auto;
}

.gr-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.25rem;
}

.gr-review {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    height: 100%;
    padding: 1.25rem;
    background-color: var(--gr-card-bg);
    border-radius: var(--gr-radius);
}

.gr-review__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.gr-review__text {
    flex: 1 1 auto;
    margin: 0;
    font-size: 0.9rem;
    color: var(--gr-text);
}

.gr-review__author {
    font-weight: 600;
    color: var(--gr-text);
}

/* =====================================================================
   Summary widget (inline stars + score)
   ===================================================================== */
.gr-summary {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    text-decoration: none;
    color: inherit;
}

.gr-summary__score {
    font-weight: 700;
    color: var(--gr-text);
}

.gr-summary__count {
    font-size: 0.75rem;
    color: var(--gr-text-muted);
}

/* =====================================================================
   Small widget (logo + single star + score)
   ===================================================================== */
.gr-summary-sm {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    text-decoration: none;
    color: inherit;
}

.gr-summary-sm__logo {
    width: 1.5rem;
    height: 1.5rem;
}

.gr-summary-sm .gr-star {
    width: 1.25rem;
    height: 1.25rem;
}

.gr-summary-sm__score {
    font-weight: 700;
    font-size: 1.1rem;
    color: var(--gr-text);
}

/* =====================================================================
   Average widget (card)
   ===================================================================== */
.gr-average {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    position: relative;
    min-width: 216px;
    padding: 12px 16px;
    background-color: #ffffff;
    border-radius: var(--gr-radius);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.gr-average__score {
    font-size: 2.5rem;
    line-height: 1;
    font-weight: 700;
    color: var(--gr-star);
}

.gr-average__link {
    display: inline-block;
    margin-top: 0.25rem;
    color: var(--gr-text-muted);
    font-size: 0.8rem;
    text-decoration: none;
}

.gr-average__logo {
    position: absolute;
    top: 8px;
    right: 8px;
    width: 1.2rem;
    height: 1.2rem;
}

/* Responsive ---------------------------------------------------------- */
@media (max-width: 782px) {
    .gr-header__aside {
        align-items: flex-start;
    }
}
