/**
 * Botón flotante de WhatsApp Hub.
 */

.rg-wahub {
	position: fixed;
	bottom: 24px;
	z-index: 99999;
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}
.rg-wahub--br { right: 24px; }
.rg-wahub--bl { left: 24px; }

/* FAB (Floating Action Button) */
.rg-wahub__fab {
	width: 60px;
	height: 60px;
	border-radius: 50%;
	background: #25d366;
	color: #fff;
	border: 0;
	box-shadow: 0 8px 24px rgba(37, 211, 102, .35), 0 2px 8px rgba(0, 0, 0, .12);
	display: flex;
	align-items: center;
	justify-content: center;
	cursor: pointer;
	transition: transform .2s, box-shadow .2s, background .2s;
	position: relative;
}
.rg-wahub__fab:hover {
	transform: scale(1.05);
	box-shadow: 0 12px 32px rgba(37, 211, 102, .45), 0 4px 12px rgba(0, 0, 0, .15);
}
.rg-wahub__fab:focus-visible {
	outline: 3px solid rgba(37, 211, 102, .4);
	outline-offset: 3px;
}
.rg-wahub__fab svg { display: block; }

/* Pulsación sutil que invita al click */
.rg-wahub__fab::before {
	content: "";
	position: absolute;
	inset: -4px;
	border-radius: 50%;
	border: 2px solid #25d366;
	opacity: 0;
	animation: rg-wahub-pulse 2.5s ease-out infinite;
	pointer-events: none;
}
@keyframes rg-wahub-pulse {
	0%   { transform: scale(.95); opacity: .7; }
	100% { transform: scale(1.35); opacity: 0; }
}
.rg-wahub.is-open .rg-wahub__fab::before { animation: none; }

/* Panel */
.rg-wahub__panel {
	position: absolute;
	bottom: 78px;
	width: 320px;
	background: #fff;
	border-radius: 16px;
	box-shadow: 0 20px 50px rgba(0, 0, 0, .18), 0 4px 12px rgba(0, 0, 0, .08);
	overflow: hidden;
	transform-origin: bottom right;
	animation: rg-wahub-pop .2s ease-out;
}
.rg-wahub--br .rg-wahub__panel { right: 0; transform-origin: bottom right; }
.rg-wahub--bl .rg-wahub__panel { left: 0;  transform-origin: bottom left; }

@keyframes rg-wahub-pop {
	from { opacity: 0; transform: scale(.9) translateY(8px); }
	to   { opacity: 1; transform: scale(1) translateY(0); }
}

.rg-wahub__panel[hidden] { display: none; }

/* Head */
.rg-wahub__head {
	display: flex;
	gap: 14px;
	align-items: flex-start;
	background: linear-gradient(135deg, #25d366 0%, #128c7e 100%);
	color: #fff;
	padding: 22px 20px;
}
.rg-wahub__head-icon {
	width: 48px;
	height: 48px;
	border-radius: 50%;
	background: rgba(255, 255, 255, .15);
	display: flex;
	align-items: center;
	justify-content: center;
	flex-shrink: 0;
}
.rg-wahub__head-title {
	font-size: 18px;
	font-weight: 700;
	margin: 0 0 4px;
	line-height: 1.2;
}
.rg-wahub__head-sub {
	font-size: 13px;
	opacity: .92;
	margin: 0;
	line-height: 1.45;
}

/* Lista de cuentas */
.rg-wahub__accounts {
	list-style: none;
	padding: 14px;
	margin: 0;
	max-height: 380px;
	overflow-y: auto;
}
.rg-wahub__accounts li + li { margin-top: 8px; }

.rg-wahub__account {
	display: flex;
	gap: 14px;
	align-items: center;
	padding: 12px 14px;
	background: #f9fafb;
	border-left: 3px solid #25d366;
	border-radius: 6px;
	text-decoration: none;
	color: inherit;
	transition: background .15s, transform .15s;
}
.rg-wahub__account:hover {
	background: #f0fdf4;
	transform: translateX(2px);
}
.rg-wahub__account-icon {
	width: 40px;
	height: 40px;
	border-radius: 50%;
	background: #25d366;
	color: #fff;
	display: flex;
	align-items: center;
	justify-content: center;
	flex-shrink: 0;
}
.rg-wahub__account-body {
	flex: 1;
	min-width: 0;
}
.rg-wahub__account-name {
	display: block;
	font-size: 15px;
	font-weight: 600;
	color: #0a2240;
	line-height: 1.25;
	margin-bottom: 2px;
}
.rg-wahub__account-desc {
	display: block;
	font-size: 12.5px;
	color: #6b7280;
	line-height: 1.35;
}
.rg-wahub__account-arrow {
	color: #25d366;
	opacity: .65;
	flex-shrink: 0;
	transition: opacity .15s, transform .15s;
}
.rg-wahub__account:hover .rg-wahub__account-arrow {
	opacity: 1;
	transform: translateX(2px);
}

/* Close button (mobile-friendly) */
.rg-wahub__close {
	position: absolute;
	top: 14px;
	right: 14px;
	width: 28px;
	height: 28px;
	border-radius: 50%;
	background: rgba(255, 255, 255, .2);
	color: #fff;
	border: 0;
	cursor: pointer;
	display: flex;
	align-items: center;
	justify-content: center;
	transition: background .15s;
}
.rg-wahub__close:hover { background: rgba(255, 255, 255, .35); }

/* Mobile responsive */
@media (max-width: 480px) {
	.rg-wahub { bottom: 16px; }
	.rg-wahub--br { right: 16px; }
	.rg-wahub--bl { left: 16px; }
	.rg-wahub__fab { width: 56px; height: 56px; }
	.rg-wahub__panel {
		width: calc(100vw - 32px);
		max-width: 360px;
	}
}
