/* ═══ Convert tab glue: token map for the extracted reference sheet (convert-v5.css), legacy chrome hidden ═══ */
#tab-convert .cv5 {
  --bg: var(--st-bg); --surface: var(--st-surface); --surface-2: var(--st-surface-2);
  --ink: var(--st-ink); --text: var(--st-ink); --muted: var(--st-muted); --line: var(--st-line);
  --primary: var(--st-primary); --primary-2: var(--st-primary-2); --teal: var(--st-teal); --shadow: var(--st-shadow);
  --teal-soft: var(--st-soft); --orange-soft: var(--st-soft); --accent: var(--st-primary);
  color: var(--st-ink); font-family: var(--app-font, Inter, 'Outfit', system-ui, sans-serif); font-size: 16px; line-height: 1.55;
  padding: 0 24px 24px;
}
.cv5 *, .cv5 *::before, .cv5 *::after { box-sizing: border-box; }
.cv5 button, .cv5 input, .cv5 select { font: inherit; }
.cv5 button { color: inherit; cursor: pointer; }
.cv5 button:disabled { cursor: not-allowed; }

/* the reference icons are sized by one global svg rule */
.cv5 svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; flex: none; }

/* legacy chrome that the approved design does not have (markup + handlers stay in the DOM) */
#tab-convert .cv5 > .section-header, #tab-convert .cv5 > #cvSourceSummary, #tab-convert .cv5 > #cvStackBanner, #tab-convert .cv5 > #cvQaRequirement { display: none !important; }

/* live status / results / history of the real conversion: only once a platform has activity */
#tab-convert .cv5 .cv-layout:not(.cv5-has-activity) { display: none; }
#tab-convert .cv5 .cv-layout.cv5-has-activity .cv-card[data-status="not-started"] { display: none; }
#tab-convert .cv5 .cv5StatusHead { margin: 22px 0 10px; }
#tab-convert .cv5 .cv5StatusHead[hidden] { display: none; }
#tab-convert .cv5 .cv5StatusHead .eyebrow { color: var(--primary); font-size: 11px; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; }
#tab-convert .cv5 .cv5Blocker { display: block; max-width: 520px; color: var(--muted); font-size: 12px; font-weight: 500; }
#tab-convert .cv5 .btn:disabled { opacity: .5; }
.cv5 h1, .cv5 h2, .cv5 h3 { line-height: 1.2; }

/* ═══ Conversion status cards (live status, retry / fresh conversion, packages, activity) — V5 card ═══ */
#tab-convert .cv5 .cv-layout.cv5-has-activity { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 18px; align-items: start; }
#tab-convert .cv5 .cv-col-label { margin: 0 0 10px; font-size: 11px; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }
#tab-convert .cv5 .cv-targets-col > .cv-col-label { display: none; }
#tab-convert .cv5 .cv-targets-col { display: grid; gap: 14px; }
#tab-convert .cv5 .cv-card { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 16px; padding: 16px 18px; border: 1px solid var(--line); border-left-width: 4px; border-radius: 16px; background: var(--surface); color: var(--ink); box-shadow: none; }
#tab-convert .cv5 .cv-card[data-status="failed"] { border-left-color: #d6453d; }
#tab-convert .cv5 .cv-card[data-status="completed"] { border-left-color: var(--teal); }
#tab-convert .cv5 .cv-card[data-status="queued"], #tab-convert .cv5 .cv-card[data-status="converting"] { border-left-color: var(--primary); }
#tab-convert .cv5 .cv-card-icon { flex: 0 0 44px; width: 44px; height: 44px; display: grid; place-items: center; border-radius: 12px; background: color-mix(in srgb, var(--primary) 12%, var(--surface)); color: var(--primary); }
#tab-convert .cv5 .cv-card-body { flex: 1 1 260px; min-width: 0; display: grid; gap: 2px; }
#tab-convert .cv5 .cv-card-name { font-size: 15px; font-weight: 800; }
#tab-convert .cv5 .cv-card-sub { font-size: 12px; color: var(--muted); }
#tab-convert .cv5 .cv-card-status-row { display: flex; align-items: center; gap: 7px; font-size: 12px; font-weight: 700; margin-top: 4px; }
#tab-convert .cv5 .cv-card-findings { margin-top: 6px; font-size: 12px; color: var(--muted); }
#tab-convert .cv5 .cv-convert-btn { flex: 0 0 auto; height: 36px; padding: 0 16px; border-radius: 10px; border: 1px solid var(--line); background: var(--surface); color: var(--ink); font: 700 12.5px/1 var(--app-font, Inter, system-ui, sans-serif); cursor: pointer; }
#tab-convert .cv5 .cv-convert-btn:hover:not(:disabled) { border-color: var(--primary); color: var(--primary); }
#tab-convert .cv5 .cv-convert-btn:not(.cv-fresh-btn) { border: 0; color: #fff; background: linear-gradient(135deg, var(--primary), var(--primary-2)); }
#tab-convert .cv5 .cv-convert-btn:not(.cv-fresh-btn):hover:not(:disabled) { color: #fff; filter: brightness(1.07); }
#tab-convert .cv5 .cv-convert-btn:disabled { opacity: .5; cursor: not-allowed; }
#tab-convert .cv5 .cv-package-actions { flex: 0 0 100%; display: flex; flex-wrap: wrap; gap: 8px; }
#tab-convert .cv5 .cv-package-btn { height: 34px; padding: 0 14px; border-radius: 10px; border: 1px solid var(--line); background: var(--surface); color: var(--ink); font: 700 12.5px/1 var(--app-font, Inter, system-ui, sans-serif); cursor: pointer; }
#tab-convert .cv5 .cv-package-btn:hover { border-color: var(--primary); color: var(--primary); }
#tab-convert .cv5 .cv-card > [id^="cv-workspace-"], #tab-convert .cv5 .cv-card > .cv-activity { flex: 0 0 100%; min-width: 0; margin: 4px 0 0; padding: 12px 0 0; border-top: 1px solid var(--line); font-size: 12.5px; color: var(--ink); }
#tab-convert .cv5 .cv-card .cv-activity, #tab-convert .cv5 .cv-card [id^="cv-workspace-"] { overflow-wrap: anywhere; }
#tab-convert .cv5 .cv-card .cv-activity button, #tab-convert .cv5 .cv-card [id^="cv-workspace-"] button { height: 34px; padding: 0 14px; border-radius: 10px; border: 1px solid var(--line); background: var(--surface); color: var(--ink); font: 700 12.5px/1 var(--app-font, Inter, system-ui, sans-serif); cursor: pointer; }
#tab-convert .cv5 .cv-history-col { padding: 14px 16px; border: 1px solid var(--line); border-radius: 16px; background: var(--surface); }
#tab-convert .cv5 .cv-history-empty { display: grid; justify-items: center; gap: 6px; padding: 14px 0; color: var(--muted); font-size: 12.5px; }
@media (max-width: 1000px) { #tab-convert .cv5 .cv-layout.cv5-has-activity { grid-template-columns: minmax(0, 1fr); } }

/* Sources | (Platform + Ready to convert): the action bar sits under Platform instead of floating at the bottom; the Sources card is exactly
   as tall as the right column and its source list scrolls when it is longer */
.cv5 .convertLowerGrid { align-items: stretch; }
.cv5 .cv5Right { display: grid; gap: 16px; align-content: start; min-width: 0; }
.cv5 .convertStageRoot .convertActionRow { position: static; bottom: auto; z-index: auto; box-shadow: none; margin: 0; }
.cv5 .convertLowerGrid > .convertSourcesPanel { display: flex; flex-direction: column; min-height: 0; overflow: hidden; contain: size layout; }
.cv5 .convertSourcesPanel .convertSourceRows { flex: 1 1 auto; min-height: 0; overflow-y: auto; overflow-x: hidden; padding-right: 6px; scrollbar-width: thin; scrollbar-color: var(--line) transparent; }
.cv5 .convertSourcesPanel .convertSourceRows::-webkit-scrollbar { width: 8px; }
.cv5 .convertSourcesPanel .convertSourceRows::-webkit-scrollbar-thumb { background: var(--line); border-radius: 8px; }
.cv5 .convertSourcesPanel .convertSourceRows { position: relative; }
.cv5 .convertSourcesPanel .sourceMenu { z-index: 30; }
@media (max-width: 1000px) {
  .cv5 .convertLowerGrid > .convertSourcesPanel { contain: none; max-height: 460px; }
}
