/* Asistente de propiedades: botón flotante + panel de chat */
.ai-btn{position:fixed;left:18px;bottom:18px;z-index:31;width:58px;height:58px;border-radius:50%;border:0;display:grid;place-items:center;color:#fff;background:var(--navy);box-shadow:0 8px 24px rgba(0,0,0,.25);cursor:pointer}
.ai-btn .ic{width:26px;height:26px}
.ai-btn[aria-expanded="true"]{background:var(--navy-2)}

.ai-panel{position:fixed;left:18px;bottom:88px;z-index:31;width:min(360px,calc(100vw - 36px));max-height:min(560px,calc(100vh - 120px));background:var(--card);border-radius:var(--radius);box-shadow:var(--shadow);display:flex;flex-direction:column;overflow:hidden;border:1px solid var(--line)}
.ai-panel[hidden]{display:none}

.ai-head{background:var(--navy);color:#fff;padding:.9rem 1rem;display:flex;align-items:center;gap:.6rem}
.ai-head .ic{width:20px;height:20px}
.ai-head b{font-family:Fraunces,Georgia,serif;font-size:1.02rem;flex:1}
.ai-head button{background:none;border:0;color:#fff;opacity:.85;cursor:pointer;display:grid;place-items:center;padding:.2rem}
.ai-head button:hover{opacity:1}

.ai-body{flex:1;overflow-y:auto;padding:.9rem;display:flex;flex-direction:column;gap:.6rem;background:var(--bg)}
.ai-msg{max-width:88%;padding:.6rem .8rem;border-radius:12px;font-size:.92rem;line-height:1.45}
.ai-msg.bot{align-self:flex-start;background:#fff;border:1px solid var(--line);border-bottom-left-radius:2px}
.ai-msg.user{align-self:flex-end;background:var(--navy);color:#fff;border-bottom-right-radius:2px}
.ai-msg p{margin:0 0 .3rem}
.ai-msg p:last-child{margin-bottom:0}

.ai-chips{display:flex;flex-wrap:wrap;gap:.4rem;align-self:flex-start;max-width:100%}
.ai-chip{border:1px solid var(--line);background:#fff;color:var(--navy);border-radius:999px;padding:.4rem .75rem;font-size:.82rem;cursor:pointer;font-family:inherit}
.ai-chip:hover{border-color:var(--navy)}

.ai-cards{display:flex;flex-direction:column;gap:.5rem;align-self:flex-start;width:100%;max-width:100%}
.ai-card{display:flex;gap:.6rem;align-items:center;background:#fff;border:1px solid var(--line);border-radius:10px;padding:.5rem;text-decoration:none;color:inherit}
.ai-card:hover{border-color:var(--navy)}
.ai-card img{width:56px;height:56px;object-fit:cover;border-radius:8px;flex:none;background:var(--line)}
.ai-card .ic{width:24px;height:24px;color:var(--muted)}
.ai-card-ph{width:56px;height:56px;border-radius:8px;flex:none;background:var(--line);display:grid;place-items:center}
.ai-card div{min-width:0}
.ai-card .t{font-size:.86rem;font-weight:600;color:var(--ink);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.ai-card .s{font-size:.78rem;color:var(--ink-2)}
.ai-card .p{font-size:.82rem;font-weight:700;color:var(--accent-2)}

.ai-foot{border-top:1px solid var(--line);padding:.6rem;display:flex;gap:.5rem;background:#fff}
.ai-foot input{flex:1;border:1.5px solid var(--line);border-radius:999px;padding:.6rem .9rem;font:inherit;min-width:0}
.ai-foot input:focus-visible{outline:3px solid var(--accent);outline-offset:1px}
.ai-foot button{width:42px;height:42px;border-radius:50%;border:0;background:var(--accent);color:#fff;display:grid;place-items:center;cursor:pointer;flex:none}
.ai-foot button:hover{background:var(--accent-2)}
.ai-foot button .ic{width:18px;height:18px}

@media (max-width:480px){
  .ai-btn{left:14px;bottom:14px}
  .ai-panel{left:8px;right:8px;width:auto;bottom:84px}
}
