/* =====================================================================
   Blog Automation – background AI jobs (js/jobs.js): cards bottom right + the progress in the AI wizard.
   Colours only from theme.css tokens.
   ===================================================================== */
.bj-dock { position: fixed; right: 20px; bottom: 20px; z-index: 190;   /* under toasts (200, lifted above the dock by jobs.js), over the page */
  display: flex; flex-direction: column; gap: 10px; width: min(360px, calc(100vw - 32px)); pointer-events: none; }
.bj-dock:empty { display: none; }
.bj-card { pointer-events: auto; display: flex; flex-direction: column; gap: 8px; padding: 12px 12px 14px 14px; background: var(--surface); color: var(--text);
  border: 1px solid var(--border); border-radius: var(--radius-lg); box-shadow: var(--shadow-lg); animation: bj-in .18s ease-out; }
.bj-card[hidden] { display: none; }
.bj-card.bj-out { animation: bj-out .16s ease-in forwards; }
@keyframes bj-in { from { opacity: 0; transform: translateY(8px) scale(.98); } }
@keyframes bj-out { to { opacity: 0; transform: translateY(8px) scale(.98); } }
.bj-head { display: flex; align-items: center; gap: 10px; min-width: 0; }
.bj-head .btn { margin: -4px -4px -4px auto; flex: none; }
.bj-title { flex: 1; min-width: 0; font-size: var(--fs-sm); line-height: 1.35; overflow: hidden; text-overflow: ellipsis; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.bj-step { display: flex; justify-content: space-between; gap: 10px; font-size: var(--fs-xs); color: var(--text-2); }
.bj-time { font-variant-numeric: tabular-nums; color: var(--text-3); }
.bj-bar { height: 6px; border-radius: 99px; background: var(--surface-3); overflow: hidden; }
.bj-bar > span { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--accent), var(--coral)); transition: width .5s linear; }
.bj-ico { flex: none; display: inline-flex; padding: 6px; border-radius: 50%; }
.bj-ico .ico { width: 16px; height: 16px; }
.bj-ok { border-color: color-mix(in srgb, var(--ok, #16a34a) 45%, var(--border)); }
.bj-ok .bj-ico { background: var(--ok-bg, #dcfce7); color: var(--ok, #16a34a); }
.bj-err { border-color: color-mix(in srgb, var(--err) 45%, var(--border)); }
.bj-err .bj-ico { background: var(--err-bg); color: var(--err); }
.bj-text { margin: 0; font-size: var(--fs-sm); color: var(--text-2); line-height: 1.45; overflow-wrap: anywhere; }
.bj-acts { display: flex; justify-content: flex-end; }
@media (max-width: 520px) { .bj-dock { right: 16px; left: 16px; bottom: 16px; width: auto; } }
@media (prefers-reduced-motion: reduce) { .bj-card, .bj-card.bj-out { animation: none; } .bj-bar > span { transition: none; } }

/* AI wizard: estimated progress under the spinner + "continue in the background" */
.bp-gen .bj-step { width: min(360px, 100%); margin-top: 6px; }
.bp-gen .bj-bar { width: min(360px, 100%); }
.bp-gen [data-bg] { margin-top: 10px; }
