/*
 * Chatbot Incrustado Styles for La Rebelión (chatbot_incrustado.css)
 */

body {
    background-color: #f8f8f8; /* Fondo muy claro */
    font-family: 'Heebo', sans-serif;
    color: #333;
}

.content-wrapper {
    max-width: 1200px;
    margin: 0 auto;
    padding: 50px 20px;
}

/* Estilo del texto principal */
.hero-section h1 {
    font-size: 4em;
    font-weight: 700;
    line-height: 1.1;
    margin-bottom: 30px;
}

.highlight-text {
    color: #007bff; /* Color verde del ejemplo */
    font-weight: 700;
    display: block; /* Para que 'delight' salte de línea si el diseño lo requiere */
}

/* Contenedor del Chat Incrustado */
.embedded-chat-container {
    margin-top: 50px;
    padding: 0;
    max-width: 800px; /* Limita el ancho del chat */
    margin-bottom: 50px;
}

/* --- Estilo de la Entrada Inicial (Estilo principal del ejemplo) --- */
.initial-input-area {
    display: flex;
    align-items: center;
    background-color: #eef2f5; /* Fondo gris claro */
    border-radius: 35px;
    padding: 10px 25px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
    margin-bottom: 20px;
}

.initial-input-area #initial-user-input {
    flex-grow: 1;
    border: none;
    background: transparent;
    padding: 10px 0;
    font-size: 1.1em;
    outline: none;
    color: #444;
}

.initial-input-area #initial-send-btn {
    background-color: #007bff;
    color: white;
    border: none;
    border-radius: 50%;
    width: 45px;
    height: 45px;
    cursor: pointer;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 1.2em;
    transition: background-color 0.2s;
}

.initial-input-area #initial-send-btn:hover {
    background-color: #7cb342;
}


/* --- Estilo del Diálogo (Ventana de Chat después de la primera interacción) --- */
.dialog-window {
    background-color: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    display: flex;
    flex-direction: column;
    height: 450px; /* Altura fija para el diálogo */
}

.dialog-window.hidden {
    display: none;
}

#chatbot-messages {
    flex-grow: 1;
    overflow-y: auto;
    padding: 15px;
}

.message {
    max-width: 85%;
    padding: 10px 15px;
    border-radius: 18px;
    margin-bottom: 10px;
    line-height: 1.5;
    font-size: 0.95em;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.user-message {
    background-color: #e3f2fd; 
    color: #263238;
    margin-left: auto;
    border-bottom-right-radius: 5px;
}

.bot-message {
    background-color: #e8f5e9; 
    color: #263238;
    margin-right: auto;
    border-bottom-left-radius: 5px;
}

/* Estilos de Markdown (igual que antes) */
.bot-message strong {
    font-weight: 700;
    color: #4CAF50;
}

.bot-message ul, .bot-message ol {
    padding-left: 20px;
    margin-top: 5px;
}

.bot-message pre {
    background-color: #263238;
    color: #ffffff;
    padding: 10px;
    border-radius: 6px;
    overflow-x: auto;
    font-family: 'Consolas', 'Monaco', monospace;
    font-size: 0.85em;
    white-space: pre-wrap;
    word-break: break-all;
}

.bot-message code {
    background-color: #cfd8dc;
    padding: 2px 4px;
    border-radius: 4px;
    font-family: 'Consolas', 'Monaco', monospace;
    font-size: 0.9em;
}

/* Pie de Página del Diálogo */
.dialog-footer {
    padding: 10px;
    display: flex;
    border-top: 1px solid #e0e0e0;
    gap: 8px;
}

.dialog-footer #user-input {
    flex-grow: 1;
    padding: 12px 15px;
    border: 1px solid #cfd8dc;
    border-radius: 20px;
    font-size: 1.0em;
    outline: none;
}

.dialog-footer #send-btn {
    background-color: #007bff;
    color: white;
    border: none;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    cursor: pointer;
    display: flex;
    justify-content: center;
    align-items: center;
}

/* Aviso de Privacidad */
.privacy-notice {
    font-size: 0.8em;
    color: #777;
    text-align: center;
    padding: 15px 0 0;
}

.privacy-notice a {
    color: #007bff;
    text-decoration: none;
}

/* Spinner de Carga */
.loading-spinner {
    border: 3px solid rgba(0, 0, 0, 0.1);
    border-left-color: #007bff;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    animation: spin 1s linear infinite;
    margin: 10px 0 10px 15px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Media Queries (Ajustar para móviles) */
@media (max-width: 768px) {
    .hero-section h1 {
        font-size: 3em;
    }
    .embedded-chat-container {
        max-width: 100%;
    }
    .initial-input-area {
        padding: 8px 15px;
    }
    .initial-input-area #initial-user-input {
        font-size: 1em;
    }
}
