/* =====================================================
   Google Reviews Widget — style.css v3.0
   Clean rewrite. Targeted resets only. No all:unset.
   ===================================================== */

/* ──────────────────────────────────────────────────────
   TARGETED RESETS
   Just the properties themes actually mess with.
   No all:unset — that was wiping hover states.
   ────────────────────────────────────────────────────── */

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

.grw-widget {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    font-size: 15px;
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
    text-align: left;
    width: 100%;
    max-width: 1280px;
    margin-left: auto;
    margin-right: auto;
}

/* Button reset — only the properties themes add.
   Does NOT touch hover/focus, so our hover styles can apply cleanly. */
.grw-widget button {
    margin: 0;
    padding: 0;
    border: 0;
    background: transparent;
    font: inherit;
    color: inherit;
    cursor: pointer;
    text-transform: none;
    letter-spacing: normal;
    line-height: 1;
    box-shadow: none;
    text-shadow: none;
    appearance: none;
    -webkit-appearance: none;
    border-radius: 0;
    min-width: 0;
    min-height: 0;
    width: auto;
    height: auto;
}

/* Link reset — only what themes add */
.grw-widget a {
    text-decoration: none;
    color: inherit;
    background: transparent;
    text-transform: none;
    letter-spacing: normal;
    border: 0;
    padding: 0;
    margin: 0;
    font: inherit;
}

/* List reset — but preserve card padding (card IS an <li>) */
.grw-widget ul {
    list-style: none;
    margin: 0;
    padding: 0;
}
.grw-widget li:not(.grw-card) {
    list-style: none;
    margin: 0;
    padding: 0;
}
.grw-widget li.grw-card {
    list-style: none;
}

.grw-widget p {
    margin: 0;
    padding: 0;
}

/* ──────────────────────────────────────────────────────
   GOOGLE BADGE (pill)
   ────────────────────────────────────────────────────── */
.grw-widget .grw-badge {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    background: #ffffff;
    border: 1px solid #e4e4e4;
    border-radius: 100px;
    padding: 8px 18px 8px 12px;
    text-decoration: none;
    cursor: pointer;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
.grw-widget .grw-badge:hover {
    border-color: #c8c8c8;
    box-shadow: 0 3px 14px rgba(0, 0, 0, 0.09);
}
.grw-widget .grw-badge-g {
    display: flex;
    align-items: center;
    flex-shrink: 0;
}
.grw-widget .grw-badge-gtext {
    font-size: 15px;
    font-weight: 700;
    color: #3c4043;
    letter-spacing: -0.2px;
}
.grw-widget .grw-badge-divider {
    display: block;
    width: 1px;
    height: 26px;
    background: #e0e0e0;
    flex-shrink: 0;
}
.grw-widget .grw-badge-rating {
    display: flex;
    flex-direction: column;
    gap: 2px;
}
.grw-widget .grw-badge-score {
    font-size: 16px;
    font-weight: 800;
    color: #1a1a1a;
    line-height: 1.1;
}
.grw-widget .grw-badge-stars {
    font-size: 12px;
    letter-spacing: 2px;
    line-height: 1;
}
.grw-widget .grw-badge-count {
    font-size: 10.5px;
    color: #999;
    line-height: 1;
    white-space: nowrap;
}

/* ──────────────────────────────────────────────────────
   ARROW BUTTONS — clean, rounded, flicker-free
   ────────────────────────────────────────────────────── */
.grw-widget .grw-arrows {
    display: flex;
    gap: 8px;
}
.grw-widget .grw-arrow {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 1px solid #e0e0e0;
    background: #ffffff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: #444;
    flex-shrink: 0;
    transition: background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease, transform 0.1s ease;
}
.grw-widget .grw-arrow:hover {
    background: #1a1a1a;
    border-color: #1a1a1a;
    color: #ffffff;
}
.grw-widget .grw-arrow:active {
    transform: scale(0.95);
}
.grw-widget .grw-arrow:disabled {
    opacity: 0.22;
    cursor: default;
    pointer-events: none;
}
.grw-widget .grw-arrow svg {
    display: block;
    pointer-events: none;
}

/* ──────────────────────────────────────────────────────
   REVIEW CARD — the hero element
   ────────────────────────────────────────────────────── */
.grw-widget li.grw-card,
.grw-widget .grw-card {
    background: #ffffff;
    border: 1px solid #eeeeee;
    border-radius: 16px;
    padding: 24px;
    display: flex;
    flex-direction: column;
    gap: 14px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
    transition: box-shadow 0.25s ease, transform 0.25s ease;
    text-align: left;
    list-style: none;
    margin: 0;
}
.grw-widget li.grw-card:hover,
.grw-widget .grw-card:hover {
    box-shadow: 0 10px 32px rgba(0, 0, 0, 0.12);
    transform: translateY(-4px);
    border-color: #e0e0e0;
}

/* Top row: avatar + meta LEFT, G icon RIGHT */
.grw-widget .grw-card-top {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 10px;
}
.grw-widget .grw-author-row {
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 0;
    flex: 1;
}
.grw-widget .grw-av {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 15px;
    color: #ffffff;
    flex-shrink: 0;
    letter-spacing: 0.3px;
    user-select: none;
}
.grw-widget .grw-author-meta {
    display: flex;
    flex-direction: column;
    min-width: 0;
    gap: 3px;
}
.grw-widget .grw-author-name {
    font-weight: 700;
    font-size: 15px;
    color: #1a1a1a;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 1.25;
    display: block;
}
.grw-widget .grw-author-date {
    font-size: 12.5px;
    color: #9a9a9a;
    line-height: 1.2;
    display: block;
    font-weight: 400;
}
.grw-widget .grw-g-icon {
    flex-shrink: 0;
    width: 20px;
    height: 20px;
    display: block;
}

/* Stars + verified pill */
.grw-widget .grw-card-stars {
    display: flex;
    align-items: center;
    gap: 8px;
}
.grw-widget .grw-stars {
    font-size: 16px;
    letter-spacing: 1.5px;
    line-height: 1;
}
.grw-widget .grw-verified {
    display: inline-flex;
    align-items: center;
    font-size: 10.5px;
    font-weight: 600;
    color: #2d8a47;
    background: #edf9f0;
    border: 1px solid #cde7d4;
    border-radius: 4px;
    padding: 3px 7px;
    white-space: nowrap;
    letter-spacing: 0.3px;
    line-height: 1;
}

/* Review text
   ─────────────────────────────────────────────────────
   No flex:1 — that was stretching text to fill the card
   and causing "Read more" to collide with the bottom edge.
   Let the card size to its natural content. */
.grw-widget .grw-card-text {
    font-size: 14px;
    line-height: 1.65;
    color: #555;
    font-weight: 400;
    word-wrap: break-word;
}

/* Read more link — explicit spacing above and below */
.grw-widget .grw-read-more {
    display: inline-block;
    font-size: 13px;
    color: #888;
    cursor: pointer;
    text-decoration: underline;
    text-underline-offset: 3px;
    font-weight: 500;
    background: transparent;
    border: 0;
    padding: 0;
    margin: 0;
    line-height: 1.5;
    transition: color 0.15s ease;
}
.grw-widget .grw-read-more:hover {
    color: #444;
}

/* ──────────────────────────────────────────────────────
   FOOTER — view all button
   ────────────────────────────────────────────────────── */
.grw-widget .grw-footer {
    text-align: center;
    margin-top: 20px;
}
.grw-widget .grw-view-all {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 13.5px;
    font-weight: 600;
    text-decoration: none;
    border: 1px solid #e0e0e0;
    background: #ffffff;
    color: #555;
    padding: 11px 28px;
    border-radius: 100px;
    cursor: pointer;
    transition: background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease, box-shadow 0.15s ease;
}
.grw-widget .grw-view-all:hover {
    background: #1a1a1a;
    border-color: #1a1a1a;
    color: #ffffff;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
}
.grw-widget .grw-view-all svg {
    display: block;
    flex-shrink: 0;
}

/* Write a review (masonry only) */
.grw-widget .grw-write-btn {
    display: inline-flex;
    align-items: center;
    border: 1px solid #1a73e8;
    color: #1a73e8;
    background: transparent;
    padding: 9px 20px;
    border-radius: 8px;
    font-size: 13.5px;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
    white-space: nowrap;
    transition: background-color 0.15s ease, color 0.15s ease;
}
.grw-widget .grw-write-btn:hover {
    background: #e8f0fe;
    color: #1557c0;
}

/* ══════════════════════════════════════════════════════
   SCROLL LAYOUT
   ══════════════════════════════════════════════════════ */
.grw-widget.grw-scroll-widget .grw-scroll-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
    gap: 14px;
    flex-wrap: wrap;
}

.grw-widget.grw-scroll-widget .grw-track-outer {
    width: 100%;
    overflow: hidden;
}

.grw-widget.grw-scroll-widget .grw-track {
    display: flex;
    align-items: flex-start;
    gap: 16px;
    overflow-x: auto;
    overflow-y: visible;
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    padding: 8px 24px 20px 4px;
    cursor: grab;
    width: 100%;
}
.grw-widget.grw-scroll-widget .grw-track:active {
    cursor: grabbing;
}
.grw-widget.grw-scroll-widget .grw-track::-webkit-scrollbar {
    display: none;
}

.grw-widget.grw-scroll-widget .grw-card {
    flex: 0 0 320px;
    align-self: flex-start;
}
@media (max-width: 900px) {
    .grw-widget.grw-scroll-widget .grw-card { flex: 0 0 280px; }
}
@media (max-width: 600px) {
    .grw-widget.grw-scroll-widget .grw-card { flex: 0 0 82vw; }
    .grw-widget.grw-scroll-widget .grw-track { padding: 8px 16px 16px 4px; gap: 12px; }
}

/* ══════════════════════════════════════════════════════
   MASONRY LAYOUT
   ══════════════════════════════════════════════════════ */
.grw-widget.grw-masonry-widget .grw-masonry-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 0;
    margin-bottom: 20px;
    flex-wrap: wrap;
    gap: 12px;
}
.grw-widget.grw-masonry-widget .grw-masonry-header-left {
    display: flex;
    align-items: center;
    gap: 14px;
    flex-wrap: wrap;
}

.grw-widget.grw-masonry-widget .grw-masonry-grid {
    columns: var(--grw-cols, 3);
    column-gap: 16px;
}
.grw-widget.grw-masonry-widget .grw-card {
    break-inside: avoid;
    margin-bottom: 16px;
    display: block;
    width: 100%;
}
@media (max-width: 960px) {
    .grw-widget.grw-masonry-widget .grw-masonry-grid { columns: 2; }
}
@media (max-width: 580px) {
    .grw-widget.grw-masonry-widget .grw-masonry-grid { columns: 1; }
    .grw-widget.grw-masonry-widget .grw-masonry-header { flex-direction: column; align-items: flex-start; }
}
