/* ============================================================
   FLOATING WHATSAPP CHAT (bottom left)
   ============================================================ */
.wa-widget {
	position: fixed;
	left: 20px;
	bottom: 20px;
	z-index: 95;
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	gap: 14px;
	font-family: var(--font-family);
}

/* ---- Round button ---- */
.wa-fab {
	position: relative;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 60px;
	height: 60px;
	padding: 0;
	border: 0;
	border-radius: 50%;
	background: #25d366;
	color: #ffffff;
	cursor: pointer;
	text-decoration: none;
	box-shadow: 0 8px 24px rgba(37, 211, 102, 0.45), 0 2px 6px rgba(0, 0, 0, 0.2);
	transition: transform 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease;
}

.wa-fab:hover { transform: scale(1.06); background: #1ebe5b; color: #ffffff; }
.wa-fab:focus-visible { outline: 3px solid var(--color-accent); outline-offset: 3px; }

/* Soft pulse ring to draw the eye */
.wa-fab::before {
	content: '';
	position: absolute;
	inset: 0;
	border-radius: 50%;
	background: #25d366;
	opacity: 0.55;
	z-index: -1;
	animation: wa-pulse 2.4s ease-out infinite;
}

.wa-fab.is-open::before { animation: none; opacity: 0; }

@keyframes wa-pulse {
	0%   { transform: scale(1);   opacity: 0.55; }
	70%  { transform: scale(1.6); opacity: 0; }
	100% { transform: scale(1.6); opacity: 0; }
}

/* Unread-style dot */
.wa-fab__dot {
	position: absolute;
	top: 2px;
	right: 2px;
	width: 14px;
	height: 14px;
	border-radius: 50%;
	background: #ff3b30;
	border: 2px solid #ffffff;
}

.wa-fab.is-open .wa-fab__dot { display: none; }

/* ---- Chat card ---- */
.wa-card {
	width: 320px;
	max-width: calc(100vw - 40px);
	border-radius: 16px;
	overflow: hidden;
	background: #ffffff;
	box-shadow: 0 20px 50px rgba(6, 13, 20, 0.35);
	animation: wa-card-in 0.22s ease-out;
}

@keyframes wa-card-in {
	from { opacity: 0; transform: translateY(12px) scale(0.98); }
	to   { opacity: 1; transform: translateY(0) scale(1); }
}

.wa-card__header {
	display: flex;
	align-items: center;
	gap: 12px;
	padding: 16px;
	background: #075e54;
	color: #ffffff;
}

.wa-card__avatar {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 44px;
	height: 44px;
	flex-shrink: 0;
	border-radius: 50%;
	background: #25d366;
	color: #ffffff;
}

.wa-card__avatar svg { width: 26px; height: 26px; }

.wa-card__heading { display: flex; flex-direction: column; min-width: 0; flex: 1; }
.wa-card__title { font-size: 1rem; font-weight: 700; line-height: 1.2; }
.wa-card__status { font-size: 0.78rem; color: rgba(255, 255, 255, 0.8); margin-top: 2px; }

.wa-card__close {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 32px;
	height: 32px;
	padding: 0;
	border: 0;
	border-radius: 50%;
	background: transparent;
	color: rgba(255, 255, 255, 0.85);
	cursor: pointer;
}

.wa-card__close:hover { background: rgba(255, 255, 255, 0.15); color: #ffffff; }
.wa-card__close:focus-visible { outline: 2px solid #ffffff; outline-offset: 2px; }

.wa-card__body {
	padding: 20px 16px 24px;
	background-color: #e5ddd5;
	background-image: radial-gradient(rgba(0, 0, 0, 0.04) 1px, transparent 1px);
	background-size: 14px 14px;
}

.wa-bubble {
	position: relative;
	max-width: 88%;
	padding: 10px 12px 12px;
	border-radius: 0 10px 10px 10px;
	background: #ffffff;
	color: #111b21;
	font-size: 0.9rem;
	line-height: 1.5;
	box-shadow: 0 1px 1px rgba(0, 0, 0, 0.12);
}

.wa-bubble::before {
	content: '';
	position: absolute;
	top: 0;
	left: -8px;
	border-style: solid;
	border-width: 0 10px 10px 0;
	border-color: transparent #ffffff transparent transparent;
}

.wa-bubble__name { display: block; font-size: 0.75rem; font-weight: 700; color: #075e54; margin-bottom: 3px; }

.wa-card__footer { padding: 14px 16px 16px; background: #ffffff; }

.wa-card__cta {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	width: 100%;
	padding: 12px 16px;
	border-radius: 999px;
	background: #25d366;
	color: #ffffff;
	font-size: 0.95rem;
	font-weight: 700;
	text-decoration: none;
	transition: background-color 0.2s ease, transform 0.15s ease;
}

.wa-card__cta svg { width: 20px; height: 20px; }
.wa-card__cta:hover { background: #1ebe5b; color: #ffffff; transform: translateY(-1px); }
.wa-card__cta:focus-visible { outline: 3px solid var(--color-accent); outline-offset: 3px; }

@media (max-width: 600px) {
	.wa-widget { left: 14px; bottom: 14px; }
	.wa-fab { width: 54px; height: 54px; }
	.wa-fab svg { width: 27px; height: 27px; }
}

@media (prefers-reduced-motion: reduce) {
	.wa-fab::before, .wa-card { animation: none; }
}

@media print { .wa-widget { display: none; } }
