/* Floating WhatsApp button + pop-up (markup: inc/whatsapp-widget.php) */

.btm-whatsapp-btn {
	position: fixed;
	bottom: 22px;
	left: 22px;
	z-index: 999998;
	width: 60px;
	height: 60px;
	border-radius: 50%;
	background: #25D366;
	color: #fff;
	display: flex;
	align-items: center;
	justify-content: center;
	box-shadow: 0 4px 12px rgba(0,0,0,.3);
	text-decoration: none;
	animation: btm-wa-pulse 2s infinite;
	transition: transform .15s;
}
.btm-whatsapp-btn:hover,
.btm-whatsapp-btn:focus-visible { transform: scale(1.1); color: #fff; }
.btm-whatsapp-btn:focus-visible { outline: 3px solid #0B335C; outline-offset: 3px; }
.btm-whatsapp-btn[hidden] { display: none; }
/* Out of the way while the Customize-My-Trip panel is open (it would cover the panel). */
.btm-drawer-is-open .btm-whatsapp-btn,
.btm-drawer-is-open .wa-popup,
.btm-drawer-is-open .wa-overlay { display: none !important; }

@keyframes btm-wa-pulse {
	0%   { box-shadow: 0 0 0 0 rgba(37,211,102,.6), 0 4px 12px rgba(0,0,0,.3); }
	70%  { box-shadow: 0 0 0 18px rgba(37,211,102,0), 0 4px 12px rgba(0,0,0,.3); }
	100% { box-shadow: 0 0 0 0 rgba(37,211,102,0), 0 4px 12px rgba(0,0,0,.3); }
}
@keyframes wa-slideup {
	from { opacity: 0; transform: translateY(18px) scale(.97); }
	to   { opacity: 1; transform: none; }
}

.wa-overlay {
	position: fixed;
	inset: 0;
	z-index: 999997;
	background: rgba(0,0,0,.45);
	backdrop-filter: blur(2px);
}
.wa-overlay[hidden] { display: none; }

.wa-popup {
	position: fixed;
	bottom: 92px;
	left: 22px;
	z-index: 999999;
	width: 330px;
	max-width: calc(100vw - 44px);
	display: flex;
	flex-direction: column;
	border-radius: 20px;
	overflow: hidden;
	box-shadow: 0 8px 40px rgba(0,0,0,.25);
	animation: wa-slideup .32s cubic-bezier(.34,1.56,.64,1) both;
}
.wa-popup[hidden] { display: none; }

.wa-popup__head {
	position: relative;
	display: flex;
	align-items: center;
	gap: 14px;
	padding: 18px 20px 16px;
	background: #25D366;
}
.wa-popup__head img {
	width: 52px;
	height: 52px;
	border-radius: 50%;
	border: 2px solid rgba(255,255,255,.4);
	object-fit: cover;
	background: #fff;
}
.wa-popup__title { margin: 0; color: #fff; font-weight: 700; font-size: 15px; }
.wa-popup__status { margin: 4px 0 0; color: rgba(255,255,255,.85); font-size: 12px; }
.wa-popup__close {
	position: absolute;
	top: 12px;
	right: 14px;
	width: 28px;
	height: 28px;
	border-radius: 50%;
	border: 1px solid rgba(255,255,255,.3);
	background: rgba(255,255,255,.18);
	color: #fff;
	cursor: pointer;
	line-height: 1;
}

.wa-popup__chat { padding: 16px 18px 8px; background: #ece5dd; }
.wa-popup__bubble {
	margin: 0;
	padding: 13px 15px;
	border-radius: 0 14px 14px 14px;
	background: #fff;
	color: #111;
	font-size: 14px;
	line-height: 1.6;
	box-shadow: 0 1px 3px rgba(0,0,0,.1);
}

.wa-popup__form {
	display: flex;
	flex-direction: column;
	gap: 8px;
	padding: 8px 18px 18px;
	background: #ece5dd;
}
.wa-field {
	box-sizing: border-box !important;
	width: 100% !important;
	padding: 12px 15px !important;
	border-radius: 12px !important;
	border: 1.5px solid #c8bfb5 !important;
	font-size: 14px !important;
	font-family: inherit !important;
	background: #fff !important;
	color: #1a1a1a !important;
	outline: none !important;
	box-shadow: 0 1px 4px rgba(0,0,0,.07) !important;
}
textarea.wa-field { resize: vertical; line-height: 1.6; }
.wa-field::placeholder { color: #a09890 !important; }
.wa-field:focus { border-color: #25D366 !important; box-shadow: 0 0 0 3px rgba(37,211,102,.15) !important; }
.wa-field[aria-invalid="true"] { border-color: #C0392B !important; }

.wa-popup .screen-reader-text {
	position: absolute !important;
	width: 1px; height: 1px;
	margin: -1px; padding: 0;
	overflow: hidden;
	clip: rect(0 0 0 0);
	white-space: nowrap;
	border: 0;
}

.wa-popup__error { margin: 0; color: #B3261E; font-size: 13px; }
.wa-popup__error[hidden] { display: none; }

.wa-send-button {
	width: 100%;
	padding: 13px;
	border: none;
	border-radius: 12px;
	background: #25D366;
	color: #fff;
	font-family: inherit;
	font-size: 15px;
	font-weight: 700;
	cursor: pointer;
}
.wa-send-button:hover { background: #1ebe5d; }

@media (max-width: 400px) {
	.wa-popup { left: 10px; right: 10px; width: auto; max-width: calc(100vw - 20px); bottom: 82px; }
	.btm-whatsapp-btn { bottom: 16px; left: 16px; }
}

@media (prefers-reduced-motion: reduce) {
	.btm-whatsapp-btn, .wa-popup { animation: none; }
}
