/* ==========================================================================
   Google Reviews Widget
   Replicates Google Maps review cards visual language.
   ========================================================================== */

.gr-widget {
    font-family: "Google Sans", Roboto, Arial, sans-serif;
    color: #3c4043;
    box-sizing: border-box;
}

.gr-widget *,
.gr-widget *::before,
.gr-widget *::after {
    box-sizing: inherit;
}

/* --------------------------------------------------------------------------
   Individual review
   -------------------------------------------------------------------------- */

.gr-review {
    background: #fff;
}

/* Header: avatar + name/stars row */
.gr-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 10px;
}

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

.gr-avatar--fallback {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    font-size: 17px;
    font-weight: 600;
    color: #fff;
    flex-shrink: 0;
    user-select: none;
}

.gr-meta {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
}

.gr-author {
    font-size: 14px;
    font-weight: 600;
    color: #3c4043;
    text-decoration: none;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.gr-author:hover {
    text-decoration: underline;
}

.gr-stars-row {
    display: flex;
    align-items: center;
    gap: 6px;
}

.gr-stars {
    font-size: 14px;
    line-height: 1;
    letter-spacing: 1px;
}

.gr-star--filled { color: #fbbc04; }
.gr-star--empty  { color: #dadce0; }

.gr-date {
    font-size: 12px;
    color: #70757a;
}

/* Review body text */
.gr-body {
    font-size: 14px;
    line-height: 1.6;
    color: #3c4043;
    margin-bottom: 10px;
}

.gr-text-inner {
    display: -webkit-box;
    -webkit-line-clamp: 4;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.gr-text-inner.gr-expanded {
    display: block;
    -webkit-line-clamp: unset;
}

.gr-more-btn {
    background: none;
    border: none;
    padding: 0;
    margin-top: 4px;
    color: #1a73e8;
    font-size: 13px;
    font-family: inherit;
    cursor: pointer;
    display: block;
}

.gr-more-btn:hover {
    text-decoration: underline;
}

/* Footer: location name + Google attribution */
.gr-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 8px;
}

.gr-place-name {
    font-size: 11px;
    font-weight: 600;
    color: #70757a;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    padding-right: 8px;
}

.gr-attribution {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 11px;
    color: #70757a;
    text-decoration: none;
}

.gr-attribution:hover {
    color: #3c4043;
}

.gr-attribution svg {
    flex-shrink: 0;
}

/* --------------------------------------------------------------------------
   Layout: Cards
   -------------------------------------------------------------------------- */

.gr-layout-cards {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
}

.gr-layout-cards .gr-review {
    flex: 1 1 260px;
    max-width: 360px;
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(60, 64, 67, .15),
                0 1px 2px rgba(60, 64, 67, .20);
    padding: 16px;
    transition: box-shadow .15s ease;
}

.gr-layout-cards .gr-review:hover {
    box-shadow: 0 2px 6px rgba(60, 64, 67, .20),
                0 1px 4px rgba(60, 64, 67, .15);
}

/* --------------------------------------------------------------------------
   Layout: List
   -------------------------------------------------------------------------- */

.gr-layout-list {
    display: flex;
    flex-direction: column;
}

.gr-layout-list .gr-review {
    padding: 16px 0;
    border-bottom: 1px solid #e8eaed;
}

.gr-layout-list .gr-review:first-child {
    padding-top: 0;
}

.gr-layout-list .gr-review:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

/* --------------------------------------------------------------------------
   Layout: Masonry  (CSS columns — no JS required)
   -------------------------------------------------------------------------- */

.gr-layout-masonry {
    columns: 3 260px;
    column-gap: 16px;
}

.gr-layout-masonry .gr-review {
    break-inside: avoid;
    margin-bottom: 16px;
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(60, 64, 67, .15),
                0 1px 2px rgba(60, 64, 67, .20);
    padding: 16px;
}

/* --------------------------------------------------------------------------
   Responsive tweaks
   -------------------------------------------------------------------------- */

/* Tablet — ≤ 768px */
@media (max-width: 768px) {
    .gr-layout-cards .gr-review {
        flex: 1 1 calc(50% - 8px);
        max-width: calc(50% - 8px);
    }

    .gr-layout-masonry {
        columns: 2;
    }
}

/* Mobile — ≤ 480px */
@media (max-width: 480px) {
    .gr-layout-cards .gr-review {
        flex: 1 1 100%;
        max-width: 100%;
    }

    .gr-layout-masonry {
        columns: 1;
    }

    .gr-layout-slider {
        padding: 0 36px;
    }

    .gr-slider-btn {
        width: 28px;
        height: 28px;
        font-size: 18px;
    }
}

/* --------------------------------------------------------------------------
   Layout: Slider
   -------------------------------------------------------------------------- */

/* Outer wrapper — relative so buttons anchor to it; NOT overflow:hidden */
.gr-layout-slider {
    --gr-spv-req: 1; /* fallback; overridden by inline style (shortcode) or Elementor responsive CSS */
    --gr-spv: var(--gr-spv-req); /* actual value used by slide width calc and JS */
    --gr-gap: 16px;
    position: relative;
    padding: 0 44px; /* space for prev/next buttons */
}

/* Viewport clips the sliding track.
   padding + negative margin trick: shadows live inside the padding area,
   so overflow:hidden won't cut them off. */
.gr-slider-viewport {
    overflow: hidden;
    padding: 6px;
    margin: -6px;
}

.gr-slider-track {
    display: flex;
    gap: var(--gr-gap);
    transition: transform .35s ease;
    will-change: transform;
    cursor: grab;
    user-select: none;
}

.gr-slider-track:active {
    cursor: grabbing;
}

/* Each slide width = (viewport - gaps between visible slides) / spv */
.gr-slide {
    flex: 0 0 calc(
        (100% - (var(--gr-spv) - 1) * var(--gr-gap)) / var(--gr-spv)
    );
    min-width: 0;
}

.gr-slide .gr-review {
    height: 100%;
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(60, 64, 67, .15),
                0 1px 2px rgba(60, 64, 67, .20);
    padding: 16px;
}

.gr-slider-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: #fff;
    border: 1px solid #dadce0;
    border-radius: 50%;
    width: 36px;
    height: 36px;
    font-size: 22px;
    line-height: 1;
    cursor: pointer;
    color: #3c4043;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1;
    transition: box-shadow .15s ease;
    padding: 0;
}

.gr-slider-btn:hover {
    box-shadow: 0 2px 6px rgba(60, 64, 67, .25);
}

.gr-slider-btn:disabled {
    opacity: .35;
    cursor: default;
    box-shadow: none;
}

.gr-slider-prev { left: 0; }
.gr-slider-next { right: 0; }
