.ib-google-reviews-widget {
    margin: 30px 0;
    display: flex;
    align-items: center;
    gap: 0;
    box-sizing: border-box;
}

/* Header Section with Business Info */
.ib-google-reviews-header {
    padding: 24px;
    text-align: center;
    margin-bottom: 0;
    flex-shrink: 0;
    min-width: 200px;
}

.ib-reviews-summary {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
}

.ib-review-link {
    font-weight: 600;
}

.ib-rating-large {
    font-size: 20px;
    font-weight: 700;
    color: #202124;
    letter-spacing: 0.5px;
}

.ib-stars-large {
    font-size: 22px;
    color: #fbbc04;
    line-height: 1;
}

.ib-google-logo {
    margin: 8px 0 0;
}

.ib-google-logo svg {
    max-width: 100px;
    height: auto;
}

/* Review Card Styling */
.ib-google-reviews-slider .as-item {
    display: flex;
    align-items: stretch;
}

.ib-google-reviews-slider .as-item .ib-review-item {
    background: #ffffff;
    border: 1px solid #e8eaed;
    border-radius: 8px;
    padding: 0;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
    display: flex;
    flex-direction: column;
    width: 100%;
    box-sizing: border-box;
}

.ib-google-reviews-slider .as-item .ib-review-item:hover {
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.12);
    border-color: #dadce0;
}

.ib-review-inner {
    display: flex;
    flex-direction: column;
    gap: 6px;
    flex: 1;
    padding: 20px;
    box-sizing: border-box;
}

/* Review Header with Author Info */
.ib-review-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 0;
}

.ib-google-icon {
    position: absolute;
    top: 16px;
    right: 16px;
    width: 20px;
    height: 20px;
    flex-shrink: 0;
    opacity: 0.7;
}

.ib-google-icon svg {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.ib-profile-img {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    overflow: hidden;
    flex-shrink: 0;
    background: #f1f3f4;
}

.ib-profile-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.ib-profile-details {
    flex: 1;
    min-width: 0;
    padding-right: 28px;
}

.ib-reviewer-name {
    font-weight: 600;
    margin-bottom: 2px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    mask-image: linear-gradient(to right, black 80%, transparent 100%);
    -webkit-mask-image: linear-gradient(to right, black 80%, transparent 100%);
}

.ib-review-date {
    font-size: 12px;
    color: #5f6368;
    line-height: 1.3;
    font-weight: 400;
}

/* Star Ratings */
.ib-review-stars,
.ib-stars-large {
    display: flex;
    gap: 0;
    margin: 2px 0;
}

.ib-star {
    color: #fbbc04;
    font-size: 24px;
    line-height: 1;
}

.ib-stars-large .ib-star {
    font-size: 32px;
}

.ib-star-full {
    color: #fbbc04;
}

.ib-star-half {
    color: #fbbc04;
    opacity: 0.5;
}

.ib-star-empty {
    color: #e8eaed;
}

/* Review Text Content */
.ib-review-text {
    flex: 1;
    min-height: 60px;
    max-height: 120px;
    margin-top: 4px;
    overflow-y: auto;
    overflow-x: hidden;
    padding-right: 6px;
    box-sizing: border-box;
    line-height: 1.5;
    scrollbar-width: thin;
    scrollbar-color: #c5c8cb transparent;
}

.ib-review-text::-webkit-scrollbar {
    width: 2px;
}

.ib-review-text::-webkit-scrollbar-track {
    background: transparent;
}

.ib-review-text::-webkit-scrollbar-thumb {
    background: #c5c8cb;
    border-radius: 2px;
}

.ib-review-text::-webkit-scrollbar-thumb:hover {
    background: #9aa0a6;
}

/* Empty State */
.ib-google-reviews-empty {
    padding: 40px 30px;
    text-align: center;
    background: #f8f9fa;
    border-radius: 8px;
    border: 1px solid #e8eaed;
}

.ib-google-reviews-empty p {
    margin: 0;
    color: #5f6368;
    font-size: 14px;
    font-weight: 400;
}

/* Slider portion fills remaining flex space after the header */
.ib-google-reviews-widget .as-slider {
    flex: 1 1 0%;
    min-width: 0;
    width: auto;
}

@media (max-width: 768px) {
    .ib-google-reviews-widget {
        flex-direction: column;
    }

    .ib-google-reviews-header {
        margin-bottom: 0;
        width: 100%;
    }

    .ib-google-reviews-widget .as-slider {
        flex: none;
        width: 100%;
    }

    .ib-google-reviews-widget .as-slider .as-item {
        flex: 0 0 100% !important;
        min-width: 100%;
    }
}

/* =========================================================
   Profile initial avatar (fallback when no photo)
   ========================================================= */
.ib-profile-initial {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    font-size: 18px;
    font-weight: 600;
    color: #fff;
    background: #5f6368;
    border-radius: 50%;
    text-transform: uppercase;
}

/* =========================================================
   Verified icon (shown beside stars)
   ========================================================= */
.ib-verified-icon {
    display: inline-flex;
    align-items: center;
    margin-left: 4px;
    vertical-align: middle;
    line-height: 1;
}

/* =========================================================
   Grid view
   ========================================================= */
.ib-google-reviews-grid-wrap {
    margin: 30px 0;
    max-width: 100%;
    overflow: hidden;
    container-type: inline-size;
    container-name: ib-reviews-grid;
}

.ib-google-reviews-grid {
    display: grid;
    /* auto-fill: graceful fallback for browsers without @container support */
    grid-template-columns: repeat(auto-fill, minmax(min(16rem, 100%), 1fr));
    grid-auto-rows: 1fr;
    align-items: stretch;
    gap: 20px;
    max-width: 100%;
}

/* between mobile & tablet — 30rem ≈ 480px: 2 columns */
@container ib-reviews-grid (min-width: 30rem) {
    .ib-google-reviews-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* tablet — 40rem ≈ 640px: 3 columns */
@container ib-reviews-grid (min-width: 40rem) {
    .ib-google-reviews-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

/* desktop — 60rem ≈ 960px: 4 columns */
@container ib-reviews-grid (min-width: 60rem) {
    .ib-google-reviews-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

.ib-google-reviews-grid .ib-review-card {
    background: #ffffff;
    border: 1px solid #e8eaed;
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
    position: relative;
    display: flex;
    flex-direction: column;
    height: 100%;
    min-width: 0;
    width: 100%;
    box-sizing: border-box;
}

.ib-google-reviews-grid .ib-review-card:hover {
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.12);
    border-color: #dadce0;
}

.ib-google-reviews-grid .ib-review-inner {
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    height: 100%;
}

.ib-google-reviews-grid .ib-review-text {
    max-height: 110px;
    height: 110px;
    overflow-y: auto;
    overflow-x: hidden;
    padding-right: 5px;
}

/* =========================================================
   Rating bar (above / below grid)
   ========================================================= */
.ib-reviews-rating-bar {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px 14px;
    padding: 10px 18px;
    background: #f8f9fa;
    border: 1px solid #e8eaed;
    border-radius: 8px;
    margin: 14px 0;
}

.ib-rating-bar-label {
    font-size: 14px;
    font-weight: 700;
    color: #202124;
    letter-spacing: 0.4px;
}

.ib-rating-bar-stars {
    display: flex;
    align-items: center;
    gap: 0;
}

.ib-rating-bar-stars .ib-star {
    font-size: 20px;
}

.ib-rating-bar-info {
    font-size: 14px;
    color: #3c4043;
    display: flex;
    align-items: center;
    gap: 6px;
}

.ib-rating-bar-info .ib-sep {
    color: #bdc1c6;
}

.ib-rating-bar-logo {
    display: flex;
    align-items: center;
    line-height: 1;
}

.ib-rating-bar-more-link {
    font-size: 13px;
    font-weight: 500;
    color: #1a73e8;
    text-decoration: none;
    margin-left: auto;
    white-space: nowrap;
}

.ib-rating-bar-more-link:hover {
    text-decoration: underline;
}

