/* ============================================================
   Google Reviews Carousel – Stylesheet  v1.3.2
   Multi-card layout: 4 desktop / 3 tablet / 1 mobile
   ============================================================ */

/* ── Wrapper ─────────────────────────────────────────────── */
.grc-wrapper {
    position: relative;
    width: 100%;
    padding: 0 52px;
    box-sizing: border-box;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

/* ── Carousel viewport (clips the sliding track) ─────────── */
.grc-carousel {
    overflow: hidden;
    width: 100%;
}

/* ── Sliding track (flex row of all cards) ───────────────── */
.grc-track {
    display: flex;
    gap: 20px;
    transition: transform 0.42s cubic-bezier(0.4, 0, 0.2, 1);
    will-change: transform;
}

/* ── Individual slides ───────────────────────────────────── */
/*  Width is set dynamically by JS via style attribute.       */
/*  flex-shrink:0 prevents cards from squashing.              */
.grc-slide {
    flex-shrink: 0;
    /* JS sets: width: calc((100% - N*gap) / visible) */
}

/* ── Card ────────────────────────────────────────────────── */
.grc-card {
    height: 100%;
    background: #ffffff;
    border: 1px solid #e8eaed;
    border-radius: 16px;
    padding: 24px 22px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.06);
    box-sizing: border-box;
    transition: box-shadow 0.2s ease;
    display: flex;
    flex-direction: column;
}

.grc-card:hover {
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.11);
}

/* ── Card header ─────────────────────────────────────────── */
.grc-card-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    margin-bottom: 12px;
    gap: 10px;
}

/* Author row: avatar + name/date — no link, plain div */
.grc-author-row {
    display: flex;
    align-items: center;
    gap: 10px;
    flex: 1;
    min-width: 0;
}

/* ── Avatar ──────────────────────────────────────────────── */
.grc-avatar {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
    border: 2px solid #f1f3f4;
}

.grc-avatar-placeholder {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: linear-gradient(135deg, #4285F4, #34A853);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    font-weight: 600;
    color: #ffffff;
    flex-shrink: 0;
    line-height: 1;
}

/* ── Author info ─────────────────────────────────────────── */
.grc-author-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
}

.grc-author-name {
    font-size: 14px;
    font-weight: 600;
    color: #202124;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.grc-review-date {
    font-size: 11px;
    color: #80868b;
}

/* ── Google badge ────────────────────────────────────────── */
.grc-google-badge {
    flex-shrink: 0;
    opacity: 0.7;
    margin-top: 1px;
}

/* ── Stars ───────────────────────────────────────────────── */
.grc-stars {
    display: flex;
    gap: 1px;
    margin-bottom: 10px;
}

.grc-star {
    font-size: 18px;
    line-height: 1;
}

.grc-star-full  { color: #FBBC04; }
.grc-star-empty { color: #dadce0; }

/* ── Review text ─────────────────────────────────────────── */
.grc-review-text {
    margin: 0;
    padding: 0;
    border: none;
    flex: 1;         /* fills remaining card height */
}

.grc-review-text p {
    font-size: 13px;
    line-height: 1.65;
    color: #3c4043;
    margin: 0;
    word-break: break-word;
    display: -webkit-box;
    -webkit-line-clamp: 6;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* ── Prev / Next arrows ──────────────────────────────────── */
.grc-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 1.5px solid #dadce0;
    background: #ffffff;
    color: #3c4043;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    padding: 0;
    transition: background 0.18s, border-color 0.18s, color 0.18s, box-shadow 0.18s;
    z-index: 2;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.08);
}

.grc-nav:hover {
    background: #1a73e8;
    border-color: #1a73e8;
    color: #ffffff;
    box-shadow: 0 2px 8px rgba(26, 115, 232, 0.35);
}

.grc-nav:focus-visible {
    outline: 3px solid #1a73e8;
    outline-offset: 2px;
}

.grc-nav:disabled {
    opacity: 0.3;
    cursor: default;
    pointer-events: none;
}

.grc-prev { left: 0; }
.grc-next { right: 0; }

/* ── Dots (page-based, built by JS) ─────────────────────── */
.grc-dots {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-top: 18px;
}

.grc-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    border: none;
    background: #dadce0;
    padding: 0;
    cursor: pointer;
    transition: background 0.2s, transform 0.2s;
}

.grc-dot:hover { background: #80868b; transform: scale(1.2); }

.grc-dot.grc-dot-active {
    background: #1a73e8;
    transform: scale(1.3);
}

.grc-dot:focus-visible {
    outline: 2px solid #1a73e8;
    outline-offset: 3px;
}

/* ── Error / empty states ────────────────────────────────── */
.grc-error {
    background: #fce8e6;
    color: #c5221f;
    border: 1px solid #f28b82;
    border-radius: 8px;
    padding: 12px 16px;
    font-size: 14px;
    max-width: 600px;
}

.grc-no-reviews {
    color: #80868b;
    font-size: 15px;
    text-align: center;
    padding: 24px 0;
}

/* ── Responsive breakpoints ──────────────────────────────── */

/* Tablet portrait: 3 cards  (600px – 1023px) */
@media (max-width: 1023px) {
    .grc-wrapper {
        padding: 0 48px;
    }

    .grc-card {
        padding: 20px 18px;
    }

    .grc-review-text p {
        -webkit-line-clamp: 5;
    }
}

/* Mobile: 1 card (<600px) */
@media (max-width: 599px) {
    .grc-wrapper {
        padding: 0 44px;
    }

    .grc-nav {
        width: 34px;
        height: 34px;
    }

    .grc-card {
        padding: 18px 16px;
    }

    .grc-author-name {
        font-size: 13px;
    }

    .grc-review-text p {
        font-size: 13px;
        -webkit-line-clamp: 7;
    }

    .grc-star {
        font-size: 16px;
    }
}

@media (max-width: 380px) {
    .grc-wrapper {
        padding: 0 38px;
    }
}
