/* Printivo Product Options — uses the child theme tokens with fallbacks. */

.pvpo-form {
	display: flex !important;
	flex-direction: column;
	align-items: stretch;
	gap: 0;
}

.pvpo {
	display: flex;
	flex-direction: column;
	gap: 28px;
	margin-bottom: 28px;
}

.pvpo fieldset {
	min-width: 0;
	margin: 0;
	padding: 0;
	border: 0;
}

.pvpo-group {
	display: flex;
	flex-direction: column;
	gap: 18px;
	padding-top: 24px !important;
	border-top: 1px solid var(--pv-hairline, #E6E7EA) !important;
}

.pvpo-group__title {
	float: left; /* lets the legend sit inside the flex column */
	width: 100%;
	margin: 0;
	padding: 0;
	color: var(--pv-graphite, #292D32);
	font-family: var(--pv-font-heading, "Montserrat", sans-serif);
	font-size: 18px;
	font-weight: 700;
	line-height: 1.3;
}

.pvpo-group__title + * {
	clear: both;
}

.pvpo-qty-title {
	margin: 0 0 10px;
	padding-top: 24px;
	border-top: 1px solid var(--pv-hairline, #E6E7EA);
}

.pvpo-field {
	display: flex;
	flex-direction: column;
	gap: 8px;
}

.pvpo-label {
	display: block;
	margin: 0;
	padding: 0;
	color: var(--pv-graphite, #292D32);
	font-size: 14.5px;
	font-weight: 500;
}

.pvpo-req {
	color: var(--pv-error, #B42318);
}

.pvpo-help {
	margin: 0;
	color: var(--pv-text-muted, #4A4F56);
	font-size: 13px;
	line-height: 1.45;
}

.pvpo [hidden] {
	display: none !important;
}

/* Chips and swatches: native radios, visually hidden */
.pvpo-chips {
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
}

.pvpo-chip,
.pvpo-swatch {
	position: relative;
	display: inline-flex;
	cursor: pointer;
}

.pvpo-chip input,
.pvpo-swatch input {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	margin: 0;
	opacity: 0;
	cursor: pointer;
}

.pvpo-chip > span,
.pvpo-swatch {
	align-items: center;
	gap: 8px;
	min-height: 44px;
	padding: 0 16px;
	border: 1.5px solid var(--pv-border-strong, #C3C7CD);
	border-radius: var(--pv-radius, 10px);
	background: #FFFFFF;
	color: var(--pv-graphite, #292D32);
	font-size: 15px;
	font-weight: 500;
	transition: border-color 150ms ease, background-color 150ms ease;
}

.pvpo-chip > span {
	display: inline-flex;
}

.pvpo-chip small {
	color: var(--pv-text-muted, #4A4F56);
	font-size: 13px;
	font-weight: 500;
}

.pvpo-chip:hover > span,
.pvpo-swatch:hover {
	border-color: var(--pv-graphite, #292D32);
}

.pvpo-chip input:checked + span {
	border-color: var(--pv-graphite, #292D32);
	background: var(--pv-graphite, #292D32);
	color: #FFFFFF;
}

.pvpo-chip input:checked + span small {
	color: #FFFFFF;
}

.pvpo-chip input:focus-visible + span,
.pvpo-swatch:has(input:focus-visible) {
	outline: 3px solid var(--pv-orange, #FF6B1A);
	outline-offset: 2px;
}

.pvpo-chip.is-disabled {
	cursor: not-allowed;
}

.pvpo-chip.is-disabled > span {
	border-style: dashed;
	color: var(--pv-text-muted, #4A4F56);
	text-decoration: line-through;
}

.pvpo-swatch {
	border-radius: var(--pv-radius-pill, 999px);
	padding: 0 16px 0 8px;
}

.pvpo-swatch:not(:has(.pvpo-swatch__dot)) {
	padding-left: 16px;
}

.pvpo-swatch__dot {
	flex: none;
	width: 26px;
	height: 26px;
	border-radius: 50%;
	background: var(--pvpo-sw);
	box-shadow: inset 0 0 0 1px rgba(41, 45, 50, .25);
}

.pvpo-swatch:has(input:checked) {
	border-width: 2px;
	border-color: var(--pv-graphite, #292D32);
	padding-right: 15px;
}

.pvpo-swatch:has(input:checked)::after {
	content: "✓";
	font-weight: 600;
}

/* Checkboxes */
.pvpo-check {
	display: flex;
	align-items: flex-start;
	gap: 10px;
	min-height: 44px;
	padding-top: 10px;
	font-size: 14.5px;
	line-height: 1.45;
	cursor: pointer;
	flex-wrap: wrap;
}

.pvpo-check input {
	flex: none;
	margin-top: 1px;
}

.pvpo-check span {
	flex: 1;
}

.pvpo-check .pvpo-error {
	flex-basis: 100%;
}

/* Upload */
.pvpo-dropzone {
	display: flex;
	flex-direction: column;
	gap: 12px;
	padding: 16px;
	border: 1.5px dashed var(--pv-dropzone-border, #B9BDC3);
	border-radius: var(--pv-radius, 10px);
	background: var(--pv-dropzone-bg, #FAFAFB);
}

.pvpo-upload {
	position: relative;
	display: inline-flex;
	align-self: flex-start;
	align-items: center;
	min-height: 44px;
	padding: 0 18px;
	border-radius: var(--pv-radius, 10px);
	background: var(--pv-graphite, #292D32);
	color: #FFFFFF;
	font-size: 15px;
	font-weight: 500;
	cursor: pointer;
}

.pvpo-upload:has(input:focus-visible) {
	outline: 3px solid var(--pv-orange, #FF6B1A);
	outline-offset: 2px;
}

.pvpo-upload input {
	position: absolute;
	inset: 0;
	width: 100%;
	opacity: 0;
	cursor: pointer;
}

.pvpo-file {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	padding: 10px 12px;
	border: 1px solid var(--pv-border, #DCDEE2);
	border-radius: 8px;
	background: #FFFFFF;
	font-size: 14px;
}

.pvpo-file__name {
	min-width: 0;
	overflow-wrap: anywhere;
}

.pvpo-file__size {
	color: var(--pv-text-muted, #4A4F56);
}

.pvpo button.pvpo-linkbtn {
	flex: none;
	min-height: 44px;
	padding: 0 10px;
	border: 0;
	background: none;
	color: var(--pv-graphite, #292D32);
	font-size: 14px;
	text-decoration: underline;
	text-underline-offset: 4px;
	cursor: pointer;
}

/* Errors */
.pvpo-error {
	margin: 0;
	color: var(--pv-error, #B42318);
	font-size: 13.5px;
	font-weight: 500;
	line-height: 1.4;
}

.pvpo-valid {
	margin: 0;
	color: var(--pv-success, #1E6B3A);
	font-size: 13.5px;
	font-weight: 500;
}

.pvpo input[aria-invalid="true"],
.pvpo-form .qty[aria-invalid="true"] {
	border-color: var(--pv-error, #B42318);
}

.pvpo-errors {
	margin: 0 0 14px;
	padding: 12px 16px;
	border-radius: var(--pv-radius, 10px);
	background: var(--pv-error-bg, #FDECEA);
	color: var(--pv-error-on-bg, #8A1C12);
	font-size: 14px;
	font-weight: 500;
}

/* Quantity stepper */
.pvpo-form .quantity.pvpo-stepper {
	display: inline-flex;
	align-self: flex-start;
	align-items: stretch;
	gap: 6px;
	margin: 0 !important;
	flex-wrap: wrap;
}

.pvpo-form button.pvpo-step {
	width: 48px;
	min-height: 48px;
	padding: 0;
	border: 1.5px solid var(--pv-border-strong, #C3C7CD);
	border-radius: var(--pv-radius, 10px);
	background: #FFFFFF;
	color: var(--pv-graphite, #292D32);
	font-size: 20px;
	line-height: 1;
	cursor: pointer;
}

.pvpo-form button.pvpo-step:hover {
	border-color: var(--pv-graphite, #292D32);
	background: var(--pv-gray-light, #F2F3F5);
}

.pvpo-form .quantity .qty {
	width: 72px;
	min-height: 48px;
	text-align: center;
	-moz-appearance: textfield;
}

.pvpo-form .quantity .qty::-webkit-inner-spin-button,
.pvpo-form .quantity .qty::-webkit-outer-spin-button {
	-webkit-appearance: none;
	margin: 0;
}

.pvpo-quote {
	margin: 10px 0 24px;
	font-size: 14.5px;
}

.pvpo-quote a {
	display: inline-flex;
	align-items: center;
	min-height: 44px;
	color: var(--pv-graphite, #292D32);
	font-weight: 600;
	text-decoration: underline;
	text-underline-offset: 4px;
}

/* Summary */
.pvpo-summary {
	margin: 0 0 18px;
	padding: 22px;
	border-radius: var(--pv-radius-card, 16px);
	background: var(--pv-gray-light, #F2F3F5);
}

.pvpo-summary__title {
	margin: 0 0 12px;
	font-family: var(--pv-font-heading, "Montserrat", sans-serif);
	font-size: 18px;
	font-weight: 700;
	letter-spacing: 0;
}

.pvpo-summary dl {
	display: grid;
	grid-template-columns: minmax(110px, auto) 1fr;
	gap: 6px 16px;
	margin: 0;
	font-size: 14.5px;
}

.pvpo-summary dt {
	color: var(--pv-text-muted, #4A4F56);
	font-weight: 400;
}

.pvpo-summary dd {
	margin: 0;
	color: var(--pv-graphite, #292D32);
	font-weight: 500;
	overflow-wrap: anywhere;
}

.pvpo-summary__totals {
	margin: 14px 0 12px !important;
	padding-top: 14px;
	border-top: 1px solid var(--pv-border, #DCDEE2);
	font-variant-numeric: tabular-nums;
}

.pvpo-summary__totals dd {
	text-align: right;
}

.pvpo-summary__totals .pvpo-summary__subtotal {
	align-self: end;
	color: var(--pv-graphite, #292D32);
	font-size: 22px;
	font-weight: 600;
}

dt.pvpo-summary__subtotal {
	font-size: 15px !important;
}

.pvpo-form .single_add_to_cart_button {
	width: 100%;
	min-height: 56px;
	margin: 0 !important;
}

/* Cart "Edit options" link */
.pvpo-edit a {
	display: inline-flex;
	align-items: center;
	min-height: 44px;
	font-size: 14.5px;
	font-weight: 600;
	text-decoration: underline;
	text-underline-offset: 4px;
}

@media (prefers-reduced-motion: reduce) {
	.pvpo * {
		transition: none !important;
	}
}
