/**
 * CojosBot - Estilos del chatbot flotante
 * @package CojosSL\Modules\Chatbot
 */

/* Botón flotante */
#cojos-chatbot-boton {
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 50%;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
    cursor: pointer;
    z-index: 9998;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

#cojos-chatbot-boton:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.6);
}

/* Ventana del chatbot */
#cojos-chatbot-ventana {
    display: none;
    flex-direction: column;
    position: fixed;
    bottom: 90px;
    right: 20px;
    width: 350px;
    max-width: calc(100vw - 40px);
    height: 500px;
    max-height: calc(100vh - 120px);
    background: white;
    border-radius: 12px;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.2);
    z-index: 9999;
    overflow: hidden;
}

/* Header del chatbot */
.cojos-chatbot-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 15px 20px;
    font-weight: 600;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 16px;
}

.cojos-chatbot-header span {
    cursor: pointer;
    font-size: 20px;
    line-height: 1;
    transition: opacity 0.2s;
}

.cojos-chatbot-header span:hover {
    opacity: 0.8;
}

/* Área de mensajes */
#cojos-chatbot-mensajes {
    flex: 1;
    padding: 15px;
    overflow-y: auto;
    background: #f8f9fa;
    font-size: 14px;
    line-height: 1.5;
}

#cojos-chatbot-mensajes div {
    margin-bottom: 12px;
    padding: 10px 12px;
    border-radius: 8px;
    background: white;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

#cojos-chatbot-mensajes div strong {
    color: #667eea;
    display: block;
    margin-bottom: 4px;
}

/* Formulario */
#cojos-chatbot-form {
    display: flex;
    padding: 15px;
    background: white;
    border-top: 1px solid #e9ecef;
    gap: 8px;
}

#cojos-chatbot-input {
    flex: 1;
    padding: 10px 12px;
    border: 1px solid #dee2e6;
    border-radius: 8px;
    font-size: 14px;
    outline: none;
    transition: border-color 0.2s;
}

#cojos-chatbot-input:focus {
    border-color: #667eea;
}

#cojos-chatbot-form button {
    padding: 10px 20px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: opacity 0.2s;
    font-size: 14px;
}

#cojos-chatbot-form button:hover {
    opacity: 0.9;
}

#cojos-chatbot-form button:active {
    transform: scale(0.98);
}

/* Scrollbar personalizada */
#cojos-chatbot-mensajes::-webkit-scrollbar {
    width: 6px;
}

#cojos-chatbot-mensajes::-webkit-scrollbar-track {
    background: #f1f1f1;
}

#cojos-chatbot-mensajes::-webkit-scrollbar-thumb {
    background: #667eea;
    border-radius: 3px;
}

#cojos-chatbot-mensajes::-webkit-scrollbar-thumb:hover {
    background: #764ba2;
}

/* Responsive */
@media (max-width: 480px) {
    #cojos-chatbot-boton {
        bottom: 15px;
        right: 15px;
        width: 55px;
        height: 55px;
        font-size: 24px;
    }

    #cojos-chatbot-ventana {
        width: calc(100vw - 30px);
        height: calc(100vh - 100px);
        bottom: 80px;
        right: 15px;
    }

    .cojos-chatbot-header {
        font-size: 14px;
        padding: 12px 15px;
    }

    #cojos-chatbot-mensajes {
        font-size: 13px;
        padding: 12px;
    }

    #cojos-chatbot-form {
        padding: 12px;
    }

    #cojos-chatbot-input,
    #cojos-chatbot-form button {
        font-size: 13px;
    }
}

/* Animación de aparición */
@keyframes chatbotSlideUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

#cojos-chatbot-ventana[style*="display: flex"] {
    animation: chatbotSlideUp 0.3s ease;
}