/**
 * Smart Center Page Styles
 * Chat simple conectado al agente IA (n8n). Reutiliza las burbujas de
 * mensaje, el indicador de escritura y el formulario de entrada de ai.css;
 * aquí solo vive el layout propio de la pantalla (cabecera + contenedor).
 */

.sc-page {
  display: flex;
  flex-direction: column;
  /* 60px = alto del header compartido (sticky) en shared-header.css */
  height: calc(100vh - 60px);
  background: var(--surface);
}

.sc-container {
  flex: 1;
  display: flex;
  flex-direction: column;
  width: 100%;
  max-width: 860px;
  margin: 0 auto;
  background: white;
  overflow: hidden;
}

/* ============= HEADER ============= */

.sc-header {
  padding: 16px 24px;
  background: linear-gradient(135deg, var(--brand) 0%, #2d6e5f 100%);
  color: white;
  display: flex;
  align-items: center;
  gap: 16px;
  flex-shrink: 0;
}

.sc-header-title {
  flex: 1;
  min-width: 0;
}

.sc-header-title h2 {
  margin: 0 0 2px 0;
  font-size: 1.2rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 8px;
}

.sc-subtitle {
  margin: 0;
  font-size: 0.85rem;
  opacity: 0.9;
}

.sc-back-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(255, 255, 255, 0.15);
  border: 1px solid rgba(255, 255, 255, 0.3);
  color: white;
  border-radius: 8px;
  padding: 8px 12px;
  font-size: 0.85rem;
  font-weight: 500;
  font-family: inherit;
  cursor: pointer;
  transition: background 150ms ease;
  white-space: nowrap;
}

.sc-back-btn:hover {
  background: rgba(255, 255, 255, 0.25);
}

.sc-header .icon-button {
  border-color: rgba(255, 255, 255, 0.4);
  color: white;
  flex-shrink: 0;
}

.sc-header .icon-button:hover {
  background: rgba(255, 255, 255, 0.2);
}

/* ============= MENSAJES ============= */
/* Las burbujas (.ai-message, .ai-user-message, .ai-bot-message),
   el indicador de escritura (.ai-typing-dots) y el scroll vienen de ai.css */

.sc-chat-messages {
  background: white;
}

/* ============= FOOTER / INPUT ============= */
/* El formulario (.ai-chat-input-form, .ai-chat-input, .ai-send-button)
   y la ayuda (.ai-input-help) vienen de ai.css */

.sc-chat-footer {
  border-top: 1px solid #e5e7eb;
}

/* ============= RESPONSIVE ============= */

@media (max-width: 640px) {
  .sc-page {
    height: calc(100vh - 60px);
    height: calc(100dvh - 60px);
  }

  .sc-header {
    padding: 12px 16px;
    gap: 10px;
  }

  .sc-header-title h2 {
    font-size: 1.05rem;
  }

  .sc-subtitle {
    font-size: 0.78rem;
  }

  .sc-chat-messages {
    padding: 16px;
  }

  .sc-chat-footer {
    padding: 12px 16px;
  }
}
