.safety-actions{display:inline-flex;gap:.35rem;flex-wrap:wrap;margin:.5rem 0}.safety-actions button{font-size:.85rem;padding:.4rem .6rem}.safety-text{white-space:pre-wrap;overflow-wrap:anywhere;max-height:20rem;overflow:auto}#safetyDescription,#safetyNote{min-height:6rem;width:100%}

/* 20261120: review text, preview and actions must stack vertically. */
#modal.media-dialog:has(#safetyReturn){box-sizing:border-box;padding:12px!important;padding-bottom:calc(12px + env(safe-area-inset-bottom))!important;background:var(--card,#fff)!important;color:var(--text,#193b48)!important}
#modal.media-dialog:has(#safetyReturn) #form{display:flex!important;flex-direction:column!important;height:100%;min-height:0;gap:10px!important}
#modal.media-dialog:has(#safetyReturn) .dialoghead{position:static!important;display:flex!important;flex:0 0 auto;padding:0!important;background:transparent!important}
#modal.media-dialog:has(#safetyReturn) .dialoghead h2{white-space:normal!important;color:inherit!important;font-size:1.1rem!important}
#modal.media-dialog:has(#safetyReturn) #fields{display:flex!important;flex-direction:column!important;flex:1 1 0;min-width:0;min-height:0;width:100%;height:auto!important;gap:10px;overflow:hidden}
#modal.media-dialog:has(#safetyReturn) .safety-review-note{flex:0 0 auto;margin:0;font-size:.9rem;line-height:1.4;overflow-wrap:anywhere}
#modal.media-dialog:has(#safetyReturn) #mediaHost{position:relative;display:flex;flex-direction:column;flex:1 1 0;min-width:0;min-height:120px;width:100%;height:auto!important;overflow:hidden;border:1px solid var(--line,#c9dbe3);border-radius:10px;background:#18232b}
#modal.media-dialog:has(#safetyReturn) .media-toolbar{position:static!important;transform:none!important;display:flex;flex:0 0 auto;flex-wrap:wrap!important;gap:6px!important;margin:0;padding:6px!important;border-radius:0!important;background:var(--card,#fff)!important;color:var(--text,#193b48)!important;box-shadow:none!important}
#modal.media-dialog:has(#safetyReturn) .media-toolbar button{width:40px!important;height:40px!important;min-height:40px!important;margin:0;padding:4px!important;font-size:1rem!important;background:var(--soft,#e7f1f5)!important;color:inherit!important}
#modal.media-dialog:has(#safetyReturn) .media-stage{flex:1 1 0;min-height:0;width:100%;height:auto!important;padding:8px!important;overflow:auto;background:#18232b}
#modal.media-dialog:has(#safetyReturn) .media-stage .fullscreen-image{object-fit:contain;min-width:0}
#modal.media-dialog:has(#safetyReturn) .safety-review-controls{display:flex;flex:0 0 auto;gap:8px;width:100%}
#modal.media-dialog:has(#safetyReturn) #safetyReturn{flex:0 0 auto;width:auto;min-height:44px;margin:0;padding:10px 16px;white-space:nowrap}
#modal.media-dialog:has(#safetyReturn) #submit{flex:0 0 auto;min-height:44px;margin:0}
html[data-theme="dark"] #modal.media-dialog:has(#safetyReturn){background:#171717!important;color:#eee!important}
html[data-theme="dark"] #modal.media-dialog:has(#safetyReturn) .media-toolbar{background:#242424!important;color:#eee!important}
html[data-theme="dark"] #modal.media-dialog:has(#safetyReturn) .media-toolbar button{background:#333!important;color:#eee!important}
