/* Aluleth Product Options – product page. Inherits the theme's fonts and colours. */
.alpo {
	--alpo-accent: var(--wp--preset--color--primary, var(--wp--preset--color--contrast, #1d4ed8));
	--alpo-border: color-mix(in srgb, currentColor 22%, transparent);
	--alpo-soft: color-mix(in srgb, currentColor 5%, transparent);
	--alpo-radius: 8px;
	margin: 0 0 1.25em;
	width: 100%;
	clear: both;
}
.alpo-fields {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 1em 1em;
}
.alpo-field {
	grid-column: 1 / -1;
	min-width: 0;
	margin: 0;
	padding: 0;
	border: 0;
}
.alpo-field--half { grid-column: auto / span 1; }
/* Two fields side by side: their boxes line up even when one label wraps. */
.alpo-field--half:not(fieldset) { display: flex; flex-direction: column; }
.alpo-field--half:not(fieldset) > .alpo-label { flex: 1 0 auto; }
@media (max-width: 480px) { .alpo-field--half { grid-column: 1 / -1; } }
.alpo-field[hidden] { display: none !important; }
.alpo-label {
	display: block;
	font-weight: 600;
	margin: 0 0 .4em;
	padding: 0;
	font-size: .95em;
	line-height: 1.35;
}
.alpo-req { color: #b42318; text-decoration: none; border: 0; }
.alpo-hint, .alpo-choice__price { font-weight: 400; opacity: .75; }
.alpo-desc { margin: -.15em 0 .5em; font-size: .85em; opacity: .75; }
.alpo-heading { margin: .4em 0 0; }
.alpo-text > :first-child { margin-top: 0; }
.alpo-text > :last-child { margin-bottom: 0; }
.alpo .alpo-input {
	display: block;
	width: 100%;
	max-width: 100%;
	box-sizing: border-box;
	min-height: 2.6em;
	padding: .5em .75em;
	border: 1px solid var(--alpo-border);
	border-radius: var(--alpo-radius);
	background: transparent;
	color: inherit;
	font: inherit;
}
.alpo textarea.alpo-input { min-height: 5.5em; resize: vertical; }
.alpo .alpo-input:focus { outline: 2px solid var(--alpo-accent); outline-offset: 1px; border-color: var(--alpo-accent); }

.alpo-choices { display: flex; flex-wrap: wrap; gap: .5em; }
.alpo-choices--radio, .alpo-choices--checkboxes { flex-direction: column; gap: .35em; }
.alpo-choice {
	display: inline-flex;
	align-items: center;
	gap: .5em;
	cursor: pointer;
	line-height: 1.3;
	margin: 0;
}
.alpo-choice__label { font-weight: 400; }
.alpo-choices--radio .alpo-choice__price, .alpo-choices--checkboxes .alpo-choice__price { margin-left: auto; padding-left: .5em; font-size: .9em; }

/* Buttons, colour and image swatches: the real input stays in the page for keyboards and screen readers. */
.alpo-choices--buttons .alpo-choice input,
.alpo-choices--color .alpo-choice input,
.alpo-choices--image .alpo-choice input {
	position: absolute;
	opacity: 0;
	width: 1px;
	height: 1px;
	margin: 0;
	pointer-events: none;
}
.alpo-choices--buttons .alpo-choice {
	padding: .5em .9em;
	border: 1px solid var(--alpo-border);
	border-radius: var(--alpo-radius);
	flex-direction: column;
	align-items: center;
	justify-content: center;
	text-align: center;
	gap: .1em;
	min-width: 4.5em;
	position: relative;
}
.alpo-choices--buttons .alpo-choice__price { font-size: .8em; }
.alpo-choices--color .alpo-choice,
.alpo-choices--image .alpo-choice {
	flex-direction: column;
	gap: .3em;
	text-align: center;
	font-size: .85em;
	position: relative;
	max-width: 6.5em;
}
.alpo-swatch {
	display: block;
	width: 2.4em;
	height: 2.4em;
	border-radius: 50%;
	box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .15);
	outline: 2px solid transparent;
	outline-offset: 2px;
}
.alpo-swatch-img {
	display: block;
	width: 4.5em;
	height: 4.5em;
	object-fit: cover;
	border-radius: var(--alpo-radius);
	outline: 2px solid transparent;
	outline-offset: 2px;
	box-shadow: inset 0 0 0 1px var(--alpo-border);
}
.alpo-swatch-img--empty { background: var(--alpo-soft); }
.alpo-choices--buttons .alpo-choice.is-checked { border-color: var(--alpo-accent); box-shadow: inset 0 0 0 1px var(--alpo-accent); background: var(--alpo-soft); }
.alpo-choice.is-checked .alpo-swatch,
.alpo-choice.is-checked .alpo-swatch-img { outline-color: var(--alpo-accent); }
.alpo-choice input:focus-visible + .alpo-swatch,
.alpo-choice input:focus-visible + .alpo-swatch-img,
.alpo-choices--buttons .alpo-choice:focus-within { outline: 2px solid var(--alpo-accent); outline-offset: 2px; }

.alpo-check { display: inline-flex; gap: .5em; align-items: flex-start; cursor: pointer; font-weight: 400; }
.alpo-check input { margin-top: .2em; }

.alpo-file { display: grid; gap: .35em; }
.alpo-file__input { max-width: 100%; }
.alpo-file.has-file .alpo-file__input { display: none; }
.alpo-file__status { display: flex; flex-wrap: wrap; gap: .6em; align-items: center; font-size: .9em; }
.alpo-file.is-busy .alpo-file__status { opacity: .7; }
.alpo-file__remove { background: none; border: 0; padding: 0; color: inherit; text-decoration: underline; cursor: pointer; font: inherit; }
.alpo-file__rules { margin: 0; font-size: .8em; opacity: .7; }

.alpo-error { margin: .35em 0 0; color: #b42318; font-size: .85em; }
.alpo-error[hidden] { display: none; }

.alpo-totals {
	margin-top: 1.1em;
	padding: .75em 1em;
	border: 1px solid var(--alpo-border);
	border-radius: var(--alpo-radius);
	background: var(--alpo-soft);
	font-variant-numeric: tabular-nums;
}
.alpo-totals[hidden] { display: none; }
.alpo-totals__row { display: flex; justify-content: space-between; gap: 1em; padding: .15em 0; }
.alpo-totals__row span { opacity: .8; }
.alpo-totals__row strong { font-weight: 600; white-space: nowrap; }
.alpo-totals__row span { min-width: 0; }
.alpo-totals__grand { margin-top: .3em; padding-top: .45em; border-top: 1px solid var(--alpo-border); }
.alpo-totals__grand span { opacity: 1; font-weight: 600; }

/* FluentCart: the fields sit above the buttons, across the full width. */
.alpo--fluentcart { flex: 0 0 100%; max-width: 100%; margin-top: .25em; }
.fct-product-buttons-wrap > .alpo--fluentcart { order: -1; }
.alpo-replace{margin:0 0 12px;padding:10px 12px;border-left:4px solid currentColor;background:rgba(127,127,127,.08)}
.alpo-line-meta__missing{color:#b32d2e}
