/* Auri · asistente de Plus Aurea */
.ac-launch, .ac-tip, .ac-panel, .ac-panel * { box-sizing: border-box; }
.ac-launch, .ac-tip, .ac-panel {
  --ac-teal: #00AB9E; --ac-teal-d: #008C81; --ac-slate: #3B4650; --ac-mint: #E3F5F3;
  --ac-bg: #F4F8F8; --ac-line: #DCE6E5; --ac-fg: #25303A; --ac-muted: #5E6B74; --ac-wa: #1FA855;
  font-family: inherit; font-size: 15px; line-height: 1.45; color: var(--ac-fg);
}

.ac-launch {
  position: fixed; z-index: 99998;
  right: calc(20px + env(safe-area-inset-right, 0px)); bottom: calc(84px + env(safe-area-inset-bottom, 0px));
  width: 68px; height: 68px; padding: 0; border: 3px solid #fff; border-radius: 50%;
  background: var(--ac-mint); cursor: pointer; box-shadow: 0 8px 24px rgba(30, 50, 60, .28);
  transition: transform .2s ease;
}
.ac-launch:hover { transform: translateY(-2px) scale(1.04); }
.ac-launch:focus-visible, .ac-tip:focus-visible { outline: 3px solid var(--ac-teal); outline-offset: 3px; }
.ac-launch img { display: block; width: 100%; height: 100%; border-radius: 50%; }
.ac-dot { position: absolute; top: 2px; right: 2px; width: 14px; height: 14px; border-radius: 50%; background: #3ED598; border: 2px solid #fff; }
.ac-launch.ac-on .ac-dot { display: none; }

.ac-tip {
  position: fixed; z-index: 99998;
  right: calc(98px + env(safe-area-inset-right, 0px)); bottom: calc(100px + env(safe-area-inset-bottom, 0px));
  padding: 9px 14px; border: 0; border-radius: 16px 16px 4px 16px;
  background: #fff; color: var(--ac-fg); font-size: 14px; cursor: pointer;
  box-shadow: 0 6px 20px rgba(30, 50, 60, .2); animation: ac-in .3s ease;
}
.ac-tip b { color: var(--ac-teal-d); }

.ac-panel {
  position: fixed; z-index: 99999;
  right: calc(20px + env(safe-area-inset-right, 0px)); bottom: calc(164px + env(safe-area-inset-bottom, 0px));
  width: 380px; max-width: calc(100vw - 32px); height: min(600px, calc(100vh - 190px));
  display: flex; flex-direction: column; overflow: hidden;
  background: #fff; border-radius: 20px; box-shadow: 0 20px 50px rgba(20, 40, 50, .3);
  animation: ac-in .22s ease;
}
.ac-panel[hidden], .ac-tip[hidden], .ac-chips[hidden] { display: none !important; }

.ac-head { display: flex; align-items: center; gap: 10px; padding: 12px 12px 12px 14px; background: var(--ac-slate); color: #fff; }
.ac-head img { border-radius: 50%; background: var(--ac-mint); flex: none; }
.ac-id { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.ac-id b { font-size: 16px; }
.ac-id span { font-size: 12.5px; opacity: .8; }
.ac-hbtn, .ac-close {
  flex: none; display: grid; place-items: center; width: 36px; height: 36px; border-radius: 50%;
  border: 0; background: rgba(255, 255, 255, .12); color: #fff; text-decoration: none; cursor: pointer;
}
.ac-hbtn:hover, .ac-close:hover { background: rgba(255, 255, 255, .24); color: #fff; }
.ac-close { font-size: 24px; line-height: 1; background: transparent; }

.ac-log { flex: 1; overflow-y: auto; padding: 16px 14px 8px; background: var(--ac-bg); display: flex; flex-direction: column; gap: 10px; }
.ac-msg { display: flex; gap: 8px; align-items: flex-end; max-width: 100%; }
.ac-mini { flex: none; border-radius: 50%; background: var(--ac-mint); }
.ac-bub { padding: 9px 13px; border-radius: 16px; max-width: 82%; overflow-wrap: anywhere; }
.ac-el .ac-bub { background: #fff; border: 1px solid var(--ac-line); border-bottom-left-radius: 4px; }
.ac-yo { justify-content: flex-end; }
.ac-yo .ac-bub { background: var(--ac-teal); color: #fff; border-bottom-right-radius: 4px; }
.ac-bub a { color: var(--ac-teal-d); font-weight: 600; }
.ac-yo .ac-bub a { color: #fff; }

.ac-typing { display: flex; gap: 4px; padding: 13px 14px; }
.ac-typing i { width: 7px; height: 7px; border-radius: 50%; background: var(--ac-teal); animation: ac-dot 1s infinite ease-in-out; }
.ac-typing i:nth-child(2) { animation-delay: .15s; }
.ac-typing i:nth-child(3) { animation-delay: .3s; }

.ac-card { margin-left: 36px; padding: 12px; border-radius: 14px; background: #fff; border: 2px solid var(--ac-teal); }
.ac-card b { display: block; margin-bottom: 6px; color: var(--ac-teal-d); }
.ac-card pre { margin: 0 0 10px; white-space: pre-wrap; font: inherit; font-size: 13.5px; color: var(--ac-fg); background: none; border: 0; padding: 0; }
.ac-acts { display: flex; flex-wrap: wrap; gap: 6px; }
.ac-btn {
  display: inline-flex; align-items: center; gap: 6px; padding: 8px 12px; border-radius: 999px;
  background: var(--ac-slate); color: #fff !important; font-size: 13.5px; font-weight: 600; text-decoration: none !important;
}
.ac-btn-wa { background: var(--ac-wa); }
.ac-btn-sec { background: #fff; color: var(--ac-slate) !important; border: 1.5px solid var(--ac-slate); }
.ac-btn:hover { filter: brightness(1.08); }

.ac-chips { display: flex; flex-wrap: wrap; gap: 6px; padding: 4px 14px 10px; background: var(--ac-bg); }
.ac-chips button {
  border: 1.5px solid var(--ac-teal); background: #fff; color: var(--ac-teal-d);
  padding: 6px 11px; border-radius: 999px; font: inherit; font-size: 13.5px; cursor: pointer;
}
.ac-chips button:hover { background: var(--ac-teal); color: #fff; }

.ac-form { display: flex; gap: 8px; align-items: flex-end; padding: 10px 12px; border-top: 1px solid var(--ac-line); background: #fff; }
.ac-form textarea {
  flex: 1; min-width: 0; resize: none; max-height: 120px; padding: 10px 12px; margin: 0;
  border: 1.5px solid var(--ac-line); border-radius: 14px; font: inherit; color: var(--ac-fg); background: #fff;
}
.ac-form textarea:focus { outline: none; border-color: var(--ac-teal); }
.ac-send { flex: none; width: 42px; height: 42px; border: 0; border-radius: 50%; background: var(--ac-teal); color: #fff; display: grid; place-items: center; cursor: pointer; padding: 0; }
.ac-send:disabled { opacity: .5; cursor: default; }
.ac-send:focus-visible, .ac-chips button:focus-visible, .ac-hbtn:focus-visible, .ac-close:focus-visible { outline: 3px solid #7ED8D0; outline-offset: 2px; }

.ac-legal { margin: 0; padding: 0 12px 10px; font-size: 11.5px; color: var(--ac-muted); background: #fff; }
.ac-legal a { color: var(--ac-muted); }
.ac-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

@keyframes ac-in { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
@keyframes ac-dot { 0%, 80%, 100% { opacity: .3; transform: translateY(0); } 40% { opacity: 1; transform: translateY(-3px); } }

@media (max-width: 560px) {
  .ac-panel {
    right: 0; bottom: 0; left: 0; top: 0; width: 100%; max-width: none; height: 100%; border-radius: 0;
    padding-top: env(safe-area-inset-top, 0px); padding-bottom: env(safe-area-inset-bottom, 0px);
  }
  html.ac-abierto .ac-launch { display: none; }
  html.ac-abierto, html.ac-abierto body { overflow: hidden; }
  .ac-tip { right: calc(94px + env(safe-area-inset-right, 0px)); }
}
@media (prefers-reduced-motion: reduce) {
  .ac-launch, .ac-tip, .ac-panel, .ac-typing i { animation: none; transition: none; }
}

/* ---- Blindaje frente a los estilos del tema / Elementor ---- */
html body .ac-panel button, html body button.ac-launch, html body button.ac-tip {
  text-transform: none !important; letter-spacing: normal !important; font-family: inherit !important;
  min-height: 0 !important; line-height: 1.3 !important; box-shadow: none; text-shadow: none !important; margin: 0 !important;
}
html body button.ac-launch {
  width: 68px !important; height: 68px !important; padding: 0 !important; border: 3px solid #fff !important;
  border-radius: 50% !important; background: var(--ac-mint) !important; box-shadow: 0 8px 24px rgba(30, 50, 60, .28) !important;
}
html body button.ac-tip {
  padding: 9px 14px !important; border: 0 !important; border-radius: 16px 16px 4px 16px !important;
  background: #fff !important; color: var(--ac-fg) !important; font-size: 14px !important; font-weight: 400 !important;
  box-shadow: 0 6px 20px rgba(30, 50, 60, .2) !important;
}
html body .ac-panel .ac-chips button {
  border: 1.5px solid var(--ac-teal) !important; background: #fff !important; color: var(--ac-teal-d) !important;
  padding: 6px 11px !important; border-radius: 999px !important; font-size: 13.5px !important; font-weight: 500 !important;
}
html body .ac-panel .ac-chips button:hover, html body .ac-panel .ac-chips button:focus-visible { background: var(--ac-teal) !important; color: #fff !important; }
html body .ac-panel .ac-close, html body .ac-panel .ac-hbtn {
  width: 36px !important; height: 36px !important; padding: 0 !important; border: 0 !important; border-radius: 50% !important;
  background: rgba(255, 255, 255, .12) !important; color: #fff !important; font-size: 22px !important; font-weight: 400 !important;
}
html body .ac-panel .ac-close { background: transparent !important; }
html body .ac-panel .ac-close:hover, html body .ac-panel .ac-hbtn:hover { background: rgba(255, 255, 255, .24) !important; }
html body .ac-panel .ac-send {
  width: 42px !important; height: 42px !important; padding: 0 !important; border: 0 !important; border-radius: 50% !important;
  background: var(--ac-teal) !important; color: #fff !important;
}
html body .ac-panel .ac-form textarea {
  border: 1.5px solid var(--ac-line) !important; border-radius: 14px !important; background: #fff !important;
  color: var(--ac-fg) !important; padding: 10px 12px !important; font-size: 15px !important; box-shadow: none !important; min-height: 0 !important;
}
html body .ac-panel .ac-form textarea:focus { border-color: var(--ac-teal) !important; }
html body .ac-panel a.ac-btn { border-radius: 999px !important; }

/* ---- Posición (alineada con el botón de cookies si existe: --ac-right / --ac-bottom) ---- */
html body button.ac-launch { right: calc(var(--ac-right, 20px) + env(safe-area-inset-right, 0px)); bottom: calc(var(--ac-bottom, 84px) + env(safe-area-inset-bottom, 0px)); }
html body .ac-panel { right: calc(var(--ac-right, 20px) + env(safe-area-inset-right, 0px)); bottom: calc(var(--ac-bottom, 84px) + 80px + env(safe-area-inset-bottom, 0px)); height: min(600px, calc(100vh - var(--ac-bottom, 84px) - 110px)); }

/* Aviso «¿Te ayudo?» con Auri animado flotando encima */
html body button.ac-tip {
  display: block !important; padding: 10px 16px !important; overflow: visible !important; font-size: 15px !important;
  border-radius: 18px 18px 4px 18px !important;
  right: calc(var(--ac-right, 20px) + env(safe-area-inset-right, 0px)); bottom: calc(var(--ac-bottom, 84px) + 12px + env(safe-area-inset-bottom, 0px));
}
/* Al pasar el ratón: el aviso a la izquierda de la burbuja */
html.ac-tip-hover body button.ac-tip { right: calc(var(--ac-right, 20px) + 80px + env(safe-area-inset-right, 0px)); }
html body button.ac-tip .ac-tip-img {
  position: absolute; right: 0; bottom: 100%; margin: 0 0 4px !important;
  width: 150px !important; height: 150px !important; max-width: none !important; display: block;
  border: 0 !important; box-shadow: none !important; background: transparent !important;
  filter: drop-shadow(0 8px 10px rgba(30, 50, 60, .18)); pointer-events: none;
}
/* Aviso automático: la burbuja se esconde mientras se ve Auri */
.ac-launch { transition: transform .25s ease, opacity .25s ease; }
html.ac-tip-on body button.ac-launch { opacity: 0 !important; transform: scale(.6) !important; pointer-events: none !important; }
@media (max-width: 560px) {
  html body .ac-panel { right: 0; bottom: 0; height: 100%; }
}

/* Stickers en la conversación */
.ac-st { padding-left: 36px; }
html body .ac-panel img.ac-sticker { width: 128px !important; height: 128px !important; max-width: none !important; border: 0 !important; box-shadow: none !important; background: transparent !important; animation: ac-pop .35s ease; }
@keyframes ac-pop { from { transform: scale(.6); opacity: 0; } to { transform: none; opacity: 1; } }
@media (prefers-reduced-motion: reduce) { html body .ac-panel img.ac-sticker { animation: none; } }

/* Botones de contacto directo */
.ac-contact { margin-left: 36px; padding: 10px 12px; border-radius: 14px; background: #fff; border: 1.5px dashed var(--ac-teal); display: grid; gap: 8px; animation: ac-pop .3s ease; }
.ac-contact span { font-size: 13px; color: var(--ac-muted); }
.ac-contact em { font-style: normal; font-weight: 600; color: var(--ac-teal-d); }
.ac-btn svg { flex: none; }
html body .ac-panel .ac-head .ac-hbtn { width: 34px !important; height: 34px !important; }
.ac-id span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
