/* ChatBot FOXITO & WhatsApp - Aligned Stack Edition */
.whatsapp-float {
    position: fixed;
    width: 60px;
    height: 60px;
    bottom: 85px; /* Abajo */
    right: 95px !important;
    z-index: 9999;
    background-color: #25d366;
    border: 2px solid rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(8px);
    color: #FFF !important;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 15px rgba(0,0,0,0.3);
}

.whatsapp-float:hover {
    transform: scale(1.1) rotate(5deg);
    box-shadow: 0 8px 25px rgba(37, 211, 102, 0.5);
}

#atrium-chatbot-container {
    position: fixed;
    bottom: 185px; /* Más separado del botón de WhatsApp */
    right: 95px !important;
    z-index: 10000;
}

#chatbot-toggle-btn {
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, #f26922 0%, #d85c1c 100%);
    border: 2px solid rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    color: white;
    font-size: 28px;
    cursor: pointer;
    transition: 0.4s;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 15px rgba(242, 105, 34, 0.4);
}

/* Ocultar burbuja cuando el chat está activo */
.chatbot-active #chatbot-toggle-btn {
    opacity: 0;
    transform: scale(0);
    pointer-events: none;
}

#chatbot-window {
    position: absolute;
    bottom: -70px; /* Ajuste para que la ventana salga desde el fondo */
    right: 0;
    width: 350px;
    max-width: 90vw;
    height: 520px;
    max-height: 70vh;
    background: rgba(20, 20, 20, 0.95);
    backdrop-filter: blur(25px);
    border: 1px solid rgba(242, 105, 34, 0.3);
    border-radius: 20px;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    transform: translateY(30px) scale(0.9);
    opacity: 0;
    pointer-events: none;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    box-shadow: 0 15px 50px rgba(0,0,0,0.5);
}

.chatbot-active #chatbot-window {
    transform: translateY(0) scale(1);
    opacity: 1;
    pointer-events: auto;
}

/* Rejilla de Botones - Solución al amontonamiento */
#chatbot-quick-replies {
    display: grid;
    grid-template-columns: 1fr;
    gap: 10px;
    margin-top: auto;
    padding-top: 15px;
}

.btn-quick-reply {
    padding: 12px;
    background: rgba(242, 105, 34, 0.1);
    border: 1px solid rgba(242, 105, 34, 0.3);
    border-radius: 12px;
    color: white;
    font-size: 13px;
    text-align: left;
    cursor: pointer;
    transition: 0.2s;
    font-weight: 500;
}

.btn-quick-reply:hover {
    background: rgba(242, 105, 34, 0.3);
    border-color: #f26922;
    transform: translateX(5px);
}

.chatbot-header { padding: 15px 20px; border-bottom: 1px solid rgba(255,255,255,0.1); }
.bot-avatar { width: 40px; height: 40px; background: #f26922; color: white; border-radius: 12px; display:flex; align-items:center; justify-content:center; font-weight:800; box-shadow: 0 0 15px rgba(242,105,34,0.5); }
.chatbot-body { flex-grow: 1; padding: 20px; overflow-y: auto; display:flex; flex-direction:column; }
.bot-msg { display:inline-block; padding:12px 16px; background:rgba(255,255,255,0.05); border:1px solid rgba(255,255,255,0.1); border-radius:15px; border-top-left-radius:2px; font-size:14px; color:#eee; }
.chatbot-footer { padding:10px; background:rgba(0,0,0,0.5); text-align:center; }
.x-small { font-size: 11px; }
