/* Sanivio Chat — widget responsivo. Estilos isolados da página hospedadora. */
.snv-chat-root {--snv-chat-brand:#067fa6; --snv-chat-ink:#16384d; --snv-chat-line:#dce7ee; position:fixed;right:24px;bottom:24px;z-index:2147481000;font:14px/1.45 system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;color:var(--snv-chat-ink);box-sizing:border-box}
.snv-chat-root *,.snv-chat-root *::before,.snv-chat-root *::after{box-sizing:border-box}
.snv-chat-root button,.snv-chat-root textarea{font:inherit}
.snv-chat-root [hidden]{display:none!important}
.snv-chat-root.snv-chat-left{right:auto;left:24px}
.snv-chat-launcher{border:0;cursor:pointer;color:#fff;background:var(--snv-chat-brand);padding:14px 20px;border-radius:100px;display:flex;align-items:center;justify-content:center;gap:10px;box-shadow:0 9px 26px #0b355842;font-weight:700;min-height:56px}
.snv-chat-launcher:hover{filter:brightness(.94)}
.snv-chat-icon{font-size:24px;line-height:1;font-weight:500}
.snv-chat-panel{display:flex;flex-direction:column;position:absolute;bottom:72px;right:0;width:min(390px,calc(100vw - 24px));height:min(610px,calc(100dvh - 120px));background:#fff;border:1px solid var(--snv-chat-line);border-radius:17px;overflow:hidden;box-shadow:0 16px 60px #133f5e3b;animation:snv-chat-rise .2s ease-out}
.snv-chat-left .snv-chat-panel{right:auto;left:0}
.snv-chat-header{background:var(--snv-chat-brand);color:white;padding:16px;display:flex;align-items:center;justify-content:space-between;min-height:75px}
.snv-chat-identity{display:flex;gap:11px;align-items:center;min-width:0}
.snv-chat-avatar{flex:0 0 44px;width:44px;height:44px;border-radius:50%;background:#ffffff36;display:flex;align-items:center;justify-content:center;font-size:20px;font-weight:750;overflow:hidden}
.snv-chat-avatar img{width:100%;height:100%;object-fit:cover}
.snv-chat-titles{display:flex;flex-direction:column;min-width:0;gap:2px}.snv-chat-titles strong{font-size:15px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.snv-chat-status{font-size:11px;opacity:.94}
.snv-chat-status[data-error="1"]{color:#ffe1ad}
.snv-chat-close{background:#ffffff20;border:0;border-radius:9px;color:#fff;padding:7px 11px;cursor:pointer}
.snv-chat-close:hover{background:#ffffff38}
.snv-chat-history{padding:18px 14px;display:flex;flex:1;flex-direction:column;align-items:flex-start;gap:10px;overflow-y:auto;overscroll-behavior:contain;background:#f7fbfc}
.snv-chat-message{padding:10px 12px;max-width:88%;border:1px solid #deebef;background:white;border-radius:13px 13px 13px 4px;box-shadow:0 2px 9px #13486410;overflow-wrap:anywhere}
.snv-chat-message.is-visitor{align-self:flex-end;background:#daf4e9;border-color:#cae8dd;border-radius:13px 13px 4px 13px}
.snv-chat-message-by{display:block;color:#68818e;font-size:10px;font-weight:700;margin-bottom:4px}
.snv-chat-message-text{white-space:pre-wrap;line-height:1.48}
.snv-chat-message-text a{color:#087fa5;text-decoration:underline;overflow-wrap:anywhere}
.snv-chat-quick-actions{padding:9px 12px 3px;display:flex;flex-wrap:wrap;gap:7px;background:white}
.snv-chat-choice{background:#e7f5f9;border:1px solid #c0e0ea;border-radius:18px;padding:7px 11px;color:#16627b;font-size:12px;cursor:pointer}
.snv-chat-choice:hover{background:#d4edf3}
.snv-chat-alert{margin:8px 12px 0;padding:9px 12px;background:#fff0ea;border:1px solid #f3c8b9;border-radius:10px;color:#9a3c2b;font-size:12px}
.snv-chat-compose{padding:12px;display:flex;gap:8px;background:white;border-top:1px solid var(--snv-chat-line)}
.snv-chat-compose textarea{flex:1;min-width:0;min-height:46px;max-height:125px;resize:vertical;border:1px solid #cbdde6;border-radius:10px;padding:10px;background:white;color:var(--snv-chat-ink);outline:0;font-size:13px}
.snv-chat-compose textarea:focus{border-color:var(--snv-chat-brand);box-shadow:0 0 0 3px #067fa620}
.snv-chat-send{background:var(--snv-chat-brand);border:0;border-radius:10px;color:white;font-weight:750;padding:8px 14px;cursor:pointer}
.snv-chat-send:disabled{opacity:.55;cursor:not-allowed}
.snv-chat-footer{padding:4px 12px 12px;display:flex;align-items:center;gap:8px;flex-wrap:wrap;background:white}
.snv-chat-human{border:1px solid #d2e2e9;background:#f1f8fb;border-radius:20px;padding:6px 12px;color:#166781;font-weight:700;cursor:pointer;font-size:11px}
.snv-chat-human:disabled{opacity:.5;cursor:not-allowed}
.snv-chat-privacy{flex:1 1 100%;font-size:10px;color:#788d99}.snv-chat-footer a{font-size:11px;color:#087392}
.snv-chat-root button:focus-visible,.snv-chat-root a:focus-visible{outline:3px solid #ffcf66;outline-offset:3px}
@keyframes snv-chat-rise{from{opacity:0;transform:translateY(10px)}to{opacity:1;transform:translateY(0)}}
@media(max-width:500px){.snv-chat-root,.snv-chat-root.snv-chat-left{right:12px;left:auto;bottom:12px}.snv-chat-panel,.snv-chat-left .snv-chat-panel{right:0;left:auto;bottom:68px;width:calc(100vw - 24px);height:min(660px,calc(100dvh - 100px));border-radius:15px}.snv-chat-launcher{padding:12px 16px}}
@media(prefers-reduced-motion:reduce){.snv-chat-panel{animation:none}}

.snv-chat-form-field{width:100%;min-width:0;padding:12px;border-radius:8px;border:1px solid #cbdce3;background:#fff;color:#15272f}
.snv-chat-form-field[hidden]{display:none!important}
.snv-chat-compose textarea[hidden]{display:none!important}

/* Sanivio | launcher circular com convite lateral e microanimação respeitando acessibilidade */
.snv-chat-root .snv-chat-launcher-round{width:64px;height:64px;min-width:64px;min-height:64px;padding:0;border-radius:50%;display:flex;align-items:center;justify-content:center;position:relative;z-index:2;box-shadow:0 8px 26px #14425b50;transition:box-shadow .18s ease,filter .18s ease}
.snv-chat-root .snv-chat-launcher-round:hover{box-shadow:0 12px 30px #14425b60;filter:brightness(.97)}
.snv-chat-launcher-svg{display:block;flex:0 0 auto;pointer-events:none}
.snv-chat-invite{position:absolute;bottom:8px;right:78px;max-width:min(250px,calc(100vw - 110px));display:flex;align-items:flex-start;gap:3px;border-radius:14px;background:#fff;box-shadow:0 8px 24px #16455a2f;border:1px solid #d7e8ee;z-index:1;transition:opacity .25s,transform .25s,visibility .25s}
.snv-chat-left .snv-chat-invite{right:auto;left:78px}
.snv-chat-invite::after{content:"";position:absolute;right:-7px;bottom:16px;background:#fff;width:12px;height:12px;border-top:1px solid #d7e8ee;border-right:1px solid #d7e8ee;transform:rotate(45deg)}
.snv-chat-left .snv-chat-invite::after{right:auto;left:-7px;transform:rotate(-135deg)}
.snv-chat-invite-open{color:#17455c;background:transparent;border:0;padding:13px 3px 13px 15px;font-weight:700;text-align:left;line-height:1.3;cursor:pointer;overflow-wrap:anywhere;max-width:200px}
.snv-chat-invite-close{color:#647d8b;border:0;background:transparent;cursor:pointer;padding:8px 10px 8px 4px;font-size:18px;line-height:1}
.snv-chat-invite-dismissed{opacity:0;transform:translateY(6px);visibility:hidden;pointer-events:none}
.snv-chat-launcher-enter{animation:snv-chat-bounce-once .9s cubic-bezier(.3,.7,.25,1) .35s both}
.snv-chat-invite-enter{animation:snv-chat-invite-in .35s ease-out .9s both}
@keyframes snv-chat-bounce-once{0%{transform:translateY(20px) scale(.85);opacity:0}45%{transform:translateY(-10px) scale(1.05);opacity:1}70%{transform:translateY(3px) scale(.98)}100%{transform:translateY(0) scale(1);opacity:1}}
@keyframes snv-chat-invite-in{from{opacity:0;transform:translateX(9px)}to{opacity:1;transform:translateX(0)}}
.snv-chat-left .snv-chat-invite-enter{animation-name:snv-chat-invite-in}
@media(max-width:500px){.snv-chat-root .snv-chat-launcher-round{width:58px;height:58px;min-width:58px;min-height:58px}.snv-chat-invite,.snv-chat-left .snv-chat-invite{right:70px;left:auto;bottom:5px;max-width:min(220px,calc(100vw - 100px))}.snv-chat-left .snv-chat-invite::after{left:auto;right:-7px;transform:rotate(45deg)}}
@media(prefers-reduced-motion:reduce){.snv-chat-root .snv-chat-launcher-enter,.snv-chat-invite-enter{animation:none!important}.snv-chat-invite{transition:none}.snv-chat-root .snv-chat-launcher-round{transition:none}}

/* 2026-10-30 | Convite não deve virar uma coluna de caracteres. */
.snv-chat-root .snv-chat-invite{
  width:max-content; min-width:198px; max-width:min(278px,calc(100vw - 108px));
  align-items:center; flex-wrap:nowrap; flex-shrink:0; overflow:visible;
}
.snv-chat-root .snv-chat-invite-open{
  display:block; flex:1 1 auto; width:auto; min-width:0; max-width:none;
  white-space:normal; word-break:normal; overflow-wrap:break-word;
  hyphens:none; line-height:1.35; padding:12px 8px 12px 15px;
}
.snv-chat-root .snv-chat-invite-close{flex:0 0 30px; align-self:flex-start;}
@media(max-width:500px){
 .snv-chat-root .snv-chat-invite{min-width:170px;max-width:calc(100vw - 92px);}
}
.snv-chat-back-ai{border:1px solid #cde4dd;background:#effaf5;border-radius:20px;padding:6px 12px;color:#15654e;font-weight:700;font-size:11px;cursor:pointer}
.snv-chat-back-ai:disabled{opacity:.5;cursor:not-allowed}
.snv-chat-human-hours{flex:1 1 100%;font-size:10px;line-height:1.4;color:#526c7d}

/* Estado real de processamento da IA: três pontos, sem mensagem fictícia. */
.snv-chat-typing-indicator{align-self:flex-start;display:flex;flex-direction:column;gap:5px;max-width:82%;padding:9px 12px 11px;border-radius:16px 16px 16px 5px;background:#eff5f8;border:1px solid #dce7ee;box-shadow:0 1px 5px rgba(17,51,74,.05);margin:4px 0 10px}
.snv-chat-typing-indicator[hidden]{display:none!important}
.snv-chat-typing-dots{display:inline-flex;align-items:center;gap:5px;min-height:15px}
.snv-chat-typing-dot{display:inline-block;width:7px;height:7px;border-radius:50%;background:var(--snv-chat-brand);opacity:.35;animation:snv-chat-dots 1.15s ease-in-out infinite}
.snv-chat-typing-dot:nth-child(2){animation-delay:.15s}
.snv-chat-typing-dot:nth-child(3){animation-delay:.3s}
@keyframes snv-chat-dots{0%,60%,100%{opacity:.3;transform:translateY(0)}30%{opacity:1;transform:translateY(-3px)}}
@media (prefers-reduced-motion:reduce){.snv-chat-typing-dot{animation:none;opacity:.75}}

/* 2026-10-30 v3 | resultados de profissionais e agenda na bolha de IA. */
.snv-chat-root .snv-chat-message:has(.snv-chat-professional-list),
.snv-chat-root .snv-chat-message:has(.snv-chat-availability),
.snv-chat-root .snv-chat-message:has(.snv-chat-services){max-width:min(95%,350px);width:100%}
.snv-chat-professional-list{display:flex;flex-direction:column;gap:9px;margin-top:12px;white-space:normal}
.snv-chat-professional-card{display:flex;gap:11px;padding:10px;border:1px solid #d8e8ed;border-radius:12px;background:#fafefe;min-width:0}
.snv-chat-professional-photo{width:58px;height:68px;min-width:58px;border-radius:10px;background:#e1f0f3;color:#236e83;display:grid;place-items:center;font-size:20px;font-weight:700;overflow:hidden}
.snv-chat-professional-photo img{display:block;width:100%;height:100%;object-fit:cover}
.snv-chat-professional-info{display:flex;flex-direction:column;gap:2px;min-width:0;line-height:1.35}
.snv-chat-professional-name{font-size:13px;color:#173d50;line-height:1.3}
.snv-chat-professional-info small{font-size:11px;color:#5f7785}
.snv-chat-rich-link{font-size:11px;font-weight:750;color:var(--snv-chat-brand);text-decoration:none;border-bottom:1px solid currentColor;align-self:flex-start;margin-top:4px}
.snv-chat-availability{display:flex;flex-direction:column;gap:8px;margin-top:12px;padding:12px;border-radius:12px;border:1px solid #ccdde5;background:#fafdff;white-space:normal}
.snv-chat-availability-title{font-size:13px;color:#17455c}
.snv-chat-availability-service{color:#5d7887;font-size:11px}
.snv-chat-agenda-day{display:flex;gap:9px;align-items:flex-start;padding-top:7px;border-top:1px solid #e1edf1}
.snv-chat-agenda-date{min-width:46px;background:#e9f6f8;padding:5px 4px;text-align:center;border-radius:7px;font-size:11px;font-weight:750;color:#1c6075}
.snv-chat-agenda-times{display:flex;flex:1;gap:6px;flex-wrap:wrap}
.snv-chat-agenda-slot{background:white;color:#1b6176;border:1px solid #b8dce6;font-weight:700;font-size:11px;border-radius:8px;padding:5px 7px}
.snv-chat-agenda-disclaimer{color:#687f88;font-size:10px;line-height:1.4}
.snv-chat-no-slots{margin:0;font-size:12px;color:#68818e}
.snv-chat-services{display:flex;flex-direction:column;gap:7px;margin-top:10px;padding:10px;background:#f6fbfc;border-radius:10px;white-space:normal}
.snv-chat-services strong{font-size:12px}
.snv-chat-service-option{width:100%;padding:9px;text-align:left;border:1px solid #c9e3e9;border-radius:9px;background:white;color:#20566a;cursor:pointer;font-size:12px}
.snv-chat-service-option:hover{background:#e9f5f8}

.snv-chat-agenda-tabs{display:flex;gap:6px;overflow-x:auto;padding:3px 0;scrollbar-width:thin}
.snv-chat-agenda-tab{border:1px solid #bddce3;border-radius:8px;background:#fff;color:#396f80;padding:6px 10px;font-size:11px;cursor:pointer;white-space:nowrap}
.snv-chat-agenda-tab[aria-pressed="true"]{color:#fff;background:var(--snv-chat-brand);border-color:var(--snv-chat-brand)}
.snv-chat-agenda-day[hidden]{display:none!important}

/* Cards íntegros no histórico e scroll: não restringir o filho a span inline. */
.snv-chat-root .snv-chat-rich-holder{display:block;max-width:100%;min-width:0;white-space:normal;margin-top:8px}
.snv-chat-root .snv-chat-rich-holder:empty{display:none}
.snv-chat-root .snv-chat-message-text{display:block;min-width:0}
.snv-chat-root .snv-chat-professional-list{width:100%;min-width:0}
.snv-chat-root .snv-chat-professional-card{max-width:100%;min-width:0}

/* Ficha pública do profissional no corpo da conversa. */
.snv-chat-root .snv-chat-profile-detail{display:flex;flex-direction:column;gap:9px;margin-top:10px;padding:12px;border:1px solid #d8e8ed;background:#fafefe;border-radius:12px;min-width:0;white-space:normal}
.snv-chat-root .snv-chat-profile-detail-head{display:flex;align-items:center;gap:11px}
.snv-chat-root .snv-chat-profile-detail-identity{display:flex;flex-direction:column;gap:3px;min-width:0}
.snv-chat-root .snv-chat-profile-detail-identity strong{font-size:13px;overflow-wrap:anywhere}
.snv-chat-root .snv-chat-profile-detail-identity small{font-size:11px;color:#627b86}
.snv-chat-root .snv-chat-profile-detail p{margin:0;font-size:12px;line-height:1.5;overflow-wrap:anywhere}
.snv-chat-root .snv-chat-profile-detail .snv-chat-professional-photo{width:70px;height:76px;min-width:70px}

.snv-chat-root .snv-chat-message:has(.snv-chat-profile-detail){max-width:min(95%,350px);width:100%}
