/* =====================================================================
   AgroChat — asistente de la tienda AgroDent (estilos)
   ---------------------------------------------------------------------
   Se tematiza con variables en :root de la página:
     --ac-accent --ac-accent-ink --ac-bg --ac-surface --ac-ink --ac-muted
     --ac-line --ac-radius --ac-font --ac-font-display
     (por defecto toman las --as-* del motor de tienda)
     --ac-offset-bottom  px que hay que dejar libres abajo (barra fija móvil)
   Opcionales: --ac-head / --ac-head-ink (cabecera) y --ac-wa (botón WhatsApp)
   ===================================================================== */
.ac-root {
  --_accent: var(--ac-accent, var(--as-accent, #4d7c2a));
  --_accent-ink: var(--ac-accent-ink, var(--as-accent-ink, #fff));
  --_bg: var(--ac-bg, var(--as-bg, #fffdf7));
  --_surface: var(--ac-surface, var(--as-surface, #f4efe2));
  --_ink: var(--ac-ink, var(--as-ink, #1f2a1c));
  --_muted: var(--ac-muted, var(--as-muted, #5f6657));
  --_line: var(--ac-line, var(--as-line, rgba(31, 42, 28, .12)));
  --_radius: var(--ac-radius, var(--as-radius, 16px));
  --_font: var(--ac-font, var(--as-font, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif));
  --_display: var(--ac-font-display, var(--as-font-display, var(--_font)));
  --_head: var(--ac-head, var(--as-dark, #1f2a1c));
  --_head-ink: var(--ac-head-ink, var(--as-dark-ink, #fff));
  --_wa: var(--ac-wa, #177a41);
  --_free: var(--as-free, #2f7d32);
  --_free-soft: var(--as-free-soft, #e6f3e2);
  --_off: var(--ac-offset-bottom, 0px);
  --_gap: 20px;
  --_launch: 62px;
  font-family: var(--_font);
  color: var(--_ink);
  -webkit-font-smoothing: antialiased;
}
.ac-root *, .ac-root *::before, .ac-root *::after { box-sizing: border-box; }
.ac-root [hidden] { display: none !important; }
.ac-root img, .ac-root svg { display: block; }
.ac-root button { font-family: inherit; }
.ac-root :focus-visible { outline: 2.5px solid var(--_accent); outline-offset: 2px; }
.ac-sr { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }

/* el chat sustituye al botón flotante de WhatsApp de la página */
html.ac-on .wa-float, html.ac-on [data-chat-replaces] { display: none !important; }
html.ac-lock, html.ac-lock body { overflow: hidden !important; }
html.ac-lock .as-toast { opacity: 0 !important; }

/* ---------- lanzador ---------- */
.ac-launcher {
  position: fixed; right: var(--_gap); bottom: calc(var(--_gap) + var(--_off)); z-index: 8800;
  width: var(--_launch); height: var(--_launch); border-radius: 50%; border: 0; padding: 0; cursor: pointer;
  background: var(--_bg); color: var(--_ink); display: grid; place-items: center;
  box-shadow: 0 0 0 1px var(--_line), 0 14px 30px -12px rgba(0, 0, 0, .5), 0 2px 6px rgba(0, 0, 0, .08);
  transition: transform .25s cubic-bezier(.2, .8, .2, 1), bottom .4s cubic-bezier(.2, .8, .2, 1), box-shadow .25s, opacity .2s, visibility 0s;
}
.ac-launcher:active { transform: scale(.96); }
.ac-launcher__logo { width: 66%; height: auto; transition: transform .3s cubic-bezier(.2, .8, .2, 1), opacity .2s; }
.ac-launcher__badge {
  position: absolute; right: -3px; bottom: -3px; width: 26px; height: 26px; border-radius: 50%;
  background: var(--_accent); color: var(--_accent-ink); display: grid; place-items: center;
  box-shadow: 0 0 0 3px var(--_bg); transition: transform .3s cubic-bezier(.2, .8, .2, 1);
}
.ac-launcher__badge svg { width: 14px; height: 14px; }
.ac-launcher__close { position: absolute; inset: 0; display: grid; place-items: center; opacity: 0; transform: rotate(-60deg) scale(.6); transition: transform .3s cubic-bezier(.2, .8, .2, 1), opacity .2s; }
.ac-launcher__close svg { width: 22px; height: 22px; }
.ac-root.is-open .ac-launcher__logo { opacity: 0; transform: scale(.6); }
.ac-root.is-open .ac-launcher__badge { transform: scale(0); }
.ac-root.is-open .ac-launcher__close { opacity: 1; transform: none; }
.ac-launcher__dot {
  position: absolute; top: 0; right: 0; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 99px;
  background: #c23b1c; color: #fff; font: 700 11px/18px var(--_font); text-align: center; box-shadow: 0 0 0 2.5px var(--_bg);
  animation: ac-pulse 2s ease-in-out infinite;
}

/* ---------- burbuja de bienvenida / aviso ---------- */
.ac-teaser {
  position: fixed; right: var(--_gap); bottom: calc(var(--_gap) + var(--_off) + var(--_launch) + 14px); z-index: 8801;
  width: min(310px, calc(100vw - 2 * var(--_gap))); display: grid; grid-template-columns: auto 1fr; gap: 10px; align-items: start;
  background: var(--_bg); color: var(--_ink); border-radius: 18px 18px 6px 18px; padding: 14px 42px 14px 14px;
  box-shadow: 0 0 0 1px var(--_line), 0 22px 44px -18px rgba(0, 0, 0, .5);
  animation: ac-pop .5s cubic-bezier(.2, 1.3, .4, 1) both; transition: bottom .4s cubic-bezier(.2, .8, .2, 1);
}
.ac-teaser__open { all: unset; cursor: pointer; display: contents; }
.ac-teaser__open:focus-visible .ac-teaser__text { outline: 2.5px solid var(--_accent); outline-offset: 3px; border-radius: 4px; }
.ac-teaser__av { width: 34px; height: 34px; border-radius: 50%; background: var(--_surface); display: grid; place-items: center; }
.ac-teaser__av img { width: 24px; height: auto; }
.ac-teaser__av--agent { background: var(--_accent); color: var(--_accent-ink); }
.ac-teaser__av--agent svg { width: 16px; height: 16px; }
.ac-teaser__text { font-size: 14px; line-height: 1.42; }
.ac-teaser__text b { display: block; font: 650 14.5px/1.25 var(--_display); margin-bottom: 2px; }
.ac-teaser__x {
  position: absolute; top: 6px; right: 6px; width: 32px; height: 32px; border: 0; border-radius: 50%; cursor: pointer;
  background: transparent; color: var(--_muted); display: grid; place-items: center;
}
.ac-teaser__x svg { width: 16px; height: 16px; }

/* ---------- panel ---------- */
.ac-panel {
  position: fixed; right: var(--_gap); bottom: calc(var(--_gap) + var(--_off) + var(--_launch) + 14px); z-index: 8900;
  width: 392px; max-width: calc(100vw - 2 * var(--_gap));
  height: min(640px, calc(100vh - var(--_off) - var(--_launch) - 2 * var(--_gap) - 34px));
  min-height: 300px; display: flex; flex-direction: column; overflow: hidden;
  background: var(--_bg); color: var(--_ink); border-radius: calc(var(--_radius) + 4px);
  box-shadow: 0 0 0 1px var(--_line), 0 32px 70px -24px rgba(0, 0, 0, .5), 0 4px 14px rgba(0, 0, 0, .06);
  transform-origin: 100% 100%; opacity: 0; transform: translateY(16px) scale(.97); visibility: hidden; pointer-events: none;
  transition: opacity .22s ease, transform .32s cubic-bezier(.2, .8, .2, 1), visibility 0s linear .32s, bottom .4s cubic-bezier(.2, .8, .2, 1);
}
.ac-root.is-open .ac-panel { opacity: 1; transform: none; visibility: visible; pointer-events: auto; transition-delay: 0s; }

.ac-head {
  flex: none; display: flex; align-items: center; gap: 12px; padding: 14px 12px 14px 16px;
  background: var(--_head); color: var(--_head-ink); position: relative;
}
.ac-head::after { content: ""; position: absolute; left: 0; right: 0; bottom: -10px; height: 10px; background: linear-gradient(var(--_line), transparent); opacity: .7; pointer-events: none; z-index: 1; }
.ac-head :focus-visible { outline-color: var(--_head-ink); }
.ac-avatar { position: relative; flex: none; width: 44px; height: 44px; border-radius: 50%; background: var(--_bg); display: grid; place-items: center; box-shadow: 0 0 0 2px rgba(255, 255, 255, .14); }
.ac-avatar img { width: 31px; height: auto; }
.ac-avatar::after { content: ""; position: absolute; right: 0; bottom: 1px; width: 11px; height: 11px; border-radius: 50%; background: #8fd16a; box-shadow: 0 0 0 2.5px var(--_head); }
.ac-head__txt { flex: 1; min-width: 0; }
.ac-title { margin: 0; font: 650 17px/1.15 var(--_display); letter-spacing: -.005em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: inherit; }
.ac-status { margin: 3px 0 0; font-size: 12.5px; line-height: 1.3; opacity: .88; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ac-root.is-agent .ac-avatar::after { background: #f2c230; animation: ac-pulse 2s ease-in-out infinite; }
.ac-head__btn {
  flex: none; width: 38px; height: 38px; border-radius: 50%; border: 0; cursor: pointer; display: grid; place-items: center;
  background: rgba(255, 255, 255, .1); color: inherit; transition: background .2s;
}
.ac-head__btn svg { width: 18px; height: 18px; }

/* ---------- mensajes ---------- */
.ac-log {
  position: relative; flex: 1; min-height: 0; overflow-y: auto; overscroll-behavior: contain; -webkit-overflow-scrolling: touch;
  padding: 18px 14px 10px; display: flex; flex-direction: column; gap: 10px;
}
.ac-log:focus-visible { outline-offset: -3px; }
.ac-day { align-self: center; font-size: 11.5px; color: var(--_muted); background: var(--_surface); padding: 4px 10px; border-radius: 99px; }
.ac-msg { display: flex; align-items: flex-end; gap: 8px; max-width: 100%; animation: ac-in .32s cubic-bezier(.2, .8, .2, 1) both; }
.ac-msg--user { justify-content: flex-end; }
.ac-mini { flex: none; width: 28px; height: 28px; border-radius: 50%; background: var(--_surface); display: grid; place-items: center; }
.ac-mini img { width: 20px; height: auto; }
.ac-mini--agent { background: var(--_accent); color: var(--_accent-ink); }
.ac-mini--agent svg { width: 15px; height: 15px; }
.ac-msg--bot + .ac-msg--bot .ac-mini, .ac-msg--agent + .ac-msg--agent .ac-mini { visibility: hidden; }
.ac-bubble {
  max-width: 86%; min-width: 0; padding: 10px 13px; border-radius: 18px; font-size: 14.5px; line-height: 1.48;
  overflow-wrap: anywhere; background: var(--_surface); color: var(--_ink); border-bottom-left-radius: 6px;
}
.ac-msg--user .ac-bubble { background: var(--_accent); color: var(--_accent-ink); border-radius: 18px; border-bottom-right-radius: 6px; white-space: pre-wrap; }
.ac-msg--agent .ac-bubble { background: var(--_bg); box-shadow: inset 0 0 0 1.5px var(--_accent); }
.ac-msg--wide .ac-bubble { max-width: calc(100% - 36px); width: 100%; }
.ac-who { display: block; font-size: 11.5px; font-weight: 700; letter-spacing: .01em; color: var(--_accent); margin-bottom: 3px; }
.ac-note { align-self: center; max-width: 90%; text-align: center; font-size: 12.5px; color: var(--_muted); line-height: 1.4; }
.ac-bubble p { margin: 0 0 8px; }
.ac-bubble p:last-child { margin-bottom: 0; }
.ac-bubble ul { margin: 6px 0 8px; padding-left: 18px; }
.ac-bubble li { margin: 2px 0; }
.ac-bubble a { color: inherit; text-decoration-thickness: 1.5px; text-underline-offset: 2px; }
.ac-bubble small { font-size: 12.5px; color: var(--_muted); }
.ac-bubble b, .ac-bubble strong { font-weight: 700; }

/* tarjetas dentro de los mensajes */
.ac-card { background: var(--_bg); border-radius: 12px; padding: 11px 12px; margin: 8px 0; box-shadow: 0 0 0 1px var(--_line); }
.ac-card:first-child { margin-top: 2px; }
.ac-card:last-child { margin-bottom: 0; }
.ac-card__title { display: block; font-size: 12px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: var(--_muted); margin-bottom: 6px; }
.ac-rows { display: grid; gap: 6px; margin: 0; }
.ac-row { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; font-size: 13.5px; }
.ac-row > span:first-child { min-width: 0; }
.ac-row small { display: block; font-size: 12px; color: var(--_muted); }
.ac-row > :last-child { text-align: right; font-weight: 700; font-variant-numeric: tabular-nums; white-space: nowrap; }
.ac-row s { color: var(--_muted); font-weight: 500; margin-right: 4px; }
.ac-row--hi { padding: 7px 8px; margin: 0 -8px; border-radius: 9px; background: color-mix(in srgb, var(--_accent) 9%, transparent); }
.ac-big { display: block; font: 700 23px/1.1 var(--_display); letter-spacing: -.01em; margin: 2px 0 4px; }
.ac-free { color: var(--_free); font-weight: 800; }
.ac-tag { display: inline-flex; align-items: center; gap: 5px; background: var(--_free-soft); color: var(--_free); font-weight: 700; font-size: 12.5px; line-height: 1.2; padding: 4px 9px; border-radius: 99px; margin: 2px 4px 2px 0; }
.ac-tag svg { width: 15px; height: 15px; flex: none; }
.ac-tag--warn { background: #fdf0dc; color: #7a4b00; }
.ac-badge { display: inline-block; font-size: 10.5px; font-weight: 800; letter-spacing: .04em; text-transform: uppercase; background: var(--_accent); color: var(--_accent-ink); padding: 2px 6px; border-radius: 99px; margin-left: 4px; vertical-align: 1px; }
.ac-fine { display: block; font-size: 12px; line-height: 1.4; color: var(--_muted); margin-top: 6px; }
.ac-done { display: flex; align-items: center; gap: 8px; font-weight: 700; color: var(--_free); }
.ac-done svg { flex: none; width: 18px; height: 18px; }

/* botones dentro de los mensajes */
.ac-actions { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.ac-btn {
  appearance: none; border: 0; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  min-height: 40px; padding: 9px 14px; border-radius: 999px; font: 650 13.5px/1.15 var(--_font); text-decoration: none; text-align: center;
  transition: filter .2s, transform .15s, background .2s, opacity .2s;
}
.ac-btn:active:not([disabled]) { transform: scale(.97); }
.ac-btn svg { width: 17px; height: 17px; flex: none; }
.ac-btn--primary { background: var(--_accent); color: var(--_accent-ink); }
.ac-btn--ghost { background: var(--_bg); color: var(--_ink); box-shadow: inset 0 0 0 1.5px var(--_line); }
.ac-btn--wa { background: var(--_wa); color: #fff; }
.ac-btn--block { width: 100%; }
.ac-btn[disabled] { opacity: .5; cursor: default; }
.ac-btn.is-chosen { opacity: 1; background: transparent; color: var(--_accent); box-shadow: inset 0 0 0 1.5px var(--_accent); filter: none; }
.ac-btn--wa.is-chosen { color: var(--_wa); box-shadow: inset 0 0 0 1.5px var(--_wa); }

/* indicador de escritura */
.ac-typing { display: inline-flex; align-items: center; gap: 4px; padding: 13px 15px; }
.ac-typing i { width: 7px; height: 7px; border-radius: 50%; background: var(--_muted); opacity: .45; animation: ac-blink 1.2s ease-in-out infinite both; }
.ac-typing i:nth-child(2) { animation-delay: .16s; }
.ac-typing i:nth-child(3) { animation-delay: .32s; }
.ac-typing-label { font-size: 12px; color: var(--_muted); margin: -4px 0 0 36px; }

/* respuestas rápidas */
.ac-chips {
  flex: none; display: flex; gap: 7px; overflow-x: auto; padding: 8px 14px 6px; scrollbar-width: none; scroll-padding-inline: 14px;
  -webkit-mask-image: linear-gradient(90deg, #000 calc(100% - 26px), transparent);
  mask-image: linear-gradient(90deg, #000 calc(100% - 26px), transparent);
}
.ac-chips::-webkit-scrollbar { display: none; }
.ac-chips:empty { display: none; }
.ac-chips.is-end { -webkit-mask-image: none; mask-image: none; }
.ac-chips.is-scrolled { -webkit-mask-image: linear-gradient(90deg, transparent, #000 22px, #000 calc(100% - 26px), transparent); mask-image: linear-gradient(90deg, transparent, #000 22px, #000 calc(100% - 26px), transparent); }
.ac-chips.is-scrolled.is-end { -webkit-mask-image: linear-gradient(90deg, transparent, #000 22px); mask-image: linear-gradient(90deg, transparent, #000 22px); }
.ac-chip {
  flex: none; appearance: none; border: 0; cursor: pointer; white-space: nowrap; min-height: 36px; padding: 8px 13px; border-radius: 999px;
  background: var(--_bg); color: var(--_accent); font: 650 13.5px/1.1 var(--_font);
  box-shadow: inset 0 0 0 1.5px var(--_line);
  box-shadow: inset 0 0 0 1.5px color-mix(in srgb, var(--_accent) 42%, transparent);
  transition: background .2s, color .2s, box-shadow .2s;
}

/* caja de texto */
.ac-composer { flex: none; display: flex; align-items: flex-end; gap: 8px; padding: 6px 12px 8px; }
.ac-input {
  flex: 1; min-width: 0; resize: none; height: 46px; max-height: 128px; margin: 0; overflow-y: auto;
  font: 400 15px/1.4 var(--_font); color: #1c1c1c; background: #fff;
  border: 1.5px solid var(--_line); border-radius: 23px; padding: 11.5px 16px; outline: none; transition: border-color .2s, box-shadow .2s;
}
.ac-input::placeholder { color: #75706a; }
.ac-input:focus { border-color: var(--_accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--_accent) 18%, transparent); }
/* la página puede tener su propio :focus-visible: en los campos del chat manda el anillo del chat */
.ac-root .ac-input:focus-visible, .ac-root .ac-field input:focus-visible, .ac-root .ac-field textarea:focus-visible { outline: none; }
.ac-send {
  flex: none; width: 46px; height: 46px; border-radius: 50%; border: 0; cursor: pointer; display: grid; place-items: center;
  background: var(--_accent); color: var(--_accent-ink); transition: opacity .2s, transform .15s, filter .2s;
}
.ac-send:active:not(:disabled) { transform: scale(.94); }
.ac-send:disabled { opacity: .38; cursor: default; }
.ac-send svg { width: 20px; height: 20px; }

/* pie: WhatsApp siempre visible */
.ac-foot { flex: none; display: flex; align-items: center; gap: 8px; padding: 2px 12px 12px; }
.ac-foot .ac-btn { min-height: 36px; padding: 7px 12px; font-size: 13px; }
.ac-foot .ac-btn--ghost { box-shadow: none; color: var(--_muted); padding-inline: 8px; }
.ac-foot__sp { flex: 1; }

/* formulario de pregunta con email */
.ac-form { display: grid; gap: 9px; margin-top: 8px; }
.ac-field { display: grid; gap: 4px; font-size: 12.5px; font-weight: 650; color: var(--_muted); }
.ac-field small { font-weight: 400; }
.ac-field input, .ac-field textarea {
  width: 100%; font: 400 15px/1.35 var(--_font); color: #1c1c1c; background: #fff; border: 1.5px solid var(--_line);
  border-radius: 10px; padding: 9px 11px; outline: none; resize: vertical;
}
.ac-field textarea { min-height: 74px; max-height: 180px; }
.ac-field input:focus, .ac-field textarea:focus { border-color: var(--_accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--_accent) 18%, transparent); }
.ac-field .is-invalid, .ac-check.is-invalid input { border-color: #b3261e; box-shadow: 0 0 0 3px rgba(179, 38, 30, .12); }
.ac-check { display: flex; gap: 9px; align-items: flex-start; font-size: 13px; line-height: 1.4; color: var(--_ink); cursor: pointer; }
.ac-check input { accent-color: var(--_accent); width: 18px; height: 18px; margin: 1px 0 0; flex: none; }
.ac-check.is-invalid { color: #8c1d14; }
.ac-err { margin: 0; color: #a3221a; font-size: 13px; font-weight: 650; }

/* efectos al pasar el ratón (solo en dispositivos con puntero: en táctil se quedarían "pegados") */
@media (hover: hover) {
  .ac-launcher:hover { transform: translateY(-2px); box-shadow: 0 0 0 1px var(--_line), 0 18px 36px -12px rgba(0, 0, 0, .55), 0 2px 6px rgba(0, 0, 0, .08); }
  .ac-teaser__x:hover { background: var(--_surface); color: var(--_ink); }
  .ac-head__btn:hover { background: rgba(255, 255, 255, .2); }
  .ac-btn--primary:hover:not([disabled]) { filter: brightness(1.1); }
  .ac-btn--ghost:hover:not([disabled]) { box-shadow: inset 0 0 0 1.5px var(--_accent); }
  .ac-btn--wa:hover:not([disabled]) { filter: brightness(1.1); }
  .ac-chip:hover { background: var(--_accent); color: var(--_accent-ink); box-shadow: none; }
  .ac-send:hover:not(:disabled) { filter: brightness(1.1); }
  .ac-foot .ac-btn--ghost:hover { color: var(--_ink); box-shadow: none; text-decoration: underline; }
}

/* ---------- animaciones ---------- */
@keyframes ac-in { from { opacity: 0; transform: translateY(8px); } }
@keyframes ac-pop { from { opacity: 0; transform: translateY(10px) scale(.94); } }
@keyframes ac-blink { 0%, 80%, 100% { opacity: .3; transform: none; } 40% { opacity: 1; transform: translateY(-3px); } }
@keyframes ac-pulse { 0%, 100% { box-shadow: 0 0 0 2.5px var(--_bg), 0 0 0 2.5px rgba(194, 59, 28, .5); } 50% { box-shadow: 0 0 0 2.5px var(--_bg), 0 0 0 7px rgba(194, 59, 28, 0); } }
.ac-root.is-agent .ac-avatar::after { animation-name: ac-pulse-agent; }
@keyframes ac-pulse-agent { 0%, 100% { box-shadow: 0 0 0 2.5px var(--_head), 0 0 0 2.5px rgba(242, 194, 48, .55); } 50% { box-shadow: 0 0 0 2.5px var(--_head), 0 0 0 7px rgba(242, 194, 48, 0); } }

/* ---------- móvil: panel a pantalla completa ---------- */
@media (max-width: 640px) {
  .ac-root { --_gap: 16px; --_launch: 58px; }
  .ac-panel {
    left: 0; right: 0; top: var(--ac-vvt, 0px); bottom: auto; width: 100%; max-width: none; min-height: 0;
    height: calc(100vh - var(--_off));
    height: calc(var(--ac-vvh, 100dvh) - var(--_off));
    border-radius: 0; transform: translateY(28px); transform-origin: 50% 100%;
  }
  .ac-root.is-kb .ac-panel { height: var(--ac-vvh, 100dvh); }
  .ac-root.is-open .ac-launcher, .ac-root.is-open .ac-teaser { opacity: 0; visibility: hidden; pointer-events: none; transition: opacity .15s, visibility 0s linear .15s; }
  .ac-head { padding-top: max(12px, env(safe-area-inset-top)); padding-bottom: 12px; }
  .ac-log { padding-inline: 12px; }
  .ac-bubble { max-width: 88%; }
  .ac-input { font-size: 16px; }
  .ac-foot { padding-bottom: max(10px, env(safe-area-inset-bottom)); }
}
@media (max-width: 360px) {
  .ac-foot .ac-btn--ghost span { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  .ac-root *, .ac-root *::before, .ac-root *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
  .ac-typing i { opacity: .6; }
}
@media print { .ac-root { display: none !important; } }

/* ---------- v3: burbuja a la izquierda del lanzador cuando encima taparía algo ---------- */
.ac-teaser--side { right: calc(var(--_gap) + var(--_launch) + 14px); bottom: calc(var(--_gap) + var(--_off)); }
.ac-teaser.is-measuring { visibility: hidden; animation: none; }
.ac-teaser.is-away { opacity: 0; visibility: hidden; pointer-events: none; animation: none; transition: opacity .2s, visibility 0s linear .2s; }
/* mientras la primera capa del banner de cookies ocupa el pie (pantallas estrechas), el chat espera a que el cliente decida */
@media (max-width: 640px) {
  html.agc-bar-on .ac-root:not(.is-open) .ac-launcher, html.agc-bar-on .ac-teaser { visibility: hidden; pointer-events: none; }
}
