/**
 * Dedicated Product Customizer storefront mode.
 *
 * Applied only when the plugin-owned customizer document is active.
 * Does not target theme-specific class names.
 */

body.product-customizer-mode {
	box-sizing: border-box;
	margin: 0;
	padding: 0;
	min-height: 100vh;
	overflow-x: hidden;
	background: #fff;
}

.product-customizer-mode-shell {
	display: flex;
	flex-direction: column;
	width: 100%;
	max-width: 100%;
	min-height: 100vh;
	margin: 0;
	padding: 0;
}

.product-customizer-mode-shell *,
.product-customizer-mode-shell *::before,
.product-customizer-mode-shell *::after {
	box-sizing: border-box;
}

.product-customizer-mode-shell__topbar {
	display: flex;
	align-items: center;
	gap: 0.5rem;
	flex: 0 0 auto;
	position: relative;
	width: 100%;
	min-height: 2.75rem;
	margin: 0;
	padding: 0.5rem 0.75rem;
	border: 0;
	border-bottom: 1px solid #dcdcde;
	background: #fff;
}

.product-customizer-mode-shell__back {
	flex: 0 1 auto;
	min-width: 0;
	margin: 0;
}

.product-customizer-mode-shell__back-action {
	display: inline-flex;
	align-items: center;
	gap: 0.35rem;
	max-width: 100%;
	min-height: 2rem;
	padding: 0.2rem 0.7rem 0.2rem 0.55rem;
	border: 1px solid #1d2327;
	border-radius: 0;
	background: #fff;
	color: #1d2327;
	font-size: 0.8125rem;
	font-weight: 600;
	line-height: 1;
	text-decoration: none;
}

.product-customizer-mode-shell__back-action::before {
	content: "";
	display: inline-block;
	width: 0.38em;
	height: 0.38em;
	margin-top: 0.05em;
	border-bottom: 1.5px solid currentColor;
	border-left: 1.5px solid currentColor;
	transform: rotate(45deg);
}

.product-customizer-mode-shell__back-action:focus {
	outline: 2px solid #2271b1;
	outline-offset: 2px;
}

.product-customizer-mode-shell__product {
	flex: 1 1 auto;
	min-width: 0;
	margin: 0;
	font-size: 0.9375rem;
	font-weight: 600;
	line-height: 1.3;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.product-customizer-mode-shell__nav {
	flex: 0 0 2.25rem;
	width: 2.25rem;
	min-width: 2.25rem;
	height: 2.25rem;
}

.product-customizer-mode-shell__workspace {
	flex: 1 1 auto;
	width: 100%;
	max-width: 100%;
	min-width: 0;
	margin: 0;
	padding: 0.75rem 0.75rem 0.5rem;
}

.product-customizer-mode-shell__unavailable {
	margin: 0;
	font-size: 1rem;
	line-height: 1.5;
}

.product-customizer-mode-shell .product-customizer-preview {
	display: flex;
	flex-direction: column;
	align-items: stretch;
	width: 100%;
	max-width: 100%;
	margin: 0;
}

.product-customizer-mode-shell .product-customizer-preview__controls {
	flex: 0 0 auto;
	align-self: center;
	margin: 0 0 0.75rem;
	border-radius: 0;
}

.product-customizer-mode-shell .product-customizer-preview__stage {
	width: 100%;
	max-width: 100%;
}

.product-customizer-mode-shell__footer {
	flex: 0 0 auto;
	position: sticky;
	bottom: 0;
	z-index: 1;
	width: 100%;
	max-width: 100%;
	border-top: 1px solid #dcdcde;
	background: #fff;
}

.product-customizer-mode-shell__footer-inner {
	width: 100%;
	max-width: 100%;
	padding: 0.45rem 0.75rem max(0.5rem, env(safe-area-inset-bottom, 0px));
}

.product-customizer-mode-shell__options {
	display: flex;
	flex-direction: column;
	width: 100%;
	max-width: 100%;
	min-width: 0;
}

.product-customizer-mode-shell__options-dock {
	display: flex;
	flex-wrap: nowrap;
	align-items: stretch;
	gap: 0.5rem;
	width: 100%;
	max-width: 100%;
}

.product-customizer-mode-shell__option {
	flex: 1 1 0;
	display: flex;
	align-items: center;
	justify-content: center;
	min-width: 0;
	min-height: 2.75rem;
	padding: 0.4rem 0.35rem;
	border: 1px solid #dcdcde;
	border-radius: 0;
	background: #fff;
	color: #1d2327;
	font-size: 0.8125rem;
	font-weight: 600;
	line-height: 1.2;
	text-align: center;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

button.product-customizer-mode-shell__option {
	appearance: none;
	-webkit-appearance: none;
	font: inherit;
	cursor: pointer;
}

.product-customizer-design-selection__panel {
	position: relative;
	width: 100%;
	max-width: 100%;
	min-width: 0;
	margin: 0 0 0.15rem;
	padding: 0;
	border: 0;
	background: transparent;
}

.product-customizer-design-selection__panel[hidden] {
	display: none;
}

.product-customizer-design-selection__controls {
	display: flex;
	flex-direction: column;
	align-items: stretch;
	gap: 0.4rem;
	width: 100%;
	min-width: 0;
}

.product-customizer-design-selection__actions {
	display: flex;
	align-items: stretch;
	gap: 0.35rem;
	width: 100%;
	min-width: 0;
	min-height: 2.75rem;
}

.product-customizer-design-selection__actions[hidden],
.product-customizer-design-selection__upload[hidden] {
	display: none;
}

.product-customizer-design-selection__action {
	appearance: none;
	-webkit-appearance: none;
	display: flex;
	align-items: center;
	justify-content: center;
	flex: 1 1 0;
	min-width: 0;
	min-height: 2.75rem;
	padding: 0.4rem 0.35rem;
	border: 1px solid #1d2327;
	border-radius: 0;
	background: #fff;
	color: #1d2327;
	font: inherit;
	font-size: 0.75rem;
	font-weight: 600;
	line-height: 1.15;
	text-align: center;
	cursor: pointer;
}

.product-customizer-design-selection__file {
	position: absolute;
	width: 1px;
	height: 1px;
	padding: 0;
	margin: -1px;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	white-space: nowrap;
	border: 0;
}

.product-customizer-design-selection__upload {
	appearance: none;
	-webkit-appearance: none;
	display: flex;
	align-items: center;
	justify-content: center;
	width: 100%;
	min-height: 2.75rem;
	padding: 0.45rem 0.75rem;
	border: 1px solid #1d2327;
	border-radius: 0;
	background: #fff;
	color: #1d2327;
	font: inherit;
	font-size: 0.8125rem;
	font-weight: 600;
	line-height: 1.2;
	cursor: pointer;
}

.product-customizer-design-selection__upload:focus,
.product-customizer-design-selection__action:focus {
	outline: 2px solid #2271b1;
	outline-offset: 2px;
}

.product-customizer-design-selection__upload:disabled,
.product-customizer-design-selection__action:disabled {
	cursor: not-allowed;
	opacity: 0.45;
}

.product-customizer-design-selection__controls.is-busy .product-customizer-design-selection__upload:disabled,
.product-customizer-design-selection__controls.is-busy .product-customizer-design-selection__action:disabled {
	cursor: wait;
}

.product-customizer-design-selection__controls.is-hydration-failed .product-customizer-design-selection__upload,
.product-customizer-design-selection__controls.is-hydration-failed .product-customizer-design-selection__actions {
	display: none;
}

.product-customizer-design-selection__controls:not(.is-empty) .product-customizer-design-selection__upload {
	display: none;
}

.product-customizer-design-selection__toggle.is-open {
	border-color: #1d2327;
	background: #1d2327;
	color: #fff;
}

.product-customizer-design-selection__toggle:focus {
	outline: 2px solid #2271b1;
	outline-offset: 2px;
}

.product-customizer-mode-shell__primary {
	width: 100%;
	max-width: 100%;
	margin: 0.75rem 0 0;
}

.product-customizer-mode-shell__primary-reserve {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 100%;
	min-height: 2.75rem;
	padding: 0.3rem;
	border: 1px dashed #c3c4c7;
	border-radius: 0;
	background: #f6f7f7;
}

.product-customizer-mode-shell__add-to-cart-placeholder {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 0.45rem;
	width: 100%;
	min-height: 2.25rem;
	padding: 0.4rem 0.9rem;
	border: 1px solid #1d2327;
	background: #1d2327;
	color: #fff;
	font: inherit;
	font-size: 0.8125rem;
	font-weight: 600;
	line-height: 1;
	cursor: pointer;
	pointer-events: auto;
	user-select: none;
}

.product-customizer-mode-shell__add-to-cart-placeholder-icon {
	display: block;
	flex: 0 0 auto;
	width: 1.125rem;
	height: 1.125rem;
}

.product-customizer-mode-shell__add-to-cart-placeholder-label {
	min-width: 0;
}

.product-customizer-back-charge {
	position: fixed;
	inset: 0;
	z-index: 20;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 1.25rem 0.75rem;
}

.product-customizer-back-charge__backdrop {
	position: absolute;
	inset: 0;
	background: rgba(29, 35, 39, 0.45);
}

.product-customizer-back-charge__dialog {
	position: relative;
	z-index: 1;
	width: 100%;
	max-width: 20.5rem;
	margin: 0;
	padding: 1.15rem 1rem 1rem;
	border: 1px solid #1d2327;
	background: #fff;
	color: #1d2327;
}

.product-customizer-back-charge__title {
	margin: 0 0 0.5rem;
	font-size: 1rem;
	font-weight: 700;
	line-height: 1.3;
}

.product-customizer-back-charge__body {
	margin: 0 0 1rem;
	font-size: 0.875rem;
	font-weight: 400;
	line-height: 1.45;
}

.product-customizer-back-charge__actions {
	display: flex;
	align-items: stretch;
	gap: 0.5rem;
	width: 100%;
}

.product-customizer-back-charge__cancel,
.product-customizer-back-charge__accept {
	appearance: none;
	-webkit-appearance: none;
	display: flex;
	align-items: center;
	justify-content: center;
	flex: 1 1 0;
	min-width: 0;
	min-height: 2.75rem;
	padding: 0.45rem 0.6rem;
	border: 1px solid #1d2327;
	border-radius: 0;
	font: inherit;
	font-size: 0.8125rem;
	font-weight: 600;
	line-height: 1.2;
	cursor: pointer;
}

.product-customizer-back-charge__cancel {
	background: #fff;
	color: #1d2327;
}

.product-customizer-back-charge__accept {
	background: #1d2327;
	color: #fff;
}

.product-customizer-back-charge__cancel:focus,
.product-customizer-back-charge__accept:focus {
	outline: 2px solid #2271b1;
	outline-offset: 2px;
}

.product-customizer-back-charge__cancel:disabled,
.product-customizer-back-charge__accept:disabled {
	cursor: wait;
	opacity: 0.7;
}

@media (min-width: 48em) {
	.product-customizer-mode-shell__topbar {
		display: grid;
		grid-template-columns: minmax(0, 1fr) minmax(0, 2fr) minmax(0, 1fr);
		align-items: center;
		gap: 1rem;
		min-height: 3rem;
		padding: 0.6rem 1.25rem;
	}

	.product-customizer-mode-shell__back {
		justify-self: start;
	}

	.product-customizer-mode-shell__product {
		justify-self: center;
		font-size: 1.0625rem;
		text-align: center;
	}

	.product-customizer-mode-shell__nav {
		justify-self: end;
	}

	.product-customizer-mode-shell__workspace {
		width: 100%;
		max-width: 42rem;
		margin: 0 auto;
		padding: 1rem 1.25rem 0.75rem;
	}

	.product-customizer-mode-shell__footer-inner {
		max-width: 42rem;
		margin: 0 auto;
		padding: 0.55rem 1.25rem 1.15rem;
	}

	.product-customizer-mode-shell__options-dock {
		gap: 0.75rem;
	}

	.product-customizer-mode-shell__option {
		min-height: 3rem;
		font-size: 0.875rem;
	}

	.product-customizer-mode-shell__primary-reserve {
		min-height: 3rem;
		padding: 0.35rem;
	}

	.product-customizer-mode-shell__add-to-cart-placeholder {
		min-height: 2.5rem;
		font-size: 0.875rem;
	}

	.product-customizer-design-selection__upload,
	.product-customizer-design-selection__action,
	.product-customizer-design-selection__actions {
		min-height: 3rem;
	}

	.product-customizer-design-selection__upload {
		font-size: 0.875rem;
	}

	.product-customizer-design-selection__action {
		font-size: 0.8125rem;
	}

	.product-customizer-back-charge {
		padding: 1.5rem 1.25rem;
	}

	.product-customizer-back-charge__dialog {
		max-width: 22rem;
		padding: 1.25rem 1.15rem 1.1rem;
	}

	.product-customizer-back-charge__cancel,
	.product-customizer-back-charge__accept {
		min-height: 3rem;
		font-size: 0.875rem;
	}
}
