/* Google Reviews Widget Pro — widget.css */

/* ── Variáveis ── */
.grw-widget {
  --grw-bg:        #ffffff;
  --grw-card-bg:   #f9f9fb;
  --grw-border:    #e8e8ec;
  --grw-text:      #1a1a2e;
  --grw-muted:     #6b7280;
  --grw-star:      #f59e0b;
  --grw-star-off:  #d1d5db;
  --grw-accent:    #4285f4;
  --grw-radius:    14px;
  --grw-shadow:    0 2px 12px rgba(0,0,0,0.07);
  font-family: 'Georgia', 'Times New Roman', serif;
  box-sizing: border-box;
  width: 100%;
}

.grw-widget.grw-theme-dark {
  --grw-bg:        #0f0f17;
  --grw-card-bg:   #1a1a28;
  --grw-border:    #2e2e45;
  --grw-text:      #f0f0fa;
  --grw-muted:     #9090b0;
  --grw-shadow:    0 2px 16px rgba(0,0,0,0.35);
}

*, *::before, *::after { box-sizing: inherit; }

/* ── Loading ── */
.grw-loading {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 40px;
  color: var(--grw-muted);
  font-family: sans-serif;
  font-size: 14px;
}

.grw-spinner {
  width: 20px; height: 20px;
  border: 2px solid var(--grw-border);
  border-top-color: var(--grw-accent);
  border-radius: 50%;
  animation: grw-spin 0.7s linear infinite;
  display: inline-block;
}

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

/* ── Cabeçalho com nota geral ── */
.grw-header {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 24px;
  padding: 18px 22px;
  background: var(--grw-card-bg);
  border: 1px solid var(--grw-border);
  border-radius: var(--grw-radius);
}

.grw-header-logo img {
  width: 48px; height: 48px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--grw-border);
}

.grw-header-logo .grw-logo-placeholder {
  width: 48px; height: 48px;
  border-radius: 50%;
  background: var(--grw-accent);
  display: flex; align-items: center; justify-content: center;
  font-size: 20px; color: #fff; font-weight: bold;
}

.grw-header-info { flex: 1; }

.grw-business-name {
  font-size: 16px;
  font-weight: 700;
  color: var(--grw-text);
  margin: 0 0 4px;
}

.grw-overall-stars { display: flex; align-items: center; gap: 8px; }

.grw-stars-row { display: flex; gap: 2px; }

.grw-star-icon {
  font-size: 16px;
  line-height: 1;
}

.grw-rating-number {
  font-size: 15px;
  font-weight: 700;
  color: var(--grw-text);
}

.grw-review-count {
  font-size: 13px;
  color: var(--grw-muted);
}

.grw-google-badge {
  display: flex; align-items: center; gap: 6px;
  color: var(--grw-muted); font-size: 12px; font-family: sans-serif;
}

.grw-google-badge svg { flex-shrink: 0; }

/* ── Card de avaliação ── */
.grw-card {
  background: var(--grw-card-bg);
  border: 1px solid var(--grw-border);
  border-radius: var(--grw-radius);
  padding: 20px;
  box-shadow: var(--grw-shadow);
  display: flex;
  flex-direction: column;
  gap: 12px;
  transition: transform 0.2s, box-shadow 0.2s;
}

.grw-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 24px rgba(0,0,0,0.12);
}

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

.grw-avatar {
  width: 42px; height: 42px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
  border: 2px solid var(--grw-border);
}

.grw-avatar-placeholder {
  width: 42px; height: 42px;
  border-radius: 50%;
  background: linear-gradient(135deg, #4285f4, #34a853);
  display: flex; align-items: center; justify-content: center;
  color: #fff; font-weight: 700; font-size: 16px;
  flex-shrink: 0;
  border: 2px solid var(--grw-border);
}

.grw-reviewer-info { flex: 1; min-width: 0; }

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

.grw-review-date {
  font-size: 11px;
  color: var(--grw-muted);
  font-family: sans-serif;
  margin-top: 2px;
}

.grw-card-stars { display: flex; gap: 2px; }

.grw-card-stars .grw-star-icon { font-size: 14px; }

.grw-review-text {
  font-size: 14px;
  line-height: 1.65;
  color: var(--grw-text);
  display: -webkit-box;
  -webkit-line-clamp: 4;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.grw-review-text.expanded {
  display: block;
  -webkit-line-clamp: unset;
}

.grw-read-more {
  background: none;
  border: none;
  color: var(--grw-accent);
  font-size: 12px;
  cursor: pointer;
  padding: 0;
  font-family: sans-serif;
  text-decoration: underline;
  align-self: flex-start;
}

/* ── LAYOUT: CARROSSEL ── */
.grw-layout-carousel { position: relative; }

.grw-carousel-track-wrap {
  overflow: hidden;
  border-radius: var(--grw-radius);
}

.grw-carousel-track {
  display: flex;
  gap: 16px;
  transition: transform 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  will-change: transform;
}

.grw-carousel-track .grw-card {
  flex: 0 0 calc(33.333% - 11px);
  min-width: 260px;
}

.grw-carousel-nav {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin-top: 18px;
}

.grw-nav-btn {
  width: 38px; height: 38px;
  border-radius: 50%;
  border: 1px solid var(--grw-border);
  background: var(--grw-card-bg);
  color: var(--grw-text);
  cursor: pointer;
  font-size: 16px;
  display: flex; align-items: center; justify-content: center;
  transition: all 0.2s;
  box-shadow: var(--grw-shadow);
}

.grw-nav-btn:hover { background: var(--grw-accent); color: #fff; border-color: var(--grw-accent); }
.grw-nav-btn:disabled { opacity: 0.3; cursor: not-allowed; }
.grw-nav-btn:disabled:hover { background: var(--grw-card-bg); color: var(--grw-text); border-color: var(--grw-border); }

.grw-dots {
  display: flex; gap: 6px; align-items: center;
}

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

.grw-dot.active {
  background: var(--grw-accent);
  width: 20px;
  border-radius: 4px;
}

/* ── LAYOUT: GRID ── */
.grw-layout-grid .grw-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 16px;
}

/* ── LAYOUT: LISTA ── */
.grw-layout-list .grw-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.grw-layout-list .grw-card {
  flex-direction: row;
  align-items: flex-start;
  gap: 16px;
}

.grw-layout-list .grw-card-body {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

/* ── Erro ── */
.grw-error {
  padding: 20px;
  background: #fff3f3;
  border: 1px solid #fca5a5;
  border-radius: var(--grw-radius);
  color: #b91c1c;
  font-family: sans-serif;
  font-size: 14px;
}

/* ── Responsivo ── */
@media (max-width: 768px) {
  .grw-carousel-track .grw-card {
    flex: 0 0 calc(100% - 0px);
    min-width: 0;
  }
  .grw-layout-list .grw-card {
    flex-direction: column;
  }
}

@media (max-width: 480px) {
  .grw-header { flex-wrap: wrap; }
}
