/* HoneyCraves purchase feedback shared by the home, catalog and product templates. */
#page .hc-product-card .add_to_cart_button,
#page .single-product .summary form.cart .single_add_to_cart_button,
#page .single-product .hc-mobile-purchase-button {
	align-items: center;
	background: var(--hc-color-honey);
	border: 1px solid var(--hc-color-honey);
	border-radius: var(--hc-radius-control);
	box-shadow: none;
	color: var(--hc-color-brown);
	display: inline-flex;
	font-weight: 700;
	justify-content: center;
	text-align: center;
}

#page .hc-product-card .add_to_cart_button:hover:not(.disabled):not(.hc-cart-pending):not(.hc-cart-added),
#page .single-product .summary form.cart .single_add_to_cart_button:hover:not(.disabled):not(.hc-cart-pending):not(.hc-cart-added),
#page .single-product .hc-mobile-purchase-button:hover:not(:disabled):not(.hc-cart-pending):not(.hc-cart-added) {
	background: #e7ad3c;
	border-color: #e7ad3c;
	color: var(--hc-color-brown);
}

#page .hc-product-card .add_to_cart_button:focus-visible,
#page .single-product .summary form.cart .single_add_to_cart_button:focus-visible,
#page .single-product .hc-mobile-purchase-button:focus-visible {
	background: var(--hc-color-honey);
	border-color: var(--hc-color-honey);
	box-shadow: none;
	color: var(--hc-color-brown);
	outline: 3px solid var(--hc-color-forest);
	outline-offset: 3px;
}

#page .hc-product-card .add_to_cart_button:active:not(.disabled),
#page .single-product .summary form.cart .single_add_to_cart_button:active:not(.disabled),
#page .single-product .hc-mobile-purchase-button:active:not(:disabled) {
	background: #c98518;
	border-color: #c98518;
	color: var(--hc-color-brown);
}

#page .hc-product-card .add_to_cart_button:disabled,
#page .hc-product-card .add_to_cart_button.disabled,
#page .single-product .summary form.cart .single_add_to_cart_button:disabled,
#page .single-product .summary form.cart .single_add_to_cart_button.disabled,
#page .single-product .hc-mobile-purchase-button:disabled {
	background: #e9dfc9;
	border-color: #e9dfc9;
	box-shadow: none;
	color: #766857;
	cursor: not-allowed;
	opacity: 1;
}

.hc-add-to-cart-feedback {
	isolation: isolate;
	overflow: hidden;
	position: relative;
}

.hc-add-to-cart-feedback::before {
	background:
		radial-gradient(ellipse at 28% 11%, rgb(255 255 255 / 28%) 0 9%, transparent 30%),
		linear-gradient(180deg, #e2a52e 0%, #c98518 100%);
	border-radius: 42% 58% 0 0 / 13% 19% 0 0;
	content: "";
	inset: 0;
	position: absolute;
	transform: translateY(102%);
	transition: transform 560ms cubic-bezier(0.2, 0.75, 0.3, 1);
	z-index: 0;
}

.hc-add-to-cart-feedback.hc-cart-pending::before,
.hc-add-to-cart-feedback.hc-cart-added::before {
	transform: translateY(0);
}

.hc-cart-feedback-label {
	align-items: center;
	display: inline-flex;
	gap: 0.38rem;
	justify-content: center;
	position: relative;
	z-index: 1;
}

/* WooCommerce uses ::after for its spinner and View Cart affordance. Our
 * temporary label replaces that feedback while the button is in this state. */
.hc-add-to-cart-feedback::after {
	content: none;
}

.hc-add-to-cart-feedback:focus-visible {
	outline: 3px solid var(--hc-color-forest);
	outline-offset: 3px;
}

.hc-add-to-cart-feedback:disabled,
.hc-add-to-cart-feedback.disabled {
	cursor: progress;
	opacity: 0.92;
}

.hc-product-actions {
	display: flex;
	flex-direction: column;
	gap: 0.65rem;
	position: relative;
}

/* WooCommerce appends this link after AJAX success. Keep it available to
 * keyboard and assistive technology without changing a product card's height. */
.hc-product-actions .added_to_cart {
	clip: rect(0, 0, 0, 0);
	clip-path: inset(50%);
	height: 1px;
	left: 0;
	overflow: hidden;
	position: absolute;
	white-space: nowrap;
	width: 1px;
}

.hc-product-actions .added_to_cart:focus-visible {
	background: var(--hc-color-cream);
	border: 2px solid var(--hc-color-forest);
	border-radius: var(--hc-radius-control);
	clip: auto;
	clip-path: none;
	height: auto;
	left: 50%;
	padding: 0.55rem 0.8rem;
	transform: translateX(-50%);
	width: auto;
	z-index: 2;
}

#page .hc-add-to-cart-feedback.hc-cart-pending,
#page .hc-add-to-cart-feedback.hc-cart-added {
	background: var(--hc-color-honey);
	border-color: var(--hc-color-honey);
	box-shadow: none;
	color: var(--hc-color-brown);
}

.hc-cart-pending {
	cursor: progress;
}

.hc-cart-added {
	cursor: default;
}

#page .hc-product-card .add_to_cart_button.loading::after,
#page .hc-product-card .add_to_cart_button.added::after,
#page .single-product .single_add_to_cart_button.loading::after,
#page .single-product .single_add_to_cart_button.added::after,
#page .single-product .hc-mobile-purchase-button.loading::after,
#page .single-product .hc-mobile-purchase-button.added::after {
	content: none;
}

.hc-cart-page-pending {
	pointer-events: none;
}

.hc-cart-status {
	clip: rect(0, 0, 0, 0);
	clip-path: inset(50%);
	height: 1px;
	overflow: hidden;
	position: absolute;
	white-space: nowrap;
	width: 1px;
}

.hc-flying-bee {
	height: 66px;
	left: 0;
	overflow: visible;
	pointer-events: none;
	position: fixed;
	top: 0;
	width: 80px;
	z-index: 1200;
}

.hc-bee-wing {
	transform-box: fill-box;
	transform-origin: center bottom;
}

.hc-flying-bee .hc-bee-wing--one {
	animation: hc-bee-flap 120ms ease-in-out infinite alternate;
}

.hc-flying-bee .hc-bee-wing--two {
	animation: hc-bee-flap 120ms ease-in-out 60ms infinite alternate-reverse;
}

.hc-cart-link.hc-cart-bounce .hc-cart-count {
	animation: hc-cart-count-bounce 520ms cubic-bezier(0.22, 0.8, 0.3, 1);
}

@keyframes hc-bee-flap {
	from { transform: rotate(-16deg) scaleY(0.78); }
	to { transform: rotate(18deg) scaleY(1.08); }
}

@keyframes hc-cart-count-bounce {
	0%, 100% { transform: scale(1); }
	35% { transform: scale(1.28); }
	65% { transform: scale(0.94); }
}

@media (prefers-reduced-motion: reduce) {
	.hc-add-to-cart-feedback::before {
		display: none;
		transition: none;
	}

	.hc-add-to-cart-feedback:focus-visible {
		outline-offset: 2px;
	}

	.hc-flying-bee,
	.hc-cart-link.hc-cart-bounce .hc-cart-count {
		animation: none;
	}
}
