/* One quiet treatment for editor failures; progress and success stay neutral. */
:is(#imageStudio, .image-studio-page) :is(
  .studio-outage-notice, [data-error]:not(#studioBatchError),
  .style-library [role=alert]:not(:empty), .video-history-panel [role=alert],
  .studio-progress-overlay:has(.studio-batch[data-state=error])
) {
  padding:10px 14px;
  border:1px solid #dba8a1;
  border-radius:10px;
  background:#fffaf0;
  color:#73504b;
  font-size:14px;
  line-height:1.5;
  overflow-wrap:anywhere;
}
/* Boxes line up with the composer's content, not its outer edge. */
#imageStudio #studioNotice[data-error], #imageStudio .studio-save[data-error] { margin:0 15px 8px; }
#imageStudio #studioNotice[data-error] { text-wrap:pretty; }
#imageStudio #studioNotice[data-error] a { margin-left:0; }
/* The filters' own words under a declined notice, two lines until expanded. */
#imageStudio .studio-feedback:has(.studio-error-detail.is-open) { max-height:min(360px, calc(var(--viewport, 100dvh) * .45)); }
#imageStudio .studio-error-detail { display:flex; align-items:flex-start; gap:8px; margin-top:8px; padding-left:12px; border-left:2px solid #e7c9c4; }
#imageStudio .studio-error-text { flex:1; min-width:0; display:-webkit-box; -webkit-box-orient:vertical; -webkit-line-clamp:2; line-clamp:2; overflow:hidden; }
#imageStudio .studio-error-detail.is-open .studio-error-text { display:block; -webkit-line-clamp:unset; line-clamp:none; }
#imageStudio .studio-error-more { flex:none; display:grid; place-items:center; width:32px; height:32px; margin:-4px -8px -4px 0; padding:0; border:0; border-radius:6px; background:none; color:inherit; cursor:pointer; }
#imageStudio .studio-error-more[hidden] { display:none; }
#imageStudio .studio-error-more svg { width:16px; height:16px; fill:none; stroke:currentColor; stroke-width:1.8; stroke-linecap:round; stroke-linejoin:round; transition:transform .15s; }
#imageStudio .studio-error-detail.is-open .studio-error-more svg { transform:rotate(180deg); }
#imageStudio #studioNotice[data-error]:has(.studio-error-detail) { max-height:none; }
@media(max-width:760px) { #imageStudio :is(#studioNotice, .studio-save)[data-error] { margin-left:11px; margin-right:11px; } }
@media(max-width:350px) { #imageStudio :is(#studioNotice, .studio-save)[data-error] { margin-left:10px; margin-right:10px; } }
#imageStudio .studio-batch[data-state=error] { color:inherit; }
#imageStudio[data-input=keyboard] .studio-batch[data-state=error] :is(a,button):focus-visible { outline-color:#73504b; }
@media(max-width:760px), (pointer:coarse) {
  :is(#imageStudio, .image-studio-page) :is(
    .studio-outage-notice, [data-error]:not(#studioBatchError),
    .style-library [role=alert]:not(:empty), .video-history-panel [role=alert],
    .studio-progress-overlay:has(.studio-batch[data-state=error])
  ) { font-size:16px; line-height:1.5; }
}
