/* Predictive Engagement Score widget */
.engagement-widget { max-width: 100%; }

.es-card {
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.10);
  background:
    radial-gradient(120% 140% at 0% 0%, rgba(99, 102, 241, 0.18), transparent 55%),
    radial-gradient(120% 140% at 100% 0%, rgba(236, 72, 153, 0.14), transparent 55%),
    rgba(22, 24, 33, 0.85);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
  overflow: hidden;
}

.es-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.85rem 1.1rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}
.es-head-title { font-weight: 700; letter-spacing: .2px; }
.es-badge-pro {
  font-size: .68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .06em;
  padding: .2rem .55rem;
  border-radius: 999px;
  color: #0b0c10;
  background: linear-gradient(135deg, #fbbf24, #f59e0b);
}

.es-body { padding: 1.1rem; }
.es-intro { color: rgba(255, 255, 255, 0.72); margin-bottom: .9rem; }

/* Score readout */
.es-score-top {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
}
.es-score-num {
  font-size: 2.6rem;
  font-weight: 800;
  line-height: 1;
}
.es-score-num small { font-size: 1rem; font-weight: 600; opacity: .55; }
.es-score-label {
  font-weight: 700;
  padding: .35rem .8rem;
  border-radius: 999px;
  font-size: .9rem;
}
/* Band colors */
.es-band-weak    { background: rgba(239, 68, 68, 0.18);  color: #fca5a5; }
.es-band-average { background: rgba(234, 179, 8, 0.18);  color: #fcd34d; }
.es-band-strong  { background: rgba(34, 197, 94, 0.18);  color: #86efac; }
.es-band-viral   { background: linear-gradient(135deg, #8b5cf6, #ec4899); color: #fff; }

/* Score progress meter */
.es-meter {
  height: 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  overflow: hidden;
  margin: 1rem 0 1.1rem;
}
.es-meter-fill {
  height: 100%;
  border-radius: 999px;
  width: 0;
  transition: width .8s ease;
  background: linear-gradient(90deg, #6366f1, #ec4899);
}

.es-section-title {
  font-size: .78rem;
  text-transform: uppercase;
  letter-spacing: .06em;
  opacity: .65;
  margin: .9rem 0 .5rem;
  font-weight: 700;
}
.es-list { list-style: none; padding: 0; margin: 0; }
.es-list li {
  padding: .4rem 0 .4rem 1.6rem;
  position: relative;
  color: rgba(255, 255, 255, 0.85);
}
.es-list.es-reasons li::before {
  content: "\f058"; /* check-circle */
  font-family: "Font Awesome 6 Free"; font-weight: 900;
  position: absolute; left: 0; top: .45rem; color: #86efac;
}
.es-list.es-suggestions li::before {
  content: "\f0eb"; /* lightbulb */
  font-family: "Font Awesome 6 Free"; font-weight: 900;
  position: absolute; left: 0; top: .45rem; color: #fcd34d;
}

/* Locked / error states */
.es-locked, .es-error {
  border-radius: 12px;
  padding: 1rem 1.1rem;
  text-align: center;
}
.es-locked {
  background: rgba(245, 158, 11, 0.10);
  border: 1px solid rgba(245, 158, 11, 0.35);
}
.es-error {
  background: rgba(239, 68, 68, 0.10);
  border: 1px solid rgba(239, 68, 68, 0.30);
  color: #fca5a5;
}
.es-locked .es-lock-icon { font-size: 1.6rem; color: #f59e0b; margin-bottom: .4rem; }

/* --- Automatic per-hook engagement badges (results page) ------------------ */
.hook-score-slot {
  display: inline-flex;
  align-items: center;
  flex: 0 0 auto;
}
.hook-score-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.15rem 0.55rem;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 600;
  line-height: 1.2;
  white-space: nowrap;
  border: 1px solid transparent;
}
.hook-score-badge .hs-num {
  font-weight: 800;
  font-variant-numeric: tabular-nums;
}
.hook-score-badge.hs-viral {
  background: linear-gradient(135deg, #7c3aed, #db2777);
  color: #fff;
}
.hook-score-badge.hs-strong {
  background: rgba(34, 197, 94, 0.18);
  color: #4ade80;
  border-color: rgba(34, 197, 94, 0.4);
}
.hook-score-badge.hs-average {
  background: rgba(234, 179, 8, 0.16);
  color: #fbbf24;
  border-color: rgba(234, 179, 8, 0.4);
}
.hook-score-badge.hs-weak {
  background: rgba(148, 163, 184, 0.18);
  color: #cbd5e1;
  border-color: rgba(148, 163, 184, 0.35);
}
.hook-score-badge.hs-loading,
.hook-score-badge.hs-unavailable {
  background: rgba(148, 163, 184, 0.12);
  color: #94a3b8;
  border-color: rgba(148, 163, 184, 0.25);
}
.hook-score-badge.hs-signup {
  background: rgba(59, 130, 246, 0.16);
  color: #60a5fa;
  border-color: rgba(59, 130, 246, 0.4);
  text-decoration: none;
}
.hook-score-badge.hs-signup:hover {
  background: rgba(59, 130, 246, 0.28);
  color: #93c5fd;
}
