/* MSNBOT Luz 4.7.5 — Bate-Papo: viewport travado, histórico fiel e mídias no padrão de conversa */
body.v475-chat-locked{overflow:hidden!important;overscroll-behavior:none}
body.v475-chat-locked main.page:not(.auth-page){
  height:var(--v475-page-height)!important;max-height:var(--v475-page-height)!important;
  min-height:0!important;margin-bottom:0!important;overflow:hidden!important;box-sizing:border-box
}
body.v475-chat-locked .msn-v33-shell{
  height:var(--v475-chat-height)!important;max-height:var(--v475-chat-height)!important;
  min-height:0!important;overflow:hidden!important
}
body.v475-chat-locked :is(.msn-v33-inbox,.msn-v33-chat,.msn-v33-contact-card){height:100%!important;max-height:100%!important;min-height:0!important}
body.v475-chat-locked .msn-v33-inbox{overflow:hidden!important}
body.v475-chat-locked .msn-v33-list{min-height:0!important;overflow-y:auto!important;overflow-x:hidden!important;overscroll-behavior:contain;scrollbar-gutter:stable}
body.v475-chat-locked .msn-v33-chat{overflow:hidden!important;grid-template-rows:auto minmax(0,1fr) auto!important}
body.v475-chat-locked .msn-v33-chat-head,body.v475-chat-locked .msn-v33-composer{min-width:0;flex:0 0 auto}
body.v475-chat-locked .msn-v33-messages{min-height:0!important;overflow-y:auto!important;overflow-x:hidden!important;overscroll-behavior:contain;scrollbar-gutter:stable}
body.v475-chat-locked .msn-v33-contact-card{overflow-y:auto!important;overflow-x:hidden!important;overscroll-behavior:contain;scrollbar-gutter:stable}

/* Conversa fixada: indicador discreto junto ao nome. */
.v475-conversation-title{display:inline-flex;align-items:center;gap:5px;min-width:0;max-width:100%}
.v475-conversation-title>strong{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.v475-pinned-icon{width:13px;height:13px;display:inline-grid;place-items:center;flex:0 0 auto;color:var(--muted,#778197);opacity:.86}
.v475-pinned-icon svg{width:12px;height:12px;fill:currentColor;display:block}

/* Separadores cronológicos no histórico. */
.v475-day-label,.msn-day-label{align-self:center;position:sticky;top:5px;z-index:4;margin:6px auto 8px;padding:5px 9px;border-radius:8px;background:color-mix(in srgb,var(--surface-solid,#fff) 92%,transparent);border:1px solid color-mix(in srgb,var(--border) 72%,transparent);box-shadow:0 2px 8px rgba(20,30,50,.08);font-size:9px;font-weight:750;color:var(--muted,#667085);line-height:1}

/* Balões e mídias nunca estouram a coluna. */
.message-bubble-v33{min-width:0!important;max-width:min(74%,620px)!important;overflow:visible!important;overflow-wrap:anywhere;word-break:break-word}
.message-bubble-v33 .message-content,.v475-message-content{min-width:0;max-width:100%;overflow-wrap:anywhere;word-break:break-word}
.message-bubble-v33 a{overflow-wrap:anywhere;word-break:break-word}
.v475-chat-image,.v475-chat-video{display:block;width:auto;max-width:min(100%,420px);max-height:440px;object-fit:contain;border-radius:10px;background:rgba(0,0,0,.06)}
.v475-media-caption{display:block;margin-top:7px;line-height:1.35}
.v475-media-placeholder{display:flex;align-items:center;gap:7px;min-width:145px;font-weight:650}

/* Áudio no formato compacto do WhatsApp, com waveform e avatar no final. */
.v475-audio-card{display:grid;grid-template-columns:30px minmax(150px,1fr) auto;align-items:center;gap:8px;width:min(310px,100%);min-width:min(245px,100%)}
.v475-audio-play{width:30px;height:30px;border:0;background:transparent;color:inherit;padding:0;cursor:pointer;font-size:18px;display:grid;place-items:center}
.v475-audio-play:disabled{opacity:.38;cursor:default}
.v475-audio-main{min-width:0;display:grid;grid-template-columns:minmax(0,1fr) auto;gap:4px 7px;align-items:end}
.v475-waveform{grid-column:1/-1;height:30px;display:flex;align-items:center;gap:2px;min-width:0;overflow:hidden}
.v475-waveform i{display:block;width:2px;height:var(--wave-h,12px);max-height:28px;min-height:4px;border-radius:2px;background:currentColor;opacity:.32;flex:1 1 2px}
.v475-audio-main small{font-size:9px;color:var(--muted,#778197);line-height:1}
.v475-audio-main audio{display:none}
.v475-audio-avatar{width:38px;height:38px;border-radius:50%;overflow:hidden;display:grid;place-items:center;background:#3784ef;color:#fff;font-weight:800;font-size:13px;flex:0 0 auto}
.v475-audio-avatar img{width:100%;height:100%;object-fit:cover;display:block}

/* Documento/PDF. */
.v475-document-card{display:grid;grid-template-columns:38px minmax(0,1fr);gap:9px;align-items:center;width:min(310px,100%);padding:9px;border-radius:9px;background:color-mix(in srgb,var(--ink,#172033) 5%,transparent)}
.v475-document-icon{width:38px;height:38px;border-radius:7px;display:grid;place-items:center;background:#566274;color:#fff;font-size:9px;font-weight:900;letter-spacing:.02em}
.v475-document-icon.pdf{background:#d91f3a}
.v475-document-info{min-width:0;display:grid;gap:3px}.v475-document-info strong{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:10px}.v475-document-info small{font-size:8px;color:var(--muted,#778197)}
.v475-document-actions{display:grid;grid-template-columns:1fr 1fr;border-top:1px solid color-mix(in srgb,var(--border) 75%,transparent);margin:7px -8px -7px}.v475-document-actions a{text-align:center;padding:7px 6px;text-decoration:none;color:inherit;font-weight:750;font-size:9px}.v475-document-actions a+a{border-left:1px solid color-mix(in srgb,var(--border) 75%,transparent)}

/* Figurinhas e emojis isolados. */
.message-bubble-v33.v475-sticker-bubble,.message-bubble-v33.v475-emoji-only{background:transparent!important;border-color:transparent!important;box-shadow:none!important;padding:3px!important}
.message-bubble-v33.v475-sticker-bubble footer,.message-bubble-v33.v475-emoji-only footer{background:color-mix(in srgb,var(--surface-solid,#fff) 88%,transparent);border-radius:7px;padding:2px 5px;width:max-content;margin-left:auto}
.v475-sticker{display:block;width:min(190px,38vw);height:auto;max-height:210px;object-fit:contain}
.v475-sticker-fallback{font-size:72px;line-height:1}
.v475-emoji-text{display:block;line-height:1.08}.v475-emoji-single .v475-emoji-text{font-size:52px}.v475-emoji-multi .v475-emoji-text{font-size:34px;letter-spacing:2px}

html[data-theme="dark"] .v475-day-label,html[data-theme="dark"] .msn-day-label{background:rgba(25,35,48,.94);border-color:#344255;color:#c3ccda}
html[data-theme="dark"] .v475-document-card{background:rgba(255,255,255,.07)}

@media(max-width:1100px){
  body.v475-chat-locked .msn-v33-contact-card{height:auto!important;max-height:none!important;top:var(--v475-shell-top,48px)!important;bottom:var(--v475-dock-bottom,76px)!important}
}
@media(max-width:720px){
  body.v475-chat-locked main.page:not(.auth-page){width:100%!important;margin-top:0!important;padding:0!important}
  body.v475-chat-locked .msn-v33-shell,body.v475-chat-locked .msn-v33-shell.empty-contact,body.v475-chat-locked .msn-v33-shell.has-contact{height:var(--v475-chat-height)!important;max-height:var(--v475-chat-height)!important;min-height:0!important}
  body.v475-chat-locked .msn-v33-inbox{height:100%!important;min-height:0!important;border-radius:0!important}
  body.v475-chat-locked .msn-v33-shell.has-contact .msn-v33-chat{height:100%!important;max-height:100%!important;min-height:0!important;border-radius:0!important}
  .message-bubble-v33{max-width:min(91%,calc(100% - 8px))!important}
  .v475-audio-card{width:min(285px,100%);grid-template-columns:28px minmax(130px,1fr) auto}.v475-audio-avatar{width:35px;height:35px}.v475-sticker{width:min(170px,52vw)}
  .v475-emoji-single .v475-emoji-text{font-size:46px}.v475-emoji-multi .v475-emoji-text{font-size:30px}
}
