/* ============================================================
   AI Shop Assistant — Widget "Express AI"  ·  v5 (prototipo exacto)
   Variables de marca: --asa-primary, --asa-primary-2, --asa-radius, --asa-launcher-size
   Capa de reset con !important para blindar el componente del tema (WoodMart, etc.).
   Cuba Provider: la paleta azul de Express se cambió por el verde de marca del tema (--cp-brand
   #21a04a, --cp-brand-dark #16803a) con un reemplazo mecánico de colores (48 líneas). El original
   está en el respaldo del plugin (~/cp-backups/2026-10-17-asa/).
   ============================================================ */

.asa-widget {
	--asa-p:      var(--asa-primary,   #16803a);
	--asa-p2:     var(--asa-primary-2, #21a04a);
	--asa-grad:   linear-gradient(135deg, #16803a 0%, #21a04a 100%);
	--asa-accent: #21a04a;
	--asa-accent-soft: #2fb35a;
	--asa-glow:   rgba(47, 179, 90, .55);

	/* Superficies (claro por defecto; el oscuro —tema del prototipo— las sobrescribe) */
	--asa-bg:      #ffffff;
	--asa-chat:    #eef1fb;
	--asa-surface: #ffffff;
	--asa-img-bg:  #f4f6fb;
	--asa-text:    #1a2233;
	--asa-soft:    #6b7688;
	--asa-border:  rgba(24, 36, 64, .12);
	--asa-hair:    rgba(24, 36, 64, .08);
	--asa-radius:  var(--asa-radius, 22px);
	--asa-shadow:  0 26px 64px -14px rgba(16, 26, 54, .35), 0 8px 22px -10px rgba(16, 26, 54, .25);

	position: fixed;
	bottom: 22px;
	z-index: 2147483000;
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif !important;
	font-size: 14px;
	line-height: 1.5;
	color: var(--asa-text);
	-webkit-font-smoothing: antialiased;
	text-align: left;
}
.asa-pos-right { right: 22px; }
.asa-pos-left  { left: 22px; }

/* ---------- RESET defensivo ---------- */
.asa-widget, .asa-widget *, .asa-widget *::before, .asa-widget *::after { box-sizing: border-box !important; }
.asa-widget button {
	margin: 0 !important; padding: 0; border: 0 !important; background: none;
	font-family: inherit !important; line-height: normal !important; letter-spacing: normal !important;
	text-transform: none !important; text-shadow: none !important; box-shadow: none;
	-webkit-appearance: none !important; appearance: none !important; min-height: 0 !important; width: auto; cursor: pointer;
}
.asa-widget textarea {
	font-family: inherit !important; -webkit-appearance: none !important; appearance: none !important;
	box-shadow: none !important; text-transform: none !important; min-height: 0 !important; margin: 0 !important;
	/* El textarea crece solo al escribir (JS); el handle nativo de redimensionar sobra y
	   algunos temas (WoodMart) lo fuerzan con !important, por eso lo bloqueamos aquí. */
	resize: none !important;
}
.asa-widget a { box-shadow: none !important; text-decoration: none; letter-spacing: normal; }
.asa-widget img { max-width: 100% !important; height: auto; border: 0 !important; border-radius: 0; box-shadow: none !important; vertical-align: middle; }
.asa-widget svg { display: block !important; max-width: 100%; vertical-align: middle; }

/* ---------- TEMA OSCURO "Express AI" (paleta del prototipo) ---------- */
.asa-theme-dark {
	--asa-bg:      #0a0e17;
	--asa-chat:    #06080f;
	--asa-surface: #121826;
	--asa-img-bg:  #ffffff;
	--asa-text:    #eaeef8;
	--asa-soft:    #8b95a9;
	--asa-border:  rgba(130, 150, 190, .18);
	--asa-hair:    rgba(130, 150, 190, .11);
	--asa-shadow:  0 30px 70px -16px rgba(0, 0, 0, .75), 0 8px 24px -10px rgba(0, 0, 0, .6);
}
@media (prefers-color-scheme: dark) {
	.asa-theme-auto {
		--asa-bg: #0a0e17; --asa-chat: #06080f; --asa-surface: #121826; --asa-img-bg: #ffffff;
		--asa-text: #eaeef8; --asa-soft: #8b95a9;
		--asa-border: rgba(130, 150, 190, .18); --asa-hair: rgba(130, 150, 190, .11);
		--asa-shadow: 0 30px 70px -16px rgba(0, 0, 0, .75), 0 8px 24px -10px rgba(0, 0, 0, .6);
	}
}

/* ---------- TEMA CLARO (misma calidad, paleta luminosa) ---------- */
/* --asa-accent-soft se oscurece a #16803a: el #2fb35a por defecto (pensado para superficies
   oscuras) no contrasta lo suficiente como texto (precio, enlaces) sobre blanco. */
.asa-theme-light {
	--asa-bg:      #ffffff;
	--asa-chat:    #edf0f6;
	--asa-surface: #ffffff;
	--asa-img-bg:  #f4f6fb;
	--asa-text:    #111b21;
	--asa-soft:    #667781;
	--asa-accent-soft: #16803a;
	--asa-border:  rgba(22, 32, 58, .14);
	--asa-hair:    rgba(22, 32, 58, .08);
	--asa-shadow:  0 26px 64px -18px rgba(30, 42, 92, .28), 0 8px 22px -12px rgba(30, 42, 92, .18);
}
@media (prefers-color-scheme: light) {
	.asa-theme-auto {
		--asa-bg: #ffffff; --asa-chat: #edf0f6; --asa-surface: #ffffff; --asa-img-bg: #f4f6fb;
		--asa-text: #111b21; --asa-soft: #667781; --asa-accent-soft: #16803a;
		--asa-border: rgba(22, 32, 58, .14); --asa-hair: rgba(22, 32, 58, .08);
		--asa-shadow: 0 26px 64px -18px rgba(30, 42, 92, .28), 0 8px 22px -12px rgba(30, 42, 92, .18);
	}
}
/* En claro, la cabecera luce el degradado de marca (en oscuro es casi negra). El punto
   vacío de las estrellas y el avatar oscuro del robot se ven bien sobre fondo claro. */
.asa-theme-light .asa-star { color: #c3cbdd; }
@media (prefers-color-scheme: light) {
	.asa-widget.asa-theme-auto .asa-star { color: #c3cbdd; }
}

/* ============================================================
   Botón flotante (launcher)
   ============================================================ */
.asa-launcher {
	position: relative;
	width: var(--asa-launcher-size, 62px) !important;
	height: var(--asa-launcher-size, 62px) !important;
	border-radius: 50% !important;
	color: #fff !important;
	background: var(--asa-grad) !important;
	box-shadow: 0 14px 30px -6px rgba(22, 128, 58, .55), 0 4px 10px rgba(8, 12, 24, .4) !important;
	display: grid !important; place-items: center;
	transition: transform .25s cubic-bezier(.2,.9,.3,1.3), box-shadow .25s ease;
}
.asa-launcher::before {
	content: ""; position: absolute; inset: 0; border-radius: 50%;
	background: radial-gradient(120% 120% at 30% 20%, rgba(255,255,255,.35), transparent 55%); pointer-events: none;
}
.asa-launcher::after {
	content: ""; position: absolute; inset: -6px; border-radius: 50%;
	border: 2px solid var(--asa-accent); opacity: 0;
	animation: asa-breathe 3.4s ease-out infinite; pointer-events: none;
}
@keyframes asa-breathe { 0%{transform:scale(.9);opacity:.5} 70%{transform:scale(1.25);opacity:0} 100%{opacity:0} }
.asa-launcher:hover  { transform: translateY(-3px) scale(1.05); }
.asa-launcher:active { transform: scale(.95); }
.asa-launcher:focus-visible { outline: 3px solid var(--asa-accent) !important; outline-offset: 3px; }
.asa-launcher-icon { position: absolute; display: grid !important; place-items: center; transition: opacity .2s ease, transform .3s cubic-bezier(.2,.9,.3,1.3); }
.asa-launcher-icon svg { width: 48% !important; height: 48% !important; min-width: 26px; min-height: 26px; }
.asa-launcher .asa-icon-close { opacity: 0; transform: rotate(-90deg) scale(.4); }
.asa-launcher.is-open .asa-icon-chat  { opacity: 0; transform: rotate(90deg) scale(.4); }
.asa-launcher.is-open .asa-icon-close { opacity: 1; transform: rotate(0) scale(1); }
.asa-launcher.is-open::after { animation: none; opacity: 0; }
.asa-badge {
	position: absolute; top: -3px; right: -3px; min-width: 20px; height: 20px; padding: 0 5px; border-radius: 10px;
	background: #ff4757 !important; color: #fff !important; font-size: 11px; font-weight: 800;
	display: grid; place-items: center; box-shadow: 0 0 0 3px var(--asa-bg);
}

/* ============================================================
   Panel
   ============================================================ */
.asa-panel {
	position: absolute;
	bottom: calc(var(--asa-launcher-size, 62px) + 18px);
	width: 400px; max-width: calc(100vw - 32px);
	height: 650px; max-height: calc(100vh - 130px);
	background: var(--asa-chat);
	border: 1px solid var(--asa-hair);
	border-radius: var(--asa-radius, 22px);
	box-shadow: var(--asa-shadow);
	display: flex; flex-direction: column; overflow: hidden;
	opacity: 0; transform: translateY(16px) scale(.96); transform-origin: bottom right; pointer-events: none;
	transition: opacity .24s ease, transform .28s cubic-bezier(.2,.9,.3,1.25);
}
.asa-pos-left .asa-panel { left: 0; transform-origin: bottom left; }
.asa-pos-right .asa-panel { right: 0; }
.asa-panel.is-open { opacity: 1; transform: translateY(0) scale(1); pointer-events: auto; }

/* ---------- Cabecera ---------- */
.asa-header {
	position: relative; display: flex; align-items: center; gap: 12px;
	padding: 14px 14px 15px; color: #fff !important;
	background:
		radial-gradient(130% 150% at 10% -20%, rgba(33, 160, 74, .30), transparent 55%),
		#0b101d;
	border-bottom: 1px solid var(--asa-hair);
	overflow: hidden;
}
/* Header BLANCO en tema claro (como la app WhatsApp): nombre oscuro, subtítulo gris, iconos gris, borde. */
.asa-theme-light .asa-header {
	background: #ffffff; color: #111b21 !important; border-bottom: 1px solid #e9edef;
}
.asa-theme-light .asa-header-name { color: #111b21; }
.asa-theme-light .asa-status-text { color: #667781; opacity: 1; }
.asa-theme-light .asa-header-btn { background: #eef1f6 !important; color: #54656f !important; }
.asa-theme-light .asa-header-btn:hover { background: #e2e7ef !important; }
@media (prefers-color-scheme: light) {
	.asa-widget.asa-theme-auto .asa-header { background: #ffffff; color: #111b21 !important; border-bottom: 1px solid #e9edef; }
	.asa-widget.asa-theme-auto .asa-header-name { color: #111b21; }
	.asa-widget.asa-theme-auto .asa-status-text { color: #667781; opacity: 1; }
	.asa-widget.asa-theme-auto .asa-header-btn { background: #eef1f6 !important; color: #54656f !important; }
}
.asa-header > * { position: relative; z-index: 1; }

.asa-header-avatar {
	position: relative; width: 48px; height: 48px; flex: 0 0 48px;
	border-radius: 50%;
	background: radial-gradient(circle at 50% 38%, #17263f, #090f1c);
	box-shadow: 0 0 0 2px rgba(33, 160, 74, .45), 0 0 22px -2px var(--asa-glow);
	display: grid !important; place-items: center; overflow: hidden;
}
.asa-header-avatar .asa-bot-face { width: 42px !important; height: 42px !important; }
.asa-header-avatar img { width: 100% !important; height: 100% !important; border-radius: 50%; object-fit: cover; }
.asa-bot-face .asa-eye { filter: drop-shadow(0 0 3px var(--asa-glow)); }

.asa-header-info { flex: 1; min-width: 0; }
.asa-header-name { display: flex; align-items: center; gap: 6px; font-weight: 800; font-size: 17px; line-height: 1.2; min-width: 0; }
.asa-header-name-txt { flex: 0 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.asa-verified { flex: 0 0 auto; display: inline-flex; }
.asa-verified svg { width: 16px !important; height: 16px !important; }
.asa-header-status { display: flex; align-items: center; gap: 6px; font-size: 12.5px; margin-top: 2px; min-width: 0; }
/* Punto "en línea" verde (como la app). */
.asa-header-status::before { content: ''; flex: 0 0 auto; width: 8px; height: 8px; border-radius: 50%; background: #22c55e; }
.asa-status-text { opacity: .82; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }

.asa-header-btn {
	width: 34px !important; height: 34px !important; flex: 0 0 34px; border-radius: 50% !important;
	background: rgba(255,255,255,.08) !important; color: #fff !important;
	display: grid !important; place-items: center; transition: background .18s ease, transform .12s ease;
}
.asa-header-btn svg { width: 16px !important; height: 16px !important; stroke: currentColor; }
.asa-header-btn:hover { background: rgba(255,255,255,.18) !important; transform: translateY(-1px); }
.asa-header-btn:active { transform: scale(.94); }
.asa-header-btn:focus-visible { outline: 2px solid #fff !important; outline-offset: 1px; }

/* ---------- Mensajes (estilo WhatsApp) ---------- */
.asa-messages {
	position: relative; /* para el icono de swipe-to-reply (posicionado absoluto) */
	flex: 1; overflow-y: auto; padding: 10px 9px 8px; background: var(--asa-chat);
	display: flex; flex-direction: column;
	scrollbar-width: thin; scrollbar-color: var(--asa-border) transparent;
	/* Corta el "scroll chaining": al agotarse el scroll del chat, NO se arrastra la página de fondo. */
	overscroll-behavior: contain; -webkit-overflow-scrolling: touch;
}
/* ANCLA AL FONDO (como WhatsApp): con pocos mensajes se pegan abajo, sobre el input, y siguen visibles
   al abrir el teclado. El spacer colapsa cuando el contenido desborda (entonces se hace scroll normal). */
.asa-messages::before { content: ''; margin-top: auto; }
/* CRÍTICO: los hijos del flex-column NO deben encogerse, o al desbordar el navegador comprime elementos
   altos (p. ej. el carrusel de pedidos quedaba en ~0px y solo se veía su scrollbar). */
.asa-messages > * { flex-shrink: 0; }
.asa-messages::-webkit-scrollbar { width: 6px; }
.asa-messages::-webkit-scrollbar-thumb { background: var(--asa-border); border-radius: 4px; }

.asa-row { display: flex; align-items: flex-start; gap: 5px; margin-bottom: 2px; }
.asa-row-user { justify-content: flex-end; }
.asa-row-assistant { justify-content: flex-start; }
/* Más aire cuando CAMBIA el emisor (WhatsApp agrupa los mensajes del mismo remitente). */
.asa-row-user + .asa-row-assistant, .asa-row-assistant + .asa-row-user { margin-top: 10px; }
.asa-anim { animation: asa-pop .2s ease both; }
@keyframes asa-pop { from{opacity:0;transform:translateY(6px)} to{opacity:1;transform:translateY(0)} }

/* Avatar (bolita) del bot/agente a la izquierda, como en los grupos de WhatsApp. Solo se muestra en el
   1º mensaje de la racha; en los siguientes va un hueco invisible del mismo ancho para alinear. */
.asa-msg-avatar {
	width: 28px !important; height: 28px !important; flex: 0 0 28px; border-radius: 50%;
	background: radial-gradient(circle at 50% 38%, #17263f, #090f1c);
	box-shadow: 0 0 0 1.5px rgba(33, 160, 74, .4);
	display: grid !important; place-items: center; overflow: hidden;
}
.asa-msg-avatar .asa-bot-face { width: 25px !important; height: 25px !important; }
.asa-msg-avatar img { width: 100% !important; height: 100% !important; border-radius: 50%; object-fit: cover; }
.asa-av-spacer { background: transparent !important; box-shadow: none !important; }

.asa-col { max-width: 82%; min-width: 0; display: flex; flex-direction: column; }
.asa-row-user .asa-col { align-items: flex-end; }

.asa-bubble {
	position: relative; padding: 6px 10px 7px; border-radius: 9px;
	color: var(--asa-text); background: var(--asa-surface);
	box-shadow: 0 1px .5px rgba(0,0,0,.08); word-wrap: break-word; overflow-wrap: break-word;
	font-size: 13.5px; line-height: 1.38;
	/* pan-y SOLO en el globo (no en toda la fila): el swipe-to-reply captura el horizontal AQUÍ, mientras
	   el carrusel de productos (hermano del globo, no descendiente) conserva su scroll horizontal nativo. */
	touch-action: pan-y;
}
.asa-bubble::after { content: ''; display: block; clear: both; } /* contiene la hora flotada */
/* Globo MÍO (saliente): azul sólido #16803a (no degradado), como WhatsApp/app. */
.asa-row-user .asa-bubble {
	color: #fff !important; background: #16803a; border: 0;
	box-shadow: 0 1px .5px rgba(0,0,0,.10);
}
/* "Cola" CURVA (bézier tipo WhatsApp) SOLO en el 1º globo de la racha: la esquina superior del lado del
   emisor va cuadrada y el pico sale del borde superior con una curva suave (SVG). */
.asa-row-assistant .asa-bubble.asa-first { border-top-left-radius: 0; }
.asa-row-user .asa-bubble.asa-first { border-top-right-radius: 0; }
.asa-bubble.asa-first::before {
	content: ''; position: absolute; top: 0; width: 8px; height: 13px;
	background-repeat: no-repeat; background-position: top center;
}
.asa-row-assistant .asa-bubble.asa-first::before {
	left: -7px;
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='8' height='13' viewBox='0 0 8 13'%3E%3Cpath fill='%23ffffff' d='M2.812 1H8v11.193L1.533 3.568C.474 2.156 1.042 1 2.812 1z'/%3E%3C/svg%3E");
}
.asa-row-user .asa-bubble.asa-first::before {
	right: -7px;
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='8' height='13' viewBox='0 0 8 13'%3E%3Cpath fill='%232563eb' d='M5.188 1H0v11.193l6.467-8.625C7.526 2.156 6.958 1 5.188 1z'/%3E%3C/svg%3E");
}
/* La cola entrante es blanca; en tema OSCURO el globo es #121826 → override para que la cola case. */
.asa-theme-dark .asa-row-assistant .asa-bubble.asa-first::before {
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='8' height='13' viewBox='0 0 8 13'%3E%3Cpath fill='%23121826' d='M2.812 1H8v11.193L1.533 3.568C.474 2.156 1.042 1 2.812 1z'/%3E%3C/svg%3E");
}
@media (prefers-color-scheme: dark) {
	.asa-widget.asa-theme-auto .asa-row-assistant .asa-bubble.asa-first::before {
		background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='8' height='13' viewBox='0 0 8 13'%3E%3Cpath fill='%23121826' d='M2.812 1H8v11.193L1.533 3.568C.474 2.156 1.042 1 2.812 1z'/%3E%3C/svg%3E");
	}
}
.asa-bubble a { color: var(--asa-accent-soft); text-decoration: underline; font-weight: 600; }
.asa-row-user .asa-bubble a { color: #fff; }
.asa-bubble strong { font-weight: 800; }
/* Enlaces del globo ENTRANTE (bot/operador) en tema claro: azul WhatsApp #16803a. */
.asa-theme-light .asa-row-assistant .asa-bubble a { color: #16803a !important; }
@media (prefers-color-scheme: light) { .asa-widget.asa-theme-auto .asa-row-assistant .asa-bubble a { color: #16803a !important; } }

/* Markdown dentro de las burbujas (listas + imágenes que envía el agente). */
.asa-bubble .asa-md-list { margin: 5px 0; padding-left: 20px; }
.asa-bubble .asa-md-list li { margin: 2px 0; }
.asa-bubble .asa-md-imglink { display: block; margin: 7px 0 3px; }
.asa-bubble .asa-md-img {
	max-width: 100% !important; max-height: 300px; border-radius: 12px !important; display: block;
	border: 1px solid var(--asa-hair) !important;
}
/* Reproductor de nota de voz. */
.asa-bubble .asa-md-audio { display: block; width: 230px; max-width: 100%; height: 40px; margin: 6px 0 2px; }
.asa-row-user .asa-bubble .asa-md-audio { background: rgba(255,255,255,.9); border-radius: 999px; }

/* Hora + palomitas: FLOTAN a la derecha; el texto de la última línea las envuelve (truco de WhatsApp).
   El margen izquierdo/superior reserva su hueco para que el texto no las pise. */
.asa-meta { float: right; display: inline-flex; align-items: center; gap: 3px; margin: 9px 0 -3px 9px; line-height: 1; user-select: none; }
.asa-time { font-size: 11px; color: var(--asa-soft); white-space: nowrap; line-height: 1; }
.asa-row-user .asa-time { color: rgba(255, 255, 255, .80); }
/* Palomitas de MIS mensajes: entregado = doble check blanco translúcido; leído = AQUA de marca (no azul). */
.asa-tick { display: inline-flex; color: rgba(255, 255, 255, .70); transition: color .2s ease; }
.asa-tick svg { width: 17px !important; height: 11px !important; }
.asa-tick.asa-tick-read { color: #5ce1e6; }

/* Nombre del emisor DENTRO del 1º globo de la racha, arriba (coloreado, como los grupos de WhatsApp). */
.asa-who { display: block; font-size: 12.5px; font-weight: 700; margin: 0 0 1px; line-height: 1.25; }
.asa-who-bot { color: var(--asa-accent-soft); }
.asa-who-agent { color: #e0568a; }

/* ---------- Swipe-to-reply (deslizar el globo para responder, como WhatsApp) ---------- */
.asa-swipe-icon {
	position: absolute; right: 14px; width: 34px; height: 34px; border-radius: 50%;
	background: var(--asa-surface); box-shadow: 0 2px 8px -2px rgba(0,0,0,.35);
	display: grid; place-items: center; color: var(--asa-accent);
	opacity: 0; transform: scale(.6); pointer-events: none; z-index: 2;
}
.asa-swipe-icon svg { width: 19px !important; height: 19px !important; }

/* Bloque de CITA dentro del globo (respuesta a otro mensaje). Al tocarlo → va al mensaje original. */
.asa-quote {
	display: flex; flex-direction: column; gap: 1px; cursor: pointer;
	border-left: 3px solid var(--asa-accent-soft);
	border-radius: 5px; padding: 4px 8px; margin: 1px 0 5px;
	background: rgba(0,0,0,.05); overflow: hidden;
}

/* Resaltado del mensaje al que te llevó la cita (flash tipo WhatsApp). */
.asa-row.asa-flash { animation: asa-flash 1.5s ease; border-radius: 12px; }
@keyframes asa-flash {
	0%, 100% { background: transparent; }
	18%, 55% { background: rgba(22, 128, 58, .16); }
}
@media (prefers-reduced-motion: reduce) { .asa-row.asa-flash { animation: none; background: rgba(22, 128, 58, .14); } }
.asa-row-user .asa-quote { background: rgba(255,255,255,.16); border-left-color: rgba(255,255,255,.85); }
.asa-quote-name { font-size: 12px; font-weight: 700; color: var(--asa-accent-soft); line-height: 1.2; }
.asa-quote-user .asa-quote-name  { color: #16a34a; }
.asa-quote-agent .asa-quote-name { color: #e0568a; }
.asa-row-user .asa-quote-name { color: #fff !important; }
.asa-quote-txt {
	font-size: 12.5px; color: var(--asa-soft); line-height: 1.3;
	display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.asa-row-user .asa-quote-txt { color: rgba(255,255,255,.85); }

/* Barra "respondiendo a…" encima del input (con salida X). */
.asa-reply-bar { flex: 0 0 100%; padding: 2px 2px 6px; }
.asa-reply-bar[hidden] { display: none !important; }
.asa-reply-bar-inner {
	display: flex; align-items: center; gap: 10px;
	background: var(--asa-surface); border-radius: 10px; padding: 8px 10px;
	border-left: 4px solid var(--asa-accent-soft);
	box-shadow: 0 1px 3px rgba(0,0,0,.12);
}
.asa-reply-bar-inner.asa-quote-user  { border-left-color: #16a34a; }
.asa-reply-bar-inner.asa-quote-agent { border-left-color: #e0568a; }
.asa-reply-bar-body { flex: 1; min-width: 0; }
.asa-reply-bar-name { font-size: 12.5px; font-weight: 700; color: var(--asa-accent-soft); line-height: 1.25; }
.asa-quote-user.asa-reply-bar-inner  .asa-reply-bar-name { color: #16a34a; }
.asa-quote-agent.asa-reply-bar-inner .asa-reply-bar-name { color: #e0568a; }
.asa-reply-bar-txt {
	font-size: 12.5px; color: var(--asa-soft); line-height: 1.3; margin-top: 1px;
	display: -webkit-box; -webkit-line-clamp: 1; -webkit-box-orient: vertical; overflow: hidden;
}
.asa-widget .asa-reply-bar-x {
	flex: 0 0 auto; width: 26px !important; height: 26px !important; min-height: 0 !important; border-radius: 50% !important;
	background: transparent !important; color: var(--asa-soft) !important; font-size: 16px !important; line-height: 1 !important;
	display: grid !important; place-items: center; cursor: pointer; padding: 0 !important;
}
.asa-widget .asa-reply-bar-x:hover { color: #ef4444 !important; }

/* Avatar del agente: foto de perfil o inicial en círculo de color (estilo Gmail). */
.asa-agent-av { position: relative; box-shadow: 0 0 0 1.5px rgba(255, 255, 255, .18), 0 2px 8px -3px rgba(0, 0, 0, .5); }
.asa-agent-initial { color: #fff; font-weight: 700; font-size: 14px; line-height: 1; }
.asa-header-avatar.asa-agent-av .asa-agent-initial { font-size: 20px; }
.asa-agent-av img { position: absolute; inset: 0; width: 100% !important; height: 100% !important; border-radius: 50%; object-fit: cover; }

.asa-system { text-align: center; margin: 4px auto 14px; }
/* Aviso de sistema: pill azul-gris propio (distinto de los mensajes y del separador de día). */
.asa-system span {
	display: inline-block; font-size: 11px; color: #5b6b80;
	background: #dde3ee; border: 0; padding: 5px 13px; border-radius: 8px; line-height: 1.35;
}
.asa-theme-dark .asa-system span { background: #16222e; color: #8696a0; }
@media (prefers-color-scheme: dark) { .asa-widget.asa-theme-auto .asa-system span { background: #16222e; color: #8696a0; } }

/* Indicador "escribiendo" */
.asa-typing { display: inline-flex !important; gap: 5px; padding: 14px 16px !important; align-items: center; }
.asa-typing span { width: 8px; height: 8px; border-radius: 50%; background: var(--asa-accent); opacity: .5; animation: asa-blink 1.3s infinite ease-in-out; }
.asa-typing span:nth-child(2) { animation-delay: .18s; }
.asa-typing span:nth-child(3) { animation-delay: .36s; }
@keyframes asa-blink { 0%,60%,100%{opacity:.3;transform:translateY(0)} 30%{opacity:1;transform:translateY(-5px)} }

/* ---------- Tarjetas de producto (verticales, como el prototipo) ---------- */
.asa-products {
	display: flex; gap: 10px; margin-top: 10px;
	overflow-x: auto; padding: 4px 2px 8px;
	scroll-snap-type: x mandatory; scrollbar-width: thin;
}
.asa-products::-webkit-scrollbar { height: 6px; }
.asa-products::-webkit-scrollbar-thumb { background: var(--asa-border); border-radius: 4px; }
.asa-products-single .asa-card { flex-basis: 220px; max-width: 220px; }

.asa-card {
	flex: 0 0 150px; max-width: 150px; scroll-snap-align: start;
	display: flex; flex-direction: column;
	background: var(--asa-surface); border: 1px solid var(--asa-hair); border-radius: 16px;
	overflow: hidden;
	box-shadow: 0 3px 14px -8px rgba(0,0,0,.5);
	transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
}
.asa-card:hover { transform: translateY(-2px); box-shadow: 0 16px 30px -14px rgba(0,0,0,.6); border-color: rgba(33, 160, 74, .45); }
.asa-card-out { opacity: .55; }

.asa-card-img {
	position: relative; display: block !important;
	aspect-ratio: 1 / 1; margin: 8px 8px 0; border-radius: 12px; overflow: hidden;
	background: var(--asa-img-bg);
}
.asa-card-img img { width: 100% !important; height: 100% !important; object-fit: contain; }
.asa-card-badge {
	position: absolute; top: 6px; left: 6px; z-index: 1;
	font-size: 9.5px; font-weight: 800; letter-spacing: .2px;
	padding: 3px 8px; border-radius: 999px; color: #fff;
}
.asa-card-badge.feat { background: #22c55e; box-shadow: 0 2px 8px -2px rgba(34,197,94,.7); }
.asa-card-badge.sale { background: #f59e0b; box-shadow: 0 2px 8px -2px rgba(245,158,11,.7); }

.asa-card-body { display: flex; flex-direction: column; flex: 1; padding: 8px 10px 10px; }
.asa-card-name {
	font-size: 12.5px; font-weight: 700; color: var(--asa-text) !important; line-height: 1.3;
	display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
	min-height: 2.6em;
}
.asa-card-rating { display: flex; align-items: center; gap: 3px; margin: 4px 0 6px; font-size: 11px; }
.asa-star { color: #46506a; font-size: 12px; line-height: 1; }
.asa-star.on { color: #f5a623; }
.asa-star-num { color: var(--asa-soft); font-weight: 600; }
.asa-card-foot { display: flex; align-items: center; justify-content: space-between; gap: 6px; margin-top: auto; }
.asa-card-price, .asa-card-price * { font-size: 14.5px !important; font-weight: 800 !important; color: var(--asa-accent-soft) !important; }
.asa-card-price del, .asa-card-price del * { color: var(--asa-soft) !important; opacity: .8; font-weight: 500 !important; font-size: 11px !important; margin-right: 3px; }
.asa-card-price ins { text-decoration: none; }
.asa-card-cart {
	flex: 0 0 30px; width: 30px; height: 30px; border-radius: 9px;
	display: grid !important; place-items: center;
	color: #fff !important; background: var(--asa-grad) !important;
	box-shadow: 0 4px 12px -4px rgba(22, 128, 58, .6);
	transition: transform .14s ease, filter .14s ease;
}
.asa-card-cart svg { width: 15px !important; height: 15px !important; }
.asa-card-cart:hover { transform: translateY(-1px) scale(1.08); filter: brightness(1.08); }

/* ---------- Carrusel de pedidos elegibles (tarjetas como productos) ---------- */
.asa-orders {
	display: flex; gap: 10px; margin: 6px 2px 16px 2px;
	overflow-x: auto; padding: 4px 2px 8px;
	scroll-snap-type: x mandatory; scrollbar-width: thin;
}
.asa-orders::-webkit-scrollbar { height: 6px; }
.asa-orders::-webkit-scrollbar-thumb { background: var(--asa-border); border-radius: 4px; }
.asa-orders-single .asa-ocard { flex-basis: 230px; max-width: 230px; }

.asa-widget .asa-ocard {
	flex: 0 0 165px; max-width: 165px; scroll-snap-align: start;
	display: flex !important; flex-direction: column; text-align: left !important;
	background: var(--asa-surface) !important; border: 1px solid var(--asa-hair) !important;
	border-radius: 16px !important; overflow: hidden; padding: 0 !important; margin: 0 !important;
	box-shadow: 0 3px 14px -8px rgba(0,0,0,.5);
	cursor: pointer; color: var(--asa-text) !important;
	transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}
.asa-widget .asa-ocard:hover { transform: translateY(-2px); box-shadow: 0 16px 30px -14px rgba(0,0,0,.6); border-color: rgba(33, 160, 74, .45); }
.asa-widget .asa-ocard:active { transform: translateY(0); }

.asa-ocard-img {
	position: relative; display: block !important;
	width: auto; height: 92px; margin: 8px 8px 0; border-radius: 12px; overflow: hidden;
	background: var(--asa-img-bg);
}
.asa-ocard-img img { width: 100% !important; height: 100% !important; object-fit: contain; }
.asa-ocard-noimg { display: grid !important; place-items: center; color: var(--asa-soft); }
.asa-ocard-noimg svg { width: 34px !important; height: 34px !important; opacity: .6; }

.asa-ocard-body { display: flex; flex-direction: column; flex: 1; gap: 4px; padding: 8px 10px 10px; }
.asa-ocard-top { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.asa-ocard-num { font-size: 13px; font-weight: 800; color: var(--asa-text) !important; }
.asa-ocard-status {
	font-size: 9.5px; font-weight: 700; letter-spacing: .2px;
	padding: 2px 7px; border-radius: 999px; color: #fff; background: var(--asa-grad);
	white-space: nowrap;
}
.asa-ocard-item {
	font-size: 11.5px; color: var(--asa-soft) !important; line-height: 1.3;
	display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
	min-height: 2.4em;
}
.asa-ocard-more {
	font-size: 10px; font-weight: 700; color: var(--asa-accent-soft) !important;
	background: rgba(33, 160, 74, .14); padding: 1px 5px; border-radius: 6px;
}
.asa-ocard-foot { display: flex; align-items: center; justify-content: space-between; gap: 6px; margin-top: auto; }
.asa-ocard-total { font-size: 13px; font-weight: 800; color: var(--asa-accent-soft) !important; }
.asa-ocard-cta {
	font-size: 11px; font-weight: 800; color: #fff !important;
	background: var(--asa-grad); padding: 5px 10px; border-radius: 999px;
	box-shadow: 0 4px 12px -4px rgba(22, 128, 58, .6); white-space: nowrap; margin-left: auto;
}

/* ---------- Asistente de garantía interactivo (wizard por pasos) ---------- */
.asa-wizard { display: flex; flex-direction: column; gap: 8px; margin: 6px 2px 16px 2px; }
.asa-wizard-title { font-size: 13.5px; font-weight: 800; color: var(--asa-text); }
.asa-wizard-hint { font-size: 12px; color: var(--asa-soft); line-height: 1.35; margin-top: -2px; }

.asa-widget .asa-wizard-btn {
	display: flex !important; align-items: center; gap: 10px; width: 100%; text-align: left !important;
	background: var(--asa-surface) !important; color: var(--asa-text) !important;
	border: 1.5px solid var(--asa-hair) !important; border-radius: 14px !important;
	padding: 11px 13px !important; margin: 0 !important; cursor: pointer;
	font-size: 13px !important; font-weight: 600 !important;
	box-shadow: 0 2px 10px -6px rgba(0,0,0,.4);
	transition: border-color .15s ease, transform .12s ease, background .15s ease;
}
.asa-widget .asa-wizard-btn:hover { border-color: rgba(33, 160, 74, .5) !important; transform: translateY(-1px); }
.asa-widget .asa-wizard-btn:active { transform: translateY(0); }
.asa-widget .asa-wizard-btn:disabled, .asa-widget .asa-wizard-btn.is-disabled { opacity: .5; cursor: default; box-shadow: none; }
.asa-widget .asa-wizard-btn:disabled:hover { transform: none; border-color: var(--asa-hair) !important; }

.asa-wizard-img {
	flex: 0 0 42px; width: 42px !important; height: 42px !important; border-radius: 9px;
	object-fit: contain; background: var(--asa-img-bg);
}
.asa-wizard-txt { display: flex; flex-direction: column; gap: 1px; min-width: 0; flex: 1; }
.asa-wizard-label { font-weight: 700; color: var(--asa-text) !important; line-height: 1.25; }
.asa-wizard-sub { font-size: 11px; font-weight: 500; color: var(--asa-soft) !important; }
.asa-wizard-badge {
	flex: 0 0 auto; font-size: 9.5px; font-weight: 800; color: #fff !important;
	background: #f59e0b; padding: 2px 7px; border-radius: 999px; white-space: nowrap;
}

/* Multi-select (elegir artículos) */
.asa-widget .asa-wizard-multi { position: relative; }
.asa-widget .asa-wizard-multi.is-selected {
	border-color: var(--asa-accent-soft) !important;
	background: var(--asa-chat) !important; /* fallback si no hay color-mix */
	background: color-mix( in srgb, var(--asa-accent-soft) 10%, var(--asa-surface) ) !important;
}
.asa-wizard-check {
	flex: 0 0 auto; width: 20px; height: 20px; border-radius: 999px; display: grid; place-items: center;
	background: var(--asa-grad); color: #fff !important; font-size: 12px; font-weight: 800;
	opacity: 0; transform: scale(.6); transition: opacity .14s ease, transform .14s ease; margin-left: auto;
}
.asa-widget .asa-wizard-multi.is-selected .asa-wizard-check { opacity: 1; transform: scale(1); }

/* CTA "Continuar / Enviar" */
.asa-widget .asa-wizard-continue {
	justify-content: center; color: #fff !important; font-weight: 800 !important;
	background: var(--asa-grad) !important; border: 0 !important;
	box-shadow: 0 6px 16px -6px rgba(22, 128, 58, .65); margin-top: 2px !important;
}
.asa-widget .asa-wizard-continue { text-align: center !important; }
.asa-widget .asa-wizard-continue .asa-wizard-txt { align-items: center; text-align: center; }
.asa-widget .asa-wizard-continue .asa-wizard-label { color: #fff !important; }
.asa-widget .asa-wizard-continue:hover { filter: brightness(1.06); }
.asa-widget .asa-wizard-continue:disabled { filter: grayscale(.5); opacity: .55; box-shadow: none; }

/* Resumen financiero */
.asa-wizard-breakdown {
	display: flex; flex-direction: column; gap: 5px;
	background: var(--asa-surface); border: 1px solid var(--asa-hair); border-radius: 12px; padding: 10px 12px;
}
.asa-bd-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; font-size: 12.5px; }
.asa-bd-label { color: var(--asa-soft); }
.asa-bd-amount { font-weight: 700; color: var(--asa-text); white-space: nowrap; }
.asa-bd-positive .asa-bd-amount { color: #16a34a !important; }
.asa-bd-negative .asa-bd-amount { color: #dc2626 !important; }
.asa-bd-total { border-top: 1px dashed var(--asa-hair); padding-top: 7px; margin-top: 2px; }
.asa-bd-total .asa-bd-label { color: var(--asa-text); font-weight: 800; }
.asa-bd-total .asa-bd-amount { font-size: 15px; font-weight: 900; color: var(--asa-accent-soft) !important; }
.asa-wizard-note { font-size: 11.5px; color: var(--asa-soft); line-height: 1.35; font-style: italic; }

/* Paso de texto (descripción) */
.asa-wizard-inputwrap { display: flex; flex-direction: column; gap: 6px; }
.asa-widget .asa-wizard-textarea {
	width: 100%; box-sizing: border-box; resize: none !important;
	background: var(--asa-surface) !important; color: var(--asa-text) !important;
	border: 1.5px solid var(--asa-hair) !important; border-radius: 12px !important;
	padding: 10px 12px !important; font-size: 13px !important; font-family: inherit !important; line-height: 1.4;
}
.asa-widget .asa-wizard-textarea:focus { outline: none; border-color: var(--asa-accent-soft) !important; }
.asa-wizard-counter { font-size: 11px; color: var(--asa-soft); margin-left: 2px; }

/* Cuando el bot muestra OPCIONES (asistente de garantía, carrusel de pedidos, o una pregunta Sí/No),
   se oculta la barra de texto para que el cliente responda con los botones y no escriba por error.
   Siempre hay una salida (Cancelar / No / Abandonar) que libera y devuelve el campo de escribir. */
.asa-panel.asa-choice-on .asa-inputbar { display: none !important; }
/* Chat BLOQUEADO por un ticket de agente en cola: sin campo de texto (la tarjeta explica por qué y ofrece cancelar). */
.asa-panel.asa-ticket-on .asa-inputbar { display: none !important; }

/* ---------- Lista de info con iconos (explicación de la cola: paso de confirmación + tarjeta del ticket) ---------- */
.asa-widget .asa-wizard-info, .asa-widget .asa-ticket-lines {
	list-style: none !important; margin: 2px 0 4px !important; padding: 10px 12px !important; display: flex; flex-direction: column; gap: 8px;
	background: var(--asa-surface); border: 1px solid var(--asa-hair); border-radius: 12px;
}
.asa-widget .asa-wizard-info li, .asa-widget .asa-ticket-lines li { display: flex; gap: 9px; align-items: flex-start; margin: 0 !important; padding: 0 !important; font-size: 12.5px; line-height: 1.4; color: var(--asa-text); }
.asa-widget .asa-info-ico { flex: 0 0 18px; font-size: 14px; line-height: 1.3; text-align: center; }
.asa-widget .asa-info-text { flex: 1; min-width: 0; }

/* ---------- Formulario de consulta del ticket (dentro de la tarjeta del paso) ---------- */
.asa-widget .asa-tkform { gap: 8px; }
.asa-widget .asa-tkform-text { min-height: 96px !important; font-size: 14px !important; line-height: 1.4 !important; }
.asa-widget .asa-tkform-thumbs { display: flex; flex-wrap: wrap; gap: 8px; }
.asa-widget .asa-tkform-thumbs[hidden] { display: none !important; }
.asa-widget .asa-tkform-thumb { position: relative; width: 64px; height: 64px; border-radius: 10px; overflow: hidden; background: var(--asa-img-bg, #fff); border: 1px solid var(--asa-hair); }
.asa-widget .asa-tkform-thumb img { width: 100% !important; height: 100% !important; object-fit: cover; display: block; }
.asa-widget .asa-tkform-thumb.is-loading { display: grid; place-items: center; }
.asa-widget .asa-tkform-thumb.is-loading span { width: 18px; height: 18px; border-radius: 50%; border: 2px solid var(--asa-hair); border-top-color: var(--asa-accent); animation: asa-spin .8s linear infinite; }
@keyframes asa-spin { to { transform: rotate(360deg); } }
.asa-widget .asa-tkform-x {
	position: absolute; top: 3px; right: 3px; width: 20px !important; height: 20px !important; border-radius: 50% !important;
	background: rgba(0,0,0,.6) !important; color: #fff !important; border: 0 !important; font-size: 14px !important; line-height: 20px !important;
	padding: 0 !important; cursor: pointer; display: grid; place-items: center;
}
.asa-widget .asa-tkform-attach {
	width: 100%; text-align: center; font-size: 13px !important; font-weight: 700 !important; padding: 10px 12px !important;
	border-radius: 12px !important; border: 1.5px dashed var(--asa-accent) !important; background: transparent !important; color: var(--asa-accent) !important;
	cursor: pointer; margin: 0 !important;
}
.asa-widget .asa-tkform-attach:hover { background: rgba(22, 128, 58, .06) !important; }
.asa-widget .asa-tkform-attach:disabled { opacity: .45; cursor: default; }
/* Fila de acciones del formulario: Cancelar (izq, secundario) + Continuar (der, primario) */
.asa-widget .asa-tkform-actions { display: flex; align-items: stretch; gap: 10px; margin-top: 2px; }
.asa-widget .asa-tkform-actions .asa-wizard-continue { flex: 1 1 auto; width: auto !important; min-width: 0; }
.asa-widget .asa-tkform-cancel {
	flex: 0 0 auto; display: inline-flex !important; align-items: center; justify-content: center;
	padding: 11px 16px !important; margin: 0 !important; border-radius: 14px !important; cursor: pointer;
	background: var(--asa-surface) !important; color: var(--asa-soft) !important;
	border: 1.5px solid var(--asa-hair) !important; font-size: 13px !important; font-weight: 700 !important;
	box-shadow: none !important;
}
.asa-widget .asa-tkform-cancel:hover { color: #dc2626 !important; border-color: rgba(220,38,38,.45) !important; }

/* ---------- Tarjeta del TICKET en cola (bloquea el chat) ---------- */
.asa-widget .asa-ticket-card {
	display: flex; flex-direction: column; gap: 10px; margin: 6px 2px 16px 2px; padding: 14px 14px 12px;
	background: var(--asa-surface); border: 1.5px solid rgba(22, 128, 58, .35); border-radius: 16px;
	box-shadow: 0 10px 28px -14px rgba(22, 128, 58, .55);
}
.asa-widget .asa-ticket-head { display: flex; align-items: center; gap: 10px; }
.asa-widget .asa-ticket-ico { flex: 0 0 40px; width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; font-size: 20px; background: rgba(22, 128, 58, .12); }
.asa-widget .asa-ticket-hd { flex: 1; min-width: 0; }
.asa-widget .asa-ticket-title { font-size: 14px; font-weight: 800; color: var(--asa-text); line-height: 1.25; }
.asa-widget .asa-ticket-meta { font-size: 11.5px; color: var(--asa-soft); margin-top: 2px; line-height: 1.3; overflow-wrap: anywhere; }
.asa-widget .asa-ticket-when { white-space: nowrap; }
.asa-widget .asa-ticket-badge {
	flex: 0 0 auto; font-size: 10.5px; font-weight: 800; letter-spacing: .04em; text-transform: uppercase;
	padding: 4px 9px; border-radius: 999px; background: #fef3c7; color: #92400e; border: 1px solid #fcd34d;
}
.asa-widget .asa-ticket-summary { display: flex; gap: 8px; align-items: flex-start; padding: 8px 10px; border-left: 3px solid rgba(22, 128, 58, .55); background: rgba(22, 128, 58, .06); border-radius: 8px; }
.asa-widget .asa-ticket-quote { flex: 1; min-width: 0; font-size: 12.5px; color: var(--asa-text); line-height: 1.35; font-style: italic; }
.asa-widget .asa-ticket-photos { flex: 0 0 auto; font-size: 12px; color: var(--asa-soft); }
.asa-widget .asa-ticket-sub { font-size: 12.5px; color: var(--asa-text); line-height: 1.4; }
.asa-widget .asa-ticket-cancel {
	width: 100%; text-align: center; font-size: 13.5px !important; font-weight: 700 !important; padding: 12px 14px !important;
	border-radius: 999px !important; border: 1.5px solid #ef4444 !important; background: transparent !important; color: #dc2626 !important;
	cursor: pointer; margin: 2px 0 0 !important; transition: background .15s ease, transform .12s ease;
}
.asa-widget .asa-ticket-cancel:hover { background: rgba(239,68,68,.08) !important; transform: translateY(-1px); }
.asa-widget .asa-ticket-confirm { display: flex; flex-direction: column; gap: 8px; padding: 12px; border-radius: 12px; background: #fff7ed; border: 1px solid #fdba74; }
.asa-widget .asa-ticket-confirm-title { font-size: 13.5px; font-weight: 800; color: #9a3412; }
.asa-widget .asa-ticket-confirm-text { font-size: 12.5px; color: #7c2d12; line-height: 1.4; }
.asa-widget .asa-ticket-confirm-row { display: flex; gap: 8px; margin-top: 2px; }
.asa-widget .asa-ticket-keep, .asa-widget .asa-ticket-yes {
	flex: 1; text-align: center; font-size: 13px !important; font-weight: 700 !important; padding: 11px 10px !important;
	border-radius: 999px !important; cursor: pointer; border: 1.5px solid transparent !important; line-height: 1.2 !important;
}
.asa-widget .asa-ticket-keep { color: #fff !important; background: var(--asa-grad) !important; box-shadow: 0 8px 20px -8px rgba(22, 128, 58, .6) !important; }
.asa-widget .asa-ticket-yes { color: #b91c1c !important; background: #fff !important; border-color: #fca5a5 !important; }
.asa-widget .asa-ticket-keep:disabled, .asa-widget .asa-ticket-yes:disabled { opacity: .55; cursor: default; }
.asa-widget .asa-ticket-confirm[hidden], .asa-widget .asa-ticket-cancel[hidden] { display: none !important; }
/* Tema oscuro: la confirmación ámbar y el badge se atenúan sobre superficies oscuras. */
.asa-theme-dark .asa-ticket-confirm { background: rgba(251,146,60,.12); border-color: rgba(251,146,60,.45); }
@media (prefers-color-scheme: dark) {
	.asa-widget.asa-theme-auto .asa-ticket-confirm { background: rgba(251,146,60,.12); border-color: rgba(251,146,60,.45); }
	.asa-widget.asa-theme-auto .asa-ticket-confirm-title, .asa-widget.asa-theme-auto .asa-ticket-confirm-text { color: #fdba74; }
	.asa-widget.asa-theme-auto .asa-ticket-badge { background: rgba(251,191,36,.18); color: #fcd34d; border-color: rgba(251,191,36,.45); }
	.asa-widget.asa-theme-auto .asa-ticket-yes { background: transparent !important; }
}
.asa-theme-dark .asa-ticket-confirm-title, .asa-theme-dark .asa-ticket-confirm-text { color: #fdba74; }
.asa-theme-dark .asa-ticket-badge { background: rgba(251,191,36,.18); color: #fcd34d; border-color: rgba(251,191,36,.45); }
.asa-theme-dark .asa-ticket-yes { background: transparent !important; }
.asa-widget .asa-wizard-abandon {
	align-self: center; margin-top: 4px !important; background: transparent !important; border: 0 !important;
	color: var(--asa-soft) !important; font-size: 12px !important; font-weight: 700 !important;
	text-decoration: underline; text-underline-offset: 2px; cursor: pointer; padding: 6px 8px !important;
}
.asa-widget .asa-wizard-abandon:hover { color: #dc2626 !important; }
.asa-orders-block { display: flex; flex-direction: column; }
.asa-widget .asa-choice-cancel {
	align-self: center; margin: 4px auto 0 !important; background: transparent !important; border: 0 !important;
	color: var(--asa-soft) !important; font-size: 12px !important; font-weight: 700 !important;
	text-decoration: underline; text-underline-offset: 2px; cursor: pointer; padding: 6px 8px !important;
}
.asa-widget .asa-choice-cancel:hover { color: var(--asa-accent-soft) !important; }

/* ---------- Chips contextuales tras productos ---------- */
.asa-suggest { display: flex; flex-wrap: wrap; gap: 8px; margin: 2px 0 14px 2px; }
.asa-sug-chip {
	border: 1px solid var(--asa-border) !important; background: var(--asa-surface) !important;
	color: var(--asa-text) !important; font-size: 12.5px; font-weight: 600;
	padding: 8px 14px !important; border-radius: 999px !important;
	transition: border-color .15s ease, transform .12s ease;
}
.asa-sug-chip:hover { border-color: var(--asa-accent) !important; transform: translateY(-1px); }

/* ---------- Sugerencias iniciales: fila horizontal deslizable de chips azul-tinte (como la app) ---------- */
.asa-quick { display: flex; gap: 8px; padding: 4px 12px 10px; background: var(--asa-chat); overflow-x: auto; scrollbar-width: none; }
.asa-quick::-webkit-scrollbar { display: none; }
.asa-quick:empty { padding: 0; }
.asa-chip {
	flex: 0 0 auto; display: inline-flex !important; align-items: center; gap: 7px; text-align: left;
	border: 0 !important; background: rgba(22, 128, 58, .10) !important; color: #16803a !important;
	font-size: 13.5px; font-weight: 600; padding: 8px 14px !important; border-radius: 20px !important;
	white-space: nowrap; transition: background .15s ease, transform .12s ease;
}
.asa-chip:hover { background: rgba(22, 128, 58, .16) !important; transform: translateY(-1px); }
.asa-chip-ico { flex: 0 0 16px; width: 16px; height: 16px; color: #16803a; display: inline-flex; }
.asa-chip-ico svg { width: 16px !important; height: 16px !important; }
.asa-chip-txt { white-space: nowrap; }
.asa-theme-dark .asa-chip { background: rgba(33, 160, 74, .18) !important; color: #5cc97f !important; }
.asa-theme-dark .asa-chip-ico { color: #5cc97f; }
@media (prefers-color-scheme: dark) { .asa-widget.asa-theme-auto .asa-chip { background: rgba(33, 160, 74, .18) !important; color: #5cc97f !important; } }

/* ---------- Barra de entrada (estilo WhatsApp: píldora + botón mic/enviar) ---------- */
.asa-inputbar { position: relative; display: flex; flex-wrap: wrap; align-items: flex-end; gap: 8px; padding: 10px 12px; background: var(--asa-chat); border-top: 1px solid var(--asa-hair); }

/* Preview de la imagen adjunta (su propia fila, encima de la píldora). */
.asa-img-preview { flex: 0 0 100%; display: flex; align-items: center; gap: 8px; padding: 2px 2px 6px; }
.asa-img-preview[hidden] { display: none !important; }
.asa-img-thumb { width: 56px !important; height: 56px !important; object-fit: cover; border-radius: 10px !important; border: 1.5px solid var(--asa-border) !important; }
.asa-widget .asa-img-remove {
	flex: 0 0 auto; width: 24px !important; height: 24px !important; min-height: 0 !important; border-radius: 50% !important;
	background: var(--asa-surface) !important; color: var(--asa-text) !important; border: 1.5px solid var(--asa-border) !important;
	display: grid !important; place-items: center; font-size: 17px !important; line-height: 1 !important; cursor: pointer; padding: 0 !important;
}
.asa-widget .asa-img-remove:hover { color: #ef4444 !important; border-color: #ef4444 !important; }

/* Píldora: emoji · texto · cámara (sin presilla de documento). */
.asa-pill {
	flex: 1; min-width: 0; display: flex; align-items: flex-end; gap: 1px;
	background: var(--asa-surface) !important; border: 1.5px solid var(--asa-border) !important;
	border-radius: 24px; padding: 3px 5px 3px 3px;
	transition: border-color .18s ease, box-shadow .18s ease;
}
.asa-pill:focus-within { border-color: var(--asa-accent) !important; box-shadow: 0 0 0 3px rgba(33, 160, 74, .18); }
.asa-input {
	flex: 1; min-width: 0; resize: none; border: 0 !important; background: transparent !important;
	color: var(--asa-text) !important; padding: 9px 6px !important; margin: 0 !important;
	font: inherit; font-size: 16.5px; max-height: 120px; outline: none !important; line-height: 1.35;
}
.asa-input::placeholder { color: var(--asa-soft); opacity: 1; }
.asa-input { scrollbar-width: thin; scrollbar-color: var(--asa-border) transparent; overflow-y: hidden; }
.asa-input::-webkit-scrollbar { width: 8px; }
.asa-input::-webkit-scrollbar-track { background: transparent; }
.asa-input::-webkit-scrollbar-thumb { background: var(--asa-border); border-radius: 4px; border: 2px solid transparent; background-clip: padding-box; }
.asa-input::-webkit-scrollbar-button { display: none !important; height: 0 !important; width: 0 !important; }

/* Iconos dentro de la píldora (emoji a la izquierda, cámara a la derecha). */
.asa-pill-btn {
	flex: 0 0 38px; width: 38px !important; height: 38px !important; border-radius: 50% !important;
	background: transparent !important; color: var(--asa-soft) !important;
	display: grid !important; place-items: center; align-self: flex-end;
	transition: color .15s ease;
}
.asa-pill-btn svg { width: 22px !important; height: 22px !important; }
/* `display:grid !important` (arriba) ganaba a `[hidden]{display:none}` (UA) → la cámara NO se ocultaba
   con texto (mismo bug que el panel de emojis). Este override lo arregla. */
.asa-pill-btn[hidden] { display: none !important; }
.asa-pill-btn:hover { color: var(--asa-accent) !important; }
.asa-pill-btn:focus-visible { outline: 2px solid var(--asa-accent) !important; outline-offset: -3px; }

/* Botón exterior: micrófono (vacío) / enviar (con texto). */
.asa-sendmic {
	flex: 0 0 46px; width: 46px !important; height: 46px !important; border-radius: 50% !important;
	color: #fff !important; background: var(--asa-grad) !important; display: grid !important; place-items: center;
	box-shadow: 0 6px 16px -5px rgba(22, 128, 58, .6); transition: transform .14s ease, filter .15s ease, background .15s ease;
}
.asa-sendmic svg { width: 22px !important; height: 22px !important; }
.asa-sendmic:hover:not(:disabled) { transform: translateY(-1px) scale(1.05); filter: brightness(1.08); }
.asa-sendmic:active:not(:disabled) { transform: scale(.95); }
.asa-sendmic:disabled { opacity: .5; cursor: default; box-shadow: none; }
.asa-sendmic:focus-visible { outline: 3px solid var(--asa-accent) !important; outline-offset: 2px; }
.asa-sendmic.is-recording { background: #ef4444 !important; animation: asa-pulse-mic 1.4s ease-out infinite; }
@keyframes asa-pulse-mic { 0%{box-shadow:0 0 0 0 rgba(239,68,68,.5)} 70%{box-shadow:0 0 0 8px rgba(239,68,68,0)} 100%{box-shadow:0 0 0 0 rgba(239,68,68,0)} }

/* Selector de emojis (encima de la barra). */
.asa-emoji-panel {
	position: absolute; left: 12px; right: 12px; bottom: calc(100% - 2px);
	background: var(--asa-surface); border: 1px solid var(--asa-border); border-radius: 16px;
	box-shadow: var(--asa-shadow); padding: 8px; z-index: 3;
	display: grid; grid-template-columns: repeat(6, 1fr); gap: 4px;
	max-height: 230px; overflow-y: auto;
}
/* Sin esto, `display:grid` (autor) ganaba a `[hidden]{display:none}` (UA) → el panel NO se cerraba. */
.asa-emoji-panel[hidden] { display: none !important; }
.asa-widget .asa-emoji-item {
	font-size: 30px !important; line-height: 1 !important; padding: 6px 0 !important; border-radius: 10px;
	background: transparent !important; display: grid !important; place-items: center; cursor: pointer;
	min-height: 0 !important; width: auto !important; height: auto !important;
}
.asa-widget .asa-emoji-item:hover { background: var(--asa-chat) !important; }

.asa-powered { text-align: center; font-size: 10.5px; letter-spacing: .2px; color: var(--asa-soft); padding: 2px 0; background: var(--asa-chat); }
.asa-footer { text-align: center; font-size: 10.5px; color: var(--asa-soft); padding: 2px 14px 10px; background: var(--asa-chat); line-height: 1.4; }
.asa-footer-txt { color: var(--asa-soft); }
.asa-reset-link {
	color: var(--asa-soft) !important; font-size: 10.5px !important;
	text-decoration: underline; text-underline-offset: 2px;
	transition: color .15s ease;
}
.asa-reset-link:hover { color: var(--asa-accent-soft) !important; }

/* ---------- Aviso para invitados (chat no se guarda + CTA login) ---------- */
.asa-guest-note {
	display: flex; align-items: center; gap: 8px;
	padding: 8px 12px; margin: 0;
	background: var(--asa-surface); /* fallback si no hay color-mix */
	background: color-mix( in srgb, var(--asa-accent-soft) 12%, var(--asa-surface) );
	border-bottom: 1px solid var(--asa-hair);
	font-size: 11.5px; line-height: 1.35; color: var(--asa-soft);
}
.asa-guest-note-txt { flex: 1; min-width: 0; }
.asa-widget .asa-guest-note-cta {
	flex: 0 0 auto; white-space: nowrap;
	font-size: 11px !important; font-weight: 800 !important; color: #fff !important;
	background: var(--asa-grad) !important; border: 0 !important;
	padding: 6px 12px !important; border-radius: 999px !important; cursor: pointer;
	box-shadow: 0 4px 12px -4px rgba(22, 128, 58, .6);
	transition: filter .14s ease, transform .14s ease;
}
.asa-widget .asa-guest-note-cta:hover { filter: brightness(1.08); transform: translateY(-1px); }

/* ---------- Login dentro del chat (OTP por email) ---------- */
.asa-login { position: absolute; inset: 0; z-index: 6; display: flex; flex-direction: column; background: var(--asa-chat); }
.asa-login[hidden] { display: none !important; }
.asa-widget .asa-login-back {
	align-self: flex-start; background: transparent !important; border: 0 !important; color: var(--asa-soft) !important;
	font: inherit; font-size: 13.5px; padding: 14px 16px 6px !important; cursor: pointer; min-height: 0 !important;
}
.asa-login-back:hover { color: var(--asa-accent) !important; }
.asa-login-body { flex: 1; overflow-y: auto; overscroll-behavior: contain; padding: 4px 22px 24px; display: flex; flex-direction: column; gap: 15px; }
.asa-login-head { display: flex; flex-direction: column; align-items: flex-start; gap: 4px; margin-bottom: 2px; }
.asa-login-ico { width: 52px; height: 52px; border-radius: 16px; background: var(--asa-grad) !important; display: grid; place-items: center; margin-bottom: 10px; box-shadow: 0 8px 22px -8px rgba(22, 128, 58, .55); }
.asa-login-ico svg { width: 26px !important; height: 26px !important; }
.asa-login-title { font-size: 21px; font-weight: 700; color: var(--asa-text); }
.asa-login-sub { font-size: 14px; color: var(--asa-soft); margin-top: 4px; line-height: 1.45; word-break: break-word; }
.asa-widget .asa-login-input {
	width: 100% !important; box-sizing: border-box !important; font: inherit; font-size: 16px;
	padding: 13px 15px !important; border-radius: 12px !important; border: 1.5px solid var(--asa-border) !important;
	background: var(--asa-surface) !important; color: var(--asa-text) !important; outline: none !important; margin: 0 !important;
}
.asa-widget .asa-login-input:focus { border-color: var(--asa-accent) !important; box-shadow: 0 0 0 3px rgba(33, 160, 74, .18); }
/* El letter-spacing SOLO cuando hay dígitos (no en el placeholder, que salía "C ó d i g o..."). */
.asa-widget .asa-login-code { text-align: center; font-weight: 700; font-size: 20px; letter-spacing: normal; }
.asa-widget .asa-login-code:not(:placeholder-shown) { letter-spacing: .4em; font-size: 23px; }
.asa-widget .asa-login-code::placeholder { letter-spacing: normal; font-weight: 400; font-size: 14.5px; opacity: .7; }
.asa-widget .asa-login-btn {
	width: 100% !important; font: inherit; font-size: 15.5px; font-weight: 600; color: #fff !important;
	background: var(--asa-grad) !important; border: 0 !important; border-radius: 12px !important;
	padding: 13px 16px !important; cursor: pointer; box-shadow: 0 6px 16px -6px rgba(22, 128, 58, .6); min-height: 0 !important;
}
.asa-login-btn:disabled { opacity: .6; cursor: default; }
.asa-login-err { color: #ef4444; font-size: 13.5px; line-height: 1.4; }
.asa-login-err[hidden] { display: none !important; }
.asa-login-row { display: flex; justify-content: space-between; gap: 10px; }
.asa-widget .asa-login-link {
	background: transparent !important; border: 0 !important; color: var(--asa-accent) !important; font: inherit;
	font-size: 13.5px; cursor: pointer; padding: 4px 0 !important; min-height: 0 !important;
}
.asa-login-link:disabled { color: var(--asa-soft) !important; cursor: default; }
.asa-login-success { text-align: center; font-size: 18px; font-weight: 700; color: var(--asa-text); padding: 34px 10px; line-height: 1.4; }

/* Continuar con Google: separador "o" + contenedor del botón oficial de GIS. */
.asa-login-or { display: flex; align-items: center; gap: 12px; color: var(--asa-soft); font-size: 13px; margin: 4px 0; }
.asa-login-or > span { flex: 0 0 auto; }
.asa-login-or::before, .asa-login-or::after { content: ''; flex: 1; height: 1px; background: var(--asa-hair); }
.asa-login-or[hidden] { display: none !important; }
.asa-login-google { display: flex; flex-direction: column; align-items: center; gap: 8px; min-height: 42px; }
.asa-login-google[hidden] { display: none !important; }
.asa-login-google > div { max-width: 100%; }
.asa-login-google-official { display: flex; justify-content: center; width: 100%; overflow: visible; padding: 1px 0; }
/* Botón PROPIO de Google (respaldo si GIS no pinta su iframe). Prefijo .asa-widget para superar el reset
   defensivo (.asa-widget button {border:0!important}) — ver changelog v1.7.3. Blanco como el botón oficial. */
.asa-widget .asa-login-google-btn {
	display: flex; align-items: center; justify-content: center; gap: 10px;
	width: 100%; max-width: 400px; min-height: 42px; padding: 10px 16px;
	background: #fff !important; color: #3c4043 !important;
	border: 1px solid #dadce0 !important; border-radius: 999px !important;
	font-size: 14px; font-weight: 600; cursor: pointer;
	box-shadow: 0 1px 2px rgba( 60, 64, 67, .12 ); transition: background .15s, box-shadow .15s;
}
.asa-widget .asa-login-google-btn:hover { background: #f7f8f8 !important; box-shadow: 0 1px 3px rgba( 60, 64, 67, .2 ); }
.asa-widget .asa-login-google-btn:disabled { opacity: .6; cursor: default; }
.asa-login-google-btn .asa-gicon { flex: 0 0 auto; }

/* ---------- Historial: separadores de día + indicador superior ---------- */
.asa-daysep { display: flex; align-items: center; gap: 10px; margin: 10px 4px 14px; color: var(--asa-soft); }
.asa-daysep::before, .asa-daysep::after { content: ""; flex: 1; height: 1px; background: var(--asa-hair); }
.asa-daysep span { font-size: 11px; font-weight: 600; white-space: nowrap; }
.asa-histtop { text-align: center; font-size: 11px; color: var(--asa-soft); padding: 4px 0 10px; }
.asa-histhint { opacity: .8; }

/* ---------- Botones de acción seleccionables (handoff, estilo Amazon) ----------
   Prefijados con .asa-widget para GANAR al reset defensivo `.asa-widget button`
   (que con `border:0 !important` los dejaba como texto plano sin borde). */
.asa-widget .asa-actions { display: flex; flex-direction: column; gap: 10px; margin: 8px 6px 18px; }
/* Valoración de mensajero: TARJETAS (estrellas / propina) — diseño del prototipo aprobado. */
.asa-widget .asa-rev-card {
	background: var(--asa-surface); border: 1px solid var(--asa-border); border-radius: 18px;
	padding: 18px 16px 16px; margin: 8px 6px 18px; box-shadow: 0 12px 34px -16px rgba(24, 36, 64, .3);
	text-align: center;
}
.asa-widget .asa-rev-title { font-size: 15.5px; font-weight: 800; color: var(--asa-text); line-height: 1.3; }
.asa-widget .asa-rev-sub { font-size: 12.5px; color: var(--asa-soft); margin-top: 4px; }
/* Estrellas: grandes, doradas al seleccionar, se rellenan al pasar. */
.asa-widget .asa-stars { display: flex; justify-content: center; gap: 6px; }
.asa-widget .asa-rev-stars { margin: 14px 0 4px; }
.asa-widget .asa-star-btn {
	background: transparent !important; border: 0 !important; padding: 2px !important; cursor: pointer;
	font-size: 40px !important; line-height: 1 !important; color: #dfe3ea !important;
	transition: color .12s ease, transform .1s ease;
}
.asa-widget .asa-star-btn:hover { transform: scale( 1.08 ); }
.asa-widget .asa-star-btn.is-on { color: #ffc531 !important; }
.asa-widget .asa-star-btn:focus-visible { outline: 3px solid var(--asa-accent) !important; outline-offset: 2px; }
.asa-widget .asa-rev-ends { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin: 2px 4px 14px; }
.asa-widget .asa-rev-end { font-size: 11.5px; color: var(--asa-soft); white-space: nowrap; }
.asa-widget .asa-rev-cur { flex: 1; font-size: 12.5px; font-weight: 700; color: var(--asa-accent); min-height: 16px; }
/* Botón "Enviar valoración / Enviar propina". */
.asa-widget .asa-rev-submit {
	display: block; width: 100%; box-sizing: border-box; margin-top: 6px;
	background: var(--asa-grad) !important; color: #fff !important; border: 0 !important; border-radius: 12px !important;
	padding: 13px 16px !important; font-size: 15px !important; font-weight: 800 !important; cursor: pointer;
	box-shadow: 0 10px 22px -10px rgba(22, 128, 58, .6); transition: filter .15s ease, opacity .15s ease;
}
.asa-widget .asa-rev-submit:hover { filter: brightness( 1.05 ); }
.asa-widget .asa-rev-submit.is-off, .asa-widget .asa-rev-submit:disabled { opacity: .5; cursor: default; box-shadow: none; filter: none; }
/* Tarjeta de PROPINA. */
.asa-widget .asa-rev-tiphead { display: flex; align-items: center; justify-content: center; gap: 8px; }
.asa-widget .asa-rev-heart { color: #ff6b81; font-size: 18px; line-height: 1; }
.asa-widget .asa-rev-note { font-size: 12.5px; color: var(--asa-soft); margin: 6px 2px 14px; line-height: 1.45; }
.asa-widget .asa-rev-chips { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; }
.asa-widget .asa-rev-chip {
	background: var(--asa-surface) !important; color: var(--asa-text) !important;
	border: 1.5px solid var(--asa-border) !important; border-radius: 12px !important;
	padding: 11px 0 !important; min-width: 62px; font-size: 15px !important; font-weight: 700 !important; cursor: pointer;
	line-height: 1.1 !important; transition: transform .1s ease, background .15s ease, border-color .15s ease, color .15s ease;
}
.asa-widget .asa-rev-chip:hover { transform: translateY( -1px ); border-color: var(--asa-accent) !important; }
.asa-widget .asa-rev-chip.is-sel {
	background: var(--asa-grad) !important; color: #fff !important; border-color: transparent !important;
	box-shadow: 0 8px 18px -9px rgba(22, 128, 58, .6);
}
.asa-widget .asa-rev-chip:focus-visible { outline: 3px solid var(--asa-accent) !important; outline-offset: 2px; }
/* Input de monto personalizado ("Otro"). */
.asa-widget .asa-rev-custom { display: flex; align-items: center; gap: 4px; margin: 12px auto 0; max-width: 210px; border: 1.5px solid var(--asa-accent); border-radius: 12px; padding: 2px 12px; }
.asa-widget .asa-rev-cpfx { font-size: 16px; font-weight: 800; color: var(--asa-text); }
.asa-widget .asa-rev-cinput {
	flex: 1; width: 100%; background: transparent !important; border: 0 !important; outline: none !important;
	box-shadow: none !important; font-size: 16px !important; color: var(--asa-text) !important; padding: 9px 2px !important;
}
.asa-widget .asa-rev-decline2 {
	display: block; margin: 12px auto 0; padding: 6px 12px !important;
	background: transparent !important; border: 0 !important; color: var(--asa-accent) !important;
	font-size: 14px !important; font-weight: 700 !important; cursor: pointer;
}
.asa-widget .asa-rev-decline2:hover { text-decoration: underline; }
.asa-widget .asa-action-btn {
	width: 100%; text-align: center; font-size: 14px !important; font-weight: 700 !important;
	padding: 13px 18px !important; border-radius: 999px !important;
	border: 1.5px solid transparent !important; cursor: pointer; line-height: 1.25 !important;
	transition: transform .12s ease, filter .15s ease, background .15s ease, box-shadow .15s ease, border-color .15s ease;
}
.asa-widget .asa-action-btn:active { transform: scale(.98); }
.asa-widget .asa-action-btn:focus-visible { outline: 3px solid var(--asa-accent) !important; outline-offset: 2px; }
/* Primario: relleno con el degradado de marca (CTA principal). */
.asa-widget .asa-action-primary {
	color: #fff !important; background: var(--asa-grad) !important;
	box-shadow: 0 8px 20px -8px rgba(22, 128, 58, .6) !important;
}
.asa-widget .asa-action-primary:hover { transform: translateY(-1px); filter: brightness(1.06); }
/* Secundario: contorno limpio sobre la superficie. */
.asa-widget .asa-action-secondary {
	color: var(--asa-accent) !important; background: var(--asa-surface) !important;
	border-color: var(--asa-border) !important;
}
.asa-widget .asa-action-secondary:hover { transform: translateY(-1px); border-color: var(--asa-accent) !important; }

/* ---------- Visor de imagen a pantalla completa (in-app, NUNCA navega fuera) ---------- */
.asa-lightbox {
	position: absolute; inset: 0; z-index: 20; background: rgba(0, 0, 0, .94);
	display: flex; align-items: center; justify-content: center; padding: 22px;
	animation: asa-fade .18s ease both;
}
@keyframes asa-fade { from { opacity: 0; } to { opacity: 1; } }
.asa-lightbox-img { max-width: 100% !important; max-height: 100% !important; width: auto; object-fit: contain; border-radius: 6px; }
.asa-widget .asa-lightbox-x {
	position: absolute; top: 12px; left: 12px; width: 40px !important; height: 40px !important; min-height: 0 !important;
	border-radius: 50% !important; background: rgba(255, 255, 255, .16) !important; color: #fff !important;
	font-size: 20px !important; line-height: 1 !important; display: grid !important; place-items: center; cursor: pointer; padding: 0 !important;
}
.asa-widget .asa-lightbox-x:hover { background: rgba(255, 255, 255, .3) !important; }

/* ---------- Móvil: pantalla completa ---------- */
@media (max-width: 480px) {
	/* `100dvh` (dynamic viewport) → el panel SE ENCOGE cuando sube el teclado (en vez de que el input
	   quede tapado y los mensajes se salgan). Con el anclaje al fondo (.asa-messages::before), los pocos
	   mensajes quedan justo sobre el input y siguen visibles con el teclado abierto — como WhatsApp. */
	.asa-panel { position: fixed; top: 0; left: 0; right: 0; bottom: auto; width: 100%; height: 100vh; height: 100dvh; max-width: none; max-height: none; border-radius: 0; border: 0; }
	.asa-pos-right .asa-panel, .asa-pos-left .asa-panel { right: 0; left: 0; }
	.asa-header { padding-top: max(14px, env(safe-area-inset-top)); }
	.asa-footer { padding-bottom: max(10px, env(safe-area-inset-bottom)); }
	.asa-card { flex-basis: 44%; max-width: 44%; }
	/* En móvil el panel es pantalla completa: el botón flotante estorba, se oculta. */
	.asa-launcher.is-open { display: none !important; }
}

/* ---------- Accesibilidad: menos movimiento ---------- */
@media (prefers-reduced-motion: reduce) {
	.asa-widget *, .asa-widget *::before, .asa-widget *::after { animation: none !important; transition: none !important; }
}
