/* Google Reviews Embedder — front-end layouts */

.gre,
.gre *,
.gre *::before,
.gre *::after {
    box-sizing: border-box;
}

.gre {
    --gre-star: #f5b301;
    --gre-accent: #e23b4a;
    --gre-card: #ffffff;
    --gre-text: #3c4043;
    --gre-name: #202124;
    --gre-muted: #5f6368;
    --gre-gap: 22px;
    color: var(--gre-text);
    font-family: inherit;
    line-height: 1.45;
}

.gre a {
    color: inherit;
    text-decoration: none;
}

.gre button {
    font-family: inherit;
    appearance: none;
    -webkit-appearance: none;
}

.gre-mark {
    display: inline-flex;
    width: 18px;
    height: 18px;
    flex: 0 0 auto;
}

.gre-mark svg {
    display: block;
    width: 100%;
    height: 100%;
}

.gre-mark--bubble {
    width: 46px;
    height: 46px;
    border-radius: 50%;
    background: #fff;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.14);
}

.gre-mark--bubble svg {
    width: 24px;
    height: 24px;
}

.gre-mark--tiny {
    width: 14px;
    height: 14px;
}

.gre-stars {
    display: inline-flex;
    align-items: center;
    gap: 2px;
    line-height: 1;
}

.gre-star {
    position: relative;
    display: inline-block;
    width: 1em;
    height: 1em;
    font-size: 16px;
}

.gre-star svg {
    display: block;
    width: 1em;
    height: 1em;
}

.gre-star-bg {
    fill: #e4e5e7;
}

.gre-star-fill {
    position: absolute;
    left: 0;
    top: 0;
    height: 100%;
    width: var(--gre-fill, 0%);
    overflow: hidden;
}

.gre-star-fill svg {
    fill: var(--gre-star);
}

.gre-rating-num {
    font-weight: 700;
    letter-spacing: -0.03em;
    line-height: 1;
    font-variant-numeric: tabular-nums;
}

.gre-score-line,
.gre-fab-line {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.gre-based {
    color: var(--gre-muted);
    font-size: 14px;
}

/* Static: inline bar, banner, card, business header */

.gre--align-center {
    display: flex;
    justify-content: center;
}

.gre--static-inline,
.gre--static-banner {
    color: inherit;
}

.gre-summary--inline {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    max-width: 100%;
    color: inherit;
    text-decoration: none;
    line-height: 1.1;
    white-space: nowrap;
}

.gre-summary--inline .gre-mark {
    width: 20px;
    height: 20px;
}

.gre-inline-label {
    font-size: 15px;
    font-weight: 600;
    letter-spacing: 0.01em;
}

.gre-inline-sep {
    display: inline-block;
    width: 1px;
    height: 1em;
    background: currentColor;
    opacity: 0.55;
    flex: 0 0 auto;
}

.gre-summary--inline .gre-score-line {
    gap: 6px;
}

.gre-summary--inline .gre-rating-num {
    font-size: 16px;
    font-weight: 700;
}

.gre-summary--inline .gre-star {
    font-size: 15px;
}

.gre-summary--inline .gre-inline-count {
    margin-left: 2px;
    font-size: 14px;
    font-weight: 500;
    opacity: 0.9;
}

@media (max-width: 520px) {
    .gre-summary--inline {
        flex-wrap: wrap;
        white-space: normal;
        row-gap: 6px;
    }
}

.gre-summary--banner {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    color: inherit;
    max-width: 100%;
}

.gre-banner-copy,
.gre-header-copy {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.gre-summary--banner .gre-rating-num {
    font-size: 30px;
}

.gre-summary--banner .gre-star {
    font-size: 18px;
}

.gre-summary--banner .gre-based {
    color: inherit;
    opacity: 0.85;
    font-size: 13px;
    margin-top: 3px;
}

.gre-summary--card {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 6px;
    width: 100%;
    max-width: 280px;
    background: #fff;
    color: #202124;
    border-radius: 10px;
    border-top: 4px solid var(--gre-accent);
    padding: 14px 16px 13px;
    box-shadow: 0 10px 28px rgba(0, 0, 0, 0.08);
}

.gre-label-row {
    display: flex;
    align-items: center;
    gap: 8px;
}

.gre-label {
    font-size: 16px;
    font-weight: 600;
    color: #202124;
}

.gre-summary--card .gre-rating-num {
    font-size: 26px;
    color: #202124;
}

.gre-summary--card .gre-star {
    font-size: 16px;
}

.gre-summary--card .gre-based {
    color: #5f6368;
    font-size: 14px;
}

.gre-summary--header {
    display: flex;
    align-items: center;
    gap: 16px;
    background: var(--gre-card);
    color: #202124;
    border-radius: 20px;
    padding: 18px 22px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
}

.gre-business-name {
    display: block;
    margin-bottom: 4px;
    color: var(--gre-accent);
    font-size: 22px;
    font-weight: 700;
    line-height: 1.25;
}

.gre-summary--header .gre-rating-num {
    font-size: 18px;
    color: #202124;
}

.gre-summary--header .gre-star {
    font-size: 16px;
}

.gre-summary--header .gre-based {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-top: 3px;
    color: #5f6368;
}

.gre-avatar {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: #f1f3f4;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    flex: 0 0 auto;
}

.gre-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.gre-avatar .gre-mark {
    width: 28px;
    height: 28px;
}

/* Review cards, shared by grid, carousel, and the slide-out list */

.gre-card {
    display: flex;
    flex-direction: column;
    min-width: 0;
    min-height: 240px;
    background: var(--gre-card);
    color: var(--gre-text);
    border-radius: 20px;
    padding: 22px 22px 18px;
    box-shadow: 0 10px 28px rgba(0, 0, 0, 0.1);
}

.gre-card-top {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 12px;
}

.gre-card-text {
    flex: 0 1 auto;
    min-height: 0;
    max-height: var(--gre-text-max, 150px);
    overflow: auto;
    padding-right: 8px;
    font-size: 15px;
    line-height: 1.5;
    overflow-wrap: break-word;
    scrollbar-width: thin;
    scrollbar-color: #c5c8c6 transparent;
}

.gre-card-text::-webkit-scrollbar {
    width: 8px;
}

.gre-card-text::-webkit-scrollbar-thumb {
    background: #c5c8c6;
    border-radius: 8px;
}

.gre-card-author {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: auto;
    padding-top: 16px;
    color: var(--gre-name);
    font-weight: 700;
}

.gre-card-author a:hover {
    text-decoration: underline;
}

.gre-author-photo {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    object-fit: cover;
}

.gre-date {
    display: block;
    margin-top: 2px;
    color: var(--gre-muted);
    font-size: 12px;
    font-weight: 400;
}

.gre--grid {
    container-type: inline-size;
}

.gre--grid .gre-summary--header {
    margin-bottom: var(--gre-gap);
}

.gre-grid {
    display: grid;
    grid-template-columns: repeat(var(--gre-cols, 3), minmax(0, 1fr));
    gap: var(--gre-gap);
}

@container (max-width: 980px) {
    .gre--cols-3 .gre-grid,
    .gre--cols-4 .gre-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@container (max-width: 620px) {
    .gre--grid .gre-grid {
        grid-template-columns: minmax(0, 1fr);
    }
}

@media (max-width: 640px) {
    .gre--grid .gre-grid {
        grid-template-columns: minmax(0, 1fr);
    }
}

/* Carousel */

.gre--carousel .gre-summary--header {
    margin-bottom: var(--gre-gap);
}

.gre-carousel {
    position: relative;
    padding: 0 28px;
}

.gre-viewport {
    overflow: hidden;
    touch-action: pan-y;
}

.gre-track {
    display: flex;
    align-items: stretch;
    gap: var(--gre-gap);
    transition: transform 0.45s ease;
}

.gre--carousel .gre-card {
    flex: 0 0 auto;
    height: auto;
}

.gre--carousel .gre-card-text {
    max-height: 220px;
}

.gre-nav {
    position: absolute;
    top: 50%;
    z-index: 2;
    display: grid;
    place-items: center;
    width: 46px;
    min-width: 46px;
    height: 46px;
    margin: 0;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: #fff;
    color: #3c4043;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.18);
    transform: translateY(-50%);
    cursor: pointer;
}

.gre-nav svg {
    width: 22px;
    height: 22px;
}

.gre-nav--prev {
    left: -6px;
}

.gre-nav--next {
    right: -6px;
}

.gre-nav:hover {
    color: #111;
}

.gre-nav:disabled,
.gre-nav[hidden] {
    opacity: 0.35;
    cursor: default;
}

.gre-nav:focus-visible,
.gre-fab:focus-visible,
.gre-panel-close:focus-visible {
    outline: 2px solid var(--gre-accent);
    outline-offset: 2px;
}

/* Floating button and slide-out list */

.gre-fab {
    position: fixed;
    z-index: 99991;
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 0;
    padding: 10px 14px;
    border: 0;
    background: #fff;
    color: #202124;
    text-align: left;
    line-height: 1.1;
    box-shadow: 0 8px 28px rgba(0, 0, 0, 0.2);
    cursor: pointer;
}

.gre--pos-right .gre-fab {
    top: 50%;
    right: 0;
    border-radius: 16px 0 0 16px;
    transform: translateY(-50%);
}

.gre--pos-left .gre-fab {
    top: 50%;
    left: 0;
    border-radius: 0 16px 16px 0;
    transform: translateY(-50%);
}

.gre--pos-bottom-right .gre-fab {
    right: 18px;
    bottom: 18px;
    border-radius: 999px;
}

.gre--pos-bottom-left .gre-fab {
    left: 18px;
    bottom: 18px;
    border-radius: 999px;
}

.gre-fab .gre-mark {
    width: 28px;
    height: 28px;
}

.gre-fab .gre-rating-num {
    font-size: 18px;
}

.gre-fab .gre-star {
    font-size: 14px;
}

.gre-fab-copy {
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.gre-fab-label {
    color: #5f6368;
    font-size: 12px;
    font-weight: 600;
}

.gre-scrim {
    position: fixed;
    inset: 0;
    z-index: 99990;
    background: rgba(32, 16, 18, 0.45);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.gre--floating.is-open .gre-scrim {
    opacity: 1;
    pointer-events: auto;
}

.gre-panel {
    position: fixed;
    top: 0;
    z-index: 99992;
    display: flex;
    flex-direction: column;
    width: min(420px, 100%);
    height: 100%;
    background: #f6f3f3;
    color: #202124;
    box-shadow: 0 0 40px rgba(0, 0, 0, 0.22);
    transition: transform 0.35s ease;
}

.gre--pos-right .gre-panel,
.gre--pos-bottom-right .gre-panel {
    right: 0;
    transform: translateX(105%);
}

.gre--pos-left .gre-panel,
.gre--pos-bottom-left .gre-panel {
    left: 0;
    transform: translateX(-105%);
}

.gre--floating.is-open .gre-panel {
    transform: translateX(0);
}

.gre-panel-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    padding: 18px 16px 14px;
    background: #fff;
    border-bottom: 1px solid #eee;
}

.gre-panel-title {
    display: flex;
    flex-direction: column;
    gap: 4px;
    min-width: 0;
}

.gre-panel-title strong {
    font-size: 18px;
    line-height: 1.3;
}

.gre-panel-title .gre-based {
    color: #5f6368;
}

.gre-panel-close {
    width: 36px;
    height: 36px;
    margin: 0;
    padding: 0;
    border: 0;
    background: transparent;
    color: #3c4043;
    font-size: 30px;
    line-height: 1;
    cursor: pointer;
}

.gre-panel-body {
    display: flex;
    flex: 1 1 auto;
    flex-direction: column;
    gap: 12px;
    overflow: auto;
    padding: 16px;
}

.gre-panel .gre-card {
    min-height: 0;
    box-shadow: none;
    border: 1px solid #eceff1;
}

.gre-panel .gre-card-text {
    max-height: none;
    overflow: visible;
}

.gre-panel-footer {
    display: block;
    padding: 14px 16px;
    background: #fff;
    border-top: 1px solid #eee;
    color: var(--gre-accent);
    font-weight: 700;
    text-align: center;
}

.gre-panel-footer:hover {
    text-decoration: underline;
}

body.admin-bar .gre-panel {
    top: 32px;
    height: calc(100% - 32px);
}

@media (max-width: 782px) {
    body.admin-bar .gre-panel {
        top: 46px;
        height: calc(100% - 46px);
    }

    .gre--hide-mobile {
        display: none !important;
    }
}

.gre-empty,
.gre-admin-note {
    margin: 0;
    color: inherit;
    font-size: 14px;
    opacity: 0.8;
}

html.gre-scroll-lock {
    overflow: hidden;
}

@media (prefers-reduced-motion: reduce) {
    .gre-track,
    .gre-panel,
    .gre-scrim {
        transition: none;
    }
}

/* Keep the fixed button from covering the block editor canvas. */
.editor-styles-wrapper .gre--floating .gre-fab,
.block-editor-block-list__layout .gre--floating .gre-fab {
    position: relative;
    top: auto;
    right: auto;
    bottom: auto;
    left: auto;
    transform: none;
    border-radius: 16px;
}

.editor-styles-wrapper .gre--floating .gre-panel,
.block-editor-block-list__layout .gre--floating .gre-panel {
    position: relative;
    top: auto;
    right: auto;
    left: auto;
    width: 100%;
    height: auto;
    max-height: 480px;
    transform: none;
}

.editor-styles-wrapper .gre--floating .gre-scrim,
.block-editor-block-list__layout .gre--floating .gre-scrim {
    display: none;
}
