/* Video inputs and generation preview follow the Studio's violet palette. */
body.atelier .uploads .upload.ready {
  border-color: #68579b;
  background: linear-gradient(145deg, #29253b 0%, #20212f 68%, #1d202b 100%);
  box-shadow: inset 0 1px 0 #ffffff0b, 0 12px 30px #09071316;
}
body.atelier .uploads .upload.ready:hover {
  border-color: #a38ae9;
  background: linear-gradient(145deg, #302a47 0%, #242439 70%, #202331 100%);
}

body.atelier .output-generating {
  gap: 15px;
  border: 1px solid #9e85e24a;
  border-radius: 16px;
  background:
    radial-gradient(circle at 50% 42%, #8b6fea30 0, #8b6fea12 23%, transparent 54%),
    radial-gradient(circle at 85% 15%, #6672d319 0, transparent 43%),
    linear-gradient(145deg, #1c1a2af8, #11131efb);
  box-shadow: inset 0 1px 0 #ffffff13, 0 16px 50px #08061235;
  text-align: center;
}
body.atelier .output-generating[hidden],
body.atelier .video-slide.has-output > .output-generating { display: none; }
body.atelier .output-generating::before {
  content: '';
  position: absolute;
  inset: 10%;
  border-radius: 50%;
  background: radial-gradient(circle, #a18af52b, transparent 58%);
  filter: blur(24px);
  animation: scailGlow 4s ease-in-out infinite;
  pointer-events: none;
}
body.atelier .output-generating > span {
  position: relative;
  z-index: 1;
  width: 17px;
  height: 17px;
  margin: 0 28px 6px;
  border: 0;
  border-radius: 50%;
  background: radial-gradient(circle at 32% 28%, #efe8ff, #aa91f4 58%, #7053d1);
  box-shadow: 0 0 20px #9877ed8c, inset -2px -3px 5px #5c44ae66;
  animation: scailOrb 1.5s ease-in-out infinite;
}
body.atelier .output-generating > span::before,
body.atelier .output-generating > span::after {
  content: '';
  position: absolute;
  top: 2px;
  width: 13px;
  height: 13px;
  border-radius: 50%;
  background: radial-gradient(circle at 30% 25%, #e4dfff, #9f9eea 62%, #6262bd);
  box-shadow: 0 0 16px #8883de70, inset -2px -2px 4px #5657a344;
  animation: scailOrb 1.5s ease-in-out infinite;
}
body.atelier .output-generating > span::before { left: -27px; animation-delay: -.35s; }
body.atelier .output-generating > span::after { right: -27px; animation-delay: .35s; }
body.atelier .output-generating > b {
  position: relative;
  z-index: 1;
  color: #ede7ff !important;
  font-size: 14px !important;
  font-weight: 600;
  letter-spacing: .01em;
}
body.atelier .output-generating > small {
  position: relative;
  z-index: 1;
  max-width: 260px;
  padding-inline: 16px;
  color: #b4accb;
  font-size: 11px;
  line-height: 1.5;
}
@keyframes scailOrb {
  0%, 100% { transform: translateY(3px) scale(.82); opacity: .7; }
  50% { transform: translateY(-7px) scale(1.12); opacity: 1; }
}
@keyframes scailGlow {
  0%, 100% { transform: scale(.85); opacity: .4; }
  50% { transform: scale(1.2); opacity: .85; }
}

html[data-studio-theme='light'] body.atelier .uploads .upload.ready {
  border-color: #b8a9e9;
  background: linear-gradient(145deg, #f5f1ff, #f8f7fc);
  box-shadow: inset 0 1px 0 #ffffff, 0 9px 24px #6f5b9d11;
}
html[data-studio-theme='light'] body.atelier .uploads .upload.ready:hover {
  border-color: #8d75d9;
  background: linear-gradient(145deg, #eee8ff, #f8f6ff);
}
html[data-studio-theme='light'] body.atelier .output-generating {
  border-color: #c9baf0;
  background:
    radial-gradient(circle at 50% 42%, #b49af44a 0, #b49af417 30%, transparent 60%),
    linear-gradient(145deg, #fbf9ff, #eeebfa);
  box-shadow: inset 0 1px 0 #fff, 0 14px 40px #7c6ba122;
}
html[data-studio-theme='light'] body.atelier .output-generating > b { color: #4d3c77 !important; }
html[data-studio-theme='light'] body.atelier .output-generating > small { color: #746889; }

/* The extra pair uses the same controls as the main video form. */
body.atelier .batch-add-dialog > form { max-height: calc(100dvh - 36px); overflow-y: auto; scrollbar-width: thin; }
body.atelier .batch-video-settings {
  margin-top: 17px;
  padding: 17px;
  border: 1px solid #514769;
  border-radius: 13px;
  background: linear-gradient(145deg, #262335, #1e202c);
}
body.atelier .batch-video-settings .video-controls-head b { color: #ece5ff; }
body.atelier .batch-video-settings .video-controls-head small,
body.atelier .batch-video-settings label,
body.atelier .batch-video-settings p { color: #bdb5cf; }
body.atelier .batch-video-settings :is(select, input[type='number']) {
  border-color: #5b5270;
  background: #171822;
  color: #f3efff;
}
body.atelier .batch-video-settings .video-output-choice label { border-color: #5b5270; }
body.atelier .batch-video-settings .video-output-choice label:has(input:checked) {
  border-color: #a18ae6;
  background: #352d51;
}
body.atelier .batch-video-settings .video-output-choice b,
body.atelier .batch-video-settings .video-output-choice legend { color: #ece5ff; }
body.atelier .batch-video-settings #batchVideoSettingsNote.error { color: #ffadaf; }

html[data-studio-theme='light'] body.atelier .batch-video-settings {
  border-color: #ddd4ed;
  background: #faf8ff;
}
html[data-studio-theme='light'] body.atelier .batch-video-settings .video-controls-head b,
html[data-studio-theme='light'] body.atelier .batch-video-settings .video-output-choice b,
html[data-studio-theme='light'] body.atelier .batch-video-settings .video-output-choice legend { color: #39324f; }
html[data-studio-theme='light'] body.atelier .batch-video-settings .video-controls-head small,
html[data-studio-theme='light'] body.atelier .batch-video-settings label,
html[data-studio-theme='light'] body.atelier .batch-video-settings p { color: #706783; }
html[data-studio-theme='light'] body.atelier .batch-video-settings :is(select, input[type='number']) {
  border-color: #d9d1e9;
  background: #fff;
  color: #39324f;
}
html[data-studio-theme='light'] body.atelier .batch-video-settings .video-output-choice label { border-color: #ded6eb; }
html[data-studio-theme='light'] body.atelier .batch-video-settings .video-output-choice label:has(input:checked) {
  border-color: #927bdc;
  background: #f0ebff;
}
html[data-studio-theme='light'] body.atelier .batch-video-settings #batchVideoSettingsNote.error { color: #b13248; }

body.atelier .video-settings-lock-note {
  margin: 13px 0 15px;
  padding: 10px 12px;
  border: 1px solid #69598d;
  border-radius: 9px;
  background: #302944;
  color: #e1d6ff;
  font-size: 11px;
  line-height: 1.5;
}
body.atelier .video-settings-lock-note[hidden] { display: none; }
body.atelier .video-inputs-locked :is(input, select, button) { cursor: not-allowed; opacity: .65; }
body.atelier .uploads.video-inputs-locked .upload { cursor: not-allowed; opacity: .65; pointer-events: none; }
html[data-studio-theme='light'] body.atelier .video-settings-lock-note {
  border-color: #cbbde9;
  background: #f0ebfa;
  color: #554675;
}

@media (prefers-reduced-motion: reduce) {
  body.atelier .output-generating::before,
  body.atelier .output-generating > span,
  body.atelier .output-generating > span::before,
  body.atelier .output-generating > span::after { animation: none; }
}
