.lex-assistant-dialog{width:min(820px,calc(100vw - 32px));height:min(790px,calc(100dvh - 36px));padding:20px;gap:14px;background:#f5f8fd}
.lex-assistant-dialog[open]{display:flex;flex-direction:column}
.lex-assistant-dialog>header{flex:0 0 auto;background:linear-gradient(115deg,#dff2ff,#eae4fc);border-radius:20px;padding:18px;align-items:center;gap:12px}
.lex-header-subtitle{margin:5px 0 0;font-size:12px;color:#52657e}
.lex-assistant-heading-actions{align-self:flex-start}
.lex-action-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px;flex:none}
.lex-action-grid button{min-height:42px;border:1px solid #d6e2f1;border-radius:12px;background:white;color:#17304f;padding:8px;font:inherit;font-size:13px;font-weight:600;cursor:pointer}
.lex-action-grid button:hover{background:#eaf2ff;border-color:#9ab7ed}
.lex-action-grid button[aria-pressed="true"]{background:#4167dc;color:white;border-color:#4167dc;box-shadow:0 3px 8px #4167dc22}
.lex-action-grid button:disabled{opacity:.6;cursor:wait}
.lex-assistant-history{flex:1 1 auto;min-height:100px;margin:0;border:1px solid #e2e9f3;border-radius:18px;padding:16px;background:#eef3f9;scrollbar-width:thin}
.lex-answer{max-width:90%;line-height:1.5;overflow-wrap:anywhere;box-shadow:0 1px 2px #17304f0a;margin:0 0 12px;padding:12px 15px;white-space:pre-wrap}
.lex-answer-question{align-self:flex-end;background:#dceaff;border-radius:16px 16px 4px 16px}
.lex-answer-reply{align-self:flex-start;background:white;border-radius:16px 16px 16px 4px}
.lex-answer .button{display:block;width:fit-content;margin-top:8px}
.lex-message-time{display:block;text-align:right;color:#71839a;font-size:10px;margin-top:5px}
.lex-typing{font-size:13px;color:#52657e;background:#ffffffa6}
.lex-sources{display:flex;flex-direction:column;gap:6px;margin-top:12px;padding-top:10px;border-top:1px solid #e2e9f3;white-space:normal;font-size:12px}
.lex-sources a{color:#2456b8;text-decoration:underline;overflow-wrap:anywhere}
.lex-assistant-form{flex:0 0 auto;grid-template-columns:minmax(0,1fr) auto;align-items:end;gap:10px;margin:0}
.lex-compose-input{display:block}.lex-assistant-form textarea{min-height:62px;max-height:130px;margin:0;background:white;border:1px solid #cad9ed;border-radius:14px;padding:12px;resize:vertical;font-size:14px}
.lex-assistant-form>button{min-height:44px;border-radius:12px;margin-bottom:2px}
.lex-compose-extras{grid-column:1/-1}.lex-compose-extras[hidden],.lex-compose-extras label[hidden]{display:none}
.lex-compose-extras label{display:flex;align-items:center;gap:10px;font-size:12px;color:#52657e;margin:0}
.lex-compose-extras input{width:auto;min-width:0;max-width:100%;font-size:12px;margin:0;padding:5px 8px}
.lex-assistant-status{font-size:12px;margin:0;min-height:0}.lex-assistant-status:empty{display:none}
.lex-sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}
.lex-cad-result{align-self:flex-start;max-width:100%;padding:14px;background:white;border:1px solid #cad9ed;border-radius:16px;display:flex;flex-direction:column;gap:10px}
.lex-cad-result img{max-width:100%;max-height:200px;width:auto;object-fit:contain;align-self:flex-start;border-radius:8px}
.lex-cad-downloads{display:flex;gap:6px;flex-wrap:wrap}.lex-cad-downloads a{font-size:12px;max-width:100%;overflow-wrap:anywhere}
.lex-cad-result small{color:#60728a;font-size:11px}
@media(max-width:600px){.lex-assistant-dialog{padding:12px;gap:10px;width:calc(100vw - 12px);height:calc(100dvh - 12px)}.lex-assistant-dialog>header{padding:12px}.lex-welcome img{width:52px;height:52px}.lex-assistant-dialog h2{font-size:20px}.lex-header-subtitle{font-size:11px}.lex-action-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:6px}.lex-action-grid button{font-size:12px;min-height:38px}.lex-assistant-history{padding:10px}.lex-answer{max-width:95%;font-size:13px}.lex-compose-extras label{align-items:flex-start;flex-direction:column;gap:4px}.lex-assistant-form>button{padding:10px}}

.lex-assistant-heading-actions{flex-wrap:wrap;max-width:300px;justify-content:flex-end}.lex-assistant-heading-actions .button{padding:8px 10px;font-size:12px}.lex-history-panel{position:absolute;right:20px;top:104px;z-index:4;width:min(430px,calc(100% - 40px));max-height:60vh;overflow:auto;background:white;border:1px solid #cbd9e9;border-radius:16px;padding:12px;box-shadow:0 15px 40px #172d4f30}.lex-history-panel[hidden]{display:none}.lex-history-panel input{width:100%;box-sizing:border-box;margin-bottom:10px}.lex-history-item{display:block;text-align:left;width:100%;background:white;border:0;border-bottom:1px solid #e5edf5;padding:12px;cursor:pointer;color:#17304f}.lex-history-item:hover{background:#edf4ff}.lex-history-item strong,.lex-history-item small{display:block}.lex-history-item small{margin-top:5px;color:#637891}@media(max-width:600px){.lex-assistant-heading-actions{max-width:100%;justify-content:flex-start}.lex-history-panel{top:135px}}
.lex-file-chip{display:inline-flex;align-items:center;gap:8px;background:#e6effb;border-radius:9px;padding:3px 8px;margin:3px 5px 0 0;max-width:100%;font-size:12px}.lex-file-chip>span{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.lex-file-chip button{border:0;background:none;color:#31577d;font-size:18px;cursor:pointer}.lex-file-link{display:block;margin-top:8px;font-size:13px;overflow-wrap:anywhere}#lex-chat-files{max-width:100%;font-size:12px}#lex-selected-files{display:block}#lex-cad-attach{min-width:0}
.lex-cad-choice{flex:none;padding:14px;border:1px solid #a5bee8;border-radius:14px;background:#fff;color:#17304f;box-shadow:0 4px 15px #17304f12}.lex-cad-choice p{font-size:13px;line-height:1.45;margin:7px 0 12px}.lex-cad-choice>div{display:flex;flex-wrap:wrap;gap:8px}.lex-cad-choice .button{margin:0;font-size:12px}
