/* Match-Me widget + result modal embedded in dashboard.html (ADR-018).
   Uses the dashboard theme vars (--theme-color, --text-primary/secondary,
   --surface/--border) so it inherits the active P3+ theme. */

/* ── Widget ─────────────────────────────────────────────── */
.mv-widget { width: 100%; max-width: 30rem; margin-top: 0.5rem; }
.mv-divider {
  display: flex; align-items: center; gap: 0.75rem;
  color: var(--text-secondary, #64748b);
  font-family: 'JetBrains Mono', monospace; font-size: 0.62rem;
  text-transform: lowercase; letter-spacing: 0.06em; margin-bottom: 0.85rem;
}
.mv-divider::before, .mv-divider::after {
  content: ''; flex: 1; height: 1px;
  background: color-mix(in srgb, var(--theme-color, #10b981) 22%, transparent);
}
.mv-hint {
  color: var(--text-secondary, #64748b); font-size: 0.72rem;
  line-height: 1.5; margin-bottom: 0.75rem; text-align: center;
}
.mv-input-row { display: flex; gap: 0.5rem; }
.mv-input {
  flex: 1; min-width: 0;
  background: color-mix(in srgb, var(--theme-color, #10b981) 6%, #0a0a0a);
  border: 1px solid color-mix(in srgb, var(--theme-color, #10b981) 30%, transparent);
  border-radius: 9px; padding: 0.6rem 0.75rem;
  color: var(--text-primary, #e2e8f0); font-size: 0.8rem; font-family: 'JetBrains Mono', monospace;
  transition: border-color 0.18s;
}
.mv-input:focus { outline: none; border-color: var(--theme-color, #10b981); box-shadow: 0 0 0 3px color-mix(in srgb, var(--theme-color, #10b981) 22%, transparent); }
.mv-input::placeholder { color: var(--text-secondary, #64748b); opacity: 0.7; }
.mv-btn {
  display: inline-flex; align-items: center; gap: 0.4rem; white-space: nowrap;
  background: var(--theme-color, #10b981); color: #000;
  border: none; border-radius: 9px; padding: 0.6rem 1rem;
  font-weight: 800; font-size: 0.66rem; text-transform: uppercase; letter-spacing: 0.06em;
  cursor: pointer; transition: opacity 0.18s, transform 0.1s;
}
.mv-btn:hover:not(:disabled) { opacity: 0.9; }
.mv-btn:active:not(:disabled) { transform: scale(0.96); }
.mv-btn:disabled { opacity: 0.4; cursor: not-allowed; }
.mv-status { min-height: 1.1rem; margin-top: 0.6rem; font-size: 0.72rem; text-align: center; color: var(--text-secondary, #64748b); }
.mv-status--error { color: #f87171; }

/* ── Modal ──────────────────────────────────────────────── */
.mv-modal-backdrop {
  position: fixed; inset: 0; z-index: 9000;
  display: none; align-items: flex-start; justify-content: center;
  background: rgba(0, 0, 0, 0.78); backdrop-filter: blur(6px);
  padding: 4vh 1rem; overflow-y: auto;
}
.mv-modal-backdrop.open { display: flex; }
.mv-modal {
  position: relative; width: 100%; max-width: 30rem;
  background: var(--surface, #0b0b0b);
  border: 1px solid color-mix(in srgb, var(--theme-color, #10b981) 28%, #1a1a1a);
  border-radius: 16px; padding: 1.75rem 1.5rem 1.5rem;
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.6);
  animation: mv-pop 0.22s ease;
}
@keyframes mv-pop { from { opacity: 0; transform: translateY(12px) scale(0.98); } to { opacity: 1; transform: none; } }
.mv-modal-close {
  position: absolute; top: 0.85rem; right: 0.85rem;
  background: transparent; border: none; color: var(--text-secondary, #64748b);
  font-size: 1.1rem; cursor: pointer; line-height: 1; padding: 0.25rem;
}
.mv-modal-close:hover { color: var(--text-primary, #e2e8f0); }

.mv-score-ring { position: relative; width: 120px; height: 120px; margin: 0 auto 0.5rem; }
.mv-score-ring svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.mv-ring-track { fill: none; stroke: color-mix(in srgb, var(--theme-color, #10b981) 14%, transparent); stroke-width: 9; }
.mv-ring-fill { fill: none; stroke: var(--theme-color, #10b981); stroke-width: 9; stroke-linecap: round; transition: stroke-dasharray 0.9s cubic-bezier(0.22, 1, 0.36, 1); }
.mv-score-num { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; }
.mv-score-num span { font-family: 'Orbitron', monospace; font-size: 2rem; font-weight: 900; color: var(--text-primary, #e2e8f0); line-height: 1; }
.mv-score-num small { font-size: 0.6rem; text-transform: uppercase; letter-spacing: 0.18em; color: var(--text-secondary, #64748b); }

/* ── Verdict hero ───────────────────────────────────────── */
.mv-hero { text-align: center; }
.mv-verdict-badge {
  display: inline-block; margin-top: 0.25rem; padding: 0.4rem 1rem; border-radius: 999px;
  font-family: 'Orbitron', monospace; font-weight: 800; font-size: 0.8rem; letter-spacing: 0.04em;
}
.mv-verdict-badge--go { background: rgba(16,185,129,0.15); color: #6ee7b7; border: 1px solid rgba(16,185,129,0.4); }
.mv-verdict-badge--maybe { background: rgba(245,158,11,0.13); color: #fcd34d; border: 1px solid rgba(245,158,11,0.4); }
.mv-verdict-badge--no { background: rgba(248,113,113,0.12); color: #fca5a5; border: 1px solid rgba(248,113,113,0.38); }
.mv-verdict-sub { font-size: 0.82rem; line-height: 1.5; color: var(--text-primary, #e2e8f0); max-width: 26rem; margin: 0.6rem auto 0; }
.mv-ring--go { stroke: #10b981 !important; }
.mv-ring--maybe { stroke: #f59e0b !important; }
.mv-ring--no { stroke: #f87171 !important; }

/* ── Key metrics row ────────────────────────────────────── */
.mv-metrics { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0.5rem; margin: 1rem 0; }
.mv-metric {
  display: flex; flex-direction: column; align-items: center; gap: 0.2rem; text-align: center;
  padding: 0.7rem 0.4rem; border-radius: 10px;
  background: color-mix(in srgb, var(--theme-color, #10b981) 6%, #0a0a0a);
  border: 1px solid color-mix(in srgb, var(--theme-color, #10b981) 18%, transparent);
}
.mv-metric-num { font-family: 'Orbitron', monospace; font-weight: 800; font-size: 1.15rem; color: var(--text-primary, #e2e8f0); line-height: 1; }
.mv-metric-num small { font-size: 0.75rem; color: var(--text-secondary, #64748b); font-weight: 600; }
.mv-metric-num sup { font-size: 0.5em; }
.mv-metric-label { font-size: 0.6rem; line-height: 1.25; color: var(--text-secondary, #64748b); text-transform: lowercase; }
.mv-metric-label sup { opacity: 0.7; }

/* ── Uplift hook (the reason to come back) ──────────────── */
.mv-uplift {
  display: flex; align-items: flex-start; gap: 0.55rem; text-align: left;
  padding: 0.7rem 0.85rem; border-radius: 10px; margin-bottom: 0.85rem;
  background: color-mix(in srgb, var(--theme-color, #10b981) 12%, transparent);
  border: 1px solid color-mix(in srgb, var(--theme-color, #10b981) 30%, transparent);
  font-size: 0.8rem; line-height: 1.45; color: var(--text-primary, #e2e8f0);
}
.mv-uplift-bolt { font-size: 1rem; }
.mv-uplift code { font-family: 'JetBrains Mono', monospace; font-size: 0.78rem; color: var(--theme-color, #10b981); }
.mv-uplift-now { color: var(--text-secondary, #64748b); }

.mv-salary {
  display: flex; align-items: flex-start; gap: 0.5rem; text-align: left;
  font-size: 0.78rem; line-height: 1.45; color: var(--text-primary, #e2e8f0);
  padding: 0.6rem 0.75rem; margin-bottom: 1rem; border-radius: 9px;
  background: rgba(255,255,255,0.03); border: 1px solid color-mix(in srgb, var(--theme-color, #10b981) 14%, transparent);
}

/* ── Premium teaser ─────────────────────────────────────── */
.mv-teaser {
  margin: 1rem 0; padding: 1rem; border-radius: 12px; text-align: left;
  background: linear-gradient(160deg, color-mix(in srgb, var(--theme-color, #10b981) 12%, transparent), transparent);
  border: 1px solid color-mix(in srgb, var(--theme-color, #10b981) 30%, transparent);
}
.mv-teaser-head { font-size: 0.78rem; font-weight: 700; color: var(--text-primary, #e2e8f0); margin-bottom: 0.6rem; }
.mv-teaser-list { list-style: none; padding: 0; margin: 0 0 0.85rem; display: flex; flex-direction: column; gap: 0.4rem; }
.mv-teaser-list li { position: relative; padding-left: 1.1rem; font-size: 0.76rem; line-height: 1.4; color: var(--text-secondary, #64748b); }
.mv-teaser-list li::before { content: '→'; position: absolute; left: 0; color: var(--theme-color, #10b981); }
.mv-teaser-list strong { color: var(--text-primary, #e2e8f0); }

.mv-job { text-align: center; margin-bottom: 0.75rem; }
.mv-job h3 { font-size: 1rem; font-weight: 700; color: var(--text-primary, #e2e8f0); line-height: 1.3; }
.mv-job-co { font-size: 0.8rem; color: var(--text-secondary, #64748b); margin-top: 0.15rem; }
.mv-job-meta { font-size: 0.68rem; color: var(--text-secondary, #64748b); opacity: 0.8; margin-top: 0.2rem; text-transform: capitalize; }
.mv-job-sal { font-size: 0.78rem; color: var(--theme-color, #10b981); margin-top: 0.35rem; font-weight: 600; }
.mv-verdict { font-size: 0.82rem; line-height: 1.55; color: var(--text-primary, #e2e8f0); text-align: center; margin-bottom: 1rem; }
.mv-oneskill {
  font-size: 0.76rem; color: #f59e0b; text-align: center;
  background: rgba(245, 158, 11, 0.08); border: 1px solid rgba(245, 158, 11, 0.25);
  border-radius: 9px; padding: 0.5rem 0.75rem; margin-bottom: 1rem;
}

.mv-pillars { display: flex; flex-direction: column; gap: 0.55rem; margin-bottom: 1rem; }
.mv-pillar { display: grid; grid-template-columns: 8.5rem 1fr 2.5rem; align-items: center; gap: 0.6rem; }
.mv-pillar-label { font-size: 0.7rem; color: var(--text-secondary, #64748b); }
.mv-pillar-bar { height: 6px; border-radius: 3px; background: color-mix(in srgb, var(--theme-color, #10b981) 12%, #161616); overflow: hidden; }
.mv-pillar-fill { height: 100%; border-radius: 3px; background: var(--theme-color, #10b981); transition: width 0.8s cubic-bezier(0.22, 1, 0.36, 1); }
.mv-pillar-val { font-size: 0.72rem; font-weight: 700; color: var(--text-primary, #e2e8f0); text-align: right; }

.mv-techgrid { display: flex; flex-wrap: wrap; gap: 0.35rem; align-items: center; margin-bottom: 0.85rem; }
.mv-techgrid-label { width: 100%; font-size: 0.68rem; color: var(--text-secondary, #64748b); margin-bottom: 0.15rem; }
.mv-badge {
  font-size: 0.68rem; padding: 0.2rem 0.5rem; border-radius: 6px; font-family: 'JetBrains Mono', monospace;
  background: color-mix(in srgb, var(--theme-color, #10b981) 10%, transparent);
  border: 1px solid color-mix(in srgb, var(--theme-color, #10b981) 25%, transparent);
  color: var(--text-primary, #e2e8f0);
}
.mv-badge--ok { background: rgba(16, 185, 129, 0.1); border-color: rgba(16, 185, 129, 0.3); color: #6ee7b7; }
.mv-badge--miss { background: rgba(248, 113, 113, 0.08); border-color: rgba(248, 113, 113, 0.28); color: #fca5a5; }

.mv-context {
  font-size: 0.72rem; line-height: 1.55; color: var(--text-secondary, #64748b);
  border-top: 1px solid color-mix(in srgb, var(--theme-color, #10b981) 14%, transparent);
  padding-top: 0.85rem; margin-bottom: 1rem; text-align: center;
}
.mv-actions { display: flex; gap: 0.5rem; flex-wrap: wrap; }
.mv-action {
  flex: 1; text-align: center; white-space: nowrap;
  padding: 0.6rem 0.85rem; border-radius: 9px; font-size: 0.72rem; font-weight: 700;
  text-decoration: none; cursor: pointer; border: 1px solid color-mix(in srgb, var(--theme-color, #10b981) 30%, transparent);
  background: transparent; color: var(--text-primary, #e2e8f0); transition: opacity 0.18s;
}
.mv-action--primary { background: var(--theme-color, #10b981); color: #000; border-color: var(--theme-color, #10b981); }
.mv-action:hover { opacity: 0.9; }
.mv-remaining { text-align: center; font-size: 0.68rem; color: var(--text-secondary, #64748b); margin-top: 0.75rem; }

/* ── Upsell (free limit reached) ────────────────────────── */
.mv-upsell { text-align: center; }
.mv-upsell-badge {
  display: inline-block; font-size: 0.62rem; font-weight: 800; letter-spacing: 0.06em;
  text-transform: uppercase; padding: 0.3rem 0.7rem; border-radius: 999px; margin-bottom: 0.85rem;
  background: color-mix(in srgb, var(--theme-color, #10b981) 16%, transparent);
  color: var(--theme-color, #10b981);
  border: 1px solid color-mix(in srgb, var(--theme-color, #10b981) 35%, transparent);
}
.mv-upsell-title { font-family: 'Orbitron', monospace; font-size: 1.15rem; font-weight: 800; color: var(--text-primary, #e2e8f0); margin-bottom: 0.6rem; }
.mv-upsell-sub { font-size: 0.8rem; line-height: 1.55; color: var(--text-secondary, #64748b); margin-bottom: 1.1rem; }
.mv-upsell-list { list-style: none; padding: 0; margin: 0 0 1.25rem; text-align: left; display: flex; flex-direction: column; gap: 0.55rem; }
.mv-upsell-list li { display: flex; align-items: center; gap: 0.6rem; font-size: 0.82rem; color: var(--text-primary, #e2e8f0); }
.mv-upsell-list li span { font-size: 1rem; }
.mv-upsell-cta { display: block; margin-bottom: 0.85rem; }
.mv-upsell-dismiss { background: none; border: none; color: var(--text-secondary, #64748b); font-size: 0.74rem; cursor: pointer; padding: 0.4rem; }
.mv-upsell-dismiss:hover { color: var(--text-primary, #e2e8f0); }
