/* Asistente MM Taxes y Seguros — usa los tokens de marca del sitio */
.mma { position: fixed; right: 24px; bottom: 24px; z-index: 9998;
  font-family: var(--font-b, 'DM Sans', sans-serif); }

/* ── Burbuja ── */
.mma-launcher { width: 60px; height: 60px; border-radius: 50%; border: 0; cursor: pointer;
  background: var(--red, #cc2222); color: #fff; display: flex; align-items: center; justify-content: center;
  box-shadow: 0 6px 22px rgba(204,34,34,.45); transition: transform .22s, background .22s;
  position: relative; z-index: 2; }
.mma-launcher:hover { transform: scale(1.08); }
.mma-launcher:focus-visible { outline: 3px solid #6ea3ff; outline-offset: 3px; }
.mma-launcher.open { background: var(--navy, #0d2a5e); box-shadow: 0 6px 22px rgba(13,42,94,.5); }
.mma-ic-x { display: none; }
.mma-launcher.open .mma-ic-chat { display: none; }
.mma-launcher.open .mma-ic-x { display: block; }

/* ── Panel ── */
.mma-panel { position: absolute; right: 0; bottom: 74px; width: 372px; max-width: calc(100vw - 32px);
  background: #fff; border-radius: 20px; overflow: hidden; display: flex; flex-direction: column;
  box-shadow: 0 24px 70px rgba(13,42,94,.30), 0 0 0 1px rgba(13,42,94,.08);
  opacity: 0; visibility: hidden; transform: translateY(14px) scale(.97); transform-origin: bottom right;
  transition: opacity .22s, transform .22s, visibility .22s; }
.mma-panel.open { opacity: 1; visibility: visible; transform: translateY(0) scale(1); }

.mma-head { background: linear-gradient(135deg, var(--navy, #0d2a5e), var(--navy-mid, #1a3f80));
  padding: 13px 12px 13px 16px; display: flex; align-items: center; gap: 9px; }
.mma-avatar { width: 40px; height: 40px; border-radius: 12px; flex-shrink: 0;
  background: rgba(255,255,255,.16); color: #fff; display: flex; align-items: center; justify-content: center;
  font-family: var(--font-h, Georgia, serif); font-weight: 800; font-size: .92rem; letter-spacing: .04em; }
.mma-htxt { flex: 1; min-width: 0; }
.mma-title { font-family: var(--font-h, Georgia, serif); font-size: 1rem; font-weight: 700; color: #fff; line-height: 1.2; }
.mma-sub { font-size: .74rem; color: rgba(255,255,255,.75); margin-top: 2px; }
.mma-lang { display: flex; background: rgba(255,255,255,.14); border-radius: 999px; padding: 2px; gap: 1px; }
.mma-lang button { border: 0; background: transparent; color: rgba(255,255,255,.68); cursor: pointer;
  font-family: inherit; font-weight: 700; font-size: .7rem; padding: 9px 12px; min-height: 34px;
  border-radius: 999px; }
.mma-lang button.on { background: #fff; color: var(--navy, #0d2a5e); }
.mma-lang button:focus-visible, .mma-x:focus-visible { outline: 2px solid #ffd45e; outline-offset: 1px; }
.mma-x { border: 0; background: transparent; color: rgba(255,255,255,.8); font-size: 1.5rem;
  line-height: 1; cursor: pointer; width: 36px; height: 36px; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center; border-radius: 9px; }
.mma-x:hover { color: #fff; background: rgba(255,255,255,.12); }

/* ── Conversación ── */
.mma-body { padding: 16px 14px 8px; overflow-y: auto; height: 348px; background: var(--off, #f4f7fd); }
.mma-row { display: flex; margin-bottom: 10px; }
.mma-bot { justify-content: flex-start; }
.mma-user { justify-content: flex-end; }
.mma-none { display: none; }
.mma-bub { max-width: 86%; padding: 11px 14px; border-radius: 14px; font-size: .875rem; line-height: 1.6;
  word-wrap: break-word; }
.mma-bot .mma-bub { background: #fff; color: var(--g800, #1a2a40); border: 1px solid var(--g200, #d0dcef);
  border-bottom-left-radius: 5px; }
.mma-user .mma-bub { background: var(--blue, #2357b8); color: #fff; border-bottom-right-radius: 5px; }
.mma-bub strong { font-weight: 700; color: var(--navy, #0d2a5e); }
.mma-user .mma-bub strong { color: #fff; }
.mma-link { display: inline-block; margin-top: 9px; padding: 7px 14px; border-radius: 999px;
  background: var(--blue-pale, #dce8fa); color: var(--blue, #2357b8) !important; font-size: .8rem;
  font-weight: 700; text-decoration: none; }
.mma-link:hover { background: var(--blue, #2357b8); color: #fff !important; }

.mma-more { font-size: .7rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase;
  color: var(--g400, #8099c0); margin: 12px 0 7px 2px; }
.mma-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 12px; }
.mma-chip { border: 1px solid var(--g200, #d0dcef); background: #fff; color: var(--blue, #2357b8);
  border-radius: 999px; padding: 8px 13px; font-family: inherit; font-size: .78rem; font-weight: 600;
  cursor: pointer; transition: all .16s; min-height: 34px; }
.mma-chip:hover { background: var(--blue, #2357b8); color: #fff; border-color: var(--blue, #2357b8); }
.mma-chip:focus-visible { outline: 2px solid #6ea3ff; outline-offset: 2px; }

.mma-typing { display: flex; gap: 4px; padding: 14px; }
.mma-typing span { width: 6px; height: 6px; border-radius: 50%; background: var(--g400, #8099c0);
  animation: mmaBounce 1.2s infinite; }
.mma-typing span:nth-child(2) { animation-delay: .18s; }
.mma-typing span:nth-child(3) { animation-delay: .36s; }
@keyframes mmaBounce { 0%,60%,100% { transform: translateY(0); opacity: .45; } 30% { transform: translateY(-5px); opacity: 1; } }

/* ── Entrada ── */
.mma-form { display: flex; gap: 8px; padding: 11px 12px; background: #fff; border-top: 1px solid var(--g200, #d0dcef); }
.mma-input { flex: 1; min-width: 0; border: 1px solid var(--g200, #d0dcef); border-radius: 999px;
  padding: 0 15px; height: 42px; font-family: inherit; font-size: .87rem; color: var(--g800, #1a2a40); outline: none; }
.mma-input:focus { border-color: var(--blue, #2357b8); box-shadow: 0 0 0 3px rgba(35,87,184,.14); }
.mma-send { width: 42px; height: 42px; flex-shrink: 0; border: 0; border-radius: 50%; cursor: pointer;
  background: var(--blue, #2357b8); color: #fff; display: flex; align-items: center; justify-content: center; }
.mma-send:hover { background: var(--navy, #0d2a5e); }
.mma-send:focus-visible, .mma-input:focus-visible { outline: 3px solid #6ea3ff; outline-offset: 2px; }

/* ── Contacto siempre visible ── */
.mma-contact { background: var(--off, #f4f7fd); border-top: 1px solid var(--g200, #d0dcef); padding: 12px 12px 11px; }
.mma-ctitle { font-size: .72rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase;
  color: var(--g600, #4a6080); margin-bottom: 9px; text-align: center; }
.mma-crow { display: grid; grid-template-columns: repeat(5, 1fr); gap: 6px; }
.mma-c { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px;
  min-height: 52px; padding: 7px 2px; border-radius: 11px; background: #fff; border: 1px solid var(--g200, #d0dcef);
  text-decoration: none; color: var(--g600, #4a6080); font-size: .62rem; font-weight: 700; text-align: center;
  transition: all .16s; }
.mma-c:hover { border-color: var(--blue, #2357b8); color: var(--blue, #2357b8); transform: translateY(-2px); }
.mma-c:focus-visible { outline: 2px solid #6ea3ff; outline-offset: 2px; }
.mma-c span:first-child { font-size: 1.05rem; line-height: 1; }
.mma-c-wa:hover { border-color: #25d366; color: #1fb855; }
.mma-disc { font-size: .64rem; color: var(--g400, #8099c0); line-height: 1.45; margin-top: 9px; text-align: center; }

/* ── Móvil ── */
@media (max-width: 480px) {
  .mma { right: 16px; bottom: 16px; }
  .mma-panel { width: calc(100vw - 24px); right: -4px; bottom: 70px; }
  .mma-body { height: min(46vh, 330px); }
  .mma-crow { gap: 5px; }
  .mma-c { font-size: .58rem; min-height: 50px; }
}
@media (max-height: 640px) { .mma-body { height: 40vh; } }

@media (prefers-reduced-motion: reduce) {
  .mma-panel, .mma-launcher, .mma-chip, .mma-c { transition: none; }
  .mma-typing span { animation: none; }
}
