/**
 * Floating Enquire now tab (opens a Tigers Wings Popup) and WhatsApp button.
 * Colors for the tab come from Theme Options (--tw-enquiry-bg / --tw-enquiry-color).
 */

/* ---------- Enquire now tab (right centre) ---------- */
.tw-enquiry-tab {
	position: fixed;
	top: 50%;
	right: 0;
	z-index: 80;
	display: inline-flex;
	align-items: center;
	gap: 10px;
	padding: 18px 11px;
	border-radius: 0 12px 12px 0;
	background: var(--tw-enquiry-bg, #f6b423);
	color: var(--tw-enquiry-color, #071633);
	box-shadow: -6px 10px 28px rgba(7, 22, 51, 0.28);
	font-family: var(--ts-font);
	font-size: 14px;
	font-weight: 700;
	letter-spacing: 0.04em;
	line-height: 1;
	text-decoration: none;
	writing-mode: vertical-rl;
	transform: translate(110%, -50%) rotate(180deg);
	transform-origin: center;
	opacity: 0;
	visibility: hidden;
	transition: transform 0.35s cubic-bezier(0.2, 0.8, 0.2, 1), opacity 0.25s ease, visibility 0.25s ease, padding 0.2s ease;
}

/* rotate(180deg) flips the tab so the text reads bottom-to-top; the
   translate is applied first so it still slides in from the right edge. */
.tw-enquiry-tab.is-visible {
	transform: translate(0, -50%) rotate(180deg);
	opacity: 1;
	visibility: visible;
}

.tw-enquiry-tab svg {
	flex: 0 0 auto;
	transform: rotate(90deg);
}

.tw-enquiry-tab:hover,
.tw-enquiry-tab:focus-visible {
	padding-right: 15px;
	color: var(--tw-enquiry-color, #071633);
	filter: brightness(1.06);
}

.tw-enquiry-tab:focus-visible {
	outline: 3px solid #fff;
	outline-offset: -6px;
}

/* ---------- WhatsApp (bottom right) ---------- */
.tw-whatsapp {
	position: fixed;
	right: 20px;
	bottom: 22px;
	z-index: 80;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 58px;
	height: 58px;
	border-radius: 999px;
	background: #25d366;
	color: #fff;
	box-shadow: 0 12px 28px rgba(18, 140, 70, 0.4);
	text-decoration: none;
	transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.tw-whatsapp::before {
	content: "";
	position: absolute;
	inset: 0;
	border-radius: inherit;
	background: #25d366;
	opacity: 0.5;
	animation: tw-whatsapp-pulse 2.4s ease-out infinite;
	z-index: -1;
}

.tw-whatsapp:hover,
.tw-whatsapp:focus-visible {
	color: #fff;
	transform: translateY(-2px);
	box-shadow: 0 16px 34px rgba(18, 140, 70, 0.5);
}

.tw-whatsapp:focus-visible {
	outline: 3px solid #fff;
	outline-offset: 3px;
}

.tw-whatsapp__label {
	position: absolute;
	right: calc(100% + 12px);
	top: 50%;
	padding: 8px 12px;
	border-radius: 8px;
	background: #071633;
	color: #fff;
	font-family: var(--ts-font);
	font-size: 13px;
	font-weight: 600;
	white-space: nowrap;
	opacity: 0;
	pointer-events: none;
	transform: translate(6px, -50%);
	transition: opacity 0.2s ease, transform 0.2s ease;
}

.tw-whatsapp:hover .tw-whatsapp__label,
.tw-whatsapp:focus-visible .tw-whatsapp__label {
	opacity: 1;
	transform: translate(0, -50%);
}

@keyframes tw-whatsapp-pulse {
	0% {
		transform: scale(1);
		opacity: 0.5;
	}
	80%,
	100% {
		transform: scale(1.55);
		opacity: 0;
	}
}

/* Back-to-top arrow sits above the WhatsApp button. */
.has-whatsapp .footer-top {
	right: 26px;
	bottom: 94px;
}

/* ---------- Small screens ---------- */
@media (max-width: 600px) {
	.tw-enquiry-tab {
		gap: 8px;
		padding: 14px 9px;
		font-size: 12.5px;
	}

	.tw-whatsapp {
		right: 16px;
		bottom: 16px;
		width: 52px;
		height: 52px;
	}

	.tw-whatsapp__label {
		display: none;
	}

	.has-whatsapp .footer-top {
		right: 19px;
		bottom: 80px;
	}
}

@media (prefers-reduced-motion: reduce) {
	.tw-enquiry-tab,
	.tw-whatsapp,
	.tw-whatsapp__label {
		transition: none;
	}

	.tw-whatsapp::before {
		animation: none;
	}
}
