/* WhatsApp Persistente + GA4 — front-end styles */

.wpwa-root {
	position: fixed;
	bottom: var(--wpwa-y, 20px);
	z-index: var(--wpwa-z, 9999);
	display: flex;
	flex-direction: column;
	align-items: flex-end;
	gap: 10px;
	font-family: inherit;
	line-height: 1.4;
}

.wpwa-pos-right { right: var(--wpwa-x, 20px); }
.wpwa-pos-left  { left: var(--wpwa-x, 20px); align-items: flex-start; }

.wpwa-root.is-offline { opacity: .75; }

/* ---------------------------------------------------------------- button */

.wpwa-button {
	display: inline-flex;
	align-items: center;
	gap: 10px;
	min-height: 48px;
	min-width: 48px;
	height: var(--wpwa-size, 60px);
	padding: 0 18px 0 0;
	border-radius: 999px;
	background: var(--wpwa-color, #25d366);
	color: #fff;
	text-decoration: none;
	box-shadow: 0 6px 20px rgba(0, 0, 0, .22);
	transition: transform .18s ease, box-shadow .18s ease;
	opacity: 0;
}

.wpwa-root.is-ready .wpwa-button { opacity: 1; }

.wpwa-button:hover,
.wpwa-button:focus-visible {
	transform: translateY(-2px);
	box-shadow: 0 10px 26px rgba(0, 0, 0, .28);
	color: #fff;
}

.wpwa-button:focus-visible {
	outline: 3px solid #1a1a1a;
	outline-offset: 3px;
}

.wpwa-button__icon {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: var(--wpwa-size, 60px);
	height: var(--wpwa-size, 60px);
	flex: 0 0 auto;
}

.wpwa-button__label {
	font-size: 15px;
	font-weight: 600;
	white-space: nowrap;
}

.wpwa-button:not(:has(.wpwa-button__label)) { padding-right: 0; }

/* ---------------------------------------------------------------- bubble */

.wpwa-bubble {
	position: relative;
	max-width: 260px;
	padding: 12px 34px 12px 14px;
	border-radius: 14px;
	background: #fff;
	color: #1f2933;
	font-size: 14px;
	box-shadow: 0 8px 24px rgba(0, 0, 0, .16);
	opacity: 0;
	transform: translateY(8px);
	transition: opacity .22s ease, transform .22s ease;
}

.wpwa-bubble.is-visible { opacity: 1; transform: translateY(0); }

.wpwa-bubble__close {
	position: absolute;
	top: 4px;
	right: 6px;
	width: 26px;
	height: 26px;
	border: 0;
	background: none;
	color: #64748b;
	font-size: 19px;
	line-height: 1;
	cursor: pointer;
	border-radius: 50%;
}

.wpwa-bubble__close:focus-visible { outline: 2px solid #1a1a1a; }

/* ----------------------------------------------------------------- panel */

.wpwa-panel {
	width: 280px;
	padding: 14px;
	border-radius: 16px;
	background: #fff;
	box-shadow: 0 12px 34px rgba(0, 0, 0, .2);
	opacity: 0;
	transform: translateY(10px);
	transition: opacity .2s ease, transform .2s ease;
}

.wpwa-panel.is-open { opacity: 1; transform: translateY(0); }

.wpwa-panel__title {
	margin: 0 0 10px;
	font-size: 14px;
	font-weight: 700;
	color: #1f2933;
}

.wpwa-panel__list { margin: 0; padding: 0; list-style: none; }

.wpwa-panel__item {
	display: block;
	padding: 10px 12px;
	border-radius: 10px;
	color: #1f2933;
	text-decoration: none;
	transition: background .15s ease;
}

.wpwa-panel__item:hover,
.wpwa-panel__item:focus-visible { background: #f1f5f9; }
.wpwa-panel__item:focus-visible { outline: 2px solid #1a1a1a; }

.wpwa-panel__name { display: block; font-weight: 600; font-size: 14px; }
.wpwa-panel__role { display: block; font-size: 12px; color: #64748b; }

.wpwa-panel__state {
	display: inline-block;
	margin-top: 4px;
	font-size: 11px;
	font-weight: 600;
	color: #15803d;
}

.wpwa-panel__item.is-offline .wpwa-panel__state { color: #b45309; }

/* ---------------------------------------------------------------- inline */

.wpwa-inline {
	display: inline-flex;
	align-items: center;
	min-height: 44px;
	padding: 10px 20px;
	border-radius: 999px;
	background: var(--wpwa-color, #25d366);
	color: #fff;
	font-weight: 600;
	text-decoration: none;
}

.wpwa-inline:hover, .wpwa-inline:focus-visible { color: #fff; opacity: .92; }
.wpwa-inline:focus-visible { outline: 3px solid #1a1a1a; outline-offset: 2px; }

/* --------------------------------------------------------------- motion */

@media (prefers-reduced-motion: reduce) {
	.wpwa-button,
	.wpwa-bubble,
	.wpwa-panel { transition: none; }
	.wpwa-button:hover { transform: none; }
}

@media (max-width: 480px) {
	.wpwa-button__label { display: none; }
	.wpwa-button { padding-right: 0; }
	.wpwa-panel { width: calc(100vw - 40px); max-width: 320px; }
}
