/* =============================================
   Google Reviews Widget - Standalone CSS
   Drop this file into your project.
   ============================================= */

/* Reset & Base */
.grw-widget, .grw-rating-badge {
  --grw-font: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen,
    Ubuntu, Cantarell, 'Helvetica Neue', Arial, sans-serif;
  --grw-bg: #ffffff;
  --grw-text: #1a1a1a;
  --grw-text-muted: #6b7280;
  --grw-border: #e5e7eb;
  --grw-card-bg: #ffffff;
  --grw-card-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
  --grw-card-shadow-hover: 0 4px 12px rgba(0, 0, 0, 0.12);
  --grw-accent: #4285f4;
  --grw-accent-hover: #3367d6;
  --grw-star-filled: #fbbc04;
  --grw-star-empty: #e0e0e0;
  --grw-radius: 12px;
  --grw-muted-bg: #f3f4f6;
  --grw-warning-bg: #fef9ec;
  --grw-warning-border: #f0c65a;
  --grw-warning-text: #7a5c0d;

  font-family: var(--grw-font);
  color: var(--grw-text);
  line-height: 1.5;
  box-sizing: border-box;
  padding: 48px 16px;
}

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

/* Container */
.grw-container {
  max-width: 1570px;
  margin: 0 auto;
}

/* Header */
.grw-header {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  margin-bottom: 40px;
  text-align: center;
}

.grw-header-title {
  display: flex;
  align-items: center;
  gap: 10px;
}

.grw-header-title h2 {
  font-size: 24px;
  font-weight: 700;
  color: var(--grw-text);
  margin: 0;
  text-wrap: balance;
}

.grw-header-rating {
  display: flex;
  align-items: center;
  gap: 12px;
}

.grw-header-rating-value {
  display: flex;
  align-items: center;
  gap: 4px;
}

.grw-header-rating-number {
  font-size: 18px;
  font-weight: 600;
  color: var(--grw-text);
}

.grw-header-rating-count {
  font-size: 14px;
  color: var(--grw-text-muted);
}

/* Stars */
.grw-stars {
  display: flex;
  align-items: center;
  gap: 2px;
}

.grw-star {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
}

.grw-star-lg {
  width: 18px;
  height: 18px;
}

/* Slider Wrapper */
.grw-slider-wrapper {
  position: relative;
  padding: 0 40px;
}

/* Slider Track */
.grw-slider-overflow {
  overflow: hidden;
}

.grw-slider-track {
  display: flex;
  transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

.grw-slide {
  flex-shrink: 0;
  padding: 0 8px;
}

/* Responsive slide widths */
.grw-slide {
  width: 100%;
}

@media (min-width: 640px) {
  .grw-slide {
    width: 50%;
  }
}

@media (min-width: 768px) {
  .grw-slide {
    width: 33.3333%;
  }
}

@media (min-width: 1280px) {
  .grw-slide {
    width: 25%;
  }
}

@media (min-width: 1400px) {
  .grw-slide {
    width: 20%;
  }
}

/* Review Card */
.grw-card {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 20px;
  border-radius: var(--grw-radius);
  border: 1px solid var(--grw-border);
  background: var(--grw-card-bg);
  box-shadow: var(--grw-card-shadow);
  transition: box-shadow 0.2s ease;
  height: 100%;
}

.grw-card:hover {
  box-shadow: var(--grw-card-shadow-hover);
}

/* Card Header */
.grw-card-header {
  display: flex;
  align-items: center;
  gap: 12px;
}

.grw-card-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  overflow: hidden;
  background: var(--grw-muted-bg);
  flex-shrink: 0;
}

.grw-card-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.grw-card-avatar-fallback {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--grw-accent);
  color: #ffffff;
  font-size: 14px;
  font-weight: 600;
}

.grw-card-info {
  min-width: 0;
  display: flex;
  flex-direction: column;
}

.grw-card-name {
  font-size: 14px;
  font-weight: 600;
  color: var(--grw-text);
  text-decoration: none;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.grw-card-name:hover {
  text-decoration: underline;
}

.grw-card-time {
  font-size: 12px;
  color: var(--grw-text-muted);
}

/* Card Body */
.grw-card-body {
  flex: 1;
}

.grw-card-text {
  font-size: 14px;
  line-height: 1.6;
  color: var(--grw-text);
  margin: 0;
}

.grw-show-more {
  display: inline-block;
  margin-top: 4px;
  font-size: 14px;
  font-weight: 500;
  color: var(--grw-accent);
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
  font-family: inherit;
  transition: color 0.15s ease;
}

.grw-show-more:hover {
  color: var(--grw-accent-hover);
}

/* Card Footer */
.grw-card-footer {
  margin-top: auto;
  padding-top: 8px;
  border-top: 1px solid var(--grw-border);
}

.grw-card-footer a {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: var(--grw-text-muted);
  text-decoration: none;
  transition: color 0.15s ease;
}

.grw-card-footer a:hover {
  color: var(--grw-text);
}



/* Navigation Arrows */
.grw-nav-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 10;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: var(--grw-card-bg);
  border: 1px solid var(--grw-border);
  box-shadow: var(--grw-card-shadow-hover);
  color: var(--grw-text);
  cursor: pointer;
  transition: background 0.15s ease;
}

.grw-nav-btn:hover {
  background: var(--grw-muted-bg);
}

.grw-nav-btn:disabled {
  display: none;
}

.grw-nav-prev {
  left: -4px;
}

.grw-nav-next {
  right: -4px;
}

.grw-nav-btn svg {
  width: 20px;
  height: 20px;
}

/* Dot Indicators */
.grw-dots {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-top: 24px;
}

.grw-dot {
  width: 8px;
  height: 8px;
  border-radius: 9999px;
  border: none;
  background: var(--grw-border);
  cursor: pointer;
  padding: 0;
  transition: all 0.2s ease;
}

.grw-dot:hover {
  background: var(--grw-text-muted);
}

.grw-dot.grw-dot-active {
  width: 24px;
  background: var(--grw-accent);
}

/* Attribution */
.grw-attribution {
  display: flex;
  align-items: center;
  justify-content: center;
  margin-top: 32px;
}

.grw-attribution a {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  border-radius: 9999px;
  border: 1px solid var(--grw-border);
  background: var(--grw-card-bg);
  font-size: 14px;
  color: var(--grw-text-muted);
  text-decoration: none;
  transition: all 0.15s ease;
}

.grw-attribution a:hover {
  background: var(--grw-muted-bg);
  color: var(--grw-text);
}

/* Loading */
.grw-loading {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  padding: 48px 16px;
}

.grw-spinner {
  width: 32px;
  height: 32px;
  border: 3px solid var(--grw-border);
  border-top-color: var(--grw-accent);
  border-radius: 50%;
  animation: grw-spin 0.8s linear infinite;
}

@keyframes grw-spin {
  to {
    transform: rotate(360deg);
  }
}

.grw-loading-text {
  font-size: 14px;
  color: var(--grw-text-muted);
}

/* Error */
.grw-error {
  text-align: center;
  padding: 48px 16px;
  color: var(--grw-text-muted);
  font-size: 14px;
}

/* =============================================
   Rating Badge Widget
   ============================================= */

.grw-rating-badge {
  display: inline-flex;
  align-items: center;
  gap: 16px;
  padding: 14px 24px;
  border-radius: 12px;
  border: 1px solid var(--grw-border);
  background: #ffffff;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
  text-decoration: none;
  transition: box-shadow 0.15s ease;
  font-family: var(--grw-font);
  cursor: pointer;
}

.grw-rating-badge:hover {
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.grw-rating-badge-label {
  font-size: 13px;
  font-weight: 700;
  color: var(--grw-text);
  white-space: nowrap;
}

.grw-rating-badge .grw-stars {
  gap: 2px;
}

.grw-rating-badge .grw-stars svg {
  width: 20px;
  height: 20px;
}

.grw-rating-badge-count {
  font-size: 14px;
  font-weight: 600;
  color: var(--grw-text);
  white-space: nowrap;
}

.grw-rating-badge-google {
  display: flex;
  align-items: center;
  flex-shrink: 0;
}

.grw-rating-badge-google svg {
  height: 22px;
  width: auto;
}

/* Badge loading skeleton */
.grw-rating-badge-loading {
  display: inline-flex;
  align-items: center;
  gap: 16px;
  padding: 14px 24px;
  border-radius: 12px;
  border: 1px solid var(--grw-border);
  background: #ffffff;
}

.grw-rating-badge-loading .grw-skel {
  background: #f3f4f6;
  border-radius: 4px;
  animation: grw-pulse 1.5s ease-in-out infinite;
}

@keyframes grw-pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.4; }
}

/* Badge responsive - stack on very small screens */
@media (max-width: 480px) {
  .grw-rating-badge {
    gap: 10px;
    padding: 12px 16px;
    flex-wrap: wrap;
    justify-content: center;
  }

  .grw-rating-badge-label {
    font-size: 11px;
  }

  .grw-rating-badge .grw-stars svg {
    width: 18px;
    height: 18px;
  }

  .grw-rating-badge-count {
    font-size: 13px;
  }
}

/* Screen reader only */
.grw-sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border-width: 0;
}


.grw-rating-badge:hover {
  color: var(--grw-text);
}