/* ======================================== */
/* ==   Estilos Base para el Chatbot   == */
/* ======================================== */

/* NOTA: Los colores primarios (azul, #007bff) son un valor por defecto.
   Estos serán reemplazados por el color dinámico (#6e08f5 o el que corresponda) 
   que se define en el archivo footer.php. */

/* Estilos para el ícono flotante del chatbot */
#chatbot-icon {
    position: fixed;
    bottom: 25px;
    right: 25px;
    width: 60px;
    height: 60px;
    background-color: #007bff; /* Color por defecto */
    color: white;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 28px;
    cursor: pointer;
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
    z-index: 9998;
    transition: transform 0.2s;
}

#chatbot-icon:hover {
    transform: scale(1.1);
}

/* Contenedor de la ventana del chat */
#chat-window {
    display: none; /* Oculto por defecto */
    position: fixed;
    bottom: 100px;
    right: 25px;
    width: 350px;
    max-width: 90vw;
    height: 500px;
    max-height: 70vh;
    background-color: #fff;
    border-radius: 15px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.3);
    z-index: 9999;
    flex-direction: column;
    overflow: hidden;
}

/* Cabecera del chat */
#chat-header {
    background-color: #007bff; /* Color por defecto */
    color: white;
    padding: 15px;
    font-weight: bold;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-shrink: 0; /* Evita que la cabecera se encoja */
}

#chat-close-btn {
    background: none;
    border: none;
    color: white;
    font-size: 20px;
    cursor: pointer;
}

/* Área de mensajes */
#chat-messages {
    flex-grow: 1;
    padding: 15px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

/* Burbujas de mensaje */
.chat-message {
    padding: 10px 15px;
    border-radius: 20px;
    max-width: 85%;
    line-height: 1.4;
    word-wrap: break-word; /* Asegura que el texto largo no se salga */
}

.bot-message {
    background-color: #f1f0f0;
    color: #333;
    align-self: flex-start;
    border-bottom-left-radius: 5px;
}

.user-message {
    background-color: #007bff; /* Color por defecto */
    color: white;
    align-self: flex-end;
    border-bottom-right-radius: 5px;
}

/* Área de opciones (botones) */
#chat-options {
    padding: 15px 10px;
    border-top: 1px solid #eee;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: center;
    flex-shrink: 0; /* Evita que se encoja */
}

.chat-option-btn {
    background-color: #f1f0f0;
    border: 1px solid #007bff; /* Color por defecto */
    color: #007bff; /* Color por defecto */
    padding: 8px 15px;
    border-radius: 20px;
    cursor: pointer;
    font-size: 14px;
    transition: background-color 0.2s, color 0.2s;
}

.chat-option-btn:hover {
    background-color: #007bff; /* Color por defecto */
    color: white;
}

/* Enlace final de resultados */
.results-link {
    display: block;
    background-color: #28a745; /* Usamos verde para diferenciar la acción principal */
    color: white !important;
    text-align: center;
    padding: 12px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: bold;
    margin-top: 10px;
    transition: background-color 0.2s;
}
.results-link:hover {
    background-color: #218838;
}


/* ======================================== */
/* == Estilos para Vista Previa de Propiedad == */
/* ======================================== */

.property-preview-card {
    background-color: #f9f9f9;
    border-radius: 10px;
    overflow: hidden;
    margin-top: 5px;
    border: 1px solid #eee;
}

.property-preview-card img {
    width: 100%;
    height: 150px;
    object-fit: cover;
    display: block;
    border-bottom: 1px solid #eee;
}

.property-preview-card p {
    padding: 10px 15px;
    margin: 0;
    font-size: 14px;
    color: #555;
    line-height: 1.4;
}

/* Estilo para el botón de WhatsApp en el chat */
.whatsapp-btn {
    display: block;
    background-color: #25D366; /* Color oficial de WhatsApp */
    color: white !important;
    text-align: center;
    padding: 12px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: bold;
    margin-top: 10px;
    transition: background-color 0.2s;
}

.whatsapp-btn:hover {
    background-color: #128C7E;
}

.whatsapp-btn i {
    margin-right: 8px; /* Espacio entre el ícono y el texto */
}

/* --- AÑADIR AL FINAL --- */

/* Estilo para el botón de WhatsApp en el chat */
.whatsapp-btn {
    display: flex; /* Cambiado a flex para alinear el ícono y texto */
    align-items: center;
    justify-content: center;
    background-color: #25D366; /* Color oficial de WhatsApp */
    color: white !important;
    text-align: center;
    padding: 12px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: bold;
    margin-top: 10px;
    transition: background-color 0.2s;
}

.whatsapp-btn:hover {
    background-color: #128C7E;
}

/* Estilo para el ícono SVG de WhatsApp */
.whatsapp-svg-icon {
    width: 20px;
    height: 20px;
    margin-right: 8px; /* Espacio entre el ícono y el texto */
    fill: white; /* Color del ícono */
}