/* LF Chat v29.47: lista, cabeçalho e notificações. */
.lf-notification-panel{position:fixed!important;z-index:11000!important;right:16px!important;top:calc(var(--lf-review-top,0px) + 72px)!important;width:min(390px,calc(100vw - 24px))!important;max-height:calc(var(--lf-review-height,100dvh) - 88px)!important;box-sizing:border-box;display:flex;flex-direction:column;overflow:hidden!important}
.lf-notification-panel[hidden]{display:none!important}
.lf-notification-panel header,.lf-notification-panel nav,.lf-notification-panel .lf-mark-all{flex:0 0 auto}
.lf-notification-list{flex:1 1 auto;min-height:0;max-height:none!important;overflow:auto;overscroll-behavior:contain}
.lf-notification-row{overflow-wrap:anywhere}
.inbox-list-header{display:grid;grid-template-columns:minmax(0,1fr) 38px;gap:10px;padding:12px!important}
.inbox-title-row{grid-column:2;grid-row:1;margin:0!important}
.inbox-title-row>div{display:none}
.conversation-status-tabs{grid-column:1;grid-row:1;margin:0!important}
.conversation-search,.conversation-filters{grid-column:1/-1;margin:0!important}
.conversation-filters{gap:6px;display:flex;flex-wrap:wrap}
.chat-header{padding:10px 12px!important;gap:8px!important;min-height:64px!important}
.chat-header-contact{min-width:0;flex:1 1 auto;overflow:hidden}
.chat-header-contact>div:last-child{min-width:0}
#active-contact-name{display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.chat-header .chat-avatar.large{width:38px!important;height:38px!important;min-width:38px!important;font-size:14px!important;flex:0 0 38px}
.chat-header .contact-channel{display:none!important}
.lf-chat-meta-toggle{border:1px solid #dce0f7;background:#f5f5ff;color:#5447da;border-radius:9px;padding:6px 9px;min-height:36px;cursor:pointer;font-size:12px}
.chat-header-actions{gap:5px!important;flex:0 0 auto}
body.lf-chat-meta-open .chat-header .contact-channel{display:flex!important;flex-wrap:wrap!important;position:fixed!important;left:var(--lf-review-meta-left,12px)!important;right:auto!important;top:var(--lf-review-meta-top,76px)!important;width:var(--lf-review-meta-width,calc(100vw - 24px))!important;max-height:calc(var(--lf-review-height,100dvh) - 110px)!important;overflow:auto!important;z-index:10900!important;margin:0!important;padding:16px!important;box-sizing:border-box;background:#fff;border:1px solid #dce0f7;border-radius:12px;box-shadow:0 10px 35px #14233b30;gap:6px!important;line-height:1.5!important;color:#64748b}
body.lf-chat-meta-open .contact-channel>*{position:static!important;transform:none!important;white-space:normal!important;max-width:100%}
body.lf-chat-meta-open .contact-channel a{overflow-wrap:anywhere}
@media(max-width:767px){
 .lf-notification-panel{right:12px!important;top:calc(var(--lf-review-top,0px) + 64px)!important;max-height:calc(var(--lf-review-height,100dvh) - 80px)!important}
 .lf-notification-panel header{padding:12px;font-size:16px}
 .lf-notification-panel nav{gap:10px;padding:8px 12px}
 body[data-lf-mobile-conversation-view="list"] .lf-mobile-conversation-layout{height:var(--lf-review-list-height,calc(100dvh - 80px))!important;min-height:0!important;max-height:var(--lf-review-list-height,calc(100dvh - 80px))!important}
 body[data-lf-mobile-conversation-view="list"] .lf-mobile-list-pane{display:flex!important;flex-direction:column!important;overflow:hidden!important;min-height:0!important}
 body[data-lf-mobile-conversation-view="list"] #chat-list{flex:1 1 0!important;min-height:0!important;overflow-y:auto!important;overscroll-behavior:contain;padding-bottom:calc(24px + env(safe-area-inset-bottom,0px))!important;scroll-padding-bottom:28px}
 .inbox-list-header{flex:0 0 auto!important;padding:10px!important;gap:8px}
 .conversation-status-tab{min-height:36px!important;padding:8px!important;font-size:12px!important}
 .conversation-search{height:38px!important}
 .conversation-search input{font-size:16px!important;min-width:0}
 .conversation-filters .filter-button{padding:6px 10px!important;font-size:12px!important;min-height:32px}
 .chat-header{height:auto!important;min-height:60px!important;flex:0 0 auto!important}
 .chat-header-contact{gap:8px!important}
 .chat-header-actions>button{width:32px!important;height:36px!important;min-width:32px!important;padding:0!important}
 .chat-header-actions>.lf-chat-meta-toggle{width:auto!important;min-width:36px!important;padding:5px 7px!important;font-size:11px}
 .chat-header>.lf-mobile-back,.chat-header>.lf-mobile-info{width:36px!important;height:36px!important;min-width:36px!important;min-height:36px!important;flex:0 0 36px!important;margin:0!important}
 .service-control{padding:8px 12px!important;gap:8px!important;min-height:48px!important}
 .service-status{gap:7px!important;font-size:12px!important}
 .service-status .ai-status-icon{font-size:20px!important}
 .service-control button{padding:8px 10px!important;font-size:12px!important}
}

@media(max-width:360px){.chat-header .chat-avatar.large{display:none!important}}

/* v29.48: botões de texto sem a largura dos ícones. */
.chat-header-actions .lf-chat-meta-toggle{width:auto!important;min-width:64px!important;padding:6px 10px!important;font-size:12px!important;white-space:nowrap!important;flex:0 0 auto!important}
.lf-chat-options{position:fixed;z-index:11050;width:220px;max-width:calc(100vw - 16px);padding:6px;background:white;border:1px solid #dce0ef;border-radius:10px;box-shadow:0 10px 35px #14233b30}
.lf-chat-options button{display:block;width:100%;text-align:left;padding:11px;border:0;border-radius:6px;background:white;color:#344155;cursor:pointer;font-size:13px}
.lf-chat-options button:hover,.lf-chat-options button:focus-visible{background:#f1efff;color:#5145d9}
.lf-chat-search{display:flex;align-items:center;flex-wrap:wrap;gap:6px;flex:0 0 auto;padding:8px 12px;background:#fafaff;border-bottom:1px solid #e3e5ef}
.lf-chat-search input{flex:1 1 130px;width:0;min-width:100px;border:1px solid #dce0ef;border-radius:8px;padding:8px;font-size:16px}
.lf-chat-search [role=status]{font-size:11px;color:#64748b}
.lf-chat-search button{min-width:30px;min-height:32px;border:1px solid #dce0ef;border-radius:7px;background:white;color:#5145d9;cursor:pointer}
.lf-search-match .message-bubble{outline:2px solid #eab308;outline-offset:2px}
.lf-search-current .message-bubble{outline:3px solid #8b5cf6;outline-offset:3px}
.contact-modal.open{z-index:11100!important}
@media(max-width:767px){.chat-header-actions .lf-chat-meta-toggle{min-width:52px!important;padding:5px 7px!important;font-size:11px!important}}

/* v29.50: painel fora dos ancestrais que cortavam a navegação no celular. */
.lf-contact-sheet{position:fixed!important;z-index:11040!important;top:var(--lf-review-top,0px)!important;left:0!important;width:100%!important;height:var(--lf-review-height,100dvh)!important;display:flex!important;flex-direction:column!important;background:white;box-sizing:border-box;overflow:hidden!important}
.lf-contact-sheet-toolbar{flex:0 0 auto;display:flex;flex-wrap:wrap;gap:8px;align-items:center;justify-content:space-between;padding:12px;padding-top:max(12px,env(safe-area-inset-top,0px));background:white;border-bottom:1px solid #e3e5ef}
.lf-contact-sheet-toolbar strong{font-size:13px;color:#64748b}
.lf-contact-sheet-back{min-height:44px;padding:9px 13px;border:1px solid #dce0ef;border-radius:9px;background:#f4f2ff;color:#4f46e5;font-size:14px;cursor:pointer}
body.lf-contact-sheet-open .lf-contact-sheet>.contact-panel{display:block!important;position:static!important;inset:auto!important;transform:none!important;width:100%!important;max-width:100%!important;min-width:0!important;height:auto!important;min-height:0!important;max-height:none!important;flex:1 1 0!important;margin:0!important;padding:0 12px calc(24px + env(safe-area-inset-bottom,0px))!important;overflow-y:auto!important;overflow-x:hidden!important;box-sizing:border-box!important;border:0!important;z-index:auto!important;overscroll-behavior:contain}
.lf-contact-sheet .lf-mobile-details-back{display:none!important}
@media(max-width:767px){.lf-contact-sheet input,.lf-contact-sheet select,.lf-contact-sheet textarea{font-size:16px!important}}

/* v29.51: detalhes fora do cabeçalho e etiquetas acima das informações móveis. */
.lf-connection-popover{position:fixed!important;z-index:11060!important;left:var(--lf-review-meta-left,12px)!important;top:var(--lf-review-meta-top,76px)!important;width:var(--lf-review-meta-width,calc(100vw - 24px))!important;max-height:calc(var(--lf-review-height,100dvh) - 100px)!important;overflow:auto!important;box-sizing:border-box;background:white;border:1px solid #dce0f7;border-radius:12px;box-shadow:0 10px 35px #14233b30}
.lf-connection-popover>header{display:flex;align-items:center;justify-content:space-between;gap:8px;padding:10px 14px;border-bottom:1px solid #e4e6f1;font-size:13px}
.lf-connection-popover>header button{min-width:40px;min-height:40px;border:0;border-radius:8px;background:#f4f2ff;color:#4f46e5;font-size:22px;cursor:pointer}
body.lf-chat-meta-open .lf-connection-popover .contact-channel{display:flex!important;flex-wrap:wrap!important;position:static!important;transform:none!important;width:auto!important;height:auto!important;max-height:none!important;overflow:visible!important;margin:0!important;padding:16px!important;gap:6px!important;line-height:1.5!important;color:#64748b;font-size:14px!important}
.lf-contact-tags-layer{position:fixed;inset:0;z-index:11120;display:flex;align-items:center;justify-content:center;padding:12px;background:#10182766;box-sizing:border-box}
.lf-contact-tags-dialog{width:min(460px,100%);max-height:calc(var(--lf-review-height,100dvh) - 24px);display:flex;flex-direction:column;gap:12px;padding:16px;background:white;border-radius:14px;box-sizing:border-box;overflow:auto;font-size:14px}
.lf-contact-tags-dialog header,.lf-contact-tags-dialog footer{display:flex;gap:8px;align-items:center;justify-content:space-between}
.lf-contact-tags-dialog p{margin:0;color:#64748b}.lf-contact-tags-dialog small{color:#64748b}
.lf-contact-tags-dialog button{min-height:40px;border:1px solid #dce0ef;background:#f4f2ff;color:#4f46e5;border-radius:8px;padding:8px 12px;cursor:pointer}
.lf-contact-tags-dialog button:disabled{opacity:.5;cursor:default}
.lf-contact-tags-dialog input[type=search]{font-size:16px;padding:10px;border:1px solid #dce0ef;border-radius:8px;width:100%;box-sizing:border-box}
.lf-contact-tags-list{min-height:60px;overflow:auto;max-height:40dvh}
.lf-contact-tags-list label{display:flex;gap:10px;align-items:center;padding:10px 0;min-height:36px;border-bottom:1px solid #f1f2f7}
.lf-contact-tags-list label[hidden]{display:none}.lf-contact-tags-list input{width:20px;height:20px;flex:0 0 20px;accent-color:#4f46e5}
.contact-tags .lf-chat-tag{display:inline-flex;gap:5px;align-items:center;border:1px solid #c7c2fc;padding:3px 7px;border-radius:9px}
.contact-tags .lf-chat-tag>span{padding:0;background:none}.lf-chat-tag button{min-width:28px;min-height:28px;border:0;background:none;color:#4f46e5;cursor:pointer;font-size:18px}
