/* 批TGWDEV528：背景源编辑独立弹窗，画面比例等于实际编码文件。 */
.video-source-editor { position: fixed; inset: 0; z-index: 2147483001; display: grid; place-items: center; padding: 12px; background: #09101dbd; color: #172b3e; }
.video-source-editor .vse-panel { width: min(980px, 100%); max-height: 94vh; max-height: 94dvh; overflow: auto; padding: 16px; border-radius: 14px; background: #fff; display: grid; gap: 12px; box-sizing: border-box; }
.video-source-editor header, .video-source-editor footer, .video-source-editor .vse-row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.video-source-editor header { justify-content: space-between; }
.video-source-editor header strong { font-size: 20px; }
.video-source-editor button { min-height: 36px; padding: 6px 12px; border: 1px solid #b7c9d8; border-radius: 7px; background: #f0f5f9; color: #203d50; font-size: 14px; font-weight: 700; white-space: nowrap; cursor: pointer; }
.video-source-editor .vse-primary, .video-source-editor .is-active { background: #147d69; color: #fff; border-color: #147d69; }
.video-source-editor .vse-delete { background: #b32939; color: #fff; border-color: #b32939; }
.video-source-editor .vse-deletions { max-height: 96px; overflow-y: auto; padding: 8px; border: 1px solid #edd0d5; border-radius: 6px; background: #fff7f8; color: #803343; font-size: 13px; line-height: 1.5; overflow-wrap: anywhere; }
.video-source-editor button:disabled { opacity: .5; cursor: not-allowed; }
.video-source-editor .vse-layout { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 16px; align-items: start; }
.video-source-editor .vse-stage { position: relative; background: #121820; display: grid; place-items: center; border-radius: 8px; overflow: hidden; }
.video-source-editor .vse-stage video, .video-source-editor .vse-encoding-source { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.video-source-editor .vse-stage canvas { display: block; width: auto; height: auto; max-width: 100%; max-height: 52vh; touch-action: none; cursor: grab; }
.video-source-editor .vse-boundaries { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 8px; margin-top: 8px; }
.video-source-editor .vse-boundaries button { min-width: 0; display: grid; justify-items: center; gap: 4px; padding: 6px; white-space: normal; }
.video-source-editor .vse-boundaries canvas { width: auto; height: auto; max-width: 100%; max-height: 88px; background: #121820; }
.video-source-editor .vse-boundaries span { font-size: 12px; line-height: 1.4; }
.video-source-editor .vse-cut-row { display: flex; align-items: center; flex-wrap: wrap; gap: 6px; margin-top: 5px; }
.video-source-editor .vse-cut-row button { min-height: 26px; padding: 3px 6px; font-size: 12px; }
.video-source-editor .vse-controls { display: grid; gap: 10px; }
.video-source-editor label { display: flex; align-items: center; gap: 6px; color: #203d50; font-size: 14px; min-width: 0; white-space: nowrap; }
.video-source-editor .vse-row > label { flex: 1; }
.video-source-editor input { min-width: 0; box-sizing: border-box; accent-color: #147d69; }
.video-source-editor input[type=number], .video-source-editor input[type=text] { width: 100%; min-height: 34px; border: 1px solid #bccbd7; border-radius: 6px; padding: 5px; background: #fff; color: #182f40; }
.video-source-editor input[type=number] { width: 95px; }
.video-source-editor input[type=range] { width: 100%; min-width: 30px; }
.video-source-editor input[type=checkbox] { flex: 0 0 16px; width: 16px; height: 16px; }
.video-source-editor output, .video-source-editor small { color: #4a6275; font-size: 13px; line-height: 1.5; }
.video-source-editor .vse-effect { display: block; margin: 6px 0; padding: 7px 9px; border-radius: 6px; background: #edf7f4; color: #17634f; font-weight: 700; }
.video-source-editor .vse-effect.is-error { background: #fff0f0; color: #a02535; }
.video-source-editor progress { width: 100%; height: 16px; }
.video-source-editor .vse-result { display: grid; gap: 8px; justify-items: center; border-top: 1px solid #dbe5ed; padding-top: 12px; }
.video-source-editor .vse-result video { width: 100%; max-width: 460px; max-height: 40vh; background: #111; }
.video-source-editor [hidden] { display: none !important; }
.video-template-upload__row [data-template-edit-video] { min-height: 40px; padding: 0 14px; border: 1px solid #147d69; border-radius: 8px; color: #147d69; background: #fff; font-weight: 800; white-space: nowrap; }
@media (max-width: 700px) { .video-source-editor { padding: 6px; } .video-source-editor .vse-panel { padding: 10px; max-height: 96vh; max-height: 96dvh; } .video-source-editor .vse-layout { grid-template-columns: minmax(0, 1fr); } .video-source-editor .vse-stage canvas { max-height: 36vh; } .video-source-editor footer button { flex: 1 1 auto; } }
