/* =========================================================
   StilX Cart Popup
   ========================================================= */


/* ---------------------------------------------------------
   Hidden
   --------------------------------------------------------- */

.stilx-cart-popup[hidden] {
	display: none !important;
}


/* ---------------------------------------------------------
   Body lock
   --------------------------------------------------------- */

html.stilx-cart-popup-open,
body.stilx-cart-popup-open {
	overflow: hidden;
}


/* ---------------------------------------------------------
   Popup
   --------------------------------------------------------- */

.stilx-cart-popup {
	position: fixed;
	inset: 0;
	z-index: 99999;

	display: flex;
	align-items: center;
	justify-content: center;

	padding: 24px;

	visibility: hidden;
	opacity: 0;

	transition:
		opacity 0.22s ease,
		visibility 0.22s ease;
}

.stilx-cart-popup.is-visible {
	visibility: visible;
	opacity: 1;
}


/* ---------------------------------------------------------
   Backdrop
   --------------------------------------------------------- */

.stilx-cart-popup__backdrop {
	position: absolute;
	inset: 0;

	background: rgba(30, 27, 24, 0.38);
}


/* ---------------------------------------------------------
   Dialog
   --------------------------------------------------------- */

.stilx-cart-popup__dialog {
	position: relative;
	z-index: 1;

	width: min(100%, 470px);

	padding: 34px;

	background: #fff;

	box-shadow:
		0 20px 70px rgba(0, 0, 0, 0.16);

	transform: translateY(14px) scale(0.98);

	transition:
		transform 0.22s ease;
}

.stilx-cart-popup.is-visible
.stilx-cart-popup__dialog {
	transform: translateY(0) scale(1);
}


/* ---------------------------------------------------------
   Close
   --------------------------------------------------------- */

.stilx-cart-popup__close {
	position: absolute;
	top: 16px;
	right: 16px;

	display: flex;
	align-items: center;
	justify-content: center;

	width: 38px;
	height: 38px;

	padding: 0;

	border: 0;
	border-radius: 50%;

	background: transparent;
	color: var(--text, #292622);

	cursor: pointer;

	transition:
		background-color 0.2s ease,
		color 0.2s ease;
}

.stilx-cart-popup__close:hover {
	background: #f4f1ed;
}

.stilx-cart-popup__close svg {
	width: 20px;
	height: 20px;
}

.stilx-cart-popup__close:focus-visible {
	outline: 2px solid var(--text, #292622);
	outline-offset: 2px;
}


/* ---------------------------------------------------------
   Success
   --------------------------------------------------------- */

.stilx-cart-popup__success {
	display: flex;
	align-items: center;
	gap: 10px;

	padding-right: 34px;
}

.stilx-cart-popup__success-icon {
	display: flex;
	align-items: center;
	justify-content: center;

	width: 28px;
	height: 28px;

	flex: 0 0 28px;

	border-radius: 50%;

	background: #e8eee2;
	color: #687b58;
}

.stilx-cart-popup__success-icon svg {
	width: 18px;
	height: 18px;
}

.stilx-cart-popup__success h2 {
	margin: 0;

	color: var(--text, #292622);

	font-size: 18px;
	font-weight: 400;
	line-height: 1.4;
}


/* ---------------------------------------------------------
   Product
   --------------------------------------------------------- */

.stilx-cart-popup__product {
	display: flex;
	align-items: center;
	gap: 18px;

	margin-top: 28px;
	padding: 18px;

	background: #f7f4f0;
}

.stilx-cart-popup__image {
	width: 82px;
	height: 82px;

	flex: 0 0 82px;

	overflow: hidden;

	background: #ece8e3;
}

.stilx-cart-popup__image img {
	display: block;

	width: 100%;
	height: 100%;

	object-fit: cover;
}

.stilx-cart-popup__image img[hidden] {
	display: none;
}

.stilx-cart-popup__product-info {
	min-width: 0;
}

.stilx-cart-popup__product-name {
	color: var(--text, #292622);

	font-size: 16px;
	font-weight: 400;
	line-height: 1.4;
}

.stilx-cart-popup__product-price {
	margin-top: 5px;

	color: var(--text-muted, #756f68);

	font-size: 14px;
	line-height: 1.4;
}


/* ---------------------------------------------------------
   Actions
   --------------------------------------------------------- */

.stilx-cart-popup__actions {
	margin-top: 28px;
}


/* ---------------------------------------------------------
   Checkout
   --------------------------------------------------------- */

.stilx-cart-popup__checkout {
	display: flex;
	align-items: center;
	justify-content: center;

	width: 100%;
	height: 56px;

	padding: 0 24px;

	border: 1px solid var(--text, #292622);
	border-radius: 999px;

	background: var(--text, #292622);
	color: #fff;

	font-family: inherit;
	font-size: 15px;
	font-weight: 400;
	line-height: 1;

	text-decoration: none;

	transition:
		background-color 0.2s ease,
		border-color 0.2s ease;
}

.stilx-cart-popup__checkout:hover {
	background: #4a4641;
	border-color: #4a4641;
	color: #fff;
}


/* ---------------------------------------------------------
   Continue shopping
   --------------------------------------------------------- */

.stilx-cart-popup__continue {
	display: block;

	width: 100%;

	margin-top: 16px;
	padding: 4px 0;

	border: 0;

	background: transparent;
	color: var(--text-muted, #756f68);

	font-family: inherit;
	font-size: 14px;
	font-weight: 400;
	line-height: 1.5;

	text-align: center;

	cursor: pointer;

	transition: color 0.2s ease;
}

.stilx-cart-popup__continue:hover {
	color: var(--text, #292622);
}

.stilx-cart-popup__continue:focus-visible {
	outline: 2px solid var(--text, #292622);
	outline-offset: 4px;
}


/* ---------------------------------------------------------
   Add to cart loading state
   --------------------------------------------------------- */

.single_add_to_cart_button.is-loading {
	cursor: wait;
	opacity: 0.65;
}

.single_add_to_cart_button.is-loading::after {
	content: '';

	display: inline-block;

	width: 14px;
	height: 14px;

	margin-left: 9px;

	border: 1.5px solid currentColor;
	border-right-color: transparent;

	border-radius: 50%;

	vertical-align: -2px;

	animation:
		stilx-cart-spin 0.65s linear infinite;
}

@keyframes stilx-cart-spin {
	to {
		transform: rotate(360deg);
	}
}


/* ---------------------------------------------------------
   Mobile
   --------------------------------------------------------- */

@media (max-width: 560px) {

	.stilx-cart-popup {
		align-items: flex-end;
		padding: 0;
	}

	.stilx-cart-popup__dialog {
		width: 100%;

		padding: 28px 20px 24px;

		transform: translateY(30px);
	}

	.stilx-cart-popup.is-visible
	.stilx-cart-popup__dialog {
		transform: translateY(0);
	}

	.stilx-cart-popup__close {
		top: 12px;
		right: 12px;
	}

	.stilx-cart-popup__success h2 {
		font-size: 17px;
	}

	.stilx-cart-popup__product {
		margin-top: 24px;
	}

	.stilx-cart-popup__image {
		width: 70px;
		height: 70px;

		flex-basis: 70px;
	}

	.stilx-cart-popup__actions {
		margin-top: 24px;
	}

	.stilx-cart-popup__checkout {
		height: 54px;
	}
}