/* Paull Floating WA — frontend */
.pfw-root{
	--pfw-brand:#25D366;
	--pfw-radius:18px;
	--pfw-shadow:0 12px 40px rgba(0,0,0,.16);
	position:fixed;
	bottom:22px;
	z-index:99990;
	font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Helvetica,Arial,sans-serif;
	box-sizing:border-box;
}
.pfw-root *,
.pfw-root *::before,
.pfw-root *::after{box-sizing:border-box;}

.pfw-pos-right{right:22px;}
.pfw-pos-left{left:22px;}

/* ---------- FAB ---------- */
.pfw-fab{
	display:inline-flex;
	align-items:center;
	gap:10px;
	height:60px;
	min-width:60px;
	padding:0 20px;
	border:none;
	border-radius:999px;
	background:var(--pfw-brand);
	color:#fff;
	cursor:pointer;
	box-shadow:var(--pfw-shadow);
	text-decoration:none;
	font-size:15px;
	font-weight:600;
	line-height:1;
	transition:transform .18s ease, box-shadow .18s ease, filter .18s ease;
	position:relative;
}
.pfw-fab:hover{transform:translateY(-2px);filter:brightness(1.03);box-shadow:0 16px 46px rgba(0,0,0,.22);}
.pfw-fab:active{transform:translateY(0);}
.pfw-fab .fa-whatsapp{font-size:30px;line-height:1;}
.pfw-fab .fa-xmark{font-size:26px;line-height:1;}
.pfw-fab-label{white-space:nowrap;}

/* no-label fab stays circular */
.pfw-fab:not(:has(.pfw-fab-label)){padding:0;justify-content:center;}

/* pulse ring */
.pfw-fab::after{
	content:"";
	position:absolute;
	inset:0;
	border-radius:999px;
	box-shadow:0 0 0 0 var(--pfw-brand);
	animation:pfw-pulse 2.4s infinite;
	pointer-events:none;
}
@keyframes pfw-pulse{
	0%{box-shadow:0 0 0 0 rgba(37,211,102,.5);}
	70%{box-shadow:0 0 0 16px rgba(37,211,102,0);}
	100%{box-shadow:0 0 0 0 rgba(37,211,102,0);}
}

/* icon swap */
.pfw-icon-close{display:none;}
.pfw-root.pfw-open .pfw-icon-open{display:none;}
.pfw-root.pfw-open .pfw-icon-close{display:inline-block;}
.pfw-root.pfw-open .pfw-fab::after{animation:none;}
.pfw-root.pfw-open .pfw-fab-label{display:none;}

@media (prefers-reduced-motion:reduce){
	.pfw-fab::after{animation:none;}
	.pfw-fab{transition:none;}
}

/* ---------- Panel ---------- */
.pfw-panel{
	position:absolute;
	bottom:76px;
	width:340px;
	max-width:calc(100vw - 32px);
	max-height:min(70vh,560px);
	background:#fff;
	border-radius:var(--pfw-radius);
	box-shadow:var(--pfw-shadow);
	overflow:hidden;
	display:flex;
	flex-direction:column;
	transform-origin:bottom right;
	animation:pfw-pop .22s cubic-bezier(.2,.9,.3,1.2);
}
.pfw-pos-left .pfw-panel{left:0;transform-origin:bottom left;}
.pfw-pos-right .pfw-panel{right:0;}
.pfw-panel[hidden]{display:none;}

@keyframes pfw-pop{
	from{opacity:0;transform:translateY(10px) scale(.96);}
	to{opacity:1;transform:translateY(0) scale(1);}
}

.pfw-panel-header{
	background:var(--pfw-brand);
	color:#fff;
	padding:16px 16px 18px;
	display:flex;
	align-items:flex-start;
	gap:10px;
}
.pfw-panel-header-txt{flex:1;min-width:0;}
.pfw-panel-title{font-size:16px;font-weight:700;line-height:1.25;}
.pfw-panel-sub{font-size:12.5px;opacity:.92;margin-top:3px;line-height:1.35;}
.pfw-panel-close{
	background:rgba(255,255,255,.18);
	border:none;
	color:#fff;
	width:30px;height:30px;
	border-radius:50%;
	cursor:pointer;
	display:inline-flex;
	align-items:center;justify-content:center;
	font-size:16px;
	flex-shrink:0;
	transition:background .15s ease;
}
.pfw-panel-close:hover{background:rgba(255,255,255,.32);}

.pfw-panel-body{
	padding:8px;
	overflow-y:auto;
	background:#f4f6f8;
	flex:1;
}

.pfw-branch{
	display:flex;
	align-items:center;
	gap:12px;
	padding:11px 12px;
	background:#fff;
	border-radius:14px;
	text-decoration:none;
	color:#1f2937;
	margin-bottom:8px;
	transition:transform .12s ease, box-shadow .12s ease;
	box-shadow:0 1px 2px rgba(0,0,0,.05);
}
.pfw-branch:last-child{margin-bottom:0;}
.pfw-branch:hover{transform:translateX(2px);box-shadow:0 4px 14px rgba(0,0,0,.1);}

.pfw-branch-avatar{
	width:42px;height:42px;
	border-radius:50%;
	background:var(--pfw-brand);
	color:#fff;
	display:inline-flex;
	align-items:center;justify-content:center;
	font-size:22px;
	flex-shrink:0;
}
.pfw-branch-info{display:flex;flex-direction:column;gap:2px;min-width:0;flex:1;}
.pfw-branch-name{font-weight:650;font-size:14.5px;line-height:1.2;color:#111827;}
.pfw-branch-role{font-size:12px;color:#6b7280;line-height:1.2;}
.pfw-branch-hours{font-size:11px;color:#9ca3af;display:inline-flex;align-items:center;gap:4px;line-height:1.2;}
.pfw-branch-go{color:#9ca3af;font-size:13px;flex-shrink:0;}

.pfw-panel-footer{
	padding:9px 12px;
	background:#fff;
	border-top:1px solid #eef0f2;
	display:flex;
	align-items:center;
	justify-content:center;
	gap:7px;
	font-size:11px;
	color:#9aa3ad;
}
.pfw-panel-footer .fa-whatsapp{color:var(--pfw-brand);font-size:13px;}

/* ---------- Mobile: bottom sheet ---------- */
@media (max-width:600px){
	.pfw-root{bottom:16px;}
	.pfw-pos-right{right:16px;}
	.pfw-pos-left{left:16px;}
	.pfw-fab{height:56px;min-width:56px;}
	.pfw-fab .fa-whatsapp{font-size:28px;}

	.pfw-panel{
		position:fixed;
		left:0;right:0;bottom:0;
		width:100%;
		max-width:100%;
		max-height:80vh;
		border-radius:20px 20px 0 0;
		animation:pfw-sheet .26s cubic-bezier(.2,.9,.3,1);
	}
	@keyframes pfw-sheet{
		from{transform:translateY(100%);}
		to{transform:translateY(0);}
	}
	.pfw-panel-header{padding-top:20px;}
}
