/* =====================================================================
   Tali · asistente de talento contento (chat flotante, estilo Liquid Glass)
   ===================================================================== */
.tali-launcher {
  position: fixed; right: 22px; bottom: 22px; z-index: 900;
  display: flex; align-items: center; gap: 10px;
  border: 1px solid rgba(255,255,255,.6); border-radius: 999px; padding: 8px 18px 8px 8px; cursor: pointer;
  font: 600 15px/1 Inter, -apple-system, "Helvetica Neue", Arial, sans-serif; color: #fff;
  background: linear-gradient(180deg, #ffa13d 0%, #f57f00 55%, #e87400 100%);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.55), 0 12px 30px rgba(245,127,0,.45);
  transition: transform .25s, box-shadow .25s;
}
.tali-launcher:hover { transform: translateY(-2px); box-shadow: inset 0 1px 0 rgba(255,255,255,.6), 0 16px 36px rgba(245,127,0,.5); }
.tali-launcher .tali-face { width: 40px; height: 40px; border-radius: 50%; background: #fff; display: grid; place-items: center; }
.tali-launcher .tali-face svg { width: 30px; height: 30px; }
.tali-launcher .tali-dot {
  position: absolute; top: 4px; left: 38px; width: 12px; height: 12px; border-radius: 50%;
  background: #22c55e; border: 2px solid #fff;
}
.tali-open .tali-launcher { opacity: 0; pointer-events: none; transform: scale(.9); }

.tali-panel {
  position: fixed; right: 22px; bottom: 22px; z-index: 950;
  width: 380px; max-width: calc(100vw - 24px); height: 600px; max-height: calc(100vh - 44px);
  display: flex; flex-direction: column; overflow: hidden; border-radius: 28px;
  background: rgba(255, 250, 244, .82);
  backdrop-filter: blur(28px) saturate(180%); -webkit-backdrop-filter: blur(28px) saturate(180%);
  border: 1px solid rgba(255,255,255,.8);
  box-shadow: inset 0 1px 0 #fff, 0 30px 80px rgba(11,47,69,.28);
  font-family: Inter, -apple-system, "Helvetica Neue", Arial, sans-serif; color: #0b2f45;
  opacity: 0; transform: translateY(16px) scale(.98); pointer-events: none;
  transition: opacity .25s ease, transform .25s ease;
}
.tali-open .tali-panel { opacity: 1; transform: none; pointer-events: auto; }

.tali-head {
  display: flex; align-items: center; gap: 12px; padding: 16px 16px 14px 18px; color: #fff;
  background:
    radial-gradient(circle at 100% 0%, rgba(255,179,92,.5), transparent 55%),
    radial-gradient(circle at 0% 100%, rgba(245,127,0,.5), transparent 60%), #0b2f45;
}
.tali-head .tali-face { width: 42px; height: 42px; border-radius: 14px; background: #fff; display: grid; place-items: center; flex-shrink: 0; }
.tali-head .tali-face svg { width: 32px; height: 32px; }
.tali-head strong { display: block; font-size: 16px; }
.tali-head small { display: flex; align-items: center; gap: 6px; font-size: 12px; color: #c7d6e2; }
.tali-head small::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: #22c55e; }
.tali-head .tali-x {
  margin-left: auto; width: 34px; height: 34px; border-radius: 50%; border: 1px solid rgba(255,255,255,.3);
  background: rgba(255,255,255,.12); color: #fff; cursor: pointer; font-size: 18px; line-height: 1;
}
.tali-head .tali-x:hover { background: rgba(255,255,255,.22); }

.tali-log { flex: 1; overflow-y: auto; padding: 18px 16px 8px; display: flex; flex-direction: column; gap: 10px; scroll-behavior: smooth; }
.tali-msg { max-width: 86%; padding: 11px 14px; border-radius: 18px; font-size: 14.5px; line-height: 1.45; white-space: pre-line; animation: tali-in .25s ease; }
.tali-msg a { color: #c25e00; font-weight: 600; }
.tali-bot { align-self: flex-start; background: #fff; border: 1px solid rgba(11,47,69,.06); border-bottom-left-radius: 6px; box-shadow: 0 4px 14px rgba(11,47,69,.06); }
.tali-user { align-self: flex-end; color: #fff; border-bottom-right-radius: 6px; background: linear-gradient(180deg, #ff9a2e, #f57f00); }
.tali-typing { display: inline-flex; gap: 4px; align-items: center; }
.tali-typing i { width: 7px; height: 7px; border-radius: 50%; background: #f57f00; opacity: .4; animation: tali-dot 1s infinite; }
.tali-typing i:nth-child(2) { animation-delay: .15s; } .tali-typing i:nth-child(3) { animation-delay: .3s; }
@keyframes tali-dot { 0%, 100% { opacity: .3; transform: translateY(0); } 50% { opacity: 1; transform: translateY(-3px); } }
@keyframes tali-in { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

.tali-chips { display: flex; flex-wrap: wrap; gap: 6px; padding: 4px 16px 10px; }
.tali-chips button {
  font: 600 13px/1 Inter, -apple-system, "Helvetica Neue", Arial, sans-serif; color: #b85c00; cursor: pointer;
  padding: 8px 12px; border-radius: 999px; background: rgba(245,127,0,.1); border: 1px solid rgba(245,127,0,.25);
  transition: background .2s;
}
.tali-chips button:hover { background: rgba(245,127,0,.2); }
.tali-cta {
  align-self: flex-start; display: inline-block; text-decoration: none !important; color: #fff !important;
  padding: 10px 16px; border-radius: 999px; font: 600 14px/1 Inter, -apple-system, sans-serif;
  background: linear-gradient(180deg, #ffa13d, #f57f00); box-shadow: 0 6px 16px rgba(245,127,0,.35);
}

.tali-form { display: flex; gap: 8px; padding: 10px 12px 12px; border-top: 1px solid rgba(11,47,69,.08); background: rgba(255,255,255,.5); }
.tali-form input {
  flex: 1; min-width: 0; border: 1px solid rgba(11,47,69,.14); border-radius: 999px; padding: 12px 16px;
  font: 15px Inter, -apple-system, "Helvetica Neue", Arial, sans-serif; color: #0b2f45; background: #fff; outline: none;
}
.tali-form input:focus { border-color: #f57f00; box-shadow: 0 0 0 3px rgba(245,127,0,.18); }
.tali-form button {
  width: 44px; height: 44px; border-radius: 50%; border: 0; cursor: pointer; color: #fff; flex-shrink: 0;
  background: linear-gradient(180deg, #ffa13d, #f57f00); display: grid; place-items: center;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.5), 0 6px 14px rgba(245,127,0,.35);
}
.tali-form button svg { width: 18px; height: 18px; }
.tali-foot { text-align: center; font-size: 11px; color: #6b7a8f; padding: 0 0 10px; background: rgba(255,255,255,.5); }

@media (max-width: 734px) {
  .tali-launcher { right: 14px; bottom: 14px; padding: 6px 14px 6px 6px; font-size: 14px; }
  .tali-launcher .tali-face { width: 36px; height: 36px; }
  .tali-panel { right: 0; bottom: 0; width: 100vw; max-width: 100vw; height: 88vh; max-height: 88vh; border-radius: 24px 24px 0 0; background: #fffaf4; }
}
@media (prefers-reduced-motion: reduce) { .tali-msg, .tali-typing i { animation: none; } .tali-panel { transition: none; } }

/* ---------- Mascota de Tali ---------- */
.tali-face { overflow: hidden; }
.tali-face img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 0; display: block; }
.tali-launcher .tali-face { width: 52px; height: 52px; border: 2px solid #fff; box-shadow: 0 4px 10px rgba(11,47,69,.2); }
.tali-launcher { padding-left: 6px; }
.tali-launcher .tali-dot { left: 46px; top: 5px; }
.tali-launcher .tali-face img { animation: tali-wave 3.2s ease-in-out infinite; transform-origin: 50% 90%; }
@keyframes tali-wave { 0%, 70%, 100% { transform: rotate(0); } 76% { transform: rotate(-8deg); } 84% { transform: rotate(7deg); } 92% { transform: rotate(-4deg); } }
.tali-head .tali-face { width: 46px; height: 46px; border-radius: 50%; border: 2px solid rgba(255,255,255,.85); }
.tali-hello { align-self: center; text-align: center; margin: 2px 0 6px; }
.tali-hello img { width: 210px; max-width: 70%; height: auto; border-radius: 22px; display: block; margin: 0 auto; filter: drop-shadow(0 10px 18px rgba(11,47,69,.12)); }
.tali-hello span { display: block; margin-top: 6px; font-size: 12px; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; color: #c96400; }
@media (max-width: 734px) { .tali-launcher .tali-face { width: 46px; height: 46px; } .tali-launcher .tali-dot { left: 40px; } }
@media (prefers-reduced-motion: reduce) { .tali-launcher .tali-face img { animation: none; } }

.tali-hello { width: 100%; }
.tali-hello img { width: 170px; max-width: 60%; }

/* ---------- Tali más visible: globo de saludo ---------- */
.tali-teaser {
  position: fixed; right: 22px; bottom: 96px; z-index: 899; width: 290px;
  background: #fff; color: #0b2f45; border-radius: 22px 22px 6px 22px; padding: 16px 18px 14px;
  box-shadow: 0 18px 44px rgba(11,47,69,.22); border: 1px solid rgba(245,127,0,.25);
  font-family: Inter, -apple-system, "Helvetica Neue", Arial, sans-serif;
  opacity: 0; transform: translateY(12px) scale(.96); pointer-events: none; transition: opacity .35s ease, transform .35s ease;
}
.tali-teaser.show { opacity: 1; transform: none; pointer-events: auto; }
.tali-open .tali-teaser { display: none; }
.tali-teaser strong { display: block; font-size: 16px; margin-right: 22px; }
.tali-teaser span { display: block; font-size: 14px; line-height: 1.45; color: #3b4a5a; margin-top: 4px; }
.tali-teaser-go {
  margin-top: 12px; border: 0; cursor: pointer; color: #fff; border-radius: 999px; padding: 9px 16px;
  font: 600 14px/1 Inter, -apple-system, "Helvetica Neue", Arial, sans-serif;
  background: linear-gradient(180deg, #ffa13d, #f57f00); box-shadow: 0 6px 14px rgba(245,127,0,.35);
}
.tali-teaser-x { position: absolute; top: 8px; right: 10px; width: 28px; height: 28px; border: 0; border-radius: 50%; background: #fff4e8; color: #c96400; font-size: 18px; line-height: 1; cursor: pointer; }
/* Botón más grande y con pulso suave para que se note */
.tali-launcher { font-size: 16px; padding-right: 20px; bottom: calc(22px + env(safe-area-inset-bottom, 0px)); }
.tali-launcher .tali-face { width: 58px; height: 58px; }
.tali-launcher .tali-dot { left: 50px; }
.tali-launcher::after {
  content: ""; position: absolute; inset: -4px; border-radius: 999px; border: 2px solid rgba(245,127,0,.55);
  animation: tali-pulse 2.4s ease-out infinite; pointer-events: none;
}
@keyframes tali-pulse { 0% { opacity: .9; transform: scale(1); } 100% { opacity: 0; transform: scale(1.18); } }
@media (max-width: 734px) {
  .tali-teaser { right: 12px; left: 12px; width: auto; bottom: calc(86px + env(safe-area-inset-bottom, 0px)); }
  .tali-launcher { bottom: calc(14px + env(safe-area-inset-bottom, 0px)); }
  .tali-launcher .tali-face { width: 50px; height: 50px; }
  .tali-launcher .tali-dot { left: 44px; }
}
@media (prefers-reduced-motion: reduce) { .tali-launcher::after { animation: none; opacity: 0; } .tali-teaser { transition: none; } }
