/* AUTOTUBE USER1 Scenario UX V3.8 — cosmetic layer only */
/* Preserve native generation buttons and textareas for original application logic. */
#scenarioGeneratePane .scenario-generator-controls { position:relative; }
#scenarioGeneratePane #generateScenarioTopicsButton { display:none !important; }
#scenarioGeneratePane .at-v38-topics-button {
  display:inline-flex !important; align-items:center; justify-content:center; gap:8px;
  flex:0 0 auto; min-height:40px; border:1px solid #F00016 !important;
  border-radius:12px !important; padding:9px 19px !important;
  font:900 14px/1.25 Inter,Arial,sans-serif !important; letter-spacing:-.015em;
  color:#fff !important; background:#F00016 !important; box-shadow:0 7px 17px rgba(240,0,22,.13) !important;
  cursor:pointer; white-space:nowrap; transition:background .16s ease,box-shadow .16s ease;
}
#scenarioGeneratePane .at-v38-topics-button:not(:disabled):hover {background:#CF0014 !important;border-color:#CF0014 !important;}
#scenarioGeneratePane .at-v38-topics-button:disabled {
  color:#777 !important; border-color:#E3E3E3 !important; background:#EAEAEA !important;
  box-shadow:none !important; cursor:not-allowed;
}
#scenarioGeneratePane .at-v38-topics-button:focus-visible {outline:3px solid rgba(240,0,22,.32);outline-offset:2px;}
#scenarioGeneratePane .at-v38-topics-hint {
  position:absolute; bottom:calc(100% + 9px); right:0; z-index:5;
  max-width:min(430px,90vw); padding:10px 13px; border-radius:10px;
  background:#101011; color:#fff; font:700 13px/1.4 Inter,Arial,sans-serif;
  box-shadow:0 8px 24px rgba(0,0,0,.12);
}
#scenarioGeneratePane .at-v38-topics-hint[hidden] {display:none!important;}
#scenarioGeneratePane .at-v38-script-progress {
  display:none; flex:1 1 auto; min-height:0; width:100%;
  flex-direction:column; align-items:center; justify-content:center; gap:23px;
  padding:26px; background:#FBFBFA; border:1px solid #E9E9E7; border-radius:12px;
  text-align:center;
}
#scenarioGeneratePane.at-v38-generating .at-v38-script-progress {display:flex !important;}
#scenarioGeneratePane.at-v38-generating .at-private-script-empty,
#scenarioGeneratePane.at-v38-generating #scenarioGeneratedLocalized {display:none !important;}
#scenarioGeneratePane .at-v38-progress-ring {display:block; width:min(240px,55%); height:auto; max-height:45vh; overflow:visible;}
#scenarioGeneratePane .at-v38-ring-track {fill:none;stroke:#EDEDED;stroke-width:13;}
#scenarioGeneratePane .at-v38-ring-value {
  fill:none;stroke:#F00016;stroke-width:13;stroke-linecap:round;
  transform-origin:120px 120px; transform:rotate(-90deg);
  transition:stroke-dashoffset .4s linear;
}
#scenarioGeneratePane .at-v38-ring-value.at-v38-indeterminate {animation:at-v38-spin 1.6s linear infinite;}
#scenarioGeneratePane .at-v38-percent {font:900 49px/1 Inter,Arial,sans-serif;fill:#101011;letter-spacing:-.05em;}
#scenarioGeneratePane .at-v38-loading-label {font:900 clamp(19px,1.55vw,25px)/1.25 Inter,Arial,sans-serif;color:#101011;letter-spacing:-.03em;}
@keyframes at-v38-spin {to {transform:rotate(270deg);}}
@media(max-width:850px){
 #scenarioGeneratePane .at-v38-progress-ring{width:190px;max-height:210px;}
 #scenarioGeneratePane .at-v38-script-progress{min-height:300px;}
 #scenarioGeneratePane .at-v38-topics-button{padding-inline:12px!important;}
}
@media(prefers-reduced-motion:reduce){#scenarioGeneratePane .at-v38-ring-value{animation:none!important;transition:none!important;}}
html[data-autotube-theme="dark"] #scenarioGeneratePane .at-v38-script-progress{background:#202124;border-color:#434343;}
html[data-autotube-theme="dark"] #scenarioGeneratePane .at-v38-loading-label{color:#F5F5F5;}
html[data-autotube-theme="dark"] #scenarioGeneratePane .at-v38-percent{fill:#F5F5F5;}
/* AUTOTUBE_USER1_SCENARIO_UX_V38_END */
/* Override the older V3.5 :has() rule even while localized text is empty. */
html:not([data-autotube-theme="dark"]) body #scenarioGeneratePane.at-v38-generating .scenario-generation-results:has(#scenarioGeneratedLocalized:placeholder-shown) .at-private-script-empty,
html:not([data-autotube-theme="dark"]) body #scenarioGeneratePane.at-v38-generating .scenario-generation-results:not(:has(#scenarioGeneratedLocalized:placeholder-shown)) .at-private-script-empty,
html[data-autotube-theme="dark"] body #scenarioGeneratePane.at-v38-generating .scenario-generation-results .at-private-script-empty {
  display:none!important;
}
html:not([data-autotube-theme="dark"]) body #scenarioGeneratePane.at-v38-generating .scenario-generation-results .text-section:has(#scenarioGeneratedLocalized) .at-v38-script-progress {
  display:flex!important;
  flex:1 1 auto!important;
}
