/* Overlay para ventana emergente */
.dfsgpt-overlay {
  position: fixed; inset: 0; display: none; background: rgba(0,0,0,.35);
  z-index: 99998;
}
.dfsgpt-overlay.open { display: block; }

/* Contenedor base */
.dfsgpt-container {
  --dfsgpt-color: #3b82f6;
  font-family: system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
  position: relative;
  border: 1px solid #e5e7eb;
  border-radius: 16px;
  box-shadow: 0 10px 30px rgba(0,0,0,.08);
  width: 360px;
  background: #fff;
  display: flex; flex-direction: column;
  z-index: 99999;
}

/* Modo flotante: como ventana emergente */
.dfsgpt-container.floating { 
  position: fixed; right: 20px; bottom: 90px; width: 360px; display: none;
}
.dfsgpt-container.open { display: flex; }

/* Botón lanzador */
.dfsgpt-launcher {
  position: fixed; right: 20px; bottom: 20px; z-index: 99999;
  width: 56px; height: 56px; border-radius: 50%; border: 0;
  background: var(--dfsgpt-color); color: #fff; font-size: 22px; cursor: pointer;
  box-shadow: 0 12px 24px rgba(0,0,0,.12);
}

/* Header, mensajes y form */
.dfsgpt-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 10px 12px; border-bottom: 1px solid #eee; background: #f9fafb; border-radius: 16px 16px 0 0;
}
.dfsgpt-title { font-weight: 600; color: #111827; }
.dfsgpt-close { background: transparent; border: 0; font-size: 20px; cursor: pointer; }
.dfsgpt-messages {
  padding: 12px; height: 320px; overflow-y: auto; background: #fff;
}
.dfsgpt-msg { max-width: 85%; padding: 8px 10px; border-radius: 12px; margin: 6px 0; line-height: 1.35; }
.dfsgpt-msg.user { margin-left: auto; background: var(--dfsgpt-color); color: #fff; border-bottom-right-radius: 4px; }
.dfsgpt-msg.assistant { margin-right: auto; background: #f3f4f6; color: #111827; border-bottom-left-radius: 4px; }
.dfsgpt-form { display: flex; gap: 8px; padding: 10px; border-top: 1px solid #eee; background: #fafafa; border-radius: 0 0 16px 16px; }
.dfsgpt-input { flex: 1; resize: none; padding: 8px; border-radius: 10px; border: 1px solid #e5e7eb; }
.dfsgpt-send { background: var(--dfsgpt-color); color:#fff; border:0; padding: 8px 12px; border-radius: 10px; cursor:pointer; }

/* Modo embebido: el contenedor es visible en el flujo de la página */
.dfsgpt-container.embed { position: relative; width: 100%; max-width: 680px; display: flex; }
