/* Clever Elements - Product Chat widget, tarjeta moderna anclada al boton (DaiscomIA). */
.elementor-product-chat {
    position: relative;
    display: inline-block;
}
.elementor-product-chat .ce-chat-toggle {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 22px;
    border: 0;
    border-radius: 999px;
    cursor: pointer;
    font-weight: 600;
    box-shadow: 0 6px 18px rgba(76, 29, 149, 0.28);
}
.elementor-product-chat .ce-chat-panel {
    position: absolute;
    z-index: 200;
    left: 0;
    width: 380px;
    max-width: calc(100vw - 32px);
    background: #fff;
    border: 1px solid #e9e4f5;
    border-radius: 18px;
    box-shadow: 0 24px 60px rgba(35, 15, 80, 0.25);
    overflow: hidden;
    display: flex;
    flex-direction: column;
}
.elementor-product-chat .ce-chat-panel[hidden] {
    display: none !important;
}
/* Direccion elegida por JS segun el espacio visible desde el boton. */
.elementor-product-chat .ce-chat-panel.ce-open-down {
    top: calc(100% + 12px);
    bottom: auto;
}
.elementor-product-chat .ce-chat-panel.ce-open-up {
    bottom: calc(100% + 12px);
    top: auto;
}
.elementor-product-chat .ce-chat-panel.ce-align-right {
    left: auto;
    right: 0;
}
.elementor-product-chat .ce-chat-header {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 14px;
    background: linear-gradient(135deg, #6d28d9, #4c1d95);
    color: #fff;
}
.elementor-product-chat .ce-chat-status {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #4ade80;
    box-shadow: 0 0 0 3px rgba(74, 222, 128, 0.3);
    flex: none;
}
.elementor-product-chat .ce-chat-header-title {
    flex: 1;
    font-weight: 700;
    font-size: 14px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.elementor-product-chat .ce-chat-close {
    border: 0;
    background: rgba(255, 255, 255, 0.16);
    color: #fff;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    font-size: 18px;
    line-height: 1;
    cursor: pointer;
    flex: none;
}
.elementor-product-chat .ce-chat-product {
    padding: 8px 14px;
    background: #f8f6ff;
    border-bottom: 1px solid #eee9fb;
    font-size: 12.5px;
    color: #5b4a86;
}
.elementor-product-chat .ce-chat-messages {
    padding: 14px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    min-height: 160px;
    max-height: 340px;
    overflow-y: auto;
    background: #fbfbfe;
}
.elementor-product-chat .ce-chat-msg {
    padding: 9px 13px;
    border-radius: 14px;
    font-size: 14px;
    line-height: 1.45;
    max-width: 88%;
    word-wrap: break-word;
}
.elementor-product-chat .ce-chat-user {
    align-self: flex-end;
    background: #4c1d95;
    color: #fff;
    border-bottom-right-radius: 4px;
}
.elementor-product-chat .ce-chat-bot {
    align-self: flex-start;
    background: #fff;
    color: #33254f;
    border: 1px solid #ece7f7;
    border-bottom-left-radius: 4px;
    box-shadow: 0 2px 6px rgba(35, 15, 80, 0.06);
}
.elementor-product-chat .ce-chat-typing {
    display: inline-flex;
    gap: 4px;
    align-items: center;
    padding: 12px 14px;
}
.elementor-product-chat .ce-chat-typing i {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #8b5cf6;
    display: inline-block;
    animation: ce-chat-blink 1.2s infinite;
}
.elementor-product-chat .ce-chat-typing i:nth-child(2) {
    animation-delay: 0.2s;
}
.elementor-product-chat .ce-chat-typing i:nth-child(3) {
    animation-delay: 0.4s;
}
@keyframes ce-chat-blink {
    0%, 80%, 100% { opacity: 0.25; }
    40% { opacity: 1; }
}
.elementor-product-chat .ce-chat-form {
    display: flex;
    gap: 8px;
    padding: 10px 12px;
    border-top: 1px solid #eee9fb;
    background: #fff;
}
.elementor-product-chat .ce-chat-input {
    flex: 1;
    border: 1px solid #ddd6f3;
    border-radius: 999px;
    padding: 10px 14px;
    font-size: 14px;
    outline: none;
}
.elementor-product-chat .ce-chat-input:focus {
    border-color: #8b5cf6;
}
.elementor-product-chat .ce-chat-send {
    border: 0;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    flex: none;
    cursor: pointer;
    font-size: 17px;
    background: #6d28d9;
    color: #fff;
}
