/* Estilos refinados para Pláticas con Dios */

body {
  margin: 0;
  font-family: 'Merriweather', Georgia, serif;
  background: #fdf9f3;
  color: #3a2f2f;
}

.chat-container {
  max-width: 600px;
  margin: 0 auto;
  height: 100dvh; /* Cambiado de 100vh a 100dvh para móviles modernos */
  display: flex;
  flex-direction: column;
  background: #fff;
  box-shadow: 0 0 12px rgba(0, 0, 0, 0.1);
  border-radius: 12px;
}


.chat-header {
  position: relative;
  padding: 15px;
  background-color: #fff8e1;
  color: #3a2f2f;
  font-size: 20px;
  text-align: center;
  border-bottom: 1px solid #e0d6b8;
}

.chat-header img.chat-logo {
  position: absolute;
  left: 15px;
  top: 50%;
  transform: translateY(-50%);
  width: 42px;
  height: 42px;
}

.chat-header button {
  background-color: #fff;
  color: #3a2f2f;
  padding: 5px 10px;
  border-radius: 10px;
  border: 1px solid #ccc;
  cursor: pointer;
  position: absolute;
  right: 15px;
  top: 12px;
  font-size: 16px;
}

.messages {
  flex: 1;
  padding: 20px 15px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  background: #fff url('icon-192.png') no-repeat center center;
  background-size: 100px;
  background-attachment: fixed;
  background-repeat: no-repeat;
  background-blend-mode: lighten;
}

.message {
  margin: 10px 0;
  padding: 12px 14px;
  border-radius: 12px;
  max-width: 85%;
  word-wrap: break-word;
  line-height: 1.6;
}

.user {
  background-color: #f0f8e8;
  align-self: flex-end;
}

.assistant {
  background-color: #fffbe6;
  border-left: 4px solid #e8d19e;
  align-self: flex-start;
}

.input-container {
  display: flex;
  padding: 12px;
  border-top: 1px solid #e4e0d8;
  gap: 10px;
  background-color: #fdf9f3;
  position: sticky; /* <- mantiene visible al hacer scroll */
  bottom: 0;
  z-index: 10;
}


textarea {
  flex: 1;
  padding: 10px;
  border-radius: 20px;
  border: 1px solid #ccc;
  resize: none;
  outline: none;
  max-height: 150px;
  overflow-y: auto;
  font-family: inherit;
  font-size: 16px;
  background: #fff;
}

button.send-btn {
  padding: 10px 15px;
  border: none;
  border-radius: 20px;
  background-color: #e0cba8;
  color: #3a2f2f;
  font-weight: bold;
  cursor: pointer;
  transition: background 0.3s ease;
}

button.send-btn:hover {
  background-color: #d0b98e;
}

.banner-bienvenida {
  z-index: 9999;
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background-color: #fff8e1;
  color: #3a2f2f;
  padding: 30px 20px 40px;
  font-size: 16px;
  border-radius: 12px;
  width: 90%;
  max-width: 500px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
  text-align: center;
  box-sizing: border-box;
}

.banner-logo {
  width: 60px;
  height: 60px;
  margin-bottom: 20px;
}

.banner-bienvenida p {
  margin: 0 0 20px;
  line-height: 1.6;
  font-style: italic;
}

.cerrar-banner {
  position: absolute;
  top: 10px;
  right: 15px;
  background: none;
  border: none;
  font-size: 22px;
  font-weight: bold;
  color: #3a2f2f;
  cursor: pointer;
}

.aceptar-banner {
  background-color: #e8d19e;
  color: #3a2f2f;
  font-weight: bold;
  padding: 10px 20px;
  border-radius: 8px;
  border: none;
  cursor: pointer;
  transition: background 0.3s ease;
}

.aceptar-banner:hover {
  background-color: #d6be92;
}

body.banner-activo::before {
  content: '';
  position: fixed;
  top: 0; left: 0;
  width: 100%; height: 100%;
  backdrop-filter: blur(6px);
  background-color: rgba(0, 0, 0, 0.2);
  z-index: 9990;
}

.banner-formulario {
  display: none;
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 9998;
  background-color: #ffffff;
  color: #3a2f2f;
  padding: 30px;
  border-radius: 12px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
  width: 90%;
  max-width: 500px;
  text-align: left;
  font-family: 'Georgia', serif;
}

.banner-formulario h2 {
  margin-top: 0;
}

.banner-formulario label {
  display: block;
  margin: 10px 0 5px;
}

.banner-formulario input,
.banner-formulario select {
  width: 100%;
  padding: 8px;
  margin-bottom: 10px;
  border-radius: 6px;
  border: 1px solid #ccc;
}

.banner-formulario button {
  width: 100%;
  padding: 10px;
  background: #e0cba8;
  color: #3a2f2f;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  font-weight: bold;
}

.banner-formulario button:hover {
  background: #d2b78f;
}

.donar-btn {
  position: absolute;
  right: 60px;
  top: 12px;
  background-color: #e8d19e;
  color: #3a2f2f;
  padding: 5px 12px;
  border-radius: 10px;
  text-decoration: none;
  font-weight: bold;
  transition: background 0.3s ease;
}



@media (max-width: 500px) {
  .chat-container {
    border-radius: 0;
    box-shadow: none;
    height: 100dvh; /* aseguramos también aquí */
  }

  .messages {
    background-size: 70px;
    padding: 10px;
  }

  .chat-header {
    font-size: 16px;
    padding: 10px;
  }

  textarea, .message {
    font-size: 14px;
  }

  button.send-btn {
    padding: 8px 12px;
    font-size: 14px;
  }
}



