/* CSS Encapsulado con prefijo esai-adv- */
#esai-adv-widget {
    position: fixed; bottom: 25px; right: 25px; z-index: 2147483647;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
}
.esai-adv-btn {
    width: 65px; height: 65px; border-radius: 50%;
    background: linear-gradient(135deg, #D9232D, #b51c24);
    border: none; color: white; cursor: pointer;
    box-shadow: 0 10px 25px rgba(217, 35, 45, 0.4);
    display: flex; align-items: center; justify-content: center;
    transition: transform 0.3s ease; float: right; padding: 0;
}
.esai-adv-btn:hover { transform: scale(1.05); }
.esai-adv-btn svg { width: 32px; height: 32px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

.esai-adv-window {
    position: absolute; bottom: 85px; right: 0;
    width: 360px; height: 550px; max-height: 75vh; max-width: calc(100vw - 40px);
    background: #ffffff; border-radius: 16px;
    box-shadow: 0 20px 50px rgba(0,0,0,0.2);
    display: flex; flex-direction: column; overflow: hidden;
    opacity: 0; pointer-events: none; transform: translateY(20px);
    transition: all 0.3s ease; border: 1px solid #eee;
}
.esai-adv-window.esai-adv-open { opacity: 1; pointer-events: auto; transform: translateY(0); }

.esai-adv-header { background: #1A1A1A; padding: 15px; display: flex; align-items: center; justify-content: space-between; color: white; }
.esai-adv-header-left { display: flex; align-items: center; gap: 10px; }
.esai-adv-avatar { width: 40px; height: 40px; border-radius: 50%; border: 2px solid #C5A059; }
.esai-adv-title { font-size: 15px; font-weight: bold; margin: 0; line-height: 1.2; color: white; }
.esai-adv-subtitle { font-size: 12px; color: #C5A059; margin: 0; }
.esai-adv-close { background: none; border: none; color: #aaa; cursor: pointer; padding: 5px; }
.esai-adv-close:hover { color: white; }
.esai-adv-close svg { width: 20px; height: 20px; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

.esai-adv-chat { flex: 1; background: #F8F9FA; padding: 15px; overflow-y: auto; display: flex; flex-direction: column; gap: 12px; }

.esai-adv-msg { max-width: 85%; padding: 12px 15px; font-size: 14px; line-height: 1.4; word-wrap: break-word; }
.esai-adv-bot { background: white; color: #1A1A1A; border-left: 4px solid #C5A059; border-radius: 12px 12px 12px 2px; align-self: flex-start; box-shadow: 0 2px 4px rgba(0,0,0,0.05); }
.esai-adv-bot strong { font-weight: 700; color: #000; }
.esai-adv-bot a { color: #D9232D; font-weight: bold; text-decoration: underline; }

.esai-adv-user { background: #1A1A1A; color: white; border-radius: 12px 12px 2px 12px; align-self: flex-end; }

.esai-adv-input-container { display: flex; padding: 10px; background: white; border-top: 1px solid #eee; gap: 8px; }
.esai-adv-input { flex: 1; padding: 10px 15px; border: 1px solid #ddd; border-radius: 20px; font-size: 14px; outline: none; background: #f9f9f9; }
.esai-adv-input:focus { border-color: #C5A059; background: white; }
.esai-adv-send { background: #D9232D; border: none; width: 40px; height: 40px; border-radius: 50%; color: white; cursor: pointer; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.esai-adv-send svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; margin-left: 2px;}

.esai-adv-typing { display: none; padding: 12px; background: white; border-radius: 12px; border-left: 4px solid #ccc; align-self: flex-start; width: max-content; gap: 4px;}
.esai-adv-typing.esai-adv-active { display: flex; }
.esai-adv-dot { width: 6px; height: 6px; background: #999; border-radius: 50%; animation: esai-adv-bounce 1.4s infinite ease-in-out both; }
.esai-adv-dot:nth-child(1) { animation-delay: -0.32s; }
.esai-adv-dot:nth-child(2) { animation-delay: -0.16s; }
@keyframes esai-adv-bounce { 0%, 80%, 100% { transform: scale(0); } 40% { transform: scale(1); } }
