/* JerezMedia · Marketing — asistente virtual (identidad propia: cápsula, tinta, burdeos, letra de máquina) */
.jm-chat { position: fixed; right: 16px; bottom: 16px; z-index: 90; font-family: var(--sans, system-ui); }
.jm-fab { position: relative; display: inline-flex; align-items: center; gap: 10px; height: 60px; padding: 0 22px 0 8px; border: 0; border-radius: 999px; cursor: pointer;
  background: var(--wine, #7A1F2B); color: #fff; font: 700 1rem var(--sans, system-ui); letter-spacing: -0.01em;
  box-shadow: 0 14px 34px -8px rgba(122,31,43,.6), 0 2px 6px rgba(0,0,0,.15); transition: transform .25s var(--ease, ease), box-shadow .25s; animation: fabIn .7s cubic-bezier(.2,1.5,.4,1) .4s both; }
.jm-fab:hover { transform: translateY(-2px) scale(1.02); }
.jm-fab:active { transform: scale(.96); }
@keyframes fabIn { from { transform: translateY(120%) scale(.6); opacity: 0; } to { transform: none; opacity: 1; } }
.jm-fab__cap { width: 44px; height: 44px; border-radius: 50%; background: #fff; display: grid; place-items: center; }
.jm-fab__cap svg { width: 30px; height: 30px; animation: capWave 2.6s ease-in-out infinite; transform-origin: 50% 100%; }
.jm-fab__cap .cap-head, .jm-fab__cap .cap-body { fill: var(--ink, #141313); }
@keyframes capWave { 0%, 60%, 100% { transform: rotate(0); } 70% { transform: rotate(-10deg); } 80% { transform: rotate(8deg); } 90% { transform: rotate(-4deg); } }
.jm-fab__ring { position: absolute; left: 8px; top: 8px; width: 44px; height: 44px; border-radius: 50%; border: 2px solid #fff; animation: ring 2.2s ease-out infinite; pointer-events: none; }
@keyframes ring { 0% { transform: scale(1); opacity: .8; } 100% { transform: scale(1.8); opacity: 0; } }
.jm-chat.is-open .jm-fab { opacity: 0; pointer-events: none; transform: scale(.8); }

.jm-teaser { position: absolute; right: 0; bottom: 74px; width: 250px; background: #fff; border: 0; border-radius: 18px; padding: 14px 34px 14px 16px; font-size: .9rem; line-height: 1.4; color: var(--ink, #141313); cursor: pointer;
  box-shadow: 0 12px 34px rgba(0,0,0,.18); animation: teaserIn .5s cubic-bezier(.2,1.5,.4,1) both; }
.jm-teaser::after { content: ""; position: absolute; right: 34px; bottom: -8px; width: 14px; height: 14px; background: #fff; transform: rotate(45deg); box-shadow: 3px 3px 6px rgba(0,0,0,.06); }
.jm-teaser b { color: var(--wine, #7A1F2B); }
.jm-teaser__x { position: absolute; top: 6px; right: 8px; border: 0; background: none; font-size: 1.2rem; line-height: 1; cursor: pointer; color: var(--ink-3, #8A8580); }
@keyframes teaserIn { from { transform: translateY(10px) scale(.9); opacity: 0; } to { transform: none; opacity: 1; } }

.jm-panel { position: fixed; inset: auto 0 0 0; height: min(88dvh, 690px); display: flex; flex-direction: column; background: #fff; border: 0; border-radius: 22px 22px 0 0; overflow: hidden;
  box-shadow: 0 -10px 50px rgba(0,0,0,.2); animation: panelIn .45s cubic-bezier(.2,1.2,.4,1) both; }
@keyframes panelIn { from { transform: translateY(30px) scale(.96); opacity: 0; } to { transform: none; opacity: 1; } }
.jm-head { display: flex; align-items: center; gap: 12px; padding: 16px 16px 14px; color: #fff; background: radial-gradient(120% 140% at 0% 0%, #7A1F2B 0%, #2a080d 55%, #000 100%); }
.jm-ava { position: relative; width: 44px; height: 44px; border-radius: 50%; background: rgba(255,255,255,.14); display: grid; place-items: center; flex-shrink: 0; }
.jm-ava svg { width: 30px; height: 30px; } .jm-ava .cap-head, .jm-ava .cap-body { fill: #fff; }
.jm-ava svg .cap-head { animation: nod 3s ease-in-out infinite; transform-origin: 20px 16px; }
@keyframes nod { 0%, 70%, 100% { transform: translateY(0); } 80% { transform: translateY(1.5px); } 90% { transform: translateY(-1px); } }
.jm-ava__dot { position: absolute; right: -3px; bottom: -3px; width: 12px; height: 12px; border-radius: 50%; background: #3BD16F; border: 2px solid var(--ink, #141313); }
.jm-title { font-weight: 800; font-size: 1.0625rem; letter-spacing: -0.02em; }
.jm-sub { font-size: .75rem; font-weight: 500; color: rgba(255,255,255,.65); display: flex; align-items: center; gap: 6px; }
.jm-live { width: 6px; height: 6px; border-radius: 50%; background: #3BD16F; animation: live 1.6s ease-in-out infinite; }
@keyframes live { 50% { opacity: .3; } }
.jm-close { margin-left: auto; width: 36px; height: 36px; border-radius: 50%; border: 1.5px solid rgba(255,255,255,.35); background: transparent; color: #fff; font-size: 1.4rem; line-height: 1; cursor: pointer; transition: background .2s; }
.jm-close:hover { background: rgba(255,255,255,.12); }

.jm-log { flex: 1; overflow-y: auto; padding: 18px 16px; display: flex; flex-direction: column; gap: 12px; overscroll-behavior: contain;
  background: #fff; }
.jm-msg { max-width: 88%; padding: 12px 14px; border-radius: 16px; font-size: .9375rem; line-height: 1.5; animation: msgIn .4s cubic-bezier(.2,1.3,.4,1) both; }
.jm-msg p + p, .jm-msg p + .jm-chips, .jm-msg p + .jm-cta { margin-top: 8px; }
@keyframes msgIn { from { transform: translateY(10px) scale(.95); opacity: 0; } to { transform: none; opacity: 1; } }
.jm-msg--bot { align-self: flex-start; background: #E9E9EB; color: #1D1D1F; border-bottom-left-radius: 6px; }
.jm-msg--user { align-self: flex-end; background: var(--wine, #7A1F2B); color: #fff; border-bottom-right-radius: 4px; }
.jm-typing { display: flex; gap: 5px; padding: 14px 16px; }
.jm-typing span { width: 7px; height: 7px; border-radius: 50%; background: var(--ink, #141313); animation: dots 1s ease-in-out infinite; }
.jm-typing span:nth-child(2) { animation-delay: .15s; } .jm-typing span:nth-child(3) { animation-delay: .3s; }
@keyframes dots { 0%, 60%, 100% { transform: translateY(0); opacity: .35; } 30% { transform: translateY(-5px); opacity: 1; } }
.jm-mini { font-size: .75rem !important; font-weight: 600; color: var(--ink-3, #8A8580); margin-top: 12px !important; }
.jm-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.jm-chip { display: inline-flex; align-items: center; gap: 7px; text-align: left; border: 1px solid rgba(0,0,0,.12); background: #fff; border-radius: 999px; padding: 7px 12px; font: 600 .8125rem var(--sans, system-ui); color: var(--ink, #141313); cursor: pointer;
  transition: background .2s, color .2s, transform .2s; animation: msgIn .35s cubic-bezier(.2,1.3,.4,1) both; }
.jm-chip:hover { background: var(--ink, #141313); color: #fff; transform: translateY(-1px); }
.jm-chip__ic { display: inline-grid; place-items: center; width: 20px; height: 20px; border-radius: 50%; background: var(--wine, #7A1F2B); color: #fff; font-size: .625rem; font-weight: 700; }
.jm-cta { display: block; width: 100%; margin-top: 10px; min-height: 42px; border: 0; border-radius: 999px; background: var(--wine, #7A1F2B); color: #fff; font: 700 .875rem var(--sans, system-ui); cursor: pointer; transition: background .2s; }
.jm-cta:hover { background: var(--wine-2, #5C1520); }
.jm-cta--wa { background: #1FA855; } .jm-cta--wa:hover { background: #178A45; }
.jm-err { color: #B4232B; }
.jm-form { display: flex; gap: 8px; padding: 12px; border-top: 1px solid rgba(0,0,0,.08); background: #fff; }
.jm-input { flex: 1; min-width: 0; height: 46px; border-radius: 999px; border: 1.5px solid var(--line-2, rgba(0,0,0,.2)); padding: 0 16px; font: 500 1rem var(--sans, system-ui); background: var(--paper, #FBFAF7); color: var(--ink, #141313); }
.jm-input:focus { outline: none; border-color: var(--wine, #7A1F2B); box-shadow: 0 0 0 4px rgba(122,31,43,.12); }
.jm-send { width: 46px; height: 46px; border-radius: 50%; border: 0; background: var(--ink, #141313); cursor: pointer; display: grid; place-items: center; flex-shrink: 0; transition: background .2s, transform .2s; }
.jm-send:hover { background: var(--wine, #7A1F2B); transform: rotate(-12deg); }
.jm-send svg { width: 20px; height: 20px; fill: none; stroke: #fff; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }
.jm-legal { font-size: .6875rem; color: var(--ink-3, #8A8580); padding: 0 14px 12px; background: #fff; line-height: 1.5; }
@media (min-width: 720px) {
  .jm-chat { right: 24px; bottom: 24px; }
  .jm-panel { inset: auto 24px 24px auto; width: 400px; height: min(660px, calc(100dvh - 110px)); border-radius: 22px; box-shadow: 0 30px 80px -10px rgba(0,0,0,.35), 0 0 0 1px rgba(0,0,0,.06); }
}
@media (prefers-reduced-motion: reduce) { .jm-chat *, .jm-chat { animation: none !important; } }
@media (max-width: 719px) {
  .jm-fab { height: 58px; padding: 7px; gap: 0; }
  .jm-fab__txt { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  .jm-fab__ring { left: 7px; top: 7px; }
  .jm-teaser { width: 210px; bottom: 70px; font-size: .84rem; }
  .jm-teaser::after { right: 20px; }
}
