.te-google-reviews {
    width: 100%;
    margin-bottom: 13px;
    color: #000;
    font-family: inherit;
}

.te-google-reviews *,
.te-google-reviews *::before,
.te-google-reviews *::after {
    box-sizing: border-box;
}

.te-google-reviews .te-google-reviews__heading {
    margin: 0 0 56px;
    padding: 0;
    text-align: center;
    font-size: clamp(28px, 3.4vw, 44px);
    font-weight: 500;
    line-height: 1.2;
}

/* Columns follow the number of matching reviews. */
.te-google-reviews__grid {
    display: grid;
    gap: 16px;
    align-items: stretch;
}

.te-google-reviews__grid--3 {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.te-google-reviews__grid--2 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.te-google-reviews__grid--1 {
    grid-template-columns: minmax(0, 1fr);
    width: 100%;
    max-width: 380px;
    margin-inline: auto;
}

.te-google-reviews .te-google-reviews__card {
    display: flex;
    flex-direction: column;
    min-width: 0;
    height: 300px;
    margin: 0;
    padding: 20px;
    overflow: hidden;
    background: #fff;
    border: 1px solid #e5e5e5;
    border-radius: 15px;
    box-shadow:
        0 2px 2px 0 #00000029,
        0 1px 5px 0 #00000029,
        0 3px 1px -2px #00000029;
}

/* Reviewer details stay above the scrolling text. */
.te-google-reviews__header {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-shrink: 0;
    margin-bottom: 14px;
}

.te-google-reviews__avatar {
    display: flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 40px;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: #4285f4;
    color: #fff;
    font-size: 18px;
    font-weight: 500;
    line-height: 1;
}

.te-google-reviews__info {
    flex: 1;
    min-width: 0;
}

.te-google-reviews .te-google-reviews__name {
    margin: 0;
    color: #000;
    font-size: 14px;
    font-weight: 500;
    line-height: 1.4;
    overflow-wrap: anywhere;
}

.te-google-reviews__meta {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    column-gap: 8px;
    row-gap: 2px;
}

.te-google-reviews .te-google-reviews__stars {
    flex-shrink: 0;
    margin: 0;
    color: #fbbc04;
    font-size: clamp(17px, 2vw, 22px);
    letter-spacing: 0;
    line-height: 1.2;
    white-space: nowrap;
}

.te-google-reviews .te-google-reviews__date {
    color: #5f6368;
    font-size: 12px;
    font-weight: 400;
    line-height: 1.4;
}

.te-google-reviews__google {
    flex: 0 0 16px;
    margin-left: auto;
}

.te-google-reviews__google svg {
    display: block;
    width: 16px;
    height: 16px;
}

/* Long reviews scroll without increasing card height. */
.te-google-reviews__content {
    min-height: 0;
    max-height: 120px;
    overflow-y: auto;
    padding-right: 6px;
    scrollbar-width: thin;
    scrollbar-color: #b8bdc3 transparent;
    overscroll-behavior-y: contain;
}

.te-google-reviews .te-google-reviews__content p {
    margin: 0;
    padding: 0;
    color: #000;
    font-family: inherit;
    font-size: 16px;
    font-weight: 500;
    line-height: 1.5;
    overflow-wrap: anywhere;
}

.te-google-reviews__content:focus-visible {
    outline: 2px solid #4285f4;
    outline-offset: 2px;
}

.te-google-reviews__content::-webkit-scrollbar {
    width: 5px;
}

.te-google-reviews__content::-webkit-scrollbar-thumb {
    background: #b8bdc3;
    border-radius: 10px;
}

@media (max-width: 900px) {
    .te-google-reviews__grid--3 {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    /* Center the third card when the layout becomes two columns. */
    .te-google-reviews__grid--3 > :last-child {
        grid-column: 1 / -1;
        width: calc((100% - 16px) / 2);
        justify-self: center;
    }
}

@media (max-width: 600px) {
    .te-google-reviews__grid {
        grid-template-columns: minmax(0, 1fr);
    }

    .te-google-reviews__grid--3 > :last-child {
        grid-column: auto;
        width: 100%;
    }

    .te-google-reviews .te-google-reviews__heading {
        margin-bottom: 30px;
    }
}