/*
 * Estilos básicos para el asistente IA de reparaciones.
 * Se utilizan variables CSS para facilitar cambios de colores
 * y adaptar el chat a la identidad visual del sitio.
 */

:root {
  --color-background: #f8f9fa;
  --color-primary: #0d6efd;
  --color-secondary: #6c757d;
  --color-user-bubble: #e2f0ff;
  --color-bot-bubble: #ffffff;
  --color-border: #dee2e6;
}

body {
  margin: 0;
  padding: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica,
    Arial, sans-serif;
  background: var(--color-background);
  display: flex;
  justify-content: center;
  align-items: flex-start;
  min-height: 100vh;
  color: #212529;
}

.chat-container {
  width: 100%;
  max-width: 480px;
  margin: 1rem;
  background: #fff;
  border: 1px solid var(--color-border);
  border-radius: 0.5rem;
  box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.05);
  display: flex;
  flex-direction: column;
}

.chat-header {
  padding: 1rem;
  border-bottom: 1px solid var(--color-border);
}

.chat-header h1 {
  margin: 0;
  font-size: 1.25rem;
  color: var(--color-primary);
}

.chat-header .text-muted {
  margin: 0.25rem 0 0;
  font-size: 0.875rem;
  color: var(--color-secondary);
}

.chat-window {
  flex: 1;
  overflow-y: auto;
  padding: 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.chat-form {
  display: flex;
  padding: 0.5rem;
  border-top: 1px solid var(--color-border);
  background: var(--color-background);
}

.chat-input {
  flex: 1;
  padding: 0.5rem;
  border: 1px solid var(--color-border);
  border-radius: 0.25rem;
  font-size: 1rem;
}

.chat-send {
  margin-left: 0.5rem;
  padding: 0.5rem 1rem;
  background: var(--color-primary);
  color: #fff;
  border: none;
  border-radius: 0.25rem;
  font-size: 1rem;
  cursor: pointer;
}

.chat-send:hover {
  background: #095bb5;
}

.message {
  max-width: 80%;
  padding: 0.5rem 0.75rem;
  border-radius: 0.75rem;
  font-size: 0.9rem;
  line-height: 1.4;
  display: inline-block;
}

.message.user {
  align-self: flex-end;
  background: var(--color-user-bubble);
  border-bottom-right-radius: 0;
}

.message.bot {
  align-self: flex-start;
  background: var(--color-bot-bubble);
  border-bottom-left-radius: 0;
  border: 1px solid var(--color-border);
}

.message a {
  color: var(--color-primary);
  text-decoration: none;
}

.message a:hover {
  text-decoration: underline;
}