/* -----------------------------------------------------------------------------
File:    05-sticky-add-to-cart.css
Path:    /woocommerce/product-archives/05-sticky-add-to-cart.css
Version: V1.0
Purpose: Mobile sticky add-to-cart bar
Rules:   palette vars only
----------------------------------------------------------------------------- */

@media (min-width: 721px){
	#rg-sticky-atc{ display:none !important; }
}

@media (max-width: 720px){

	/* bar wrapper */
	.rg-sticky-atc{
		position: fixed;
		left: 0;
		right: 0;
		bottom: 0;
		z-index: 9999;
		padding: 10px 12px calc(10px + env(safe-area-inset-bottom));
		background: var(--base);
		border-top: 1px solid var(--base-2);
		box-shadow: 0 -10px 24px rgba(0,0,0,0.08);
		transform: translateY(110%);
		transition: transform 220ms ease;
	}

	.rg-sticky-atc.is-visible{
		transform: translateY(0);
	}

	.rg-sticky-atc__inner{
		max-width: 980px;
		margin: 0 auto;
	}

	/* cloned form layout */
	.rg-sticky-atc__form{
		display: flex;
		gap: 10px;
		align-items: stretch;
		justify-content: space-between;
		margin: 0;
	}

	/* quantity block */
	.rg-sticky-atc__form .quantity{
		display: flex;
		align-items: stretch;
		border: 1px solid var(--base-2);
		border-radius: 10px;
		overflow: hidden;
		background: var(--base);
	}

	.rg-sticky-atc__form .quantity .minus,
	.rg-sticky-atc__form .quantity .plus{
		display: inline-flex;
		align-items: center;
		justify-content: center;
		min-width: 44px;
		padding: 0;
		color: var(--contrast);
		background: var(--base);
		text-decoration: none;
		font-weight: 900;
		border: 0;
	}

	.rg-sticky-atc__form .quantity .qty{
		width: 56px;
		border: 0;
		text-align: center;
		color: var(--contrast);
		background: var(--base);
		font-weight: 800;
	}

	/* button takes remaining space */
	.rg-sticky-atc__form .single_add_to_cart_button{
		flex: 1;
		border-radius: 10px;
		min-height: 48px;
		font-weight: 900;
	}

	/* remove extra spacing some themes add */
	.rg-sticky-atc__form > *{
		margin: 0 !important;
	}
}