/* Amox WhatsApp Popup
 * Matches the look of the Leader for WP popup it replaces.
 * !important is used on buttons because the theme styles every <button> globally. */

/* The theme draws a square ::before/::after on every <button> (hidden on hover) - remove it on ours */
html body button.amox-wa-sticky::before,
html body button.amox-wa-sticky::after,
html body .amox-wa-modal button::before,
html body .amox-wa-modal button::after {
	content: none !important;
	display: none !important;
}

/* Sticky button: bottom-right, above the reCAPTCHA badge */
html body button.amox-wa-sticky {
	position: fixed !important;
	right: 18px !important;
	bottom: 90px !important;
	left: auto !important;
	z-index: 9990;
	display: flex !important;
	align-items: center;
	justify-content: center;
	width: 56px !important;
	height: 56px !important;
	min-width: 0 !important;
	margin: 0 !important;
	padding: 0 !important;
	border: 0 !important;
	border-radius: 50% !important;
	background: #25d366 !important;
	color: #fff !important;
	box-shadow: 0 3px 10px rgba(0, 0, 0, .2) !important;
	cursor: pointer;
	transition: transform .2s ease;
}
html body button.amox-wa-sticky:hover {
	background: #25d366 !important;
	transform: scale(1.06);
}
.amox-wa-sticky:focus-visible {
	outline: 3px solid #264200;
	outline-offset: 3px;
}
.amox-wa-sticky svg {
	width: 34px;
	height: 34px;
}
/* keep above the sticky add-to-cart bar on product pages */
html body.woocommerce.single-product-add-to-cart-sticky.sticky-cart-active button.amox-wa-sticky {
	bottom: 140px !important;
}

/* Popup */
.amox-wa-modal[hidden] {
	display: none !important;
}
.amox-wa-modal {
	position: fixed;
	inset: 0;
	z-index: 99999;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 16px;
	direction: rtl;
}
.amox-wa-modal__backdrop {
	position: absolute;
	inset: 0;
	background: rgba(0, 0, 0, .45);
}
.amox-wa-modal__content {
	position: relative;
	width: 100%;
	max-width: 340px;
	overflow: hidden;
	border-radius: 8px;
	background: #fff;
	box-shadow: 0 10px 40px rgba(0, 0, 0, .2);
	animation: amox-wa-in .2s ease;
}
@keyframes amox-wa-in {
	from { opacity: 0; transform: translateY(12px); }
	to   { opacity: 1; transform: translateY(0); }
}

.amox-wa-modal__header {
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 26px 20px 18px;
	background: #f6f2e9;
}
.amox-wa-modal__logo {
	display: block;
	width: auto;
	max-width: 150px;
	height: auto;
	max-height: 44px;
}
.amox-wa-modal__logo-text {
	color: #b9966e;
	font-size: 34px;
	font-weight: 300;
	letter-spacing: 8px;
	line-height: 1;
}
html body button.amox-wa-modal__close {
	position: absolute !important;
	top: 10px !important;
	left: 12px !important;
	width: 24px !important;
	height: 24px !important;
	min-width: 0 !important;
	margin: 0 !important;
	padding: 0 !important;
	border: 0 !important;
	border-radius: 0 !important;
	background: none !important;
	box-shadow: none !important;
	color: #888 !important;
	font-size: 22px !important;
	line-height: 1 !important;
	cursor: pointer;
}
.amox-wa-modal__close:hover {
	color: #322f31 !important;
}

.amox-wa-modal__body {
	display: flex;
	flex-direction: column;
	gap: 12px;
	margin: 0;
	padding: 24px 22px 26px;
}
.amox-wa-modal .amox-wa-modal__body input {
	width: 100%;
	height: 40px;
	margin: 0;
	padding: 0 12px;
	border: 1px solid #d4d4d4;
	border-radius: 4px;
	background: #fff;
	box-shadow: none;
	color: #322f31;
	font-size: 16px; /* 16px stops iOS zooming in on focus */
	text-align: right;
}
.amox-wa-modal .amox-wa-modal__body input:focus {
	border-color: #264200;
	outline: none;
}
.amox-wa-modal .amox-wa-modal__body input[aria-invalid="true"] {
	border-color: #d63638;
}
.amox-wa-modal__error {
	margin: 0;
	color: #d63638;
	font-size: 14px;
}
.amox-wa-modal__error[hidden] {
	display: none;
}
html body button.amox-wa-modal__submit {
	width: 100% !important;
	height: 44px !important;
	min-width: 0 !important;
	margin: 10px 0 0 !important;
	padding: 0 16px !important;
	border: 0 !important;
	border-radius: 4px !important;
	background: #264200 !important;
	box-shadow: none !important;
	color: #fff !important;
	font-size: 16px !important;
	font-weight: 700;
	letter-spacing: .5px;
	text-transform: none !important;
	cursor: pointer;
	transition: opacity .2s ease;
}
.amox-wa-modal__submit:hover {
	opacity: .9;
}

.amox-wa-modal .screen-reader-text {
	position: absolute !important;
	width: 1px;
	height: 1px;
	overflow: hidden;
	clip: rect(0 0 0 0);
	white-space: nowrap;
}
