/* =============================================================
   Reviews Lite — Frontend Styles
   ============================================================= */

/* ---- Tokens ---- */
:root {
  --rl-teal:        #1a7a6e;
  --rl-teal-dark:   #155f55;
  --rl-teal-light:  #e8f5f3;
  --rl-bg:          #eef0f8;
  --rl-card-bg:     #ffffff;
  --rl-text:        #1a1a2e;
  --rl-muted:       #6b7280;
  --rl-star:        #f59e0b;
  --rl-radius:      16px;
  --rl-shadow:      0 2px 16px rgba(26,122,110,.08);
  --rl-font:        'Georgia', 'Times New Roman', serif;
  --rl-font-ui:     system-ui, -apple-system, sans-serif;
}

/* ---- Wrapper ---- */
.rl-wrap {
  font-family: var(--rl-font-ui);
  color: var(--rl-text);
  padding: 16px 0;
}

/* ---- Grid ---- */
.rl-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 20px;
  align-items: start;
}

@media (min-width: 900px) {
  .rl-grid { grid-template-columns: 1fr 1fr 1fr; }
}

/* ---- Base card ---- */
.rl-card {
  background: var(--rl-card-bg);
  border-radius: var(--rl-radius);
  padding: 28px 28px 22px;
  box-shadow: var(--rl-shadow);
  display: flex;
  flex-direction: column;
  gap: 14px;
  transition: transform .2s ease, box-shadow .2s ease;
}

.rl-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 28px rgba(26,122,110,.13);
}

/* ---- Featured card ---- */
.rl-card--featured {
  background: var(--rl-bg);
  grid-column: span 2;
}

@media (max-width: 899px) {
  .rl-card--featured { grid-column: span 1; }
}

/* ---- Stat card ---- */
.rl-card--stat {
  background: var(--rl-teal);
  color: #fff;
  align-items: center;
  justify-content: center;
  text-align: center;
  min-height: 160px;
}

.rl-pct {
  font-size: clamp(52px, 8vw, 72px);
  font-weight: 800;
  line-height: 1;
  letter-spacing: -2px;
}

.rl-pct-label {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 2px;
  text-transform: uppercase;
  opacity: .85;
  margin-top: 6px;
}

/* ---- Stars ---- */
.rl-stars { display: inline-flex; gap: 2px; }
.rl-star  { font-size: 20px; line-height: 1; }
.rl-star--filled { color: var(--rl-star); }
.rl-star--empty  { color: #d1d5db; }

/* ---- Quote ---- */
.rl-quote {
  font-family: var(--rl-font);
  font-style: italic;
  font-size: 15px;
  line-height: 1.65;
  color: var(--rl-text);
  margin: 0;
  padding: 0;
  border: none;
}

/* ---- Decorative quote mark ---- */
.rl-qmark {
  display: block;
  font-family: Georgia, serif;
  font-size: 56px;
  line-height: .6;
  color: var(--rl-teal-light);
  margin-bottom: 4px;
  user-select: none;
}

.rl-card-inner {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

/* ---- Author row ---- */
.rl-author {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: auto;
  flex-wrap: wrap;
}

.rl-author-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
  flex: 1;
}

.rl-author-info strong { font-size: 14px; font-weight: 700; }

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

/* ---- Avatar ---- */
.rl-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  object-fit: cover;
  background: var(--rl-bg);
  flex-shrink: 0;
}

.rl-avatar--initials {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--rl-teal-light);
  color: var(--rl-teal);
  font-weight: 700;
  font-size: 16px;
  font-family: var(--rl-font-ui);
}

/* ---- Platform badge ---- */
.rl-platform {
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .5px;
  border-radius: 4px;
  padding: 2px 6px;
  flex-shrink: 0;
}

.rl-platform--google { background: #e8f0fe; color: #1a73e8; }
.rl-platform--ta     { background: #fff0e8; color: #00af87; }

/* ---- Source line ---- */
.rl-source {
  text-align: center;
  font-size: 13px;
  color: var(--rl-muted);
  margin-top: 20px;
}

.rl-badge {
  display: inline-block;
  border-radius: 4px;
  padding: 2px 8px;
  font-size: 12px;
  font-weight: 700;
}

.rl-badge--google { background: #e8f0fe; color: #1a73e8; }
.rl-badge--ta     { background: #e6f8f4; color: #00af87; }

/* ---- Count shortcode ---- */
.rl-count-wrap     { display: inline; }
.rl-count-number   { font-size: 1.1em; color: var(--rl-teal); }
.rl-count-business { color: var(--rl-teal); }

/* ---- Admin error notice ---- */
.rl-errors {
  background: #fff3cd;
  border-left: 4px solid #f59e0b;
  padding: 12px 16px;
  border-radius: 8px;
  margin-bottom: 16px;
  font-size: 13px;
}

.rl-errors ul { margin: 8px 0 0 16px; }

/* ---- Platform links ---- */
.rl-links {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin-top: 12px;
  flex-wrap: wrap;
}

.rl-links-label { font-size: 14px; color: #64748b; }

.rl-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  border-radius: 24px;
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  transition: opacity .2s, transform .2s;
}

.rl-link:hover { opacity: .85; transform: translateY(-1px); }
.rl-link--google { background: #4285f4; color: #fff; }
.rl-link--ta     { background: #34e0a1; color: #1a1a2e; }

.rl-link-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: rgba(255,255,255,.25);
  font-size: 11px;
  font-weight: 700;
}

/* ---- Card top row ---- */
.rl-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

/* ---- Sentiment Badges ---- */
.rl-sentiment {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 11px;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 20px;
  white-space: nowrap;
  line-height: 1.2;
}

.rl-sentiment--action   { background: #fef3c7; color: #92400e; }
.rl-sentiment--family   { background: #dbeafe; color: #1e40af; }
.rl-sentiment--romantic { background: #fce7f3; color: #9d174d; }
.rl-sentiment--value    { background: #d1fae5; color: #065f46; }
.rl-sentiment--safety   { background: #e0e7ff; color: #3730a3; }
.rl-sentiment--service  { background: #f0fdfa; color: #0f766e; }

/* ---- Responsive ---- */
@media (max-width: 480px) {
  .rl-card { padding: 20px 18px 16px; }
  .rl-pct  { font-size: 48px; }
  .rl-sentiment { font-size: 10px; padding: 3px 8px; }
}
