/**
 * Google reviews block — shared component.
 *
 * Rendered by hm_render_google_reviews() (functions.php) and used on the
 * homepage, the About page and the tour pages, so the styles live in their
 * own file rather than inside hm-home.css: a tour page should not have to
 * download the whole homepage stylesheet for one section.
 *
 * Styled after Google's own review UI — white cards on a light ground,
 * the Google mark, amber stars, the 5→1 rating bars — so a visitor
 * recognises where these came from without reading a word.
 */

.hm-greviews-section { padding: clamp(56px, 7vw, 86px) 0; background: #f6f7f9; }
.hm-greviews-section .hm-greviews-section__head { margin-bottom: 32px; }
.hm-greviews-section h2 { margin: 0; color: var(--hm-navy, #082f3a); font-family: var(--font-display, inherit); font-size: clamp(1.8rem, 3vw, 2.8rem); }
.hm-greviews-section .hm-eyebrow { margin: 0 0 12px; color: var(--hm-lagoon, #17a9a1); font: 700 .72rem/1.2 var(--font-mono, inherit); letter-spacing: .14em; text-transform: uppercase; }

.hm-g-logo { width: 20px; height: 20px; flex-shrink: 0; }
.hm-gstars { display: inline-flex; gap: 2px; }
.hm-gstars .hm-gstar { width: 18px; height: 18px; }
.hm-greviews { display: grid; grid-template-columns: 296px 1fr; gap: 24px; align-items: start; }

.hm-greviews__summary { padding: 28px 26px; border: 1px solid #dadce0; border-radius: 16px; background: #fff; text-align: center; }
.hm-greviews__brand { display: flex; align-items: center; justify-content: center; gap: 8px; margin: 0 0 12px; color: #5f6368; font-size: .92rem; font-weight: 600; }
.hm-greviews__score { margin: 0; }
.hm-greviews-block .hm-greviews__score strong { color: #202124; font: 400 3.4rem/1 var(--font-display, inherit); letter-spacing: -.02em; }
.hm-greviews__summary .hm-gstars { margin: 10px 0 6px; }
.hm-greviews__summary .hm-gstar { width: 22px; height: 22px; }
.hm-greviews__count { margin: 0; color: #5f6368; font-size: .88rem; }
.hm-greviews__bars { display: grid; gap: 6px; margin: 18px 0 20px; padding: 0; list-style: none; }
.hm-greviews__bars li { display: flex; align-items: center; gap: 10px; }
.hm-greviews__bar-label { width: 10px; color: #5f6368; font-size: .8rem; text-align: right; }
.hm-greviews__bar { flex: 1 1 auto; height: 8px; border-radius: 99px; background: #e8eaed; overflow: hidden; }
.hm-greviews__bar span { display: block; height: 100%; border-radius: 99px; background: #fbbc04; }
/* Link colours are written with an extra class on purpose: on tour pages
   the parent theme paints every link in the content column grey (#666),
   and a plain .hm-gbutton / .hm-greviews__who a loses to it — the blue
   button ends up with grey-on-blue text. */
.hm-greviews-block .hm-greviews__summary a.hm-gbutton,
.hm-greviews-block a.hm-gbutton { display: inline-flex; align-items: center; justify-content: center; min-height: 44px; padding: 0 22px; border-radius: 99px; background: #1a73e8; color: #fff; font-weight: 600; text-decoration: none; transition: background .2s ease; }
.hm-greviews-block a.hm-gbutton:hover,
.hm-greviews-block a.hm-gbutton:focus-visible { background: #1557b0; color: #fff; }

/* One horizontal rail everywhere: swipe on a phone, arrows on a desktop —
   the same gesture Google's own review cards use. */
.hm-greviews__rail { display: flex; gap: 20px; padding: 2px 2px 10px; overflow-x: auto; scroll-snap-type: x mandatory; scroll-padding-left: 2px; -webkit-overflow-scrolling: touch; scrollbar-width: none; }
.hm-greviews__rail::-webkit-scrollbar { display: none; }
.hm-greviews__rail:focus-visible { outline: 2px solid var(--hm-lagoon, #17a9a1); outline-offset: 4px; border-radius: 16px; }
.hm-greviews__card { flex: 0 0 300px; display: flex; flex-direction: column; gap: 14px; margin: 0; padding: 24px; border: 1px solid #dadce0; border-radius: 16px; background: #fff; scroll-snap-align: start; }
.hm-greviews__head { display: flex; align-items: center; gap: 12px; }
.hm-greviews__head .hm-g-logo { margin-left: auto; }
.hm-greviews__avatar { display: grid; place-items: center; width: 40px; height: 40px; flex-shrink: 0; border-radius: 50%; background: #1a73e8; color: #fff; font-weight: 600; }
.hm-greviews__who { display: flex; flex-direction: column; min-width: 0; }
.hm-greviews-block .hm-greviews__card .hm-greviews__who a { color: #202124; font-weight: 600; text-decoration: none; }
.hm-greviews-block .hm-greviews__card .hm-greviews__who a:hover,
.hm-greviews-block .hm-greviews__card .hm-greviews__who a:focus-visible { text-decoration: underline; }
.hm-greviews__who small { color: #5f6368; font-size: .78rem; }
.hm-greviews__card blockquote { margin: 0; padding: 0; border: 0; }
.hm-greviews-block .hm-greviews__card blockquote p { margin: 0; color: #3c4043; font-size: .96rem; line-height: 1.6; }

/* Inside a host page's own column (tour pages): no page background of its
   own, and a little air above the theme's review form below it. */
.hm-greviews-inline { margin: 0 0 32px; }
.hm-greviews-inline .hm-greviews { min-width: 0; }

.hm-greviews__actions { display: flex; flex-wrap: wrap; align-items: center; gap: 14px 28px; margin-top: 26px; }
.hm-greviews-block .hm-greviews__actions a.hm-text-link { display: inline-flex; align-items: center; gap: 10px; color: var(--hm-navy, #082f3a); font-weight: 700; text-decoration: none; white-space: normal; }
.hm-greviews-block .hm-greviews__actions a.hm-text-link span { color: var(--hm-coral, #f26b4a); }
.hm-greviews-block .hm-greviews__actions a.hm-text-link:hover { text-decoration: underline; }
.hm-greviews__nav { display: flex; gap: 10px; margin-left: auto; }
.hm-gnav { display: grid; place-items: center; width: 44px; height: 44px; border: 1px solid #dadce0; border-radius: 50%; background: #fff; color: #202124; font-size: 1.5rem; line-height: 1; cursor: pointer; transition: background .2s ease, opacity .2s ease; }
.hm-gnav:hover:not(:disabled) { background: #f1f3f4; }
.hm-gnav:disabled { opacity: .35; cursor: default; }

@media (max-width: 991px) {
    .hm-greviews { grid-template-columns: 1fr; }
    .hm-greviews__summary { display: grid; grid-template-columns: auto 1fr; align-items: center; gap: 4px 28px; text-align: left; }
    .hm-greviews__brand { grid-column: 1 / -1; justify-content: flex-start; }
    .hm-greviews__score, .hm-greviews__summary .hm-gstars, .hm-greviews__count { grid-column: 1; justify-self: start; }
    .hm-greviews__bars { grid-column: 2; grid-row: 2 / 5; margin: 0; align-self: center; width: 100%; }
    .hm-gbutton { grid-column: 1 / -1; justify-self: start; margin-top: 18px; }
}

@media (max-width: 767px) {
    /* Phones: full-bleed rail so a card peeks in from the right edge and
       the swipe is obvious. Only in the standalone section — inside a
       host page's own column (.hm-greviews-inline, tour pages) the
       negative margins would push past the viewport edge. */
    .hm-greviews__rail { gap: 14px; }
    .hm-greviews-section .hm-greviews__rail { margin: 0 -14px; padding: 2px 14px 10px; scroll-padding-left: 14px; }
    .hm-greviews__card { flex: 0 0 82%; padding: 20px; }
    .hm-greviews__summary { gap: 4px 20px; padding: 22px 20px; }
    .hm-gbutton { width: 100%; }
    .hm-greviews__nav { display: none; }
}
