/* Shared loading and AI answer layout. Palette restored to pre-standard-theme version. */
/* The already-approved diamond remains the only temporary loading animation. */
.brand-loading-page{height:var(--brand-loading-height,calc(100dvh - 112px));min-height:240px;box-sizing:border-box;padding-top:var(--brand-loading-offset,0px)}
dialog.context-drawer .cx-body:has(>.brand-loading-surface){display:flex;flex-direction:column}
dialog.context-drawer .cx-body>.brand-loading-surface{flex:1;min-height:240px}
.wp-loading:has(>.brand-loading-surface){display:block}
/* Question → explicit confirmation → shared loading → model-style answer. */
body:has(.plane-shell) dialog.scene-answer-dialog .cx-body{padding:26px 30px;min-height:0}
body:has(.plane-shell) dialog.scene-answer-dialog .cx-body:has(.sa-state-ready,.sa-state-loading,.sa-refresh-confirm){display:flex;flex-direction:column}
dialog.scene-answer-dialog .sa-body{padding:0;min-width:0;color:var(--text);width:100%;margin:0 auto}
dialog.scene-answer-dialog .sa-state-ready,dialog.scene-answer-dialog .sa-state-loading{display:flex;flex:1;flex-direction:column;min-height:100%}
.scene-answer-dialog .sa-question{max-width:88%;margin:0 0 30px auto;padding:15px 19px;background:var(--soft,#f0f2f5);border-radius:17px 17px 5px 17px;overflow-wrap:anywhere}
.scene-answer-dialog .sa-question>span{display:block;font-size:12px;color:var(--muted);margin-bottom:6px}
.scene-answer-dialog .sa-question h2{font-size:17px!important;font-weight:500!important;line-height:1.8;margin:0!important}
.scene-answer-dialog .sa-search-stage,.scene-answer-dialog .sa-pending{flex:1;display:flex;align-items:center;justify-content:center;flex-direction:column;min-height:300px;padding:28px 20px;text-align:center}
.scene-answer-dialog .sa-search-stage>div{width:100%;max-width:510px}
.scene-answer-dialog .sa-search-art{width:100px;height:100px;display:block;margin:0 auto 20px;color:var(--cs-accent,#648899);fill:none;stroke:currentColor}
.scene-answer-dialog .sa-search-stage h3,.scene-answer-dialog .sa-search-stage h2{font-size:21px!important;line-height:1.5;font-weight:600;margin:0 0 13px}
.scene-answer-dialog .sa-search-stage p{font-size:14px;line-height:1.9;color:var(--muted);margin:0 auto 20px}
.scene-answer-dialog .sa-search-stage .btn.primary{min-width:148px;min-height:40px;background:#006399;border-color:#006399;color:#fff}
.scene-answer-dialog .sa-confirm-actions{display:flex;justify-content:center;gap:12px;margin-top:26px}
.scene-answer-dialog .sa-confirm-question{font-size:16px;line-height:1.8;color:var(--text);margin-top:18px}
.scene-answer-dialog .sa-refresh-confirm{width:100%}
.scene-answer-dialog .sa-pending{gap:0}
.scene-answer-dialog .sa-pending h3{margin:24px 0 10px;font-size:17px}
.scene-answer-dialog .sa-pending p{font-size:13px;color:var(--muted);line-height:1.8}
.scene-answer-dialog .sa-conversation{max-width:820px}
.scene-answer-dialog .sa-response{margin:0}
.scene-answer-dialog .sa-assistant-head{display:flex;gap:11px;align-items:center;margin-bottom:24px;padding:0;border:0}
.scene-answer-dialog .sa-assistant-head .platform-name{font-size:0;display:flex;flex:none}
.scene-answer-dialog .sa-assistant-head .platform-icon{width:32px;height:32px;display:block}
.scene-answer-dialog .sa-assistant-head>div{display:flex;flex-direction:column;gap:2px}
.scene-answer-dialog .sa-assistant-head strong{font-size:15px;font-weight:600}
.scene-answer-dialog .sa-assistant-head>div>span{font-size:12px;color:var(--muted)}
.scene-answer-dialog .sa-copy-answer{margin-left:auto;font-size:12px;min-height:28px;padding:3px 9px}
.scene-answer-dialog .sa-answer{white-space:normal;font-size:16px;line-height:1.9;overflow-wrap:anywhere;color:var(--text);padding:0}
.scene-answer-dialog .sa-answer p{font-size:16px;line-height:1.95;margin:0 0 18px;color:inherit}
.scene-answer-dialog .sa-answer :is(h2,h3,h4){font-size:18px!important;font-weight:600!important;line-height:1.7;margin:28px 0 12px!important;color:inherit}
.scene-answer-dialog .sa-answer :is(ul,ol){padding-left:24px;margin:16px 0 24px}
.scene-answer-dialog .sa-answer li{padding-left:3px;margin:10px 0;line-height:1.9}
.scene-answer-dialog .sa-answer strong{font-weight:600}
.scene-answer-dialog .sa-answer .document-table{max-width:100%;overflow-x:auto;margin:22px 0 26px;border-radius:8px;border:1px solid var(--line)}
.scene-answer-dialog .sa-answer table{border-collapse:collapse;width:100%;min-width:480px;table-layout:auto;font-size:14px;line-height:1.8;margin:0}
.scene-answer-dialog .sa-answer :is(th,td){padding:12px 15px;border:0;border-bottom:1px solid var(--line);border-right:1px solid var(--line);text-align:left;vertical-align:top;white-space:normal;overflow-wrap:anywhere;min-width:0}
.scene-answer-dialog .sa-answer th{background:var(--soft,#f0f2f5);font-weight:600}
.scene-answer-dialog .sa-answer :is(th,td):last-child{border-right:0}
.scene-answer-dialog .sa-answer tr:last-child td{border-bottom:0}
.scene-answer-dialog .sa-answer blockquote{margin:20px 0;padding:12px 18px;border-left:2px solid var(--line);color:var(--muted);background:var(--soft,#f8f9fb)}
.scene-answer-dialog .sa-answer pre{padding:18px;background:var(--soft,#f0f2f5);border-radius:9px;overflow-x:auto;white-space:pre;font-size:14px;line-height:1.8}
.scene-answer-dialog .sa-answer code{font-size:14px;line-height:1.8;background:var(--soft,#f0f2f5);border-radius:4px;padding:2px 4px}
.scene-answer-dialog .sa-answer pre>code{padding:0;background:none}
.scene-answer-dialog .sa-answer a{color:#006399;text-decoration:underline;text-underline-offset:3px}
.scene-answer-dialog .sa-source{margin-top:26px;padding-top:15px;border-top:1px solid var(--line);font-size:12px;line-height:1.8;color:var(--muted)}
.scene-answer-dialog .sa-evidence{margin-top:30px;border-top:1px solid var(--line);padding-top:23px}
.scene-answer-dialog .sa-evidence h3{display:flex;align-items:center;gap:8px;font-size:14px;line-height:1.8;margin:0 0 15px}
.scene-answer-dialog .sa-evidence p{font-size:14px;color:var(--muted);line-height:1.8}
.scene-answer-dialog .sa-entities{gap:10px;display:flex;flex-wrap:wrap}
.scene-answer-dialog .sa-entities>span{padding:9px 12px;background:var(--cs-wash,#eef3f5);border-radius:8px}
.scene-answer-dialog .sa-entities strong{font-size:13px;color:var(--cs-accent,#648899)}
.scene-answer-dialog .sa-note{font-size:12px;line-height:1.9;color:var(--muted);margin-top:24px}
.scene-answer-dialog .sa-error{font-size:14px;line-height:1.8;background:#f9eaed;color:#ad4651;border-radius:8px;padding:14px 18px}
html.dark .scene-answer-dialog .sa-question{background:#29313b}
html.dark .scene-answer-dialog .sa-answer a{color:#84b9de}
@media(max-width:700px){body:has(.plane-shell) dialog.scene-answer-dialog .cx-body{padding:20px 17px}.scene-answer-dialog .sa-question{max-width:96%;padding:13px 15px}.scene-answer-dialog .sa-question h2{font-size:16px!important}.scene-answer-dialog .sa-search-stage{padding-inline:4px;min-height:280px}.scene-answer-dialog .sa-answer,.scene-answer-dialog .sa-answer p{font-size:15px}.scene-answer-dialog .sa-answer :is(th,td){padding:10px 12px}.scene-answer-dialog .sa-search-stage p{font-size:13px}.scene-answer-dialog .sa-search-art{width:86px;height:86px}}

.scene-answer-dialog .sa-search-stage :is(h2,h3,p){text-align:center!important}
body:has(.plane-shell) dialog.scene-answer-dialog .sa-search-stage .btn.primary{min-height:40px!important;padding:9px 20px!important;font-size:14px!important}

.scene-answer-dialog .sa-search-stage :is(h2,h3){display:block!important;justify-content:center!important;width:100%;text-align:center!important}
dialog.scene-dialog .scene-dialog-content:has(>.brand-loading-dialog){display:flex;flex-direction:column}dialog.scene-dialog .scene-dialog-content>.brand-loading-dialog{flex:1;min-height:240px}
