/* Estilo general */
body {
    margin: 0;
    padding: 0;
    font-family: 'Montserrat', sans-serif;
    background-color: #f9f9f9;
    height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Fondo de pantalla de WhatsApp */
.chatbot-container {
    display: flex;
    flex-direction: column;
    height: 100vh;
    width: 100%;
    background-image: url('https://stories.infobae.com/wp-content/uploads/2022/03/patron-4-novedades-que-llegan-a-WhatsApp.png');
    background-size: cover;
    background-repeat: no-repeat;
    background-position: center;
}

/* Encabezado fijo estilo WhatsApp */
.chat-header {
    background-color: #075E54;
    padding: 10px;
    color: white;
    display: flex;
    align-items: center;
    position: sticky;
    top: 0;
    z-index: 1000;
    height: 60px; /* Altura fija para evitar cambios de tamaño */
}

/* Contenedor para la imagen y el título */
.header-content {
    display: flex;
    align-items: flex-start;
    position: relative;
}

/* Foto de perfil en el encabezado */
.chat-header img {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    margin-right: 15px;
}

/* Nombre de usuario en el encabezado */
.chat-header .chat-title {
    font-size: 1.8rem;
    font-weight: bold;
    margin: 0;
    line-height: 1.5; /* Ajuste para alinear mejor con "Escribiendo..." */
}

/* Animación de "escribiendo..." */
.typing-indicator {
    display: none;
    font-size: 0.9rem;
    color: #ffffff;
    opacity: 0.8;
    position: absolute;
    top: 35px; /* Posición más cercana al nombre */
    left: 65px; /* Ajustado para estar alineado con el nombre */
}

/* Cuerpo del chatbot */
.chat-body {
    flex: 1;
    padding: 20px;
    overflow-y: auto;
    margin-bottom: 70px;
    display: flex;
    flex-direction: column;
}

/* Mensajes estilo WhatsApp */
.chat-message {
    margin-bottom: 5px; /* Ajustado para reducir el espaciado */
    padding: 10px;
    border-radius: 8px;
    position: relative;
    word-wrap: break-word;
    display: flex;
    align-items: flex-start;
    opacity: 0;
    /* Oculto inicialmente */
    transition: opacity 0.5s ease;
    /* Suaviza la aparición */
}

/* Estilo específico para el primer mensaje */
.chat-message-first {
    margin-bottom: 5px;
    padding: 10px;
    border-radius: 8px;
    position: relative;
    word-wrap: break-word;
    display: flex;
    align-items: flex-start;
    opacity: 0;
    transition: opacity 0.5s ease;
}


.chat-message.show {
    opacity: 1;
    /* Mostrar mensaje */
}

/* Foto de perfil en los mensajes */
.chat-message img {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    margin-right: 10px;
}

/* Estilo de los mensajes */
.chat-message.bot {
    background-color: #DCF8C6;
    max-width: 80%;
    color: #303030;
}

.chat-message.user {
    margin-bottom: 10px;
    background-color: #075e55;
    color: white;
    align-self: flex-end;
    margin-left: auto;
}

/* Nombre de usuario sobre el mensaje */
.chat-message .sender-name {
    font-weight: bold;
    font-size: 1rem;
    margin-bottom: 5px;
    color: #075E54;
}

/* Botones alineados a la derecha */
.chat-button-container {
    text-align: right;
    margin-top: 0px;
    margin-left: 20px;
}

/* Botones horizontales (opción actual) */
.button-container {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-top: 10px;
    margin-bottom: 10px;
}

/* Botones en disposición vertical */
.button-container-vertical {
    display: flex;
    flex-direction: column;
    align-items: right;
    gap: 10px;
    margin-top: 10px;
    margin-bottom: 10px;
}

/* Estilo general de los botones */
.chat-button {
    opacity: 1;
    pointer-events: auto;
    padding: 14px 20px;
    background-color: #25D366;
    color: white;
    text-align: center;
    border-radius: 5px;
    cursor: pointer;
    font-size: 1.2rem;
    border: none;
    transition: background-color 0.3s ease;
}

.chat-button:hover {
    background-color: #20b85a;
}


/* Botón adicional de "Ver Mi Cotización" */
.view-quote-button {
    margin-top: 5px; /* Ajustado para reducir el espaciado */
    margin-bottom: 10px; /* Ajustado para reducir el espaciado */
    padding: 10px;
    background-color: #25D366;
    color: white;
    text-align: center;
    border-radius: 5px;
    cursor: pointer;
    font-size: 1.2rem;
    border: none;
    width: 100%;
}

.view-quote-button:hover {
    background-color: #20b85a;
}

/* Campo de entrada para la cantidad */
.input-container {
    margin: 5px 0; /* Ajustado para reducir el espaciado */
    display: flex;
    align-items: center;
}

.input-container input {
    padding: 10px;
    font-size: 1rem;
    width: 100%;
    border: 1px solid #ccc;
    border-radius: 5px;
    box-sizing: border-box;
}

.privacy-container {
    position: fixed;
    bottom: 10px; /* Espacio desde la parte inferior de la pantalla */
    left: 0;
    width: 100%; /* Ocupa todo el ancho de la pantalla */
    text-align: center;
    background-color: transparent; /* Hace que el fondo sea transparente */
    z-index: 1000; /* Se asegura de que esté sobre otros elementos */
}

.privacy-button {
    padding: 10px 20px;
    background-color: transparent; /* Sin fondo */
    color: #075E54; /* Color de las letras */
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 0.8rem;
    text-decoration: underline; /* Subrayado para indicar que es un enlace */
    transition: color 0.3s ease;
}

.privacy-button:hover {
    color: #064A43; /* Cambia el color al pasar el cursor */
}



/* Modal de aviso de privacidad */
.privacy-modal {
    display: none;
    position: fixed;
    z-index: 1001;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.7);
}

.modal-content {
    background-color: #fefefe;
    margin: 10% auto;
    padding: 20px;
    border: 1px solid #888;
    width: 80%;
    max-width: 600px;
    border-radius: 10px;
    position: relative;
}

.close-button {
    color: #aaa;
    font-size: 28px;
    font-weight: bold;
    position: absolute;
    top: 10px;
    right: 20px;
    cursor: pointer;
}

.close-button:hover,
.close-button:focus {
    color: black;
}
