/**
 * Estilos para el chatbot de Alfred SEO
 */

/* Contenedor principal del chatbot */
.alfred-chatbot-container {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 999999;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
    font-size: 14px;
    line-height: 1.5;
    color: #333;
}

/* Botón del chatbot */
.alfred-chatbot-button {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background-color: #4CAF50;
    color: white;
    cursor: pointer;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
    transition: all 0.3s ease;
}

.alfred-chatbot-button:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.25);
}

.alfred-chatbot-button-icon {
    width: 30px;
    height: 30px;
}

.alfred-chatbot-button-text {
    margin-left: 10px;
    font-weight: 500;
}

/* Posiciones del botón */
.alfred-chatbot-button.bottom-right {
    position: fixed;
    bottom: 20px;
    right: 20px;
}

.alfred-chatbot-button.bottom-left {
    position: fixed;
    bottom: 20px;
    left: 20px;
}

.alfred-chatbot-button.top-right {
    position: fixed;
    top: 20px;
    right: 20px;
}

.alfred-chatbot-button.top-left {
    position: fixed;
    top: 20px;
    left: 20px;
}

/* Widget del chatbot */
.alfred-chatbot-widget {
    position: fixed;
    bottom: 90px;
    right: 20px;
    width: 350px;
    height: 500px;
    border-radius: 10px;
    background-color: white;
    box-shadow: 0 5px 25px rgba(0, 0, 0, 0.2);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    z-index: 999999;
}

/* Cabecera del chatbot */
.alfred-chatbot-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 15px;
    background-color: #4CAF50;
    color: white;
}

.alfred-chatbot-header-info {
    display: flex;
    align-items: center;
}

.alfred-chatbot-avatar {
    width: 30px;
    height: 30px;
    margin-right: 10px;
    color: white;
}

.alfred-chatbot-title {
    font-size: 16px;
    font-weight: 600;
    margin: 0;
}

.alfred-chatbot-close,
.alfred-chatbot-minimize {
    background: none;
    border: none;
    color: white;
    font-size: 20px;
    cursor: pointer;
    padding: 0;
    margin-left: 10px;
    opacity: 0.8;
    transition: opacity 0.2s;
}

.alfred-chatbot-close:hover,
.alfred-chatbot-minimize:hover {
    opacity: 1;
}

/* Mensajes del chatbot */
.alfred-chatbot-messages {
    flex: 1;
    overflow-y: auto;
    padding: 15px;
    background-color: #f5f5f5;
}

.alfred-chatbot-message {
    display: flex;
    margin-bottom: 15px;
}

.alfred-chatbot-message:last-child {
    margin-bottom: 0;
}

.alfred-chatbot-message-avatar {
    width: 30px;
    height: 30px;
    margin-right: 10px;
    flex-shrink: 0;
}

.alfred-chatbot-message-bubble {
    max-width: 80%;
}

.alfred-chatbot-message-user {
    flex-direction: row-reverse;
}

.alfred-chatbot-message-user .alfred-chatbot-message-avatar {
    margin-right: 0;
    margin-left: 10px;
}

.alfred-chatbot-message-user .alfred-chatbot-message-bubble {
    margin-left: auto;
}

.alfred-chatbot-message-content {
    padding: 10px 15px;
    border-radius: 18px;
    background-color: white;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
    word-wrap: break-word;
}

.alfred-chatbot-message-user .alfred-chatbot-message-content {
    background-color: #4CAF50;
    color: white;
}

.alfred-chatbot-message-time {
    font-size: 11px;
    color: #999;
    margin-top: 5px;
    text-align: right;
}

/* Área de entrada */
.alfred-chatbot-input {
    display: flex;
    align-items: center;
    padding: 10px;
    border-top: 1px solid #eee;
    background-color: white;
}

.alfred-chatbot-input-field {
    flex: 1;
    border: 1px solid #ddd;
    border-radius: 20px;
    padding: 8px 15px;
    outline: none;
    font-family: inherit;
    font-size: inherit;
}

.alfred-chatbot-input-field:focus {
    border-color: #4CAF50;
}

.alfred-chatbot-send {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: #4CAF50;
    color: white;
    border: none;
    margin-left: 10px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.2s;
}

.alfred-chatbot-send:hover {
    background-color: #45a049;
}

.alfred-chatbot-send svg {
    width: 20px;
    height: 20px;
}

/* Indicador de carga */
.alfred-chatbot-message-loading .alfred-chatbot-message-content {
    display: flex;
    align-items: center;
}

.alfred-chatbot-message-loading .alfred-chatbot-message-content::after {
    content: "...";
    animation: loading 1.5s infinite;
}

@keyframes loading {
    0% { content: "."; }
    33% { content: ".."; }
    66% { content: "..."; }
}

/* Estilos para mensajes de error */
.alfred-chatbot-message-error .alfred-chatbot-message-content {
    background-color: #ffebee;
    color: #d32f2f;
    border: 1px solid #ffcdd2;
}

/* Estilos para elementos formateados */
.alfred-chatbot-message-content a {
    color: #2196F3;
    text-decoration: underline;
}

.alfred-chatbot-message-user .alfred-chatbot-message-content a {
    color: #E1F5FE;
}

.alfred-chatbot-message-content code {
    background-color: #f5f5f5;
    padding: 2px 4px;
    border-radius: 3px;
    font-family: monospace;
    font-size: 0.9em;
    color: #e91e63;
}

.alfred-chatbot-message-user .alfred-chatbot-message-content code {
    background-color: rgba(255, 255, 255, 0.2);
    color: #fff;
}

.alfred-chatbot-message-content pre {
    background-color: #f5f5f5;
    padding: 10px;
    border-radius: 5px;
    overflow-x: auto;
    margin: 10px 0;
}

.alfred-chatbot-message-content pre code {
    background-color: transparent;
    padding: 0;
    color: #333;
    font-family: monospace;
    font-size: 0.9em;
    white-space: pre-wrap;
}

.alfred-chatbot-message-user .alfred-chatbot-message-content pre {
    background-color: rgba(255, 255, 255, 0.1);
}

.alfred-chatbot-message-user .alfred-chatbot-message-content pre code {
    color: #fff;
}

.alfred-chatbot-message-content ul, 
.alfred-chatbot-message-content ol {
    margin: 5px 0;
    padding-left: 20px;
}

.alfred-chatbot-message-content li {
    margin-bottom: 5px;
}

.alfred-chatbot-message-content strong {
    font-weight: bold;
}

.alfred-chatbot-message-content em {
    font-style: italic;
}

/* Responsive */
@media (max-width: 480px) {
    .alfred-chatbot-widget {
        width: calc(100% - 40px);
        height: calc(100% - 120px);
        bottom: 80px;
        right: 20px;
        left: 20px;
    }
    
    .alfred-chatbot-button.with-text {
        width: auto;
        padding: 0 15px;
        border-radius: 30px;
    }
} 