/* Shared Skill Gap card styles — used by the Market Estimator results page (and available to any
   page that renders the shared js/components/skill-gap-cards.js component). Mirrors the dashboard's
   skill-gap card visuals so the "Gaps to Address" section matches the dashboard exactly.
   Skeleton-line / shimmer keyframes come from css/components/skeleton.css (loaded via base.css). */

.skill-gap-card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: var(--space-4) var(--space-5);
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}

.skill-gap-card + .skill-gap-card { margin-top: var(--space-3); }

.skill-gap-card__header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: var(--space-3);
}

.skill-gap-card__skill {
  flex: 1;
  font-size: var(--font-size-body);
  font-weight: var(--font-weight-semibold);
  color: var(--color-text-primary);
}

.skill-gap-card__impact {
  flex-shrink: 0;
  align-self: center;
  font-size: var(--font-size-xs);
  font-weight: var(--font-weight-semibold);
  letter-spacing: var(--tracking-wide);
  line-height: 1;
  padding: 3px var(--space-2);
  border: 1px solid currentColor;
  border-radius: var(--radius-full);
  background: color-mix(in srgb, currentColor 8%, transparent);
  white-space: nowrap;
}

.skill-gap-card__score {
  flex-shrink: 0;
  font-size: var(--font-size-sm);
  font-weight: var(--font-weight-bold);
  font-variant-numeric: tabular-nums;
}

.skill-gap-card__delete {
  flex-shrink: 0;
  background: none;
  border: none;
  cursor: pointer;
  font-size: 1.15rem;
  line-height: 1;
  color: var(--color-text-muted, #9ca3af);
  padding: 0 .2rem;
  border-radius: 4px;
}
.skill-gap-card__delete:hover {
  color: var(--color-band-at-risk, #dc2626);
  background: rgba(220, 38, 38, .08);
}

.skill-gap-card__rationale {
  font-size: var(--font-size-sm);
  color: var(--color-text-secondary);
  margin: 0;
  line-height: 1.5;
}

.skill-gap-card__confirm {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-2);
  margin-top: var(--space-2);
  padding-top: var(--space-2);
  border-top: 1px solid var(--color-border);
}
.skill-gap-card__confirm-text {
  font-size: var(--font-size-xs);
  color: var(--color-text-secondary);
}
.skill-gap-card__confirm-actions {
  display: flex;
  gap: var(--space-2);
  flex-shrink: 0;
}

/* PRO upsell (FREE users) */
.skill-gap-upsell {
  display: flex;
  align-items: center;
  gap: var(--space-4);
  margin-top: var(--space-3);
  padding: var(--space-4);
  background: var(--color-surface-inset);
  border-radius: var(--radius-md);
  flex-wrap: wrap;
}
.skill-gap-upsell__text {
  flex: 1;
  min-width: 180px;
  font-size: var(--font-size-sm);
  color: var(--color-text-secondary);
  margin: 0;
}

/* "View all skill gaps →" link */
.skill-gap-viewall {
  display: inline-block;
  margin-top: var(--space-3);
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--color-primary);
  text-decoration: none;
}
.skill-gap-viewall:hover { text-decoration: underline; }

/* Pending/processing shimmer */
.skill-gaps-building-msg {
  font-size: var(--font-size-sm);
  color: var(--color-text-secondary);
  margin: 0 0 var(--space-3);
}
.skill-gaps-shimmer {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}
.skill-gap-card--skeleton {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: var(--space-4) var(--space-5);
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}
.skill-gap-card--skeleton__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-4);
}
.skill-gap-card--skeleton__score {
  width: 1.75rem;
  height: 1.75rem;
  flex: 0 0 auto;
}

/* Inline spinner next to the "Analyzing…" status copy, so the wait reads as
   active computation rather than a stalled empty state. */
.skill-gaps-building-msg {
  display: flex;
  align-items: center;
  gap: var(--space-2);
}
.skill-gaps-building-msg__spinner {
  width: 0.9rem;
  height: 0.9rem;
  flex: 0 0 auto;
  border: 2px solid var(--color-border);
  border-top-color: var(--color-primary);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}
@media (prefers-reduced-motion: reduce) {
  .skill-gaps-building-msg__spinner { animation: none; }
}

/* Failed state */
.skill-gaps-error-state {
  display: flex;
  align-items: center;
  gap: var(--space-4);
  flex-wrap: wrap;
}
.skill-gaps-error-msg {
  flex: 1;
  min-width: 200px;
  font-size: var(--font-size-sm);
  color: var(--color-text-secondary);
  margin: 0;
}
