/* ============================================================================
   onboarding.css — página standalone /onboarding
   Sin dependencias en app.min.css. Reset moderno + estilos completos.
   Paleta unificada del repo (rosa #F84F76, tipografía Fraunces + DM Sans).
   ========================================================================== */

*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }

body {
  font-family: 'DM Sans', system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
  font-weight: 400;
  font-size: 16px;
  line-height: 1.55;
  color: #F8E1C7;
  background: #0F1730;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

h1, h2, h3 {
  font-family: 'Fraunces', Georgia, serif;
  font-weight: 700;
  line-height: 1.15;
  margin: 0;
}

button, input, textarea, select { font: inherit; color: inherit; }
button { cursor: pointer; border: 0; background: none; padding: 0; }
a { color: inherit; }

.ob-sr {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0;
}

/* ── Tokens locales ──────────────────────────────────────────────────────── */
:root {
  --brand-pink: #F84F76;
  --brand-pink-dark: #c92850;
  --brand-pink-darker: #b81d44;
  --brand-pink-soft: #ffe4ec;
  --brand-pink-border: #f4a3b6;
  --ink: #0f172a;
  --ink-dim: #1a1a2e;
  --gray-700: #4b5563;
  --gray-500: #6b7280;
  --gray-400: #94a3b8;
  --gray-300: #cbd5e1;
  --gray-200: #e2e8f0;
  --gray-100: #f1f5f9;
  --bg-page: #f3f4f8;
  --bg-nav: #f7f7fa;
  --bg-card: #ffffff;
  --green-50: #ecfdf5;
  --green-500: #10b981;
  --green-700: #047857;
  --shadow-sm: 0 1px 2px rgba(15, 23, 42, 0.04);
  --shadow-md: 0 4px 12px rgba(15, 23, 42, 0.08);
}

/* ── Nav ─────────────────────────────────────────────────────────────────── */
.ob-nav {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 24px;
  background: var(--bg-nav);
  border-bottom: 1px solid var(--gray-200);
  position: sticky; top: 0; z-index: 30;
}
.ob-nav-logo img {
  display: block;
  height: 32px;
  width: auto;
}
.ob-link-btn {
  color: var(--gray-700);
  font-weight: 500;
  font-size: 14px;
  padding: 8px 14px;
  border-radius: 8px;
  transition: background 120ms ease, color 120ms ease;
}
.ob-link-btn:hover { background: var(--gray-100); color: var(--ink); }

/* ── Shell layout ────────────────────────────────────────────────────────── */
.ob-shell {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  max-width: 1200px;
  margin: 0 auto;
  padding: 32px 24px 48px;
  gap: 32px;
  min-height: calc(100vh - 64px);
}
@media (max-width: 900px) {
  .ob-shell {
    grid-template-columns: 1fr;
    padding: 20px 16px 80px;
    gap: 20px;
  }
}

/* ── Chat pane ───────────────────────────────────────────────────────────── */
.ob-chat-pane {
  display: flex;
  flex-direction: column;
  background: var(--bg-card);
  border-radius: 20px;
  border: 1px solid var(--gray-200);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  min-height: 560px;
  max-height: calc(100vh - 128px);
}
@media (max-width: 900px) {
  .ob-chat-pane { max-height: none; min-height: 480px; }
}

.ob-chat-header {
  padding: 24px 24px 16px;
  border-bottom: 1px solid var(--gray-200);
}
.ob-eyebrow {
  display: inline-block;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.06em;
  color: var(--brand-pink-darker);
  background: var(--brand-pink-soft);
  border: 1px solid var(--brand-pink-border);
  border-radius: 999px;
  padding: 4px 10px;
  margin: 0 0 12px;
  text-transform: uppercase;
}
.ob-chat-header h1 {
  font-size: 28px;
  color: var(--ink);
  margin-bottom: 8px;
}
@media (max-width: 600px) {
  .ob-chat-header h1 { font-size: 24px; }
}
.ob-lede {
  color: var(--gray-700);
  font-size: 15px;
  margin: 0;
}

/* ── Banner anónimo ─────────────────────────────────────────────────────── */
.ob-anon-banner {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 14px;
  padding: 10px 12px;
  border-radius: 10px;
  background: var(--brand-pink-soft);
  border: 1px solid var(--brand-pink-border);
  font-size: 13px;
  color: var(--brand-pink-darker);
  flex-wrap: wrap;
}
.ob-anon-banner[hidden] { display: none; }
.ob-anon-icon {
  color: var(--brand-pink);
  font-size: 10px;
  line-height: 1;
}
.ob-anon-text {
  flex: 1;
  min-width: 0;
  line-height: 1.4;
}
.ob-anon-text strong {
  font-weight: 700;
  color: var(--brand-pink-darker);
}
.ob-anon-cta {
  flex-shrink: 0;
  background: var(--brand-pink);
  color: white;
  border-radius: 8px;
  font-weight: 600;
  font-size: 12.5px;
  padding: 7px 12px;
  transition: background 120ms ease;
}
.ob-anon-cta:hover { background: var(--brand-pink-dark); }
.ob-anon-banner.is-limit {
  background: #fef3c7;
  border-color: #fcd34d;
  color: #92400e;
}
.ob-anon-banner.is-limit strong { color: #78350f; }

/* ── Messages ────────────────────────────────────────────────────────────── */
.ob-messages {
  flex: 1;
  overflow-y: auto;
  padding: 20px 24px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  scroll-behavior: smooth;
}
.ob-msg {
  max-width: 78%;
  padding: 12px 16px;
  border-radius: 16px;
  font-size: 15px;
  line-height: 1.5;
  white-space: pre-wrap;
  word-wrap: break-word;
  animation: ob-fade-in 180ms ease-out;
}
.ob-msg-assistant {
  align-self: flex-start;
  background: var(--gray-100);
  border-bottom-left-radius: 4px;
  color: var(--ink);
}
.ob-msg-user {
  align-self: flex-end;
  background: var(--brand-pink);
  color: white;
  border-bottom-right-radius: 4px;
}
@keyframes ob-fade-in {
  from { opacity: 0; transform: translateY(4px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ── Typing indicator ────────────────────────────────────────────────────── */
.ob-typing {
  display: flex;
  gap: 4px;
  align-self: flex-start;
  padding: 12px 16px;
  background: var(--gray-100);
  border-radius: 16px;
  border-bottom-left-radius: 4px;
  margin: 0 24px 8px;
  width: fit-content;
}
.ob-typing[hidden] { display: none; }
.ob-typing span {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--gray-400);
  animation: ob-bounce 1.2s infinite ease-in-out;
}
.ob-typing span:nth-child(2) { animation-delay: 0.15s; }
.ob-typing span:nth-child(3) { animation-delay: 0.3s; }
@keyframes ob-bounce {
  0%, 60%, 100% { transform: translateY(0); opacity: 0.5; }
  30% { transform: translateY(-4px); opacity: 1; }
}

/* ── Composer ────────────────────────────────────────────────────────────── */
.ob-composer {
  display: flex;
  align-items: flex-end;
  gap: 12px;
  padding: 16px 20px;
  border-top: 1px solid var(--gray-200);
  background: var(--bg-card);
}
.ob-composer textarea {
  flex: 1;
  resize: none;
  border: 1px solid var(--gray-300);
  background: var(--bg-page);
  border-radius: 14px;
  padding: 12px 14px;
  font-size: 15px;
  line-height: 1.5;
  max-height: 160px;
  min-height: 44px;
  outline: none;
  transition: border-color 120ms ease, background 120ms ease, box-shadow 120ms ease;
}
.ob-composer textarea:focus {
  border-color: var(--brand-pink);
  background: var(--bg-card);
  box-shadow: 0 0 0 3px rgba(248, 79, 118, 0.15);
}
.ob-composer textarea[disabled] {
  opacity: 0.6;
  cursor: not-allowed;
}

/* ── Botones ─────────────────────────────────────────────────────────────── */
.ob-btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--brand-pink);
  color: white;
  border-radius: 12px;
  font-weight: 700;
  padding: 13px 20px;
  font-size: 15px;
  transition: background 120ms ease, transform 80ms ease;
}
.ob-btn-primary:hover { background: var(--brand-pink-dark); }
.ob-btn-primary:active { transform: scale(0.97); }
.ob-btn-primary[disabled] { opacity: 0.55; cursor: not-allowed; }
.ob-btn-primary[disabled]:hover { background: var(--brand-pink); }

.ob-btn-send {
  width: 44px;
  height: 44px;
  min-width: 44px;
  padding: 0;
}
.ob-btn-cta {
  display: inline-flex;
  width: 100%;
  text-decoration: none;
  text-align: center;
  justify-content: center;
}

/* ── Profile pane ────────────────────────────────────────────────────────── */
.ob-profile-pane {
  background: var(--bg-card);
  border: 1px solid var(--gray-200);
  border-radius: 20px;
  padding: 24px;
  height: fit-content;
  position: sticky;
  top: 96px;
  box-shadow: var(--shadow-sm);
}
@media (max-width: 900px) {
  .ob-profile-pane { position: static; }
}

.ob-profile-header h2 {
  font-size: 22px;
  margin-bottom: 16px;
  color: var(--ink);
}
.ob-progress {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-top: 4px;
}
.ob-progress-bar {
  width: 100%;
  height: 8px;
  background: var(--gray-100);
  border-radius: 999px;
  overflow: hidden;
}
.ob-progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--brand-pink), var(--brand-pink-dark));
  transition: width 320ms ease;
  border-radius: 999px;
}
.ob-progress-label {
  font-size: 13px;
  color: var(--gray-500);
  font-weight: 500;
}

.ob-profile-fields {
  list-style: none;
  margin: 24px 0 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.ob-profile-fields li {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 10px 12px;
  border-radius: 10px;
  background: var(--gray-100);
  border-left: 3px solid var(--gray-300);
  transition: border-color 200ms ease, background 200ms ease;
}
.ob-profile-fields li.is-filled {
  border-left-color: var(--green-500);
  background: var(--green-50);
}
.ob-field-label {
  font-size: 13px;
  color: var(--gray-700);
  font-weight: 500;
}
.ob-field-value {
  font-size: 13px;
  color: var(--ink);
  font-weight: 600;
  text-align: right;
  max-width: 60%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.ob-profile-fields li.is-filled .ob-field-value { color: var(--green-700); }

.ob-cta-block {
  margin: 20px 0 4px;
  padding: 16px;
  border-radius: 14px;
  background: var(--brand-pink-soft);
  border: 1px solid var(--brand-pink-border);
  text-align: center;
  animation: ob-fade-in 240ms ease-out;
}

/* Premium CTA (Plan Migratorio €19) */
.ob-cta-premium { margin-top: 12px; }
.ob-cta-premium[hidden] { display: none; }
.ob-cta-divider {
  position: relative;
  margin: 14px 0 12px;
  text-align: center;
  font-size: 11px;
  color: var(--gray-500);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}
.ob-cta-divider::before,
.ob-cta-divider::after {
  content: "";
  position: absolute;
  top: 50%;
  width: calc(50% - 16px);
  height: 1px;
  background: var(--brand-pink-border);
}
.ob-cta-divider::before { left: 0; }
.ob-cta-divider::after  { right: 0; }
.ob-cta-divider span {
  position: relative;
  background: var(--brand-pink-soft);
  padding: 0 6px;
}
.ob-cta-premium-card {
  background: var(--bg-card);
  border-radius: 12px;
  border: 1.5px solid var(--brand-pink);
  padding: 16px;
  box-shadow: 0 4px 16px rgba(248, 79, 118, 0.18);
  text-align: left;
}
.ob-cta-premium-badge {
  display: inline-block;
  background: linear-gradient(135deg, #fef3c7, #fde68a);
  color: #92400e;
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.04em;
  padding: 4px 10px;
  border-radius: 999px;
  text-transform: uppercase;
  margin: 0 0 10px;
}
.ob-cta-premium-title {
  font-family: 'Fraunces', Georgia, serif;
  font-size: 18px;
  font-weight: 700;
  line-height: 1.2;
  color: var(--ink);
  margin: 0 0 6px;
  text-align: left;
}
.ob-cta-premium-subtitle {
  font-size: 13.5px;
  color: var(--gray-700);
  margin: 0 0 14px;
  line-height: 1.4;
}
.ob-cta-premium-list {
  list-style: none;
  padding: 0;
  margin: 0 0 14px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.ob-cta-premium-list li {
  font-size: 12.5px;
  color: var(--gray-700);
  padding-left: 18px;
  position: relative;
  line-height: 1.45;
}
.ob-cta-premium-list li strong {
  color: var(--ink);
  font-weight: 700;
}
.ob-cta-premium-list li::before {
  content: "✓";
  position: absolute;
  left: 0;
  color: #10b981;
  font-weight: 700;
}
.ob-btn-pay {
  width: 100%;
  background: var(--brand-pink);
  font-size: 15px;
}
.ob-btn-pay:hover { background: var(--brand-pink-dark); }
.ob-btn-pay:disabled { opacity: 0.65; cursor: not-allowed; }
.ob-cta-premium-fine {
  text-align: center;
  font-size: 11.5px;
  color: var(--gray-500);
  margin: 8px 0 0;
}
.ob-cta-premium-link {
  color: var(--brand-pink-dark);
  text-decoration: underline;
}
.ob-cta-premium-link:hover { color: var(--brand-pink-darker); }
.ob-cta-text {
  font-size: 14px;
  color: var(--brand-pink-darker);
  margin: 0 0 12px;
  font-weight: 500;
}

/* ── Toast ──────────────────────────────────────────────────────────────── */
.ob-toast {
  position: fixed;
  top: 20px;
  right: 20px;
  background: var(--ink);
  color: white;
  padding: 12px 16px;
  border-radius: 12px;
  font-size: 14px;
  box-shadow: var(--shadow-md);
  z-index: 50;
  animation: ob-toast-in 200ms ease-out;
  max-width: calc(100vw - 40px);
}
.ob-toast[hidden] { display: none; }
@keyframes ob-toast-in {
  from { opacity: 0; transform: translateY(-8px); }
  to   { opacity: 1; transform: translateY(0); }
}
