﻿/* ===============================
   BOT IA – Chilecito Tienda
================================ */

/* Botón flotante */
#ct-bot-toggle {
    position: fixed;
    right: 18px;
    top: 50%;
    transform: translateY(-50%);
    width: 54px;
    height: 54px;
    border-radius: 50%;
    background: linear-gradient(135deg, #16a34a, #22c55e);
    color: #fff;
    font-size: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 9998;
    box-shadow: 0 10px 25px rgba(0,0,0,.25);
}

/* Panel del chat */
/* Panel del chat */
/* Panel del chat */
#ct-bot-panel {
    position: fixed;
    right: -380px; /* ⬅️ oculto fuera de pantalla */
    top: 50%;
    width: 360px;
    max-width: 95%;
    height: 60vh;
    transform: translateY(-50%); /* ✅ solo centrado vertical */
    transition: right .35s ease;
    background: #ffffff;
    box-shadow: -10px 0 30px rgba(0,0,0,.2);
    z-index: 9999;
    display: flex;
    flex-direction: column;
    border-radius: 16px;
    overflow: hidden;
}

    /* Abierto */
    #ct-bot-panel.ct-open {
        right: 15px; /* ⬅️ entra hacia la izquierda, SIN saltar */
    }


/* Header */
.ct-bot-header {
    padding: 14px 16px;
    background: #16a34a;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.ct-bot-title {
    font-weight: 600;
}

#ct-bot-close {
    background: transparent;
    border: none;
    color: #fff;
    font-size: 18px;
    cursor: pointer;
}

/* Mensajes */
.ct-bot-messages {
    flex: 1;
    padding: 14px;
    overflow-y: auto;
    background: #f9fafb;
}

.ct-msg {
    max-width: 85%;
    padding: 10px 12px;
    margin-bottom: 10px;
    border-radius: 14px;
    font-size: 14px;
    line-height: 1.4;
}

    .ct-msg.ct-bot {
        background: #e5f7ed;
        color: #065f46;
    }

    .ct-msg.ct-user {
        background: #dcfce7;
        margin-left: auto;
        color: #065f46;
    }

/* Input */
.ct-bot-input {
    display: flex;
    padding: 10px;
    border-top: 1px solid #e5e7eb;
}

    .ct-bot-input input {
        flex: 1;
        padding: 10px;
        border-radius: 20px;
        border: 1px solid #d1d5db;
        outline: none;
    }

    .ct-bot-input button {
        margin-left: 8px;
        border-radius: 50%;
        width: 42px;
        height: 42px;
        border: none;
        background: #16a34a;
        color: #fff;
        font-size: 18px;
        cursor: pointer;
    }

/* Mobile */
@media (max-width: 480px) {
    #ct-bot-panel {
        width: 100%;
    }
}
/* Chips */
.ct-bot-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    padding: 10px;
    border-top: 1px solid #e5e7eb;
    background: #f9fafb;
}

.ct-chip {
    border: none;
    padding: 6px 12px;
    border-radius: 20px;
    background: #e5f7ed;
    color: #065f46;
    font-size: 13px;
    cursor: pointer;
    transition: all .2s ease;
}

    .ct-chip:hover {
        background: #bbf7d0;
    }
/* Mensajes con avatar */
.ct-msg {
    display: flex;
    align-items: flex-end;
    gap: 8px;
    max-width: 100%;
}

    .ct-msg .ct-avatar {
        width: 28px;
        height: 28px;
        border-radius: 50%;
        background-size: cover;
        background-position: center;
        flex-shrink: 0;
    }

    .ct-msg.ct-bot {
        justify-content: flex-start;
    }

    .ct-msg.ct-user {
        justify-content: flex-end;
    }

    .ct-msg.ct-bot .ct-bubble {
        background: #e5f7ed;
        color: #065f46;
        border-radius: 14px 14px 14px 4px;
    }

    .ct-msg.ct-user .ct-bubble {
        background: #dcfce7;
        color: #065f46;
        border-radius: 14px 14px 4px 14px;
    }

/* Burbuja */
.ct-bubble {
    padding: 10px 12px;
    font-size: 14px;
    line-height: 1.4;
    max-width: 75%;
}
/* Header bot – icono */
.ct-bot-header img {
    width: 28px; /* tamaño chico */
    height: 28px;
    object-fit: cover;
    border-radius: 50%; /* circular */
    margin-right: 10px;
    box-shadow: 0 2px 6px rgba(0,0,0,.25);
}

/* Asegura alineación horizontal */
.ct-bot-header {
    display: flex;
    align-items: center;
    gap: 6px;
}

/* Título un poco más fuerte */
.ct-bot-title {
    font-weight: 600;
    font-size: 15px;
    white-space: nowrap;
}
/* Ajuste tipografía para ganar espacio */
.ct-msg {
    font-size: 13px;
}

.ct-bubble {
    font-size: 13px;
    line-height: 1.35;
}

.ct-chip {
    font-size: 12px;
    padding: 6px 10px;
}

.ct-bot-title {
    font-size: 14px;
}
/* Badge/botón dentro del mismo mensaje */
.ct-extra {
    margin-top: 10px;
}

.ct-link-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 8px 12px;
    border-radius: 999px;
    background: #f50505;
    color: #fff;
    border: 0;
    cursor: pointer;
    font-weight: 700;
    font-size: 13px;
    text-decoration: none;
    box-shadow: 0 8px 18px rgba(0,0,0,.12);
    transition: transform .12s ease, filter .12s ease;
}

    .ct-link-badge:hover {
        transform: translateY(-1px);
        filter: brightness(1.02);
    }

    .ct-link-badge:active {
        transform: translateY(0);
    }
/* Botón flotante con imagen */
#ct-bot-toggle {
    position: fixed;
    right: 18px;
    top: 50%;
    transform: translateY(-50%);
    width: 54px;
    height: 54px;
    border-radius: 50%;
    background: linear-gradient(135deg, #16a34a, #22c55e);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 9998;
    box-shadow: 0 10px 25px rgba(0,0,0,.25);
    transition: transform .2s ease, box-shadow .2s ease;
}

    /* Imagen del bot */
    #ct-bot-toggle img {
        width: 32px; /* 👈 tamaño chico y prolijo */
        height: 32px;
        object-fit: cover;
        border-radius: 50%;
        pointer-events: none; /* 👈 no rompe el click */
    }

    /* Hover premium */
    #ct-bot-toggle:hover {
        transform: translateY(-50%) scale(1.06);
        box-shadow: 0 14px 30px rgba(0,0,0,.35);
    }
.ct-extra {
    margin-top: 10px;
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.ct-link-badge {
    border: none;
    padding: 10px 14px;
    border-radius: 999px;
    background: #ef4444;
    color: #fff;
    font-weight: 800;
    font-size: 13px;
    cursor: pointer;
}

.ct-wpp-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 10px 14px;
    border-radius: 999px;
    background: linear-gradient(135deg,#16a34a,#22c55e);
    color: #fff;
    font-weight: 800;
    font-size: 13px;
    text-decoration: none;
    box-shadow: 0 10px 18px rgba(0,0,0,.12);
}
