/* ==========================================================================
   TESTIMONIALS PAGE (Plan 33 — WIP)
   ========================================================================== */

/* ---- Aggregate rating badge (hero) -------------------------------------- */
.tm-aggregate {
  display: inline-flex;
  align-items: center;
  gap: var(--space-4);
  margin-top: var(--space-6);
  padding: var(--space-4) var(--space-6);
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-2xl);
  box-shadow: var(--shadow-md);
}

.tm-aggregate-number {
  font-size: var(--fs-4xl);
  font-weight: var(--fw-black);
  color: var(--text-main);
  line-height: 1;
}

.tm-aggregate-divider {
  width: 1px;
  height: 34px;
  background: var(--border-subtle);
}

.tm-aggregate-details {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
}

.tm-aggregate-stars {
  display: flex;
  gap: 2px;
}

.tm-star {
  width: 17px;
  height: 17px;
  color: var(--border-subtle);
  fill: none;
}

.tm-star-filled {
  color: var(--color-warning);
  fill: var(--color-warning);
}

.tm-aggregate-text {
  font-size: var(--fs-sm);
  color: var(--text-soft);
  font-weight: 600;
}

/* ---- Testimonial cards grid ---------------------------------------------- */
.tm-grid-section {
  padding: var(--space-12) 0;
}

.tm-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-6);
}

@media (max-width: 960px) {
  .tm-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 640px) {
  .tm-grid { grid-template-columns: 1fr; }
}

.tm-card {
  display: flex;
  flex-direction: column;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-xl);
  padding: var(--space-6);
  box-shadow: var(--shadow-sm);
}

.tm-card-stars {
  display: flex;
  gap: 2px;
  margin-bottom: var(--space-3);
}

.tm-card-stars .tm-star {
  width: 15px;
  height: 15px;
}

.tm-card-quote {
  flex: 1;
  font-size: var(--fs-base);
  line-height: 1.6;
  color: var(--text-soft);
  margin: 0 0 var(--space-5);
}

.tm-card-author {
  display: flex;
  align-items: center;
  gap: var(--space-3);
}

/* Avatar — same fallback chain as views/user/settings.ejs's .settings-avatar-wrap (photo ->
   gender illustration -> role/premium-aware lucide icon), scaled down from settings' 88px to
   this card's 40px. Mobile-verify badge sits next to the name instead of on the avatar, unlike
   settings.ejs — that page shows a user their own account-completion status (badge-on-avatar
   reads naturally there), but here the badge is a public trust signal about the reviewer, which
   reads better attached to the name (same convention as Twitter/Google Reviews "Verified"). */
.tm-card-avatar-wrap {
  flex-shrink: 0;
  width: 40px;
  height: 40px;
}

.tm-card-avatar-img {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  object-fit: cover;
  border: 1px solid var(--border-subtle);
}

.tm-card-avatar-icon {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--bg-section-soft);
  border: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
}

.tm-card-avatar-icon svg {
  width: 20px;
  height: 20px;
}

/* Inline next to the name — same color convention as settings.ejs's .settings-avatar-badge
   (verified/unverified/not-added), just positioned differently (see comment above). */
.tm-verify-icon {
  width: 15px;
  height: 15px;
  margin-left: 2px;
  vertical-align: -2px;
  fill: currentColor;
  stroke: var(--bg-card);
  stroke-width: 1.5px;
  flex-shrink: 0;
}

.tm-verify-icon.not-added {
  color: var(--text-muted);
}

.tm-verify-icon.unverified {
  color: var(--accent-secondary);
}

.tm-verify-icon.verified {
  color: var(--accent-primary);
}

.tm-card-author-info {
  display: flex;
  flex-direction: column;
}

.tm-card-name {
  font-weight: 600;
  font-size: var(--fs-base);
}

.tm-card-context {
  font-size: var(--fs-xs);
  color: var(--text-muted);
}

/* Bottom CTA now reuses the shared .cta-section/.cta-inner pattern (main.css) — same as
   about.ejs — instead of a page-specific style, so no rules needed here. */

/* ---- Pagination — values copied from public/css/blog.css's .blog-pg-* (renamed, not shared
   directly, so this page doesn't have to load all of blog.css just for these few rules). ---- */
.tm-pagination {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3);
  margin-top: var(--space-8);
  margin-bottom: var(--space-4);
}

.tm-pg-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: var(--space-2) var(--space-4);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  background: var(--bg-card);
  color: var(--text-primary);
  font-size: var(--fs-sm);
  font-weight: 600;
  text-decoration: none;
  transition: background 0.15s, color 0.15s;
  white-space: nowrap;
}

.tm-pg-btn i { width: 16px; height: 16px; }

.tm-pg-btn:hover:not(.tm-pg-disabled) {
  background: var(--accent-gradient);
  border: none;
  color: #fff;
}

.tm-pg-disabled {
  opacity: 0.4;
  cursor: default;
  pointer-events: none;
}

.tm-pg-numbers {
  display: flex;
  align-items: center;
  gap: var(--space-2);
}

.tm-pg-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: var(--radius-full);
  border: 2px solid var(--border-subtle);
  font-size: var(--fs-md);
  font-weight: var(--fw-bold);
  color: var(--text-main);
  text-decoration: none;
  transition: var(--transition-base);
  background: var(--admin-hover-bg);
}

.tm-pg-num:hover {
  border-color: rgba(59, 130, 246, 0.6);
  transform: translateY(-2px);
}

.tm-pg-active {
  background: var(--accent-gradient);
  border: none;
  color: #fff;
  cursor: default;
}

.tm-pg-ellipsis {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  font-size: var(--fs-sm);
  color: var(--text-muted);
}
