/* Propalia: asistente virtual del sitio */
.propalia-site.ps-chat { position: fixed; right: 20px; bottom: 20px; z-index: 9991; font-size: 15px; line-height: 1.45; }
.propalia-site.ps-chat *, .propalia-site.ps-chat *::before, .propalia-site.ps-chat *::after { box-sizing: border-box; }
.ps-chat .ps-chat__launcher { display: inline-flex; align-items: center; gap: 10px; height: 58px; padding: 0 20px 0 16px; border: 0; border-radius: 999px; background: var(--ps-accent); color: var(--ps-accent-ink); font: 600 15px/1 var(--ps-font-body); cursor: pointer; box-shadow: 0 8px 24px rgba(0, 0, 0, .22); }
.ps-chat .ps-chat__launcher:hover { filter: brightness(1.06); }
.ps-chat .ps-chat__launcher:focus-visible { outline: 3px solid var(--ps-accent-soft); outline-offset: 2px; }
.ps-chat .ps-chat__launcher-icon { display: inline-flex; }
.ps-chat.is-open .ps-chat__launcher { display: none; }

.ps-chat .ps-chat__panel { width: 384px; height: min(620px, calc(100vh - 40px)); display: flex; flex-direction: column; background: var(--ps-bg); border: 1px solid var(--ps-line); border-radius: var(--ps-radius); box-shadow: 0 18px 48px rgba(20, 22, 26, .24); overflow: hidden; }
.ps-chat .ps-chat__panel[hidden] { display: none; }
.ps-chat .ps-chat__head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 14px 14px 18px; background: var(--ps-accent); color: var(--ps-accent-ink); }
.ps-chat .ps-chat__head strong { display: block; font: 700 16px/1.2 var(--ps-font-display); }
.ps-chat .ps-chat__head span { display: block; font-size: 12.5px; opacity: .85; margin-top: 2px; }
.ps-chat .ps-chat__close { width: 36px; height: 36px; display: inline-flex; align-items: center; justify-content: center; border: 0; border-radius: 999px; background: rgba(255, 255, 255, .16); color: inherit; cursor: pointer; }
.ps-chat .ps-chat__close:hover { background: rgba(255, 255, 255, .28); }

.ps-chat .ps-chat__log { flex: 1; overflow-y: auto; padding: 16px; display: flex; flex-direction: column; gap: 10px; background: var(--ps-soft); }
.ps-chat .ps-chat__msg { display: flex; flex-direction: column; gap: 8px; max-width: 88%; }
.ps-chat .ps-chat__msg--user { align-self: flex-end; align-items: flex-end; }
.ps-chat .ps-chat__msg--bot { align-self: flex-start; }
.ps-chat .ps-chat__bubble { padding: 10px 13px; border-radius: var(--ps-radius-inner); background: #FFFFFF; color: var(--ps-text); border: 1px solid var(--ps-line); white-space: normal; overflow-wrap: anywhere; }
.ps-chat .ps-chat__msg--user .ps-chat__bubble { background: var(--ps-accent); color: var(--ps-accent-ink); border-color: transparent; }
.ps-chat .ps-chat__typing .ps-chat__bubble { display: inline-flex; gap: 5px; padding: 14px; }
.ps-chat .ps-chat__typing span { width: 7px; height: 7px; border-radius: 999px; background: var(--ps-muted); opacity: .4; animation: ps-chat-dot 1.2s infinite; }
.ps-chat .ps-chat__typing span:nth-child(2) { animation-delay: .2s; }
.ps-chat .ps-chat__typing span:nth-child(3) { animation-delay: .4s; }
@keyframes ps-chat-dot { 0%, 80%, 100% { opacity: .3; } 40% { opacity: 1; } }

.ps-chat .ps-chat__cards { display: flex; flex-direction: column; gap: 8px; width: 100%; }
.ps-chat .ps-chat__card { display: flex; gap: 10px; align-items: stretch; padding: 8px; background: #FFFFFF; border: 1px solid var(--ps-line); border-radius: var(--ps-radius-inner); color: var(--ps-text); text-decoration: none; min-width: 250px; }
.ps-chat .ps-chat__card:hover { border-color: var(--ps-accent); }
.ps-chat .ps-chat__card-img { flex: none; width: 84px; height: 68px; border-radius: calc(var(--ps-radius-inner) - 3px); overflow: hidden; background: var(--ps-soft); display: inline-flex; align-items: center; justify-content: center; color: var(--ps-muted); }
.ps-chat .ps-chat__card-img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.ps-chat .ps-chat__card-body { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.ps-chat .ps-chat__card-body strong { color: var(--ps-ink); font-size: 15px; }
.ps-chat .ps-chat__card-body small { color: var(--ps-muted); font-weight: 400; font-size: 12px; }
.ps-chat .ps-chat__card-title { font-size: 13.5px; line-height: 1.3; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.ps-chat .ps-chat__card-meta { font-size: 12.5px; color: var(--ps-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.ps-chat .ps-chat__actions { display: flex; flex-wrap: wrap; gap: 8px; align-self: flex-start; }
.ps-chat .ps-btn--small { min-height: 38px; padding: 0 14px; font-size: 14px; }
.ps-chat .ps-chat__chips { display: flex; flex-wrap: wrap; gap: 8px; padding: 0 16px 12px; background: var(--ps-soft); }
.ps-chat .ps-chat__chips[hidden] { display: none; }
.ps-chat .ps-chat__chip { border: 1px solid var(--ps-accent); color: var(--ps-accent); background: #FFFFFF; border-radius: 999px; padding: 7px 13px; font: 600 13.5px/1.2 var(--ps-font-body); cursor: pointer; }
.ps-chat .ps-chat__chip:hover { background: var(--ps-accent-soft); }

.ps-chat .ps-chat__lead { display: flex; flex-direction: column; gap: 10px; padding: 14px 16px; border-top: 1px solid var(--ps-line); background: #FFFFFF; max-height: 60%; overflow-y: auto; }
.ps-chat .ps-chat__lead[hidden] { display: none; }
.ps-chat .ps-chat__lead .ps-field input { min-height: 42px; }
.ps-chat .ps-chat__lead-title { margin: 0; font-weight: 600; color: var(--ps-ink); }
.ps-chat .ps-chat__lead-btns { display: flex; gap: 8px; flex-wrap: wrap; }
.ps-chat .ps-chat__lead-status { font-size: 13px; color: #9A3412; }
.ps-chat .ps-chat__lead-status:empty { display: none; }

.ps-chat .ps-chat__form { display: flex; gap: 8px; align-items: flex-end; padding: 12px 12px 8px; border-top: 1px solid var(--ps-line); background: #FFFFFF; }
.ps-chat .ps-chat__form textarea { flex: 1; min-height: 44px; max-height: 110px; resize: none; border: 1px solid var(--ps-line-strong); border-radius: var(--ps-radius-btn); padding: 11px 12px; font: 15px/1.4 var(--ps-font-body); color: var(--ps-ink); background: #FFFFFF; margin: 0; }
.ps-chat .ps-chat__form textarea:focus { border-color: var(--ps-accent); outline: 2px solid var(--ps-accent-soft); }
.ps-chat .ps-chat__send { flex: none; width: 44px; height: 44px; border: 0; border-radius: var(--ps-radius-btn); background: var(--ps-accent); color: var(--ps-accent-ink); display: inline-flex; align-items: center; justify-content: center; cursor: pointer; }
.ps-chat .ps-chat__foot { padding: 4px 14px 12px; background: #FFFFFF; display: flex; flex-wrap: wrap; gap: 4px 16px; align-items: center; }
.ps-chat .ps-chat__foot p { flex-basis: 100%; margin: 4px 0 0; font-size: 11.5px; color: var(--ps-muted); line-height: 1.4; }
.ps-chat .ps-chat__link { display: inline-flex; align-items: center; gap: 5px; border: 0; background: none; padding: 0; color: var(--ps-accent); font: 600 13px/1.4 var(--ps-font-body); text-decoration: underline; text-underline-offset: 2px; cursor: pointer; }
.ps-chat .screen-reader-text { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(1px, 1px, 1px, 1px); }

@media (max-width: 640px) {
	.propalia-site.ps-chat { right: 14px; bottom: 14px; }
	.ps-chat .ps-chat__launcher { height: 54px; padding: 0 16px 0 14px; }
	.propalia-site.ps-chat.is-open { inset: 0; right: 0; bottom: 0; }
	.ps-chat .ps-chat__panel { width: 100%; height: 100%; border-radius: 0; border: 0; }
	.ps-chat .ps-chat__card { min-width: 0; }
}
@media print { .propalia-site.ps-chat { display: none; } }
.ps-chat .ps-chat__lead-note { margin: -4px 0 0; font-size: 12.5px; color: var(--ps-muted); line-height: 1.4; }
.ps-chat .ps-chat__lead input[type=file] { min-height: 0; padding: 9px 10px; font-size: 13.5px; background: var(--ps-soft); }
.ps-chat .ps-chat__files { font-size: 12.5px; color: var(--ps-muted); overflow-wrap: anywhere; }
.ps-chat .ps-chat__files:empty { display: none; }
.ps-chat .ps-chat__opt { font-weight: 400; color: var(--ps-muted); }
