.gsrc-dialog{box-sizing:border-box;width:min(440px,calc(100vw - 24px));max-height:88dvh;overflow:auto;border:1px solid #e2e9f1;border-radius:18px;padding:16px;color:#10243b;background:#fff;font:15px/1.5 Avenir,"Segoe UI",Arial,sans-serif;box-shadow:0 18px 60px #10243b55}.gsrc-dialog *{box-sizing:border-box}.gsrc-dialog::backdrop{background:#10243b85}.gsrc-dialog header{display:flex;align-items:center;justify-content:space-between;background:#102b52;color:white;padding:14px;border-radius:12px}.gsrc-dialog header strong,.gsrc-dialog header small{display:block}.gsrc-dialog button{border:0;border-radius:8px;background:#0046af;color:white;padding:10px 14px;cursor:pointer;font:inherit}.gsrc-dialog button:disabled{opacity:.6}.gsrc-dialog .gsrc-close{background:transparent;font-size:24px;padding:0 10px}.gsrc-messages{min-height:110px;max-height:35dvh;overflow:auto;padding:8px 2px}.gsrc-messages p{white-space:pre-wrap;overflow-wrap:anywhere;padding:10px;border-radius:12px;background:#f0f4f8;margin:8px 18px 8px 0}.gsrc-messages .gsrc-user{background:#e3efff;margin:8px 0 8px 24px}.gsrc-notice{font-size:12px;color:#526579;margin:8px 0}.gsrc-chat-form{display:flex;gap:8px}.gsrc-dialog input:not([type=checkbox]),.gsrc-dialog select{min-width:0;width:100%;border:1px solid #b5c4d4;padding:10px;border-radius:8px;font:inherit;color:#10243b;background:white}.gsrc-contact{width:100%;margin-top:8px;background:#087b45!important}.gsrc-lead{padding:10px 0;display:grid;gap:8px}.gsrc-lead[hidden],.gsrc-contact[hidden]{display:none}.gsrc-lead label{display:grid;gap:4px}.gsrc-consent{display:flex!important;align-items:flex-start;font-size:13px}.gsrc-wa{display:block;text-align:center;color:#087b45;margin-top:10px}.gsrc-sr{position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%)}
/* Chat 24h: fixed composer, independently scrolling conversation. */
.gsrc-dialog[open]{display:flex;flex-direction:column;width:min(520px,calc(100vw - 24px));height:min(670px,85dvh);max-height:85dvh;overflow:hidden;gap:8px;padding:14px}.gsrc-dialog header{flex:none;padding:14px 16px}.gsrc-messages{flex:1 1 0;min-height:64px;max-height:none;overflow-y:auto;overscroll-behavior:contain;background:#f8fafc;border-radius:12px;padding:12px}.gsrc-messages p{width:fit-content;max-width:88%;margin:8px auto 8px 0;background:#eaf0f5;padding:11px 14px}.gsrc-messages .gsrc-user{margin:8px 0 8px auto;background:#dbeafe}.gsrc-messages .gsrc-typing{color:#526579;font-size:13px;font-style:italic}.gsrc-notice{flex:none;margin:0;padding:0 3px;font-size:11px}.gsrc-notice summary{cursor:pointer}.gsrc-chat-form{flex:none;margin:0;align-items:stretch}.gsrc-chat-form input{flex:1}.gsrc-chat-form button{white-space:nowrap;flex:none}.gsrc-contact{flex:none;margin:0;width:100%}.gsrc-lead:not([hidden]){flex:none;max-height:35dvh;overflow:auto;overscroll-behavior:contain}.gsrc-wa{flex:none;margin:0;font-size:13px}.gsrc-dialog button:focus-visible,.gsrc-dialog a:focus-visible{outline:2px solid #1756a5;outline-offset:2px}@media(max-width:600px){.gsrc-dialog[open]{width:calc(100vw - 16px);height: min(670px,88dvh);max-height:88dvh;padding:10px}.gsrc-messages{padding:8px}.gsrc-chat-form input{font-size:16px}}

/* Keep the conversation visible; contact opens a separate view. */
.gsrc-dialog[open]{width:min(580px,calc(100vw - 24px));height:min(710px,88dvh);max-height:88dvh}.gsrc-dialog .gsrc-lead[hidden],.gsrc-dialog .gsrc-contact[hidden]{display:none!important}.gsrc-dialog .gsrc-messages{min-height:0;flex:1 1 auto;scroll-behavior:auto}.gsrc-dialog.gsrc-contact-mode .gsrc-messages,.gsrc-dialog.gsrc-contact-mode .gsrc-chat-form,.gsrc-dialog.gsrc-contact-mode .gsrc-contact,.gsrc-dialog.gsrc-contact-mode .gsrc-notice{display:none!important}.gsrc-dialog.gsrc-contact-mode .gsrc-lead:not([hidden]){display:grid!important;flex:1 1 auto;max-height:none;min-height:0;align-content:start;overflow:auto}.gsrc-dialog .gsrc-back{background:#eef5ff;color:#0046af;text-align:left}.gsrc-dialog .gsrc-contact{width:auto;align-self:center;padding:9px 20px}@media(max-width:600px){.gsrc-dialog[open]{width:calc(100vw - 16px);height:min(710px,88dvh)}}

.gsrc-lead-error{color:#9b1c1c;font-size:14px;margin:8px 0 0;}

.gsrc-choices{display:flex;flex-wrap:wrap;gap:8px;margin:8px 0}.gsrc-choices button{background:#fff;color:#0046af;border:1px solid #0046af;font-size:14px;padding:7px 12px}

.gsrc-messages .gsrc-assistant::before{content:"Atendente virtual";display:block;font-size:11px;font-weight:600;color:#526579;margin-bottom:4px}

.gsrc-dialog .gsrc-quick{flex:none;align-self:center;color:#0046af;background:transparent;padding:2px 8px;font-size:13px;text-decoration:underline}.gsrc-dialog .gsrc-quick[hidden],.gsrc-dialog.gsrc-contact-mode .gsrc-quick{display:none!important}

/* Clear, separate authorization and completion states. */
.gsrc-dialog.gsrc-consent-mode .gsrc-chat-form,.gsrc-dialog.gsrc-consent-mode .gsrc-contact,.gsrc-dialog.gsrc-consent-mode .gsrc-quick,.gsrc-dialog.gsrc-consent-mode .gsrc-wa,.gsrc-dialog.gsrc-finished-mode .gsrc-chat-form,.gsrc-dialog.gsrc-finished-mode .gsrc-wa{display:none!important}
.gsrc-consent-choices{display:grid;gap:14px;margin:22px 4px 24px;padding:16px 0 0;border-top:1px solid #d9e3ed}.gsrc-dialog .gsrc-consent-choices button{min-height:44px;padding:12px 16px}.gsrc-dialog .gsrc-consent-choices button:first-child{background:#087b45;color:white;border-color:#087b45}.gsrc-dialog .gsrc-consent-choices button:last-child{background:#fff;color:#526579;border-color:#b5c4d4}.gsrc-finished{display:flex;flex:none;flex-wrap:wrap;gap:12px;padding:12px 0}.gsrc-finished[hidden]{display:none!important}.gsrc-finished button{flex:1 1 145px;min-height:44px}.gsrc-dialog .gsrc-end{background:#eef5ff;color:#0046af}

/* Optional diagnostic answers; free-text input stays visible. */
.gsrc-dialog .gsrc-diagnostic-choices{gap:8px;margin:8px 0 12px}.gsrc-dialog .gsrc-diagnostic-choices button{min-height:38px;text-align:left;border-color:#a6bbd7;background:#fff;color:#124984;overflow-wrap:anywhere}.gsrc-dialog .gsrc-diagnostic-choices button:hover{background:#eaf2fd}@media(max-width:600px){.gsrc-dialog .gsrc-diagnostic-choices button{min-height:44px}}

/* Direct human channels: compact, always accessible outside consent/completion. */
.gsrc-dialog .gsrc-contact{background:#102b52!important;min-height:40px;width:100%;align-self:stretch}.gsrc-dialog .gsrc-wa{background:#087b45;color:#fff;border-radius:8px;padding:9px 12px;text-decoration:none;font-weight:600;min-height:38px}.gsrc-dialog .gsrc-wa:hover{background:#066b3b}

/* Optional evaluation details. */
.gsrc-dialog .gsrc-lead textarea{width:100%;min-width:0;resize:vertical;border:1px solid #b5c4d4;padding:10px;border-radius:8px;font:inherit;color:#10243b;background:white}.gsrc-lead-title{font-size:20px;margin:4px 0 2px;line-height:1.25}.gsrc-lead label{font-size:14px}.gsrc-dialog.gsrc-contact-mode .gsrc-lead{gap:10px}.gsrc-dialog .gsrc-lead .gsrc-consent input{flex:none;margin-top:4px}.gsrc-dialog .gsrc-lead button[type=submit]{min-height:44px}
