/* TALENT DAY · estilos de marca FLT (MPV 2026) — mismo sistema que CONESFAR */
:root {
  --naranja: #FFB549;      /* protagonista: CTAs, iconos, burbuja del usuario */
  --naranja-claro: #FFCB84;
  --naranja-suave: #FFE2BA;
  --ocre: #C47800;         /* texto de acento sobre claro */
  --brasa: #7A3E00;        /* titulares sobre claro */
  --texto: #2E2D2D;
  --fondo: #F2F1EF;        /* warm white */
  --tarjeta: #FFFFFF;
  --linea: rgba(46, 45, 45, .12);
  --suave: rgba(46, 45, 45, .62);
  --grad-farma: linear-gradient(90deg, #FFB549, #C47800, #7A3E00);
  --radio: 22px;
  --serif: 'Playfair Display', Georgia, serif;
  --sans: 'Inter', system-ui, -apple-system, sans-serif;
  --ancho: 780px;
}

* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body {
  min-height: 100dvh;
  background: var(--fondo);
  color: var(--texto);
  font-family: var(--sans);
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  overflow: hidden;
}
button, input, textarea { font: inherit; color: inherit; }

.app {
  display: flex;
  flex-direction: column;
  height: 100dvh;
  max-width: var(--ancho);
  margin: 0 auto;
}

/* ---------- cabecera ---------- */
.barra-marca { height: 7px; background: var(--grad-farma); flex: none; }

.cabecera {
  flex: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 13px 20px;
  background: var(--tarjeta);
  border-bottom: 1px solid var(--linea);
}
.marca { display: flex; align-items: center; gap: 12px; min-width: 0; }
.marca img { height: 30px; width: auto; display: block; }
.marca .titulo {
  font-family: var(--serif);
  font-style: italic;
  font-weight: 700;
  font-size: 18px;
  color: var(--brasa);
  letter-spacing: -.01em;
  margin: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.acciones { display: flex; align-items: center; gap: 8px; flex: none; }

.btn-contacto {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 42px;
  padding: 0 18px;
  border: 0;
  border-radius: 999px;
  background: var(--naranja);
  color: var(--texto);
  font-weight: 600;
  font-size: 14.5px;
  text-decoration: none;
  cursor: pointer;
  transition: background .15s ease, transform .15s ease;
}
.btn-contacto:hover { background: #ffa82a; }
.btn-contacto:active { transform: scale(.98); }
.btn-contacto svg { width: 17px; height: 17px; }

.contacto-wrap { position: relative; }

.menu-contacto {
  position: absolute;
  right: 0;
  top: calc(100% + 10px);
  width: 292px;
  padding: 6px;
  background: var(--tarjeta);
  border: 1px solid var(--linea);
  border-radius: 18px;
  box-shadow: 0 12px 34px rgba(46, 45, 45, .16);
  z-index: 30;
  animation: entra .15s ease both;
}
.menu-contacto[hidden] { display: none; }

.opcion {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 13px;
  border-radius: 13px;
  color: var(--texto);
  text-decoration: none;
  transition: background .15s ease;
}
.opcion:hover { background: var(--fondo); }
.opcion svg { width: 21px; height: 21px; flex: none; color: var(--ocre); }
.opcion > span { min-width: 0; }
.opcion b { display: block; font-weight: 600; font-size: 14.5px; }
.opcion small {
  display: block;
  margin-top: 1px;
  font-size: 11.5px;
  line-height: 1.35;
  color: var(--suave);
  overflow-wrap: anywhere;
}

.btn-plano {
  min-height: 42px;
  padding: 0 14px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  box-shadow: inset 0 0 0 2px var(--naranja);
  color: var(--texto);
  font-weight: 600;
  font-size: 13.5px;
  cursor: pointer;
  transition: background .15s ease;
}
.btn-plano:hover { background: var(--naranja-suave); }

/* ---------- conversación ---------- */
.chat {
  flex: 1 1 auto;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 22px 20px 6px;
  display: flex;
  flex-direction: column;
  gap: 11px;
  scrollbar-width: thin;
  scrollbar-color: var(--linea) transparent;
}
.chat::-webkit-scrollbar { width: 8px; }
.chat::-webkit-scrollbar-thumb { background: var(--linea); border-radius: 999px; }

.msg {
  max-width: 76%;
  padding: 14px 18px;
  border-radius: var(--radio);
  font-size: 16px;
  line-height: 1.55;
  white-space: pre-wrap;
  word-wrap: break-word;
}
.msg.ia {
  align-self: flex-start;
  background: var(--tarjeta);
  border: 1px solid var(--linea);
  border-bottom-left-radius: 7px;
}
.msg.yo {
  align-self: flex-end;
  background: var(--naranja);
  color: var(--texto);
  font-weight: 500;
  border-bottom-right-radius: 7px;
}
.msg strong { font-weight: 700; color: var(--ocre); }
.msg.yo strong { color: inherit; }
.msg.nuevo { animation: entra .2s ease both; }
@keyframes entra { from { opacity: 0; } to { opacity: 1; } }

.escribiendo {
  align-self: flex-start;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 17px 20px;
  background: var(--tarjeta);
  border: 1px solid var(--linea);
  border-radius: var(--radio);
  border-bottom-left-radius: 7px;
}
.escribiendo span {
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--naranja);
  animation: pulso 1.3s infinite ease-in-out;
}
.escribiendo span:nth-child(2) { animation-delay: .16s; }
.escribiendo span:nth-child(3) { animation-delay: .32s; }
@keyframes pulso { 0%, 65%, 100% { opacity: .3; } 32% { opacity: 1; } }

/* ---------- sugerencias ---------- */
.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 6px 20px 0;
  flex: none;
}
.chip {
  padding: 10px 16px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  box-shadow: inset 0 0 0 1.5px var(--linea);
  color: var(--texto);
  font-size: 14px;
  cursor: pointer;
  transition: box-shadow .15s ease, background .15s ease;
}
.chip:hover { box-shadow: inset 0 0 0 2px var(--naranja); background: var(--naranja-suave); }

/* ---------- CTA de cierre ---------- */
.cta {
  align-self: flex-start;
  display: inline-flex;
  align-items: center;
  min-height: 52px;
  padding: 0 26px;
  border-radius: 999px;
  background: var(--naranja);
  color: var(--texto);
  font-weight: 600;
  font-size: 16px;
  text-decoration: none;
}
.cta:hover { background: #ffa82a; }

/* ---------- barra de entrada ---------- */
.pie {
  flex: none;
  padding: 12px 20px calc(12px + env(safe-area-inset-bottom));
  background: var(--tarjeta);
  border-top: 1px solid var(--linea);
}
.entrada {
  display: flex;
  align-items: flex-end;
  gap: 8px;
  padding: 5px 5px 5px 18px;
  border: 1.5px solid var(--linea);
  border-radius: 28px;
  background: var(--fondo);
  transition: border-color .15s ease;
}
.entrada:focus-within { border-color: var(--naranja); }
.entrada textarea {
  flex: 1;
  border: 0;
  outline: 0;
  resize: none;
  background: transparent;
  font-size: 16px;
  line-height: 1.45;
  max-height: 132px;
  padding: 11px 0;
}
.entrada textarea::placeholder { color: var(--suave); }
.btn-micro {
  flex: none;
  width: 44px; height: 44px;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: var(--suave);
  display: grid;
  place-items: center;
  cursor: pointer;
  transition: color .15s ease, background .15s ease;
}
.btn-micro:hover { color: var(--texto); background: var(--naranja-suave); }
.btn-micro:disabled { opacity: .4; cursor: default; }
.btn-micro svg { width: 21px; height: 21px; }
.btn-micro.grabando {
  background: var(--naranja);
  color: var(--texto);
  animation: latido 1.4s infinite;
}
@keyframes latido {
  0%   { box-shadow: 0 0 0 0 rgba(255, 181, 73, .75); }
  70%  { box-shadow: 0 0 0 11px rgba(255, 181, 73, 0); }
  100% { box-shadow: 0 0 0 0 rgba(255, 181, 73, 0); }
}

.btn-enviar {
  flex: none;
  width: 44px; height: 44px;
  border: 0;
  border-radius: 50%;
  background: var(--naranja);
  color: var(--texto);
  display: grid;
  place-items: center;
  cursor: pointer;
  transition: opacity .15s ease, transform .15s ease;
}
.btn-enviar:disabled { opacity: .35; cursor: default; }
.btn-enviar:not(:disabled):active { transform: scale(.95); }
.btn-enviar svg { width: 20px; height: 20px; }

.aviso {
  margin: 8px 0 0;
  text-align: center;
  font-size: 11.5px;
  color: var(--suave);
}

/* ---------- móvil ---------- */
@media (max-width: 640px) {
  .cabecera { padding: 11px 15px; }
  .marca img { height: 24px; }
  .marca .titulo { font-size: 15.5px; }
  .btn-contacto { padding: 0 13px; min-height: 38px; }
  .menu-contacto { width: 288px; }
  .btn-contacto .txt { display: none; }
  .contacto-wrap { position: relative; }

.menu-contacto {
  position: absolute;
  right: 0;
  top: calc(100% + 10px);
  width: 292px;
  padding: 6px;
  background: var(--tarjeta);
  border: 1px solid var(--linea);
  border-radius: 18px;
  box-shadow: 0 12px 34px rgba(46, 45, 45, .16);
  z-index: 30;
  animation: entra .15s ease both;
}
.menu-contacto[hidden] { display: none; }

.opcion {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 13px;
  border-radius: 13px;
  color: var(--texto);
  text-decoration: none;
  transition: background .15s ease;
}
.opcion:hover { background: var(--fondo); }
.opcion svg { width: 21px; height: 21px; flex: none; color: var(--ocre); }
.opcion > span { min-width: 0; }
.opcion b { display: block; font-weight: 600; font-size: 14.5px; }
.opcion small {
  display: block;
  margin-top: 1px;
  font-size: 11.5px;
  line-height: 1.35;
  color: var(--suave);
  overflow-wrap: anywhere;
}

.btn-plano { min-height: 38px; padding: 0 12px; }
  .chat { padding: 18px 15px 4px; }
  .msg { max-width: 88%; font-size: 15.5px; padding: 13px 16px; }
  .chips { padding: 6px 15px 0; }
  .chip { font-size: 13.5px; padding: 9px 14px; }
  .pie { padding: 10px 12px calc(10px + env(safe-area-inset-bottom)); }
  .btn-micro { width: 38px; height: 38px; }
  .btn-micro svg { width: 19px; height: 19px; }
  .btn-enviar { width: 40px; height: 40px; }
  .entrada { gap: 2px; padding-left: 14px; }
  .entrada textarea { font-size: 16px; }
}

@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; }
}
