#blanca-chat-widget {
    --bot-color-blanca: #B81626;
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 99999;
    font-family: -apple-system, Arial, sans-serif;
}

#blanca-chat-toggle {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    border: none;
    background: var(--bot-color-blanca);
    color: #fff;
    font-size: 24px;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
    display: flex;
    align-items: center;
    justify-content: center;
}

#blanca-chat-ventana {
    position: absolute;
    bottom: 70px;
    right: 0;
    width: 320px;
    max-width: 90vw;
    height: 420px;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 6px 20px rgba(0,0,0,0.25);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

#blanca-chat-cabecera {
    background: var(--bot-color-blanca);
    color: #fff;
    padding: 10px 14px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-weight: 600;
}

#blanca-chat-cabecera button {
    background: none;
    border: none;
    color: #fff;
    cursor: pointer;
    font-size: 16px;
}

#blanca-chat-mensajes {
    flex: 1;
    padding: 12px;
    overflow-y: auto;
    font-size: 14px;
    /* El tema de WordPress capitaliza cada palabra por defecto en algunos
       sitios — sin esto, el chat se ve con "Todas Las Palabras Así". */
    text-transform: none !important;
}

#blanca-chat-mensajes .blanca-msg {
    margin-bottom: 10px;
    line-height: 1.4;
}

#blanca-chat-mensajes .blanca-msg-usuario {
    text-align: right;
    color: #333;
}

#blanca-chat-mensajes .blanca-msg-bot {
    text-align: left;
    color: var(--bot-color-blanca);
}

#blanca-chat-mensajes .blanca-msg-escribiendo {
    opacity: 0.6;
    font-style: italic;
}

#blanca-chat-form {
    display: flex;
    border-top: 1px solid #eee;
}

#blanca-chat-input {
    flex: 1;
    border: none;
    padding: 10px;
    font-size: 14px;
    outline: none;
}

#blanca-chat-form button {
    border: none;
    background: var(--bot-color-blanca);
    color: #fff;
    padding: 0 16px;
    cursor: pointer;
}

/* --- Burbuja flotante de aviso (CTA) --- */
#ah-chat-cta {
    position: absolute;
    bottom: 70px;
    right: 0;
    background: #fff;
    color: #1B1B1B;
    padding: 12px 32px 12px 16px;
    border-radius: 12px;
    box-shadow: 0 8px 24px rgba(0,0,0,0.15);
    font-size: 13.5px;
    font-weight: 600;
    border: 2px solid var(--bot-color-blanca);
    max-width: 240px;
    line-height: 1.4;
    animation: ahFloatCta 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
}

#ah-chat-cta:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 28px rgba(184,22,38,0.18);
}

#ah-chat-cta-close {
    position: absolute;
    top: 4px;
    right: 8px;
    background: none;
    border: none;
    font-size: 18px;
    color: #9e9e9e;
    cursor: pointer;
    line-height: 1;
    padding: 2px;
}

#ah-chat-cta-close:hover {
    color: var(--bot-color-blanca);
}

.ah-chat-cta-arrow {
    position: absolute;
    bottom: -8px;
    right: 20px;
    width: 0;
    height: 0;
    border-left: 8px solid transparent;
    border-right: 8px solid transparent;
    border-top: 8px solid var(--bot-color-blanca);
}

.ah-chat-cta-arrow::after {
    content: "";
    position: absolute;
    bottom: 2px;
    left: -7px;
    width: 0;
    height: 0;
    border-left: 7px solid transparent;
    border-right: 7px solid transparent;
    border-top: 7px solid #fff;
}

@keyframes ahFloatCta {
    0% { opacity: 0; transform: translateY(15px) scale(0.9); }
    100% { opacity: 1; transform: translateY(0) scale(1); }
}
