/* Maiopção V14 — Assistente IA imobiliária */
:root { --chat-blue:#006aba; --chat-dark:#172033; --chat-line:#e3eaf2; }
#mp-chat-launcher {
    position: fixed; right: 20px; left: auto; bottom: 84px; z-index: 1042;
    width: 52px; height: 52px; min-width: 52px; min-height: 52px; padding: 0;
    border: 0; border-radius: 50%;
    display: inline-flex; align-items: center; justify-content: center;
    background: var(--chat-blue); color: #fff; cursor: pointer;
    box-shadow: 0 10px 26px rgba(0,106,186,.27);
    transition: transform .18s ease, box-shadow .18s ease, background-color .18s ease;
}
#mp-chat-launcher:hover,
#mp-chat-launcher:focus-visible {
    transform: translateY(-2px);
    background: #0079cf;
    box-shadow: 0 15px 34px rgba(0,106,186,.34);
    outline: none;
}
#mp-chat-launcher i { font-size: 20px; line-height: 1; }
#mp-chat-launcher::before {
    content: '';
    position: absolute; top: 3px; right: 3px;
    width: 9px; height: 9px; border-radius: 50%;
    background: #37c976; border: 2px solid #fff;
    box-sizing: content-box;
}
#mp-chat-launcher::after {
    content: attr(data-tooltip);
    position: absolute; right: 62px; top: 50%;
    transform: translateY(-50%) translateX(5px);
    padding: 7px 10px; border-radius: 8px;
    background: #172033; color: #fff;
    font: 600 11px/1.2 'Inter', sans-serif;
    white-space: nowrap; pointer-events: none;
    opacity: 0; visibility: hidden;
    box-shadow: 0 6px 18px rgba(15,23,42,.18);
    transition: opacity .15s ease, transform .15s ease, visibility .15s ease;
}
#mp-chat-launcher:hover::after,
#mp-chat-launcher:focus-visible::after {
    opacity: 1; visibility: visible; transform: translateY(-50%) translateX(0);
}
#mp-chat-panel {
    position: fixed; right: 20px; left: auto; bottom: 148px; z-index: 1043;
    width: min(390px, calc(100vw - 28px)); height: min(650px, calc(100vh - 168px));
    display: none; flex-direction: column; overflow: hidden;
    background: #fff; border: 1px solid var(--chat-line); border-radius: 18px;
    box-shadow: 0 24px 70px rgba(15,23,42,.22); font-family: 'Inter', sans-serif;
}
#mp-chat-panel.mp-open { display: flex; animation: mpChatIn .18s ease-out; }
@keyframes mpChatIn { from { opacity:0; transform:translateY(8px) scale(.985); } to { opacity:1; transform:none; } }
.mp-chat-header { min-height: 62px; padding: 10px 14px; display:flex; align-items:center; gap:11px; color:#fff; background:linear-gradient(135deg,#006aba,#078ee8); }
.mp-chat-avatar { width:42px; height:42px; flex:0 0 42px; border-radius:50%; background:rgba(255,255,255,.18); display:grid; place-items:center; font-size:19px; }
.mp-chat-headcopy { min-width:0; flex:1; }
.mp-chat-title { font-weight:700; font-size:14px; margin:0; display:flex; align-items:center; gap:6px; white-space:nowrap; }
.mp-chat-close { width:34px; height:34px; border:0; border-radius:50%; background:rgba(255,255,255,.14); color:#fff; cursor:pointer; }
.mp-chat-messages { flex:1; overflow:auto; overscroll-behavior:contain; padding:14px; background:#f7f9fc; scrollbar-width:thin; }
.mp-msg { display:flex; margin:0 0 10px; }
.mp-msg-user { justify-content:flex-end; }
.mp-msg-bot { align-items:flex-start; gap:7px; }
.mp-msg-avatar { width:27px; height:27px; flex:0 0 27px; margin-top:2px; border-radius:50%; display:grid; place-items:center; background:#eaf5fd; color:#006aba; border:1px solid #d4e8f6; font-size:12px; box-shadow:0 2px 7px rgba(15,23,42,.05); }
.mp-msg-bot .mp-bubble { max-width:calc(88% - 34px); }
.mp-bubble { max-width:88%; padding:10px 12px; border-radius:14px; font-size:13px; line-height:1.45; white-space:pre-line; }
.mp-msg-bot .mp-bubble { background:#fff; color:#344256; border:1px solid #e5ebf2; border-bottom-left-radius:5px; }
.mp-msg-user .mp-bubble { background:var(--chat-blue); color:#fff; border-bottom-right-radius:5px; }
.mp-chat-chips { display:flex; flex-wrap:wrap; gap:6px; margin:2px 0 12px; }
.mp-chat-chip { border:1px solid #cfe0ee; border-radius:999px; background:#fff; color:#006aba; padding:7px 10px; font-size:11px; font-weight:600; cursor:pointer; }
.mp-chat-chip:hover { background:#f1f8fd; }
.mp-chat-card { overflow:hidden; margin:7px 0 11px; border:1px solid #e1e8ef; border-radius:13px; background:#fff; box-shadow:0 4px 13px rgba(15,23,42,.05); }
.mp-chat-card-img { width:100%; height:135px; object-fit:cover; display:block; background:#eef2f6; }
.mp-chat-card-body { padding:10px 11px 11px; }
.mp-chat-card-title { color:#172033; font-size:13px; font-weight:700; margin:0 0 4px; }
.mp-chat-card-loc { color:#68778a; font-size:10.5px; line-height:1.35; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.mp-chat-card-row { display:flex; justify-content:space-between; align-items:center; gap:8px; margin-top:9px; }
.mp-chat-card-price { color:#006aba; font-size:14px; font-weight:750; }
.mp-chat-badge { display:inline-flex; align-items:center; border-radius:999px; padding:4px 7px; font-size:9px; font-weight:700; color:#006aba; background:#eaf5fd; }
.mp-chat-card-actions { display:flex; gap:6px; margin-top:9px; }
.mp-chat-card-actions a, .mp-chat-card-actions button, .mp-chat-viewall { min-height:32px; border-radius:8px; border:1px solid #cfe0ee; padding:0 10px; display:inline-flex; align-items:center; justify-content:center; text-decoration:none; font-size:10.5px; font-weight:650; cursor:pointer; }
.mp-chat-card-actions a, .mp-chat-viewall { background:#006aba; color:#fff; border-color:#006aba; }
.mp-chat-card-actions button { background:#fff; color:#006aba; }
.mp-chat-viewall { margin:0 0 12px; }
.mp-chat-typing { display:inline-flex; gap:4px; padding:11px 13px; border-radius:14px; background:#fff; border:1px solid #e5ebf2; }
.mp-chat-typing i { width:5px; height:5px; border-radius:50%; background:#91a0b2; animation:mpDot 1s infinite; }
.mp-chat-typing i:nth-child(2){animation-delay:.15s}.mp-chat-typing i:nth-child(3){animation-delay:.3s}
@keyframes mpDot { 0%,60%,100%{opacity:.35;transform:none} 30%{opacity:1;transform:translateY(-2px)} }
.mp-chat-footer { padding:10px; border-top:1px solid #e5ebf2; background:#fff; }
.mp-chat-inputrow { display:flex; align-items:flex-end; gap:7px; border:1px solid #d8e1eb; border-radius:12px; padding:6px 6px 6px 10px; }
#mp-chat-input { flex:1; min-height:34px; max-height:90px; resize:none; border:0; outline:0; background:transparent; font:13px/1.4 'Inter',sans-serif; padding:7px 0 2px; }
#mp-chat-send { width:36px; height:36px; flex:0 0 36px; border:0; border-radius:9px; background:#006aba; color:#fff; cursor:pointer; }
.mp-chat-note { margin-top:6px; color:#8a97a7; font-size:9px; text-align:center; }
.mp-chat-contact { margin:7px 0 12px; padding:12px; background:#fff; border:1px solid #e1e8ef; border-radius:13px; }
.mp-chat-contact input, .mp-chat-contact textarea { width:100%; margin-bottom:7px; min-height:38px; border:1px solid #d8e1eb; border-radius:9px; padding:8px 9px; font:12px 'Inter',sans-serif; outline:0; }
.mp-chat-contact textarea { min-height:62px; resize:vertical; }
.mp-chat-contact input:focus, .mp-chat-contact textarea:focus { border-color:#65aee0; box-shadow:0 0 0 3px rgba(0,106,186,.08); }
.mp-chat-consent { display:flex; align-items:flex-start; gap:6px; margin:2px 0 9px; color:#6a788a; font-size:9.5px; line-height:1.35; }
.mp-chat-consent input { width:auto; min-height:0; margin:2px 0 0; }
.mp-chat-contact-submit { width:100%; min-height:38px; border:0; border-radius:9px; background:#006aba; color:#fff; font-size:12px; font-weight:700; cursor:pointer; }
.mp-chat-honeypot { position:absolute !important; left:-9999px !important; }
@media (max-width:650px) {
    #mp-chat-launcher { right:12px; left:auto; bottom:72px; width:50px; height:50px; min-width:50px; min-height:50px; padding:0; }
    #mp-chat-launcher::after { display:none; }
    #mp-chat-panel { left:8px; right:8px; bottom:132px; width:auto; height:min(660px,calc(100dvh - 144px)); border-radius:16px; }
    .mp-chat-card-img { height:120px; }
}
@media (prefers-reduced-motion:reduce) { #mp-chat-panel.mp-open { animation:none; } #mp-chat-launcher { transition:none; } }

/* Maiopção V15 — contexto da pesquisa atual */
.mp-chat-context {
    padding: 8px 12px 7px;
    border-bottom: 1px solid #e5ebf2;
    background: #fff;
}
.mp-chat-context > span {
    display: block;
    margin-bottom: 5px;
    color: #7d8a9b;
    font-size: 9px;
    font-weight: 700;
    letter-spacing: .04em;
    text-transform: uppercase;
}
.mp-chat-context > div {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
}
.mp-chat-context b {
    display: inline-flex;
    align-items: center;
    min-height: 23px;
    padding: 3px 7px;
    border: 1px solid #d7e6f2;
    border-radius: 999px;
    background: #f5faff;
    color: #006aba;
    font-size: 9.5px;
    font-weight: 650;
}

/* V16 — razões de correspondência do Consultor Ultimate */
.mp-chat-match { display:flex; gap:6px; align-items:flex-start; margin-top:8px; padding:7px 8px; border-radius:8px; background:#f5f9fd; color:#526578; font-size:9.8px; line-height:1.35; }
.mp-chat-match i { color:#e9a300; margin-top:2px; font-size:9px; }
.mp-chat-match span { min-width:0; }
