/* Standalone styling for the embedded universal badge */

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

:root {
  color-scheme: light;
}

body {
  margin: 0;
  padding: 0;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  background: transparent;
  font-family: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

.badge-card {
  --bg-color: #ffffff;
  --border-color: rgba(15, 23, 42, 0.08);
  --text-primary: #0f172a;
  --text-secondary: #475569;
  --text-subtle: #64748b;
  --text-muted: #94a3b8;
  --badge-bg: #d1fae5;
  --badge-text: #047857;
  --star-filled: #facc15;
  --star-empty: #e2e8f0;
  --logo-bg-color: rgba(148, 163, 184, 0.18);
  --avatar-border: #e2e8f0;
  --avatar-bg: #f8fafc;
  --avatar-text: #475569;
  --footer-divider: #f1f5f9;
  --footer-text: #94a3b8;
  --link-color: #94a3b8;
  --link-hover: #475569;
  --gradient-from: #059669;
  --gradient-to: #064e3b;
  --performer-icon: #047857;
  background-color: var(--bg-color);
  color: var(--text-primary);
  border: 1px solid var(--border-color);
  border-radius: 16px;
  box-shadow: 0 18px 30px rgba(15, 23, 42, 0.12);
  width: 320px;
  max-width: 100%;
  min-height: 180px;
  padding: 20px;
  display: flex;
  flex-direction: column;
  position: relative;
  overflow: hidden;
  transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease;
}

.badge-content {
  flex: 1 1 auto;
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
}

.hidden-section {
  display: none !important;
}

.badge-header {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}

.logo-container {
  display: flex;
  align-items: center;
  gap: 10px;
}

.logo-bg {
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 32px;
  min-height: 32px;
  padding: 4px;
  border-radius: 8px;
  background-color: var(--logo-bg-color);
  overflow: hidden;
}

.logo-image {
  display: block;
  height: 20px;
  width: auto;
  object-fit: contain;
}

.business-name {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text-primary);
}

.review-quote {
  width: 100%;
  font-size: 0.95rem;
  line-height: 1.6;
  color: var(--text-secondary);
  margin: 12px 0;
  text-align: left;
}

.review-author-section {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 8px;
}

.author-avatar {
  height: 40px;
  width: 40px;
  border-radius: 999px;
  border: 2px solid var(--avatar-border);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  background-color: var(--avatar-bg);
  color: var(--avatar-text);
  font-size: 0.95rem;
  font-weight: 600;
}

.author-details {
  flex: 1 1 auto;
  text-align: left;
}

.author-info {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 4px;
}

.author-name {
  margin: 0;
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text-primary);
}

.verified-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 6px;
  font-size: 0.75rem;
  font-weight: 500;
  border-radius: 999px;
  background-color: var(--badge-bg);
  color: var(--badge-text);
}

.verified-icon {
  width: 12px;
  height: 12px;
  display: block;
}

.author-position {
  margin: 0;
  font-size: 0.8rem;
  color: var(--text-subtle);
}

.rating-stars {
  display: flex;
  gap: 2px;
  margin-top: 4px;
}

.star-icon {
  width: 16px;
  height: 16px;
  display: block;
  color: var(--star-filled);
}

.text-stars-filled {
  color: var(--star-filled);
}

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

.star-partial-wrapper {
  position: relative;
  display: inline-flex;
  width: 16px;
  height: 16px;
  overflow: hidden;
}

.star-partial-wrapper > svg {
  display: block;
  color: var(--star-empty);
}

.star-partial-overlay {
  position: absolute;
  inset: 0;
  overflow: hidden;
}

.star-partial-overlay > svg {
  display: block;
  color: var(--star-filled);
}

.reputation-summary {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  margin: 12px 0;
}

.reputation-summary .flex {
  display: flex;
  align-items: baseline;
  gap: 4px;
}

.average-rating {
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--text-primary);
}

.rating-max {
  font-size: 0.95rem;
  color: var(--text-subtle);
}

.review-count {
  font-size: 0.75rem;
  color: var(--text-muted);
}

.platform-icons {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-top: 8px;
}

.platform-icons img {
  width: 16px;
  height: 16px;
  display: block;
}

.reputation-tagline {
  margin-top: 8px;
  font-size: 0.9rem;
  color: var(--text-secondary);
  font-style: italic;
}

#last-updated {
  display: block;
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-top: 4px;
}

.performer-details {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  margin: 12px 0;
}

.performer-icon {
  font-size: 1.75rem;
  color: var(--performer-icon);
  margin-bottom: 4px;
}

.performer-title {
  margin: 0;
  font-size: 1.125rem;
  font-weight: 600;
  color: var(--text-primary);
}

.performer-metric {
  margin: 0;
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--text-secondary);
}

.performer-period {
  margin: 0;
  font-size: 0.8rem;
  color: var(--text-muted);
}

.performer-subline {
  margin: 4px 0 0;
  font-size: 0.8rem;
  color: var(--text-muted);
  font-style: italic;
}

.values-details {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  margin: 12px 0;
}

.values-tagline {
  margin: 0;
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--text-secondary);
}

.value-icons {
  display: flex;
  gap: 8px;
  font-size: 1.35rem;
}

.values-message {
  margin: 0;
  font-size: 0.95rem;
  color: var(--text-secondary);
}

.established-year {
  margin: 4px 0 0;
  font-size: 0.8rem;
  color: var(--text-muted);
}

.footer {
  width: 100%;
  margin-top: auto;
  padding-top: 12px;
  border-top: 1px solid var(--footer-divider);
  text-align: center;
}

.footer-text {
  font-size: 0.75rem;
  color: var(--footer-text);
}

.powered-by-link {
  color: var(--link-color);
  text-decoration: none;
  transition: color 0.2s ease;
}

.powered-by-link:hover {
  color: var(--link-hover);
}

/* Utility helpers (limited Tailwind replacements) */
.w-full { width: 100%; }
.flex { display: flex; }
.items-baseline { align-items: baseline; }
.gap-1 { gap: 4px; }
.gap-2 { gap: 8px; }
.gap-3 { gap: 12px; }
.flex-shrink-0 { flex-shrink: 0; }
.flex-1 { flex: 1 1 auto; }
.mb-3 { margin-bottom: 12px; }
.my-3 { margin: 12px 0; }
.mt-1 { margin-top: 4px; }
.mt-2 { margin-top: 8px; }
.pt-3 { padding-top: 12px; }
.text-xs { font-size: 0.75rem; line-height: 1rem; }
.text-slate-400 { color: var(--text-muted); }
.text-slate-500 { color: var(--text-subtle); }
.text-slate-600 { color: var(--text-secondary); }
.text-slate-700 { color: #334155; }
.text-slate-900 { color: var(--text-primary); }

/* Theme modifiers */
.theme-light {
  --bg-color: #ffffff;
  --border-color: rgba(15, 23, 42, 0.08);
  --text-primary: #0f172a;
  --text-secondary: #475569;
  --text-subtle: #64748b;
  --text-muted: #94a3b8;
  --logo-bg-color: rgba(148, 163, 184, 0.18);
  --avatar-border: #e2e8f0;
  --avatar-bg: #f8fafc;
  --avatar-text: #475569;
  --footer-divider: #f1f5f9;
  --footer-text: #94a3b8;
  --link-color: #94a3b8;
  --link-hover: #475569;
  --performer-icon: #047857;
}

.theme-dark {
  --bg-color: #1f2937;
  --border-color: rgba(148, 163, 184, 0.3);
  --text-primary: #f8fafc;
  --text-secondary: rgba(248, 250, 252, 0.85);
  --text-subtle: rgba(226, 232, 240, 0.75);
  --text-muted: rgba(148, 163, 184, 0.68);
  --badge-bg: rgba(16, 185, 129, 0.2);
  --badge-text: #6ee7b7;
  --star-empty: rgba(255, 255, 255, 0.32);
  --logo-bg-color: rgba(255, 255, 255, 0.12);
  --avatar-border: rgba(255, 255, 255, 0.2);
  --avatar-bg: rgba(255, 255, 255, 0.08);
  --avatar-text: rgba(255, 255, 255, 0.92);
  --footer-divider: rgba(255, 255, 255, 0.12);
  --footer-text: rgba(255, 255, 255, 0.55);
  --link-color: rgba(255, 255, 255, 0.55);
  --link-hover: rgba(255, 255, 255, 0.85);
  --performer-icon: #6ee7b7;
}

.theme-gradient {
  --border-color: rgba(4, 120, 87, 0.45);
  --text-primary: #ffffff;
  --text-secondary: rgba(255, 255, 255, 0.9);
  --text-subtle: rgba(255, 255, 255, 0.78);
  --text-muted: rgba(255, 255, 255, 0.7);
  --badge-bg: rgba(255, 255, 255, 0.2);
  --badge-text: rgba(255, 255, 255, 0.95);
  --star-empty: rgba(255, 255, 255, 0.4);
  --logo-bg-color: rgba(255, 255, 255, 0.2);
  --avatar-border: rgba(255, 255, 255, 0.25);
  --avatar-bg: rgba(255, 255, 255, 0.12);
  --avatar-text: rgba(255, 255, 255, 0.92);
  --footer-divider: rgba(255, 255, 255, 0.25);
  --footer-text: rgba(255, 255, 255, 0.65);
  --link-color: rgba(255, 255, 255, 0.65);
  --link-hover: rgba(255, 255, 255, 0.92);
  --performer-icon: rgba(255, 255, 255, 0.9);
  background: linear-gradient(135deg, var(--gradient-from), var(--gradient-to));
  color: var(--text-primary);
  border-color: var(--border-color);
}

/* Accent palettes */
.accent-emerald {
  --badge-bg: #d1fae5;
  --badge-text: #047857;
  --star-filled: #facc15;
  --performer-icon: #047857;
}

.accent-violet {
  --badge-bg: #ede9fe;
  --badge-text: #6d28d9;
  --star-filled: #8b5cf6;
  --performer-icon: #6d28d9;
}

.accent-rose {
  --badge-bg: #ffe4e6;
  --badge-text: #be123c;
  --star-filled: #f43f5e;
  --performer-icon: #be123c;
}

.accent-amber {
  --badge-bg: #fef3c7;
  --badge-text: #b45309;
  --star-filled: #f59e0b;
  --performer-icon: #b45309;
}

.accent-sky {
  --badge-bg: #e0f2fe;
  --badge-text: #0369a1;
  --star-filled: #0ea5e9;
  --performer-icon: #0369a1;
}

.accent-cyan {
  --badge-bg: #cffafe;
  --badge-text: #0e7490;
  --star-filled: #06b6d4;
  --performer-icon: #0e7490;
}

.accent-indigo {
  --badge-bg: #e0e7ff;
  --badge-text: #4338ca;
  --star-filled: #6366f1;
  --performer-icon: #4338ca;
}

.accent-red {
  --badge-bg: #fee2e2;
  --badge-text: #b91c1c;
  --star-filled: #ef4444;
  --performer-icon: #b91c1c;
}

.accent-green {
  --badge-bg: #dcfce7;
  --badge-text: #15803d;
  --star-filled: #22c55e;
  --performer-icon: #15803d;
}

.accent-yellow {
  --badge-bg: #fef9c3;
  --badge-text: #854d0e;
  --star-filled: #eab308;
  --performer-icon: #854d0e;
}

.accent-neutral {
  --badge-bg: #f5f5f5;
  --badge-text: #4b5563;
  --star-filled: #6b7280;
  --performer-icon: #4b5563;
}

/* Gradient accent helpers (supports both accent- and theme-gradient-* combos) */
.theme-gradient.accent-emerald,
.theme-gradient-emerald {
  --gradient-from: #059669;
  --gradient-to: #064e3b;
  --border-color: rgba(4, 120, 87, 0.55);
}

.theme-gradient.accent-violet,
.theme-gradient-violet {
  --gradient-from: #7c3aed;
  --gradient-to: #4c1d95;
  --border-color: rgba(109, 40, 217, 0.55);
}

.theme-gradient.accent-rose,
.theme-gradient-rose {
  --gradient-from: #e11d48;
  --gradient-to: #7f1d1d;
  --border-color: rgba(225, 29, 72, 0.55);
}

.theme-gradient.accent-amber,
.theme-gradient-amber {
  --gradient-from: #f59e0b;
  --gradient-to: #92400e;
  --border-color: rgba(181, 83, 9, 0.55);
}

.theme-gradient.accent-sky,
.theme-gradient-sky {
  --gradient-from: #0284c7;
  --gradient-to: #0c4a6e;
  --border-color: rgba(3, 105, 161, 0.55);
}

.theme-gradient.accent-cyan,
.theme-gradient-cyan {
  --gradient-from: #0891b2;
  --gradient-to: #164e63;
  --border-color: rgba(8, 145, 178, 0.55);
}

.theme-gradient.accent-indigo,
.theme-gradient-indigo {
  --gradient-from: #4f46e5;
  --gradient-to: #312e81;
  --border-color: rgba(67, 56, 202, 0.55);
}

.theme-gradient.accent-red,
.theme-gradient-red {
  --gradient-from: #dc2626;
  --gradient-to: #7f1d1d;
  --border-color: rgba(185, 28, 28, 0.55);
}

.theme-gradient.accent-green,
.theme-gradient-green {
  --gradient-from: #16a34a;
  --gradient-to: #14532d;
  --border-color: rgba(21, 128, 61, 0.55);
}

.theme-gradient.accent-yellow,
.theme-gradient-yellow {
  --gradient-from: #eab308;
  --gradient-to: #854d0e;
  --border-color: rgba(202, 138, 4, 0.55);
}

.theme-gradient.accent-neutral,
.theme-gradient-neutral {
  --gradient-from: #4b5563;
  --gradient-to: #111827;
  --border-color: rgba(55, 65, 81, 0.55);
}

