/* Self-hosted Google reviews widget. Replaces the Elfsight Google Reviews embed.
   Built to match the live widget: header card, one-card carousel, owner-reply popup.
   Markup comes from js/reviews-widget.js using the JSON in #reviews-widget-data. No third-party requests. */
.rw, .rw-pop {
  --rw-ink: #111;
  --rw-orange: #f68f3e;
  --rw-card: #f8f8f8;
  --rw-star: #fcbf02;
  --rw-star-off: rgba(17, 17, 17, 0.3);
  --rw-muted: rgba(17, 17, 17, 0.5);
}
.rw {
  box-sizing: border-box;
  width: 100%;
  max-width: 1280px;
  margin: 0 auto;
  font-family: Inter, "Inter Fallback", Arial, sans-serif;
  font-size: 16px;
  font-weight: 400;
  line-height: 1.5;
  color: var(--rw-ink);
  text-align: start;
  container-type: inline-size;
}
.rw *, .rw *::before, .rw *::after, .rw-pop *, .rw-pop *::before, .rw-pop *::after { box-sizing: border-box; }
.rw p, .rw ul, .rw li, .rw-pop p, .rw-pop ul, .rw-pop li { margin: 0; padding: 0; list-style: none; }
.rw img, .rw svg, .rw-pop img, .rw-pop svg { display: block; max-width: none; }
.rw button, .rw-pop button { font: inherit; color: inherit; margin: 0; }
.rw-sr { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }

/* ---------- header ---------- */
.rw-head, .rw-pop-head { display: flex; flex-direction: column; }
.rw-head { margin-bottom: 20px; }
.rw-head-box {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 16px;
  padding: 24px; border-radius: 8px; background: var(--rw-card); text-align: center;
}
.rw-info { display: grid; grid-template-columns: auto auto; grid-template-rows: 20px 24px; column-gap: 8px; align-items: center; justify-items: start; text-align: start; }
.rw-score { grid-row: 1 / 3; font-size: 44px; line-height: 44px; font-weight: 700; color: var(--rw-ink); }
.rw-stars-row { grid-column: 2; grid-row: 1; display: flex; align-items: center; }
.rw-count { grid-column: 2; grid-row: 2; display: flex; align-items: center; font-size: 13px; line-height: 15.6px; color: var(--rw-ink); white-space: pre; }
.rw-count img { width: 56.66px; height: 24px; }
.rw-stars { display: flex; align-items: center; }
.rw-star { position: relative; width: 18px; height: 18px; flex: none; }
.rw-star svg { position: absolute; left: 0; top: 0; width: 18px; height: 18px; }
.rw-star .off { fill: var(--rw-star-off); }
.rw-star .on { fill: var(--rw-star); }
.rw-btn {
  display: inline-flex; align-items: center; justify-content: center;
  height: 44px; padding: 9px 22px; border: 2px solid transparent; border-radius: 4px;
  background: var(--rw-orange); color: #fff; text-decoration: none; cursor: pointer;
  font-size: 16px; line-height: 22px; font-weight: 700; text-transform: none; white-space: nowrap;
}
.rw .rw-btn, .rw-pop .rw-btn { color: #fff; text-decoration: none; background: var(--rw-orange); }
.rw .rw-btn:hover, .rw .rw-btn:focus-visible, .rw-pop .rw-btn:hover, .rw-pop .rw-btn:focus-visible { filter: brightness(1.06); color: #fff; text-decoration: none; }

/* ---------- carousel ---------- */
.rw-outer { position: relative; display: flex; align-items: center; }
.rw-inner { position: relative; width: 100%; overflow: hidden; touch-action: pan-y; transition: height 0.4s ease; }
.rw-wrap { display: flex; align-items: flex-start; will-change: transform; transition: transform 0.74s cubic-bezier(0.25, 0.1, 0.25, 1); }
.rw .rw-slide { flex: 0 0 100%; margin: 0 20px 0 0; min-width: 0; }
.rw-wrap.rw-still { transition: none; }

.rw-card { display: flex; flex-direction: column; padding: 24px; border: 1px solid transparent; border-radius: 8px; background: var(--rw-card); }
.rw-author { display: flex; flex-direction: row; gap: 12px; margin-bottom: 16px; }
.rw-avatar-link { display: block; flex: none; width: 40px; height: 40px; border-radius: 50%; color: #000; }
.rw-avatar { position: relative; display: flex; align-items: center; justify-content: center; width: 40px; height: 40px; border: 1px solid rgba(17, 17, 17, 0.2); border-radius: 8px; background: var(--rw-card); }
.rw-avatar img { width: 28px; height: 28px; }
.rw-who { display: flex; flex-direction: column; justify-content: center; gap: 4px; min-width: 0; }
.rw a.rw-name-link, .rw-pop a.rw-name-link { color: var(--rw-ink); text-decoration: none; }
.rw a.rw-avatar-link, .rw-pop a.rw-avatar-link { color: #000; text-decoration: none; }
.rw-name-link { display: flex; align-items: center; gap: 5px; color: var(--rw-ink); text-decoration: none; text-align: left; min-width: 0; }
.rw-name { font-size: 15px; line-height: 18px; font-weight: 600; color: var(--rw-ink); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rw-verified { flex: none; width: 14px; height: 14px; display: flex; }
.rw-verified svg { width: 14px; height: 14px; }
.rw-date { font-size: 12px; line-height: 16px; color: var(--rw-muted); }
.rw-body { display: flex; flex-direction: column; align-items: flex-start; }
.rw-body .rw-stars { margin-bottom: 6px; }
.rw-text { font-size: 16px; line-height: 23px; color: var(--rw-ink); white-space: pre-line; overflow-wrap: anywhere; }
.rw-card .rw-text { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 3; line-clamp: 3; overflow: hidden; }
.rw .rw-more { display: inline-block; height: 23px; padding: 0; border: 0; background: none; cursor: pointer; font-size: 16px; line-height: 23px; color: var(--rw-orange); text-align: left; }
.rw .rw-more:hover { text-decoration: underline; }
@container (min-width: 480px) {
  .rw-body { margin-left: 52px; }
}

/* arrows overhang the carousel by 16px, like the live widget; hover-only on desktop */
.rw-arrow {
  position: absolute; top: calc(50% - 16px); z-index: 2; width: 32px; height: 32px; margin: 0; padding: 0;
  display: flex; align-items: center; justify-content: center;
  border: 0; border-radius: 50%; background: rgba(17, 17, 17, 0.5); color: #fff; cursor: pointer;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
  opacity: 0; pointer-events: none; transition: opacity 0.2s ease, background-color 0.2s ease;
}
.rw .rw-arrow { color: #fff; }
.rw-arrow svg { width: 16px; height: 16px; fill: currentColor; }
.rw-arrow:hover, .rw-arrow:focus-visible { background: #111; }
.rw-prev { left: -16px; }
.rw-next { right: -16px; }
.rw-outer.has-prev:hover .rw-prev, .rw-outer.has-next:hover .rw-next,
.rw-outer.has-prev:focus-within .rw-prev, .rw-outer.has-next:focus-within .rw-next { opacity: 1; pointer-events: auto; }
@media (max-width: 767px), (hover: none) {
  .rw-outer.has-prev .rw-prev, .rw-outer.has-next .rw-next { opacity: 1; pointer-events: auto; }
}

/* pagination: five bullets that shrink away from the active one */
.rw-bullets { position: relative; z-index: 1; display: flex; justify-content: center; margin-top: 16px; }
.rw-bullets-box { width: 54px; margin: -4px; padding: 4px; overflow: hidden; }
.rw-bullets-in { display: flex; gap: 4px; align-items: flex-start; transition: transform 0.3s; }
.rw-bullet {
  flex: none; width: 6px; height: 6px; padding: 0; border: 0; border-radius: 50%; cursor: pointer;
  background: rgba(17, 17, 17, 0.5); transform: scale(0.25); transform-origin: center; transition: transform 0.3s, background-color 0.3s;
}
.rw-bullet.d0 { background: var(--rw-ink); transform: scale(1); }
.rw-bullet.d1 { transform: scale(0.75); }
.rw-bullet.d2 { transform: scale(0.5); }
.rw-bullet.hid { pointer-events: none; }

.rw a:focus-visible, .rw button:focus-visible, .rw-pop a:focus-visible, .rw-pop button:focus-visible, .rw-more:focus-visible {
  outline: 2px solid #111; outline-offset: 2px; box-shadow: 0 0 0 4px #fff;
}
.rw-pop-close:focus-visible { outline-offset: -2px; box-shadow: none; }

/* ---------- popup (all reviews with owner replies) ---------- */
.rw-pop { position: fixed; inset: 0; z-index: 2147483000; font-family: inherit; font-size: 16px; font-weight: 400; line-height: normal; color: #000; text-align: start; }
.rw-pop[hidden] { display: none; }
.rw-pop-backdrop { position: absolute; inset: 0; background: rgba(17, 17, 17, 0.9); }
.rw-pop-inner { position: absolute; inset: 0; display: flex; justify-content: center; padding: 40px; pointer-events: none; }
.rw-pop-box {
  position: relative; display: flex; flex-direction: column; width: 720px; max-width: 100%; max-height: 100%; height: 100%;
  background: #fff; border-radius: 24px; overflow: hidden; pointer-events: auto; outline: 0;
}
.rw-pop-close {
  position: absolute; top: 8px; right: 8px; z-index: 2; width: 32px; height: 32px; padding: 0; border: 0; border-radius: 50%;
  background: rgba(255, 255, 255, 0.5); color: rgba(17, 17, 17, 0.7); cursor: pointer; display: flex; align-items: center; justify-content: center;
}
.rw-pop .rw-pop-close { color: rgba(17, 17, 17, 0.7); }
.rw-pop-close svg { width: 16px; height: 16px; fill: currentColor; }
.rw-pop-close:hover { color: #111; }
.rw-pop-head { flex: none; margin: 0 40px; padding: 40px 0 20px; border-bottom: 1px solid rgba(17, 17, 17, 0.1); }
.rw-pop-head .rw-head-box { padding: 0 0 4px; background: none; flex-direction: row; justify-content: space-between; gap: 16px; text-align: start; }
.rw-pop-head .rw-info, .rw-pop-head .rw-count, .rw-pop-head .rw-score { color: var(--rw-ink); }
.rw-pop-head .rw-btn { height: 44px; }
.rw-pop-list { position: relative; flex: 1 1 auto; min-height: 0; overflow-y: auto; padding: 0 34px 40px 40px; overscroll-behavior: contain; }
.rw-pop-item { padding: 24px 0 0; border-bottom: 1px solid rgba(17, 17, 17, 0.1); }
.rw-pop-item:last-child { border-bottom: 0; }
.rw-pop-item .rw-card { padding: 0; background: #fff; border: 1px solid transparent; }
.rw-pop-item .rw-author { margin-bottom: 12px; }
.rw-pop-item .rw-avatar { background: #fff; border: 1px solid rgba(17, 17, 17, 0.2); }
.rw-pop-item .rw-body { margin-left: 0; }
.rw-pop-item .rw-text { display: block; }
.rw-pop-item .rw-card { padding-bottom: 0; }
.rw-reply { display: flex; flex-direction: column; margin: 12px 0 24px; padding: 16px; border-radius: 8px; background: rgba(17, 17, 17, 0.03); }
.rw-pop-item:not(.has-reply) .rw-card { padding-bottom: 24px; }
.rw-reply-top { display: flex; margin-bottom: 8px; }
.rw-reply-avatar { flex: none; width: 32px; height: 32px; margin-right: 8px; border-radius: 50%; display: flex; align-items: center; justify-content: center; background: rgba(17, 17, 17, 0.05); }
.rw-reply-avatar svg { width: 18px; height: 18px; }
.rw-reply-info { display: flex; flex-direction: column; min-width: 0; }
.rw-reply-namerow { display: flex; align-items: center; gap: 4px; flex-wrap: wrap; }
.rw-badge { display: flex; align-items: center; justify-content: center; padding: 2px 5px; border-radius: 4px; background: rgba(17, 17, 17, 0.1); font-size: 9px; line-height: 12px; font-weight: 700; text-transform: uppercase; color: var(--rw-ink); }
.rw-reply .rw-date { margin-top: 4px; }
.rw-reply-text { font-size: 16px; line-height: 23px; color: var(--rw-ink); white-space: pre-line; overflow-wrap: anywhere; }
.rw-pop .rw-stars { margin-bottom: 6px; }

@media (max-width: 767px) {
  .rw-pop-inner { padding: 0; }
  .rw-pop-box { border-radius: 0; }
  .rw-pop-head { margin: 0; }
  .rw-pop-head .rw-head-box { flex-direction: column; justify-content: center; align-items: center; text-align: center; }
  .rw-pop-list { padding: 0 14px 40px 20px; }
}
@media (prefers-reduced-motion: reduce) {
  .rw-wrap, .rw-inner, .rw-bullets-in, .rw-bullet, .rw-arrow { transition: none; }
}
html.rw-lock, html.rw-lock body { overflow: hidden; }

