:root{
	--wf-wa-color:#25D366;
}

#wf-wa-widget{
	position:fixed;
	bottom:24px;
	z-index:99999;
	font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Helvetica,Arial,sans-serif;
}
#wf-wa-widget.wf-wa-pos-right{ right:24px; }
#wf-wa-widget.wf-wa-pos-left{ left:24px; }

/* Botón flotante */
.wf-wa-toggle{
	height:60px;
	border-radius:30px;
	background:var(--wf-wa-color);
	border:none;
	cursor:pointer;
	box-shadow:0 6px 20px rgba(0,0,0,.18);
	display:flex;
	align-items:center;
	justify-content:center;
	gap:8px;
	padding:0 6px;
	margin-left:auto;
	transition:transform .2s ease;
	position:relative;
	color:#fff;
}
.wf-wa-toggle:hover{ transform:scale(1.04); }

/* Etiqueta "Pedidos e info" */
.wf-wa-label{
	font-weight:600;
	font-size:14px;
	white-space:nowrap;
	padding-left:8px;
	order:-1; /* texto antes del icono cuando está a la derecha */
}
#wf-wa-widget.wf-wa-pos-left .wf-wa-label{ order:1; padding-left:0; padding-right:8px; }

/* El icono se mantiene en un círculo dentro del pill */
.wf-wa-toggle .wf-wa-icon-open,
.wf-wa-toggle .wf-wa-icon-close{
	flex:0 0 auto;
	width:48px;
	height:48px;
	background:rgba(255,255,255,.18);
	border-radius:50%;
	padding:9px;
	box-sizing:border-box;
}
.wf-wa-toggle .wf-wa-icon-close{ display:none; }
#wf-wa-widget.is-open .wf-wa-toggle .wf-wa-icon-open{ display:none; }
#wf-wa-widget.is-open .wf-wa-toggle .wf-wa-icon-close{ display:block; }
/* Al abrir, ocultamos la etiqueta y volvemos a círculo */
#wf-wa-widget.is-open .wf-wa-label{ display:none; }
#wf-wa-widget.is-open .wf-wa-toggle{ border-radius:50%; padding:0; width:60px; }

/* Efecto de pulsación */
.wf-wa-pulse{
	position:absolute;
	right:6px;
	top:50%;
	transform:translateY(-50%);
	width:48px;
	height:48px;
	border-radius:50%;
	background:var(--wf-wa-color);
	z-index:-1;
	animation:wf-wa-pulse 2s ease-out infinite;
}
#wf-wa-widget.wf-wa-pos-left .wf-wa-pulse{ right:auto; left:6px; }
#wf-wa-widget.is-open .wf-wa-pulse{ display:none; }
@keyframes wf-wa-pulse{
	0%{ transform:translateY(-50%) scale(1); opacity:.6; }
	70%{ transform:translateY(-50%) scale(2.2); opacity:0; }
	100%{ transform:translateY(-50%) scale(2.2); opacity:0; }
}
@media (prefers-reduced-motion:reduce){
	.wf-wa-pulse{ animation:none; }
}

/* Panel */
.wf-wa-panel{
	position:absolute;
	bottom:76px;
	width:330px;
	max-width:calc(100vw - 48px);
	background:#ece5dd;
	border-radius:16px;
	box-shadow:0 12px 40px rgba(0,0,0,.22);
	overflow:hidden;
	opacity:0;
	visibility:hidden;
	transform:translateY(12px) scale(.97);
	transform-origin:bottom right;
	transition:opacity .22s ease,transform .22s ease,visibility .22s;
}
#wf-wa-widget.wf-wa-pos-right .wf-wa-panel{ right:0; }
#wf-wa-widget.wf-wa-pos-left .wf-wa-panel{ left:0; transform-origin:bottom left; }
#wf-wa-widget.is-open .wf-wa-panel{
	opacity:1;
	visibility:visible;
	transform:translateY(0) scale(1);
}

.wf-wa-panel-header{
	background:var(--wf-wa-color);
	color:#fff;
	padding:20px 40px;
	font-size:16px;
	font-weight:600;
	text-align:center;
	position:relative;
	line-height:1.3;
}
.wf-wa-close,
.wf-wa-back{
	position:absolute;
	top:50%;
	transform:translateY(-50%);
	background:none;
	border:none;
	color:#fff;
	line-height:1;
	cursor:pointer;
	opacity:.85;
	padding:0;
}
.wf-wa-close{ right:14px; font-size:24px; }
.wf-wa-back{ left:14px; font-size:30px; font-weight:400; }
.wf-wa-close:hover,
.wf-wa-back:hover{ opacity:1; }

/* Pantalla de selección de intención */
.wf-wa-choices{ padding:16px 14px; }
.wf-wa-choices-intro{
	margin:4px 4px 14px;
	font-size:14px;
	color:#54656f;
	font-weight:600;
}
.wf-wa-choice{
	display:flex;
	align-items:center;
	gap:14px;
	width:100%;
	background:#fff;
	border:none;
	border-radius:12px;
	padding:16px;
	margin-bottom:10px;
	cursor:pointer;
	text-align:left;
	box-shadow:0 1px 3px rgba(0,0,0,.08);
	transition:transform .15s ease,box-shadow .15s ease;
}
.wf-wa-choice:hover{
	transform:translateY(-1px);
	box-shadow:0 4px 12px rgba(0,0,0,.12);
}
.wf-wa-choice-icon{
	flex:0 0 auto;
	width:44px;
	height:44px;
	border-radius:50%;
	background:var(--wf-wa-color);
	color:#fff;
	display:flex;
	align-items:center;
	justify-content:center;
}
.wf-wa-choice-text{ display:flex; flex-direction:column; gap:2px; }
.wf-wa-choice-title{ font-weight:700; font-size:15px; color:#222; }
.wf-wa-choice-sub{ font-size:12px; color:#667781; }

.wf-wa-agents{
	padding:14px;
	max-height:60vh;
	overflow-y:auto;
}

.wf-wa-agent{
	display:flex;
	align-items:center;
	gap:12px;
	background:#fff;
	border-radius:12px;
	padding:12px;
	margin-bottom:10px;
	text-decoration:none;
	color:#222;
	box-shadow:0 1px 3px rgba(0,0,0,.08);
	transition:transform .15s ease,box-shadow .15s ease;
}
.wf-wa-agent:last-child{ margin-bottom:0; }
.wf-wa-agent:hover{
	transform:translateY(-1px);
	box-shadow:0 4px 12px rgba(0,0,0,.12);
}

.wf-wa-avatar{
	flex:0 0 auto;
	width:48px;
	height:48px;
	border-radius:50%;
	overflow:hidden;
	background:var(--wf-wa-color);
	display:flex;
	align-items:center;
	justify-content:center;
	border:2px solid var(--wf-wa-color);
}
.wf-wa-avatar img{ width:100%; height:100%; object-fit:cover; }
.wf-wa-avatar-fallback{
	color:#fff;
	font-weight:700;
	font-size:20px;
	text-transform:uppercase;
}

.wf-wa-info{
	flex:1 1 auto;
	display:flex;
	flex-direction:column;
	gap:2px;
	min-width:0;
}
.wf-wa-name{ font-weight:700; font-size:15px; }
.wf-wa-role{ font-size:12px; color:#667781; }
.wf-wa-location{
	font-size:11px;
	color:#8a96a3;
	display:flex;
	align-items:center;
	gap:3px;
}

.wf-wa-go{
	flex:0 0 auto;
	color:var(--wf-wa-color);
	display:flex;
	align-items:center;
}

@media (max-width:480px){
	#wf-wa-widget{ bottom:16px; }
	#wf-wa-widget.wf-wa-pos-right{ right:16px; }
	#wf-wa-widget.wf-wa-pos-left{ left:16px; }
}
