/* =============================================================
   Font Migrator — tool-specific styles  (PREVIEW)
   Built on the shared design system (styles.css); uses its CSS
   variables so the tool follows the site's light/dark theme.
   ============================================================= */

/* ---- Beta marking ---- */
.fm .tool-hero h1 { flex-wrap: wrap; }
.fm .tool-hero h1 > span:not(.tool-icon):not(.fm-beta) { min-width: 0; }
.fm-beta { font-size: .62rem; align-self: center; }
.fm-beta-note {
  display: flex; gap: 10px; align-items: flex-start;
  background: color-mix(in srgb, var(--brand-2) 14%, transparent);
  border: 1px solid color-mix(in srgb, var(--brand-2) 55%, var(--border));
  border-radius: 12px; padding: 11px 15px; margin-bottom: 16px;
  font-size: 13px; color: var(--text); line-height: 1.5;
}
.fm-beta-note::before { content: "🔤"; font-size: 15px; line-height: 1.4; }

/* ---- Source bar ---- */
.fm-source {
  display: flex; flex-wrap: wrap; align-items: center; gap: 14px;
  padding: 16px 18px; margin-bottom: 16px;
}
.fm-source .grow { flex: 1 1 auto; min-width: 180px; }
.filemeta { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.filemeta .fname { font-family: ui-monospace, "SFMono-Regular", Menlo, monospace; font-size: 13px; color: var(--text); word-break: break-all; }
.filemeta .fsub { font-size: 12.5px; color: var(--text-soft); }
.filemeta.empty .fname { color: var(--text-soft); }
.fm-typebadge { font-size: .68rem; }
.fm .btn .ic { width: 16px; height: 16px; }
.fm .btn svg { display: block; }

/* ---- Fonts table ---- */
.tablecard { padding: 0; overflow: hidden; }
.tscroll { overflow: auto; max-height: calc(100vh - 260px); }
.fm table { width: 100%; border-collapse: collapse; font-size: 14px; }
.fm thead th {
  position: sticky; top: 0; z-index: 2; background: var(--bg-elev);
  font-size: .66rem; font-weight: 600; letter-spacing: .1em; text-transform: uppercase;
  color: var(--text-soft); text-align: left; padding: 11px 14px;
  border-bottom: 1px solid var(--border); white-space: nowrap;
}
.fm thead th.tc-center { text-align: center; }
.fm tbody td { padding: 9px 14px; border-bottom: 1px solid var(--border); vertical-align: middle; }
.fm tbody tr { animation: fmRise .42s cubic-bezier(.2,.7,.2,1) both; }
.fm tbody tr:hover { background: var(--bg-soft); }
.fm tbody tr.changed { background: color-mix(in srgb, var(--brand) 9%, transparent); }
.fm tbody tr.changed:hover { background: color-mix(in srgb, var(--brand) 14%, transparent); }
@keyframes fmRise { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

.fm-col-name { min-width: 220px; }
.fm-col-uses { width: 90px; }
.fm-col-repl { min-width: 240px; }
.tc-center { text-align: center; }

.fm-name { display: flex; align-items: center; gap: 9px; }
.fm-fontname { font-weight: 600; color: var(--text); font-size: 15px; }
.fm-uses { text-align: center; color: var(--text-soft); font-variant-numeric: tabular-nums; }
.fm-badge {
  display: inline-block; font-family: ui-monospace, Menlo, monospace;
  font-size: 9.5px; font-weight: 600; letter-spacing: .05em; text-transform: uppercase;
  padding: 2px 7px; border-radius: 999px; border: 1px solid currentColor;
  background: color-mix(in srgb, currentColor 9%, transparent); white-space: nowrap;
}
.fm-badge.theme { color: var(--office-general); }

.fm-input {
  font: inherit; font-size: 13.5px; color: var(--text);
  background: var(--bg); border: 1px solid var(--border); border-radius: 9px;
  padding: 8px 11px; width: 100%; max-width: 340px; min-width: 0; box-sizing: border-box;
  transition: border-color .14s, box-shadow .14s;
}
.fm-input::placeholder { color: var(--text-soft); }
.fm-input:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px color-mix(in srgb, var(--brand) 18%, transparent); }
.fm tbody tr.changed .fm-input { border-color: var(--brand); }

.fm-empty { text-align: center; padding: 56px 24px; color: var(--text-soft); font-size: 1.05rem; }

/* ---- Sticky action bar ---- */
.fm-actionbar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 40;
  background: color-mix(in srgb, var(--bg-elev) 88%, transparent);
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  border-top: 1px solid var(--border);
}
.fm-actionbar .inner { max-width: var(--maxw); margin: 0 auto; padding: 13px 24px; display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.fm-actionbar .count { font-size: 13.5px; color: var(--text-soft); }
.fm-actionbar .count b { color: var(--brand); font-weight: 700; }
.fm-actionbar .spacer { flex: 1 1 auto; }

/* ---- Toast ---- */
.fm-toast {
  position: fixed; bottom: 84px; left: 50%; transform: translateX(-50%) translateY(20px);
  background: var(--bg-elev); color: var(--text); padding: 12px 18px; border-radius: 12px;
  border: 1px solid var(--border); font-size: 13.5px; opacity: 0; pointer-events: none;
  transition: all .25s ease; z-index: 70; box-shadow: var(--shadow-lg); max-width: 90vw;
}
.fm-toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }
.fm-toast.err { border-color: color-mix(in srgb, var(--office-powerpoint) 60%, var(--border)); color: var(--office-powerpoint); }

/* drag & drop highlight */
.fm.droplit { outline: 2px dashed var(--brand); outline-offset: -10px; border-radius: 18px; }

/* legal note */
.fm-legal { margin-top: 36px; font-size: 11.5px; color: var(--text-soft); line-height: 1.55; }
.fm-legal p { margin: 0 0 8px; max-width: 84ch; }
