.chat-import-page{display:grid;gap:20px;max-width:1100px;margin-inline:auto}
.chat-import-page .card{padding:22px}
.chat-import-page .stack{display:grid;gap:16px}
.chat-import-page label{display:grid;gap:7px;font-weight:600}
.chat-import-page input,.chat-import-page select{width:100%;min-height:42px}
.chat-import-picker{position:relative}
.chat-import-picker input.sr-only{position:absolute;width:1px;height:1px;min-height:1px;opacity:0;overflow:hidden}
.chat-import-picker-button{display:inline-flex;align-items:center;justify-content:center;min-height:42px;width:max-content;padding:0 18px;border:1px solid var(--border,#dbe5e3);border-radius:9px;background:var(--surface,#fff);cursor:pointer}
.chat-import-preview{display:grid;gap:14px;padding:18px;border:1px solid var(--border,#dbe5e3);border-radius:12px;background:var(--surface,#fff)}
.chat-import-preview h3,.chat-import-page h2{margin:0}
.chat-import-link{display:flex;align-items:end;gap:12px;flex-wrap:wrap}
.chat-import-link label{min-width:min(100%,440px);flex:1}
.chat-import-messages{display:grid;gap:10px}
.chat-import-message{max-width:85%;padding:10px 14px;border:1px solid var(--border,#dbe5e3);border-radius:12px;white-space:pre-wrap;overflow-wrap:anywhere}
.chat-import-message.outgoing{margin-inline-start:auto;background:#e9f4f0}
.chat-import-message.incoming{margin-inline-end:auto;background:var(--surface,#fff)}
.chat-import-message header{display:flex;justify-content:space-between;gap:14px;font-size:.9em}
.chat-import-message time{color:var(--muted,#65746f)}
.chat-import-message p{margin:8px 0 0}
@media(max-width:680px){.chat-import-page .card{padding:14px}.chat-import-message{max-width:100%}}
.chat-import-detail{display:grid;grid-template-columns:minmax(250px,320px) minmax(0,1fr);max-width:none;gap:0;height:min(72vh,760px);border:1px solid #d1d7db;border-radius:10px;overflow:hidden;background:#fff}
.chat-import-threads{overflow:auto;border-inline-end:1px solid #d1d7db;background:#fff}
.chat-import-threads>header{padding:18px;background:#f0f2f5;border-bottom:1px solid #d1d7db}
.chat-import-thread{display:grid;gap:5px;padding:16px;border-bottom:1px solid #edf0f2;color:#111b21;text-decoration:none}
.chat-import-thread.selected,.chat-import-thread:hover{background:#e9edef}
.chat-import-thread small{color:#667781}
.chat-import-chat{display:flex;flex-direction:column;min-width:0;min-height:0;background:#efeae2}
.chat-import-chat-head{padding:14px 18px;background:#f0f2f5;display:grid;gap:4px}
.chat-import-chat-head h2{font-size:18px;margin:0}.chat-import-chat-head small{color:#667781}
.chat-import-settings{padding:10px 18px;background:#fff;border-bottom:1px solid #d1d7db;max-height:45%;overflow:auto}
.chat-import-settings summary{cursor:pointer;font-weight:700;color:#174a3f}
.chat-import-settings .chat-import-link{margin:12px 0}.chat-import-settings .chat-import-link label{min-width:180px}
.chat-import-messages.messages{flex:1;min-height:0;overflow:auto;padding:24px 6%;display:flex;flex-direction:column;gap:10px;background-color:#efeae2;background-image:radial-gradient(#c7c2b870 .7px,transparent .7px);background-size:20px 20px}
.chat-import-messages .bubble{max-width:78%;padding:9px 12px;border-radius:8px;background:#fff;color:#111b21;box-shadow:0 1px 1px #0b141a22;white-space:pre-wrap;overflow-wrap:anywhere}
.chat-import-messages .bubble.outgoing{background:#d9fdd3;color:#111b21;align-self:flex-end}
.chat-import-messages .bubble.incoming{align-self:flex-start}
.chat-import-messages .bubble small{display:block;text-align:end;color:#667781;font-size:11px;margin-top:5px}
.chat-import-messages .bubble.outgoing small{color:#54656f}
.chat-import-messages .wa-inline-image,.chat-import-messages .wa-inline-video{max-width:min(100%,340px);max-height:340px;object-fit:contain;border-radius:8px}
.chat-import-messages .wa-inline-audio{max-width:100%}
.chat-import-messages .wa-document{display:block;white-space:normal;overflow-wrap:anywhere}
@media(max-width:700px){.chat-import-detail{display:flex;flex-direction:column;height:82vh}.chat-import-threads{max-height:145px;border-inline-end:0;border-bottom:1px solid #d1d7db}.chat-import-thread{display:none}.chat-import-thread.selected{display:grid}.chat-import-chat{flex:1}.chat-import-messages .bubble{max-width:92%}}
.chat-import-form{gap:14px!important}.chat-import-form-head{display:flex;align-items:center;justify-content:space-between;gap:12px}
.chat-import-form .chat-import-picker{display:flex;align-items:center;gap:14px}.chat-import-form .chat-import-preview{border:0;padding:0;background:transparent}
.chat-import-preview>p{margin:0;color:#667781}.chat-import-fields{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:14px}
.chat-import-preview>.primary{justify-self:start}.chat-import-conversation{height:min(76vh,800px);max-width:none;margin:0;min-height:450px}
.chat-import-conversation .wa-web-threads{border-inline-end:1px solid #d1d7db}.chat-import-conversation .wa-web-thread{text-decoration:none;color:#111b21}
.chat-import-conversation .wa-web-chat-head{gap:12px}.chat-import-conversation .wa-web-chat-identity{flex:1}
.chat-import-conversation .messages{display:flex;flex-direction:column}.chat-import-conversation .messages .bubble{width:max-content;max-width:78%;color:#111b21}
.chat-import-conversation .messages .bubble.outgoing{align-self:flex-end;color:#111b21}.chat-import-conversation .messages .bubble.incoming{align-self:flex-start}
.chat-import-conversation .messages .bubble.outgoing small{color:#54656f}.chat-import-conversation .wa-message-sender-label{color:#174a3f}
.chat-import-conversation .wa-web-body{white-space:pre-wrap;overflow-wrap:anywhere}.chat-import-conversation .wa-web-body:empty{display:none}
.chat-import-conversation .message-date{align-self:center}
.chat-import-conversation .chat-import-settings{max-height:48%;padding:10px 18px}
.chat-import-settings-grid{display:flex;gap:24px;padding:12px 0}.chat-import-settings-grid>div{display:grid;gap:3px}.chat-import-settings-grid small{color:#667781}
.chat-import-controls{display:flex;gap:10px;align-items:end;flex-wrap:wrap;padding:9px 0}.chat-import-controls label{flex:1;min-width:180px}.chat-import-controls button{min-height:42px}
.chat-import-media-picker{display:flex!important;align-items:center;gap:12px;padding:12px 0}
.chat-import-open-button{white-space:nowrap}.chat-import-dialog:not(.drawer){width:90vw;max-width:90vw;height:90vh;max-height:90vh;padding:0;overflow:hidden;display:flex;flex-direction:column}
.chat-import-dialog>.heading{min-height:56px;padding:10px 18px;margin:0;border-bottom:1px solid #d1d7db;flex:0 0 auto}.chat-import-dialog .chat-import-conversation{height:auto;flex:1;min-height:0;border:0;border-radius:0}
@media(max-width:700px){.chat-import-fields{grid-template-columns:1fr}.chat-import-conversation{height:76vh}.chat-import-dialog:not(.drawer){width:90vw;max-width:90vw}.chat-import-dialog .wa-web-threads{width:38%}.chat-import-dialog .wa-web-chat{width:62%}.chat-import-dialog .wa-web-thread{min-height:70px}.chat-import-dialog .wa-web-thread .wa-web-avatar{display:none}.chat-import-dialog .messages .bubble{max-width:94%}}
main.content:has(> #view > .chat-import-conversation){height:calc(100dvh - 56px);min-height:0;display:flex;flex-direction:column;overflow:hidden}
main.content:has(> #view > .chat-import-conversation)>#view{flex:1;min-height:0;display:flex}
main.content:has(> #view > .chat-import-conversation) .chat-import-conversation{height:100%;min-height:0;flex:1}
.chat-import-conversation .chat{min-height:0}
.chat-import-conversation .messages{min-height:0;overflow-y:auto;overscroll-behavior:contain}
.chat-import-conversation .wa-web-thread-copy .chat-import-department-title{color:#00694d;font-size:15px;line-height:1.5}
.chat-import-conversation .wa-web-thread-copy .chat-import-department-number{display:block;color:#174a3f;font-size:12px;font-weight:700;line-height:1.7;margin-top:3px}
.chat-import-conversation .chat-import-peer-line{display:block;color:#667781;font-size:11px;line-height:1.7;margin-top:6px}
.chat-import-dialog .dialog-scroll-body{display:flex;flex:1;min-height:0;overflow:hidden}
.chat-import-dialog .dialog-scroll-body>.chat-import-conversation{height:100%;min-height:0;flex:1}
.chat-import-searchbar{display:flex;align-items:center;gap:10px;padding:10px 14px;background:#f0f2f5;border-bottom:1px solid #d1d7db}
.chat-import-searchbar[hidden]{display:none}
.chat-import-searchbar input{flex:1;min-width:0;min-height:38px;margin:0;background:white}
.chat-import-search-count{white-space:nowrap;color:#54656f;font-size:12px}
.chat-import-searchbar button{min-width:38px;min-height:38px;padding:0;font-size:22px;line-height:1}
@media(max-width:760px){.chat-import-conversation{display:flex;flex-direction:column}.chat-import-conversation .wa-web-threads{flex:none;max-height:132px}.chat-import-conversation .wa-web-chat{display:flex;flex:1;min-height:0}.chat-import-dialog .chat-import-conversation .wa-web-threads{width:100%;max-height:100px}.chat-import-dialog .chat-import-conversation .wa-web-chat{width:100%}}
main.content:has(> #view > .chat-import-conversation)>.page-intro{display:none}main.content:has(> #view > .chat-import-conversation){padding:0;max-width:none;height:calc(100dvh - 64px)}.chat-import-conversation .messages{overflow-anchor:auto}.chat-import-thread-card{position:relative}.chat-import-thread-card:has(.chat-import-settings)>.wa-web-thread{padding-inline-end:45px}.chat-import-conversation .thread-list .chat-import-settings{position:static;max-height:none;overflow:visible;margin:0;padding:0;border:0;background:transparent}.chat-import-conversation .thread-list .chat-import-settings>summary{position:absolute;inset-inline-end:9px;top:11px;z-index:2;display:grid;place-items:center;width:31px;height:31px;min-height:31px;padding:0;border:1px solid #c8d9d0;border-radius:8px;background:#fff;color:#17634f;font:700 21px/1 Arial,sans-serif;list-style:none;cursor:pointer}.chat-import-conversation .thread-list .chat-import-settings>summary::-webkit-details-marker{display:none}.chat-import-conversation .thread-list .chat-import-settings[open]>summary{background:#def0e8}.chat-import-settings-content{max-height:min(52vh,480px);overflow:auto;padding:14px;border-bottom:1px solid #d1d7db;background:#fff}.chat-import-settings-content h3{margin:0 0 8px;font-size:14px;color:#174a3f}.chat-import-settings-grid{flex-wrap:wrap;gap:10px}.chat-import-settings-grid>div{min-width:0}.chat-import-settings-grid strong{overflow-wrap:anywhere}.chat-import-settings-content .chat-import-controls{display:grid;gap:6px}.chat-import-settings-content .chat-import-controls label{min-width:0}.chat-import-settings-content .chat-import-controls button{justify-self:start;min-height:34px}.chat-import-settings-content input,.chat-import-settings-content select{width:100%;min-width:0}.chat-import-settings-content .chat-import-media-picker{display:grid!important;gap:7px}
