#n8n-chat-input-area .input-row {
    display: flex;
    gap: 12px;
    align-items: center;
}
/* custom-chat.css */
@import url(https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600&display=swap);

* {
    box-sizing: border-box;
}

#n8n-chatbot-widget {
    position: fixed;
    bottom: 25px;
    right: 25px;
    width: 380px;
    height: 550px;
    background: linear-gradient(135deg, #F48B22 0%, #4F5650 100%);
    border: none;
    border-radius: 20px;
    box-shadow: 0 20px 40px rgba(0,0,0,0.15), 0 0 0 1px rgba(255,255,255,0.1);
    display: flex;
    flex-direction: column;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    overflow: hidden;
    z-index: 9999;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    transform: translateY(100%) translateX(100%) scale(0.8);
    opacity: 0;
    visibility: hidden;
    backdrop-filter: blur(20px);
}

#n8n-chatbot-widget.open {
    transform: translateY(0) translateX(0) scale(1);
    opacity: 1;
    visibility: visible;
}

#n8n-chatbot-toggle-button {
    position: fixed;
    bottom: 25px;
    right: 25px;
    width: 64px;
    height: 64px;
    background: linear-gradient(135deg, #F48B22 0%, #4F5650 100%);
    color: white;
    border: none;
    border-radius: 50%;
    box-shadow: 0 8px 25px rgba(244, 139, 34, 0.4), 0 0 0 1px rgba(255,255,255,0.1);
    font-size: 0; /* Ocultar el texto/emoji del HTML */
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 9999999;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    backdrop-filter: blur(20px);
    isolation: isolate;
}

/* Reemplazar el emoji con SVG del botsito */
#n8n-chatbot-toggle-button::before {
    content: '';
    width: 32px;
    height: 32px;
    background-image: var(--wpr-bg-954c4912-a647-49cb-aa5b-cbb52b84d57e);
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
}

#n8n-chatbot-toggle-button:hover {
    transform: scale(1.1) translateY(-2px);
    box-shadow: 0 12px 35px rgba(102, 126, 234, 0.5), 0 0 0 1px rgba(255,255,255,0.2);
    animation: wiggle 0.5s ease-in-out;
}

@keyframes wiggle {
    0%, 100% { transform: scale(1.1) translateY(-2px) rotate(0deg); }
    25% { transform: scale(1.1) translateY(-2px) rotate(-3deg); }
    75% { transform: scale(1.1) translateY(-2px) rotate(3deg); }
}

#n8n-chat-header {
    background: linear-gradient(135deg, #F48B22 0%, #4F5650 100%);
    backdrop-filter: blur(20px);
    color: white;
    padding: 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    position: relative;
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 16px;
    font-weight: 600;
}

/* Agregar avatar del bot al header */
#n8n-chat-header::before {
    content: '';
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    background-image: var(--wpr-bg-fd20c958-ace3-4f5b-939e-1a3861603df8);
    background-size: 32px 32px;
    background-repeat: no-repeat;
    background-position: center;
    margin-right: 12px;
    flex-shrink: 0;
}

.close-button {
    background: rgba(255, 255, 255, 0.1);
    border: none;
    color: white;
    font-size: 24px;
    cursor: pointer;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    backdrop-filter: blur(10px);
    flex-shrink: 0;
}

.close-button:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: scale(1.1);
}

#n8n-chat-messages {
    flex-grow: 1;
    overflow-y: auto;
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 16px;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    scrollbar-width: thin;
    scrollbar-color: rgba(102, 126, 234, 0.3) transparent;
}

#n8n-chat-messages::-webkit-scrollbar {
    width: 4px;
}

#n8n-chat-messages::-webkit-scrollbar-track {
    background: transparent;
}

#n8n-chat-messages::-webkit-scrollbar-thumb {
    background: rgba(102, 126, 234, 0.3);
    border-radius: 2px;
}

.n8n-message {
    padding: 12px 16px;
    border-radius: 18px;
    max-width: 85%;
    word-wrap: break-word;
    font-size: 14px;
    line-height: 1.4;
    position: relative;
    animation: messageSlideIn 0.3s ease-out;
}

@keyframes messageSlideIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.n8n-message.user {
    align-self: flex-end;
    background: #4F5650;
    color: #fff;
    box-shadow: 0 4px 12px rgba(79, 86, 80, 0.3);
    border-bottom-right-radius: 6px;
}

.n8n-message.bot {
    align-self: flex-start;
    background: #F48B22;
    color: #fff;
    box-shadow: 0 4px 12px rgba(244, 139, 34, 0.15);
    border: 1px solid rgba(244, 139, 34, 0.15);
    border-bottom-left-radius: 6px;
    position: relative;
}

.n8n-message.bot::before {
    content: '';
    position: absolute;
    left: -8px;
    top: 12px;
    width: 16px;
    height: 16px;
    background: #F48B22;
    border: 1px solid rgba(244, 139, 34, 0.15);
    border-right: none;
    border-bottom: none;
    transform: rotate(-45deg);
    border-radius: 2px 0 0 0;
}

#n8n-chat-input-area {
    display: flex;
    padding: 20px;
    gap: 12px;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    border-top: 1px solid rgba(0, 0, 0, 0.05);
    position: relative;
    flex-direction: column;
    align-items: stretch;
}

#levitze-brand {
    display: block;
    text-align: center;
    font-size: 11px;
    color: #F48B22;
    font-weight: 400;
    margin-top: 2px;
    margin-bottom: -10px;
    letter-spacing: 0.2px;
    user-select: none;
    padding: 0 0 8px 0;
    opacity: 0.7;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

#n8n-user-input {
    flex-grow: 1;
    padding: 14px 18px;
    border: 2px solid rgba(102, 126, 234, 0.1);
    border-radius: 25px;
    font-size: 14px;
    font-family: 'Inter', sans-serif;
    background: white;
    transition: all 0.2s ease;
    outline: none;
}

#n8n-user-input:focus {
    border-color: rgba(102, 126, 234, 0.4);
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

#n8n-user-input::placeholder {
    color: #a0aec0;
}

#n8n-send-button {
    background: linear-gradient(135deg, #F48B22 0%, #4F5650 100%);
    color: white;
    border: none;
    border-radius: 50%;
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 4px 12px rgba(244, 139, 34, 0.3);
    font-size: 20px;
}

#n8n-send-button:hover {
    transform: scale(1.05);
    box-shadow: 0 6px 16px rgba(102, 126, 234, 0.4);
}

#n8n-send-button:active {
    transform: scale(0.95);
}

/* Indicador de escritura mejorado */

#typing-indicator {
    display: flex;
    align-items: center;
    min-height: 24px;
    background: transparent;
    box-shadow: none;
}

.typing-dots {
    display: flex;
    gap: 4px;
    align-items: flex-end;
    height: 16px;
    margin-left: 2px;
}

.typing-dots .dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #F48B22;
    opacity: 0.7;
    animation: typing-dot 1.2s infinite both;
}
.typing-dots .dot:nth-child(2) {
    animation-delay: 0.2s;
}
.typing-dots .dot:nth-child(3) {
    animation-delay: 0.4s;
}

@keyframes typing-dot {
    0%, 80%, 100% {
        transform: translateY(0);
        opacity: 0.7;
    }
    40% {
        transform: translateY(-7px);
        opacity: 1;
    }
}

/* Responsive */
@media (max-width: 480px) {
    #n8n-chatbot-widget {
        width: 100vw;
        height: 100vh;
        bottom: 0;
        right: 0;
        top: 0;
        left: 0;
        border-radius: 0;
        transform: translateX(100%);
        z-index: 999999;
        position: fixed;
        visibility: hidden;
        opacity: 0;
        transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    }
    
    #n8n-chatbot-widget.open {
        transform: translateX(0);
        visibility: visible;
        opacity: 1;
    }
    
    #n8n-chatbot-toggle-button {
        bottom: 20px;
        right: 20px;
        width: 56px;
        height: 56px;
        z-index: 1000000;
        position: fixed;
    }
    
    /* Solución específica para conflictos con TranslatePress */
    /* Solo ocultar temporalmente cuando el chat está abierto, no cambiar position permanentemente */
    #trp-floater-ls {
        z-index: 999 !important;
    }
    
    /* Neutralizar completamente el flotador de idiomas SOLO cuando el chat está abierto */
    #n8n-chatbot-widget.open ~ #trp-floater-ls,
    body:has(#n8n-chatbot-widget.open) #trp-floater-ls {
        display: none !important;
        visibility: hidden !important;
        opacity: 0 !important;
    }
    
    /* Asegurar que nuestro botón tenga prioridad sobre otros elementos flotantes */
    #n8n-chatbot-toggle-button {
        z-index: 9999999 !important;
        position: fixed !important;
        isolation: isolate !important;
    }
    
    /* Cuando el chat está abierto, ocultar temporalmente elementos que interfieren */
    #n8n-chatbot-widget.open ~ #trp-floater-ls,
    #n8n-chatbot-widget.open ~ [id*="trp-"][id*="floater"] {
        display: none !important;
        visibility: hidden !important;
        opacity: 0 !important;
        z-index: -1 !important;
    }
    
    #n8n-chatbot-widget {
        z-index: 9999998 !important;
        isolation: isolate !important;
    }
    
    #n8n-chatbot-toggle-button.hidden,
    #n8n-chatbot-toggle-button.hidden *,
    button#n8n-chatbot-toggle-button.hidden,
    [id="n8n-chatbot-toggle-button"].hidden {
        display: none !important;
        visibility: hidden !important;
        opacity: 0 !important;
        pointer-events: none !important;
        transform: scale(0) !important;
        position: absolute !important;
        left: -99999px !important;
        top: -99999px !important;
        width: 0px !important;
        height: 0px !important;
        z-index: -1 !important;
        overflow: hidden !important;
        clip: rect(0, 0, 0, 0) !important;
        margin: -1px !important;
        padding: 0 !important;
        border: 0 !important;
    }
    
    #n8n-chat-header {
        padding: 20px 16px;
        font-size: 16px;
        background: linear-gradient(135deg, #F48B22 0%, #4F5650 100%);
    }
    
    #n8n-chat-messages {
        padding: 16px;
        gap: 12px;
        background: rgba(255, 255, 255, 0.95);
    }
    
    .n8n-message {
        font-size: 14px;
        max-width: 85%;
    }
    
    #n8n-chat-input-area {
        padding: 16px;
        background: rgba(255, 255, 255, 0.95);
    }
    
    #n8n-user-input {
        font-size: 16px;
        padding: 12px 16px;
        border: 2px solid rgba(102, 126, 234, 0.1);
        border-radius: 25px;
        background: white;
    }
    
    #n8n-send-button {
        width: 48px;
        height: 48px;
        font-size: 18px;
    }
}