/* ─── Reviews Widget Styles ─────────────────────────────────────────────── */

.rw-widget {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 16px;
  box-sizing: border-box;
  color: #1a1a1a;
}

/* Заголовок и статистика */
.rw-header {
  margin-bottom: 20px;
  margin-left: 10px;
}

.rw-header h2 {
  font-size: 22px;
  font-weight: 700;
  margin: 0;
  color: #1a1a1a;
}

.rw-header-count {
  color: #888;
  font-weight: 400;
  font-size: 18px;
}

.rw-stat-total {
  display: flex;
  align-items: center;
  gap: 8px;
}

.rw-rating-big {
  font-size: 32px;
  font-weight: 800;
  color: #1a1a1a;
  line-height: 1;
}

.rw-stars-big {
  display: flex;
  gap: 2px;
}

.rw-stars-big .rw-star {
  font-size: 24px;
}

.rw-stat-count {
  font-size: 14px;
  color: #666;
  margin-top: 4px;
}

/* Фильтры */
.rw-filters {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 28px;
}

.rw-filter-group {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.rw-filter-btn {
  padding: 8px 14px;
  border: 2px solid #e0e0e0;
  border-radius: 24px;
  background: #fff;
  cursor: pointer;
  font-size: 14px;
  font-weight: 500;
  transition: all 0.2s;
  display: flex;
  align-items: center;
  gap: 2px;
  color: #555;
  line-height: 1;
}

.rw-filter-btn:hover {
  border-color: #0077ff;
  color: #0077ff;
}

.rw-filter-btn.active {
  background: #0077ff;
  border-color: #0077ff;
  color: #fff;
}

.rw-filter-btn.active span {
  color: #fff !important;
}

.rw-sort-btn {
  padding: 8px 18px;
  border: 2px solid #e0e0e0;
  border-radius: 24px;
  background: #fff;
  cursor: pointer;
  font-size: 14px;
  font-weight: 500;
  transition: all 0.2s;
  color: #555;
  white-space: nowrap;
  flex-shrink: 0;
}

.rw-sort-btn:hover {
  border-color: #0077ff;
  color: #0077ff;
}

/* Иконки источников */
.rw-source-icon {
  width: 18px;
  height: 18px;
  border-radius: 3px;
  display: inline-block;
  vertical-align: middle;
  flex-shrink: 0;
}

.rw-source-icon.google  { background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><text y="18" font-size="16">G</text></svg>') no-repeat center; background-color: #fff; border: 1px solid #ddd; }
.rw-source-icon.yandex  { background-color: #fc3f1d; }
.rw-source-icon.gis2    { background-color: #29b35e; }

/* Сетка карточек */
.rw-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 20px;
}

/* Карточка отзыва */
.rw-card {
  background: #fff;
  border-radius: 16px;
  padding: 22px;
  box-shadow: 0 2px 12px rgba(0,0,0,0.07);
  transition: transform 0.2s, box-shadow 0.2s;
  display: flex;
  flex-direction: column;
  gap: 12px;
  position: relative;
}

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

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

.rw-avatar {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  object-fit: cover;
  background: linear-gradient(135deg, #0077ff, #6c63ff);
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 18px;
  font-weight: 700;
}

.rw-avatar img {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
}

.rw-author-info {
  flex: 1;
  min-width: 0;
}

.rw-author-name {
  font-weight: 600;
  font-size: 15px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.rw-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 2px;
}

.rw-source-badge {
  font-size: 11px;
  color: #888;
  display: flex;
  align-items: center;
  gap: 4px;
}

.rw-date {
  font-size: 12px;
  color: #aaa;
}

/* Звёзды */
.rw-stars {
  display: flex;
  gap: 2px;
}

.rw-star {
  color: #e0e0e0;
  font-size: 16px;
}

.rw-star.filled {
  color: #f5a623;
}

/* Текст отзыва */
.rw-text {
  font-size: 14px;
  line-height: 1.6;
  color: #333;
  flex: 1;
}

.rw-text.collapsed {
  display: -webkit-box;
  -webkit-line-clamp: 4;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.rw-expand-btn {
  background: none;
  border: none;
  color: #0077ff;
  cursor: pointer;
  font-size: 13px;
  padding: 0;
  text-align: left;
  margin-top: -4px;
}

/* Кнопка "ещё" */
.rw-load-more {
  display: block;
  margin: 32px auto 0;
  padding: 12px 36px;
  background: transparent;
  border: 2px solid #0077ff;
  border-radius: 8px;
  color: #0077ff;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
}

.rw-load-more:hover {
  background: #0077ff;
  color: #fff;
}

.rw-load-more:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

/* Скелетон */
.rw-skeleton {
  background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
  border-radius: 8px;
}

@keyframes shimmer {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* Адаптивность */
@media (max-width: 600px) {
  .rw-grid {
    grid-template-columns: 1fr;
  }
  .rw-rating-big {
    font-size: 26px;
  }
}
