/* TrustReviews Frontend Styles */
:root {
  --tr-accent: #00b67a;
  --tr-star-full: #00b67a;
  --tr-star-empty: #dce0e0;
  --tr-text: #191919;
  --tr-muted: #6b7280;
  --tr-border: #e8e8e8;
  --tr-card-bg: #ffffff;
  --tr-card-shadow: 0 2px 8px rgba(0,0,0,0.06);
  --tr-radius: 8px;
}

.tr-widget {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  max-width: 1100px;
  margin: 0 auto;
  padding: 20px 0;
}

/* ===== HEADER ===== */
.tr-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 24px;
  background: #fff;
  border: 1px solid var(--tr-border);
  border-radius: var(--tr-radius);
  margin-bottom: 20px;
  flex-wrap: wrap;
  gap: 16px;
}

.tr-header-left {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.tr-logo-svg {
  width: 120px;
  height: auto;
}

.tr-company-name {
  font-size: 22px;
  font-weight: 700;
  color: var(--tr-text);
  line-height: 1.2;
}

.tr-header-right {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 4px;
}

.tr-trustscore-label {
  font-size: 12px;
  color: var(--tr-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.tr-trustscore-value {
  font-size: 36px;
  font-weight: 800;
  color: var(--tr-text);
  line-height: 1;
}

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

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

/* ===== STARS ===== */
.tr-star {
  display: inline-block;
  font-style: normal;
}

.tr-star-lg {
  font-size: 28px;
  line-height: 1;
}

.tr-star-sm {
  font-size: 18px;
  line-height: 1;
}

.tr-star-full {
  color: var(--tr-accent);
}

.tr-star-half {
  color: var(--tr-accent);
  opacity: 0.6;
}

.tr-star-empty {
  color: var(--tr-star-empty);
}

/* ===== GRID LAYOUT ===== */
.tr-layout-grid .tr-reviews-container {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

@media (max-width: 900px) {
  .tr-layout-grid .tr-reviews-container {
    grid-template-columns: repeat(2, 1fr);
  }
}
@media (max-width: 580px) {
  .tr-layout-grid .tr-reviews-container {
    grid-template-columns: 1fr;
  }
}

/* ===== LIST LAYOUT ===== */
.tr-layout-list .tr-reviews-container {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.tr-layout-list .tr-review-card {
  display: grid;
  grid-template-columns: 200px 1fr;
  gap: 16px 24px;
  align-items: start;
}

.tr-layout-list .tr-card-top {
  flex-direction: column;
}

/* ===== CAROUSEL LAYOUT ===== */
.tr-layout-carousel .tr-reviews-container {
  display: flex;
  gap: 16px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  padding-bottom: 12px;
  scrollbar-width: thin;
  scrollbar-color: var(--tr-accent) var(--tr-border);
}

.tr-layout-carousel .tr-review-card {
  min-width: 300px;
  max-width: 300px;
  scroll-snap-align: start;
  flex-shrink: 0;
}

/* ===== REVIEW CARD ===== */
.tr-review-card {
  background: var(--tr-card-bg);
  border: 1px solid var(--tr-border);
  border-radius: var(--tr-radius);
  padding: 20px;
  transition: box-shadow 0.2s ease, transform 0.2s ease;
}

.tr-review-card:hover {
  box-shadow: 0 4px 16px rgba(0,182,122,0.12);
  transform: translateY(-2px);
}

.tr-card-top {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
}

.tr-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 14px;
  color: #fff;
  flex-shrink: 0;
}

.tr-reviewer-name {
  font-weight: 600;
  font-size: 14px;
  color: var(--tr-text);
}

.tr-reviewer-meta {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 2px;
}

.tr-verified {
  font-size: 11px;
  color: var(--tr-accent);
  font-weight: 600;
}

.tr-country {
  font-size: 11px;
  color: var(--tr-muted);
}

.tr-card-stars {
  display: flex;
  gap: 2px;
  margin-bottom: 10px;
}

.tr-review-title {
  font-weight: 700;
  font-size: 14px;
  color: var(--tr-text);
  margin-bottom: 6px;
  line-height: 1.3;
}

.tr-review-text {
  font-size: 14px;
  color: #4b5563;
  line-height: 1.6;
  margin-bottom: 12px;
}

.tr-review-date {
  font-size: 12px;
  color: var(--tr-muted);
}

/* ===== RESPONSIVE ===== */
@media (max-width: 600px) {
  .tr-header {
    flex-direction: column;
    align-items: flex-start;
  }
  .tr-header-right {
    align-items: flex-start;
  }
  .tr-trustscore-value {
    font-size: 28px;
  }
  .tr-star-lg {
    font-size: 22px;
  }
  .tr-layout-list .tr-review-card {
    grid-template-columns: 1fr;
  }
}
