/* History rows copied from Quick Magic (cv-history-list-row.css) and popovers from cv-duration.vue / cv-model-modal.vue /
   cv-resolution.vue. */
.cvr { display: grid; grid-template-columns: minmax(0, 40fr) minmax(240px, 60fr); align-items: stretch; gap: 12px; margin-bottom: 16px; }
.cvr-media { position: relative; aspect-ratio: 4 / 3; align-self: start; border-radius: 16px; overflow: hidden; background: #1c1e20; container-type: inline-size; }
.cvr-video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; display: block; background: #000; }
.cvr-state { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 10px; padding: 12px; text-align: center; font-size: 12px; color: #898a8b; }
.cvr-state--err { align-items: flex-start; justify-content: space-between; padding: clamp(12px, 3%, 20px); text-align: left; color: #f7f7f8;
  background: radial-gradient(ellipse 90% 22% at 50% -6%, rgba(231, 41, 48, .14), transparent 100%), #1c1e20; }
.cvr-error-badge { display: inline-flex; align-items: center; gap: 6px; padding: 8px 10px; border-radius: 999px;
  background: rgba(217, 217, 217, .04); box-shadow: inset 0 0 0 1px rgba(217, 217, 217, .04); font-size: 12px; font-weight: 600; }
.cvr-error-message { font-size: 14px; line-height: 20px; font-weight: 600; max-width: 100%; overflow-wrap: anywhere; overflow-y: auto; }
.cvr-spinner { width: 24px; height: 24px; border: 3px solid rgba(255, 255, 255, .12); border-top-color: #f0ba2e; border-radius: 50%; animation: cv-rot .8s linear infinite; }
.cvr-timer { font-size: 14px; font-weight: 700; font-variant-numeric: tabular-nums; color: #f0ba2e; }
.cvr-qnum { font-size: 28px; line-height: 1; font-weight: 700; color: #f7f7f8; font-variant-numeric: tabular-nums; }
.cvr-stage { font-size: 13px; font-weight: 600; color: #f7f7f8; }
.cvr-acc { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 11px; color: #898a8b; }
.cvr-hint { font-size: 12px; font-weight: 600; color: #f0ba2e; }

.cvr-info { position: relative; min-width: 0; display: grid; gap: 12px; justify-items: start; align-content: start;
  padding: 16px; background: #131517; border: 1px solid rgba(217, 217, 217, 0.04); border-radius: 16px; }
.cvr-badge { display: inline-flex; align-items: center; gap: 4px; height: 24px; padding: 0 8px; font-size: 10px; line-height: 14px;
  font-weight: 600; color: #fff; border: 1px solid rgba(255, 255, 255, .08); border-radius: 8px; }
.cvr-prompt { width: 100%; margin: 0; font-size: 14px; line-height: 20px; color: #898a8b; white-space: pre-wrap; overflow-wrap: anywhere;
  display: -webkit-box; -webkit-line-clamp: 6; -webkit-box-orient: vertical; overflow: hidden; }
.cvr-prompt--full { -webkit-line-clamp: unset; }
.cvr-seemore { padding: 0; border: 0; background: transparent; color: #f0ba2e; font-size: 12px; font-weight: 600; cursor: pointer; }
.cvr-refs { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.cvr-thumb { width: 40px; height: 40px; border-radius: 8px; object-fit: cover; background: rgba(255, 255, 255, .06); transform: rotate(-5deg); transition: transform .15s ease; }
.cvr-thumb:hover { transform: rotate(0); }
.cvr-thumb-more { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 8px; background: #1c1e20; font-size: 12px; font-weight: 600; color: #898a8b; }
.cvr-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.cvr-chip { display: inline-flex; align-items: center; gap: 4px; height: 24px; padding: 5px 10px 5px 6px; font-size: 10px; line-height: 14px;
  font-weight: 600; color: #fff; background: #1c1e20; border-radius: 8px; white-space: nowrap; }
.cvr-chip svg { width: 14px; height: 14px; }
.cvr-chip--acc { max-width: 100%; overflow: hidden; text-overflow: ellipsis; color: #898a8b; }
.cvr-date { font-size: 12px; line-height: 18px; color: #898a8b; }
/* The buttons stay visible (a failed or waiting row needs them at once) and wrap when the column is narrow. */
/* where the video is saved (done) or will be saved (waiting / running): one line, the middle of a long path is cut */
.cvr-path { width: 100%; margin: 0; font-size: 12px; line-height: 18px; color: #898a8b; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cvr-path span { color: #d3d3d6; font-family: ui-monospace, monospace; font-size: 11.5px; }
.cvr-path:empty { display: none; }
.cvr-actrow { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 14px; width: 100%; }
.cvr-act { display: inline-flex; align-items: center; gap: 6px; padding: 0; border: 0; background: transparent; font-size: 12px;
  font-weight: 600; color: #fff; cursor: pointer; white-space: nowrap; }
.cvr-act:hover:not(:disabled) { color: #f0ba2e; }
.cvr-act:disabled, .cvr-ibtn:disabled { opacity: .4; cursor: progress; }
.cvr-flash { width: 100%; margin: 0; min-height: 0; font-size: 12px; line-height: 17px; color: #e5837d; overflow-wrap: anywhere; }
.cvr-flash:empty { display: none; }
.cvr-ibtn { margin-left: auto; display: grid; place-items: center; width: 28px; height: 28px; border: 0; border-radius: 8px; background: transparent; color: #898a8b; cursor: pointer; }
.cvr-ibtn:hover { background: rgba(229, 131, 125, .16); color: #e5837d; }

/* popovers */
.cv-res-backdrop { position: fixed; inset: 0; z-index: 1300; }
.cv-pop { position: fixed; z-index: 1301; padding: 8px; border: 1px solid rgba(255, 255, 255, .06); border-radius: 16px;
  background: #1f2124; box-shadow: 0 12px 20px rgba(0, 0, 0, .4); max-height: calc(100vh - 16px); overflow-y: auto; }
.cv-pop-head { margin: 4px 4px 8px; font-size: 14px; font-weight: 500; color: #fff; }
.cv-pop-note { margin: 8px 4px 2px; font-size: 12px; line-height: 1.5; color: #898a8b; }
.cv-res-item { display: flex; align-items: center; justify-content: space-between; width: 100%; height: 40px; padding: 0 12px;
  background: none; border: none; border-radius: 8px; cursor: pointer; font-size: 14px; color: #f7f7f8; }
.cv-res-item:hover { background: rgba(255, 255, 255, .06); }
.cv-res-item--on { color: #f0ba2e; }
.cv-model-item { display: flex; align-items: center; gap: 12px; width: 100%; padding: 9px 10px; border: 1px solid transparent;
  border-radius: 12px; background: transparent; text-align: left; cursor: pointer; color: #f7f7f8; }
.cv-model-item:hover { background: rgba(255, 255, 255, .05); }
.cv-model-item--on { background: rgba(240, 186, 46, .08); border-color: rgba(240, 186, 46, .25); }
.cv-model-body { flex: 1; min-width: 0; }
.cv-model-name { display: flex; align-items: center; gap: 7px; font-size: 14px; font-weight: 600; }
.cv-model-chips { display: flex; gap: 5px; margin-top: 4px; }
.cv-chip { padding: 2px 7px; border-radius: 999px; background: rgba(255, 255, 255, .07); color: rgba(255, 255, 255, .6); font-size: 10.5px; font-weight: 600; }
.cv-model-check { flex-shrink: 0; color: #f0ba2e; }
.cv-duration-track { position: relative; height: 36px; border: 1px solid #424242; border-radius: 6px; overflow: hidden; background: #131517; }
.cv-duration-fill { position: absolute; inset: 0; width: var(--progress); background: #23262a; pointer-events: none; }
.cv-duration-value { position: absolute; z-index: 1; left: 12px; top: 50%; transform: translateY(-50%); font-size: 12px; font-weight: 500; pointer-events: none; }
.cv-dur-slider { appearance: none; position: absolute; inset: 0; width: 100%; height: 34px; margin: 0; background: transparent; cursor: pointer; }
.cv-dur-slider::-webkit-slider-thumb { appearance: none; width: 4px; height: 34px; border: 0; border-radius: 999px; background: #fff; }
.cv-fb-ta { width: 100%; height: 150px; resize: none; white-space: pre; overflow: auto; -webkit-text-security: disc; background: #131517;
  color: #f7f7f8; border: 1px solid #33333f; border-radius: 8px; padding: 8px; font: 12px ui-monospace, monospace; outline: none; }
.cv-fb-ta:focus { border-color: #f0ba2e; }

