/* ==========================================================================
   WIDGET DE CHAT LIQUID GLASS (TEMA CLARO & AZUL CORPORATIVO)
   ========================================================================== */


/* BOTÓN FLOTANTE */

.chat-trigger-liquid {
    position: fixed;
    bottom: 25px;
    right: 25px;
    background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
    color: #ffffff;
    padding: 0.75rem 1.2rem;
    border-radius: 50px;
    display: flex;
    align-items: center;
    gap: 0.6rem;
    cursor: pointer;
    box-shadow: 0 10px 25px -3px rgba(37, 99, 235, 0.4);
    z-index: 999;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.chat-trigger-liquid:hover {
    transform: translateY(-3px) scale(1.03);
    box-shadow: 0 15px 30px -3px rgba(37, 99, 235, 0.6);
}

.chat-badge-liquid {
    font-weight: 700;
    font-size: 0.88rem;
}


/* VENTANA DE CHAT */

.chat-window-liquid {
    position: fixed;
    bottom: 90px;
    right: 25px;
    width: 360px;
    max-width: calc(100vw - 40px);
    height: 520px;
    max-height: calc(100vh - 120px);
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(16px) saturate(180%);
    -webkit-backdrop-filter: blur(16px) saturate(180%);
    border: 1px solid rgba(226, 232, 240, 0.9);
    border-radius: 20px;
    box-shadow: 0 20px 40px -10px rgba(15, 43, 92, 0.15);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    z-index: 1000;
    transition: all 0.3s ease;
}

.chat-window-liquid.hidden {
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px) scale(0.95);
    pointer-events: none;
}


/* HEADER DEL CHAT */

.chat-header-liquid {
    background: linear-gradient(135deg, #0f2b5c 0%, #1e40af 100%);
    color: #ffffff;
    padding: 1rem 1.25rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.chat-avatar-box {
    position: relative;
    font-size: 1.5rem;
}

.status-indicator {
    position: absolute;
    bottom: 0;
    right: 0;
    width: 8px;
    height: 8px;
    background: #10b981;
    border: 2px solid #0f2b5c;
    border-radius: 50%;
}

.chat-header-info {
    flex: 1;
}

.chat-header-info h4 {
    font-size: 0.95rem;
    font-weight: 800;
    margin: 0;
}

.chat-header-info p {
    font-size: 0.75rem;
    color: #93c5fd;
    margin: 0;
}

.chat-close-btn {
    background: rgba(255, 255, 255, 0.15);
    border: none;
    color: #ffffff;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 0.9rem;
}


/* CUERPO Y MENSAJES */

.chat-body-liquid {
    flex: 1;
    padding: 1rem;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    background: #f8fafc;
}

.chat-msg {
    max-width: 85%;
    padding: 0.75rem 1rem;
    border-radius: 14px;
    font-size: 0.88rem;
    line-height: 1.5;
}

.chat-msg.bot {
    background: #ffffff;
    color: #1e293b;
    align-self: flex-start;
    border: 1px solid #e2e8f0;
    border-bottom-left-radius: 4px;
}

.chat-msg.user {
    background: #2563eb;
    color: #ffffff;
    align-self: flex-end;
    border-bottom-right-radius: 4px;
}


/* ÁRBOLES DE BOTONES DE OPCIÓN */

.chat-tree-options {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
    margin-top: 0.5rem;
}

.chat-tree-btn {
    background: #ffffff;
    border: 1px solid #cbd5e1;
    color: #1e40af;
    padding: 0.6rem 0.85rem;
    border-radius: 10px;
    font-size: 0.82rem;
    font-weight: 700;
    text-align: left;
    cursor: pointer;
    transition: all 0.2s ease;
}

.chat-tree-btn:hover {
    background: #e0f2fe;
    border-color: #2563eb;
    transform: translateX(2px);
}


/* FOOTER INPUT */

.chat-footer-liquid {
    padding: 0.75rem;
    background: #ffffff;
    border-top: 1px solid #e2e8f0;
    display: flex;
    gap: 0.5rem;
}

.chat-footer-liquid input {
    flex: 1;
    border: 1px solid #cbd5e1;
    padding: 0.6rem 0.85rem;
    border-radius: 8px;
    font-size: 0.88rem;
    outline: none;
}

.chat-footer-liquid input:focus {
    border-color: #2563eb;
}

.chat-footer-liquid button {
    background: #2563eb;
    color: #ffffff;
    border: none;
    padding: 0.6rem;
    border-radius: 8px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}