/**
 * WhatsApp Chat Widget — front-end
 */

.wcwa-root {
	position: fixed;
	left: 20px;
	bottom: 20px;
	z-index: 999999;
	pointer-events: auto;
	font-family: system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, sans-serif;
	font-size: 15px;
	line-height: 1.4;
	box-sizing: border-box;
}

.wcwa-root *,
.wcwa-root *::before,
.wcwa-root *::after {
	box-sizing: border-box;
}

.wcwa-root .screen-reader-text {
	border: 0;
	clip: rect(1px, 1px, 1px, 1px);
	clip-path: inset(50%);
	height: 1px;
	margin: -1px;
	overflow: hidden;
	padding: 0;
	position: absolute;
	width: 1px;
	word-wrap: normal !important;
}

.wcwa-panel {
	position: absolute;
	left: 0;
	bottom: 72px;
	width: min(360px, calc(100vw - 40px));
	max-height: min(420px, 70vh);
	display: flex;
	flex-direction: column;
	background: #fff;
	border-radius: 12px;
	box-shadow: 0 8px 32px rgba(15, 23, 42, 0.18), 0 2px 8px rgba(15, 23, 42, 0.08);
	overflow: hidden;
	animation: wcwa-pop 0.22s ease-out;
}

.wcwa-panel[hidden] {
	display: none !important;
}

@keyframes wcwa-pop {
	from {
		opacity: 0;
		transform: translateY(8px) scale(0.98);
	}
	to {
		opacity: 1;
		transform: translateY(0) scale(1);
	}
}

.wcwa-panel__head {
	display: flex;
	align-items: flex-start;
	justify-content: space-between;
	gap: 12px;
	padding: 16px 16px 12px;
	background: linear-gradient(135deg, #075e54 0%, #128c7e 100%);
	color: #fff;
}

.wcwa-panel__title {
	display: block;
	font-size: 1.05rem;
	font-weight: 600;
}

.wcwa-panel__subtitle {
	display: block;
	font-size: 0.8rem;
	opacity: 0.9;
	margin-top: 4px;
}

.wcwa-panel__close {
	flex-shrink: 0;
	width: 32px;
	height: 32px;
	border: 0;
	border-radius: 8px;
	background: rgba(255, 255, 255, 0.15);
	color: #fff;
	font-size: 1.5rem;
	line-height: 1;
	cursor: pointer;
	transition: background 0.15s ease;
}

.wcwa-panel__close:hover,
.wcwa-panel__close:focus-visible {
	background: rgba(255, 255, 255, 0.28);
	outline: none;
}

.wcwa-panel__body {
	padding: 14px 16px 16px;
	overflow-y: auto;
	flex: 1;
}

.wcwa-bubble--auto {
	background: #ece5dd;
	border-radius: 0 12px 12px 12px;
	padding: 10px 12px;
	margin-bottom: 14px;
	color: #303030;
	font-size: 0.92rem;
}

.wcwa-panel__prompt {
	margin: 0 0 10px;
	font-size: 0.85rem;
	color: #64748b;
}

.wcwa-contacts {
	list-style: none;
	margin: 0;
	padding: 0;
	display: flex;
	flex-direction: column;
	gap: 8px;
}

.wcwa-contact-link {
	display: flex;
	align-items: center;
	gap: 12px;
	padding: 12px 14px;
	border-radius: 10px;
	background: #f0fdf4;
	border: 1px solid #bbf7d0;
	color: #065f46;
	text-decoration: none;
	font-weight: 500;
	transition: background 0.15s ease, border-color 0.15s ease, transform 0.12s ease;
}

.wcwa-contact-link:hover,
.wcwa-contact-link:focus-visible {
	background: #dcfce7;
	border-color: #86efac;
	transform: translateX(2px);
	outline: none;
}

.wcwa-contact-link__icon {
	display: flex;
	color: #25d366;
	flex-shrink: 0;
}

.wcwa-panel__foot {
	padding: 8px 12px;
	text-align: center;
	font-size: 0.75rem;
	border-top: 1px solid #f1f5f9;
	background: #fafafa;
}

.wcwa-panel__foot a {
	color: #64748b;
	text-decoration: none;
}

.wcwa-panel__foot a:hover {
	text-decoration: underline;
}

.wcwa-fab {
	position: relative;
	display: flex;
	align-items: center;
	justify-content: center;
	width: 60px;
	height: 60px;
	border: 0;
	border-radius: 50%;
	background: #25d366;
	color: #fff;
	cursor: pointer;
	box-shadow: 0 4px 16px rgba(37, 211, 102, 0.45);
	transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.wcwa-fab:hover,
.wcwa-fab:focus-visible {
	transform: scale(1.05);
	box-shadow: 0 6px 20px rgba(37, 211, 102, 0.5);
	outline: none;
}

.wcwa-fab:active {
	transform: scale(0.98);
}

.wcwa-fab[aria-expanded="true"] {
	background: #128c7e;
}

@media (prefers-reduced-motion: reduce) {
	.wcwa-panel,
	.wcwa-fab,
	.wcwa-contact-link {
		animation: none;
		transition: none;
	}
}
