.wpo-fields {
	--wpo-border: #d9d9d9;
	--wpo-border-strong: #9a9a9a;
	--wpo-accent: #222;
	--wpo-bg: #fafafa;
	--wpo-radius: 5px;
	width: 100%;
	margin: 0 0 1.5em;
	clear: both;
}
.wpo-field { margin-bottom: 1.2em; }
.wpo-field.wpo-hidden { display: none; }
.wpo-label { display: block; font-weight: 600; margin-bottom: .45em; font-size: .95em; }
.wpo-req { color: #c62828; text-decoration: none; border: 0; }
.wpo-hint { font-weight: 400; opacity: .7; font-size: .92em; }
.wpo-desc { font-size: .85em; opacity: .75; margin-top: .35em; }
.wpo-error { color: #c62828; font-size: .85em; margin-top: .35em; }

.wpo-input {
	width: 100%;
	box-sizing: border-box;
	padding: .65em .8em;
	border: 1px solid var(--wpo-border);
	border-radius: var(--wpo-radius);
	background: #fff;
	font: inherit;
	line-height: 1.4;
	transition: border-color .15s, box-shadow .15s;
}
.wpo-input:focus { outline: none; border-color: var(--wpo-border-strong); box-shadow: 0 0 0 3px rgba(0,0,0,.06); }
select.wpo-input { appearance: auto; }

/* Radio / checkbox lists */
.wpo-choices { display: flex; flex-direction: column; gap: .45em; }
.wpo-choice { display: flex; align-items: center; gap: .5em; cursor: pointer; font-weight: 400; margin: 0; }
.wpo-choice input { margin: 0; width: 1.05em; height: 1.05em; accent-color: var(--wpo-accent); }

/* Swatches */
.wpo-swatches { display: flex; flex-wrap: wrap; gap: .6em; }
.wpo-swatch { position: relative; cursor: pointer; margin: 0; }
.wpo-swatch input { position: absolute; opacity: 0; pointer-events: none; }
.wpo-swatch-color {
	display: block; width: 34px; height: 34px; border-radius: 50%;
	box-shadow: inset 0 0 0 1px rgba(0,0,0,.15);
	outline: 2px solid transparent; outline-offset: 2px; transition: outline-color .15s;
}
.wpo-swatch:hover .wpo-swatch-color { outline-color: var(--wpo-border); }
.wpo-swatch input:checked + .wpo-swatch-color { outline-color: var(--wpo-accent); }
.wpo-swatch input:focus-visible + .wpo-swatch-color { outline-color: var(--wpo-border-strong); }
.wpo-swatch-selected { font-size: .85em; margin-top: .4em; opacity: .75; min-height: 1.2em; }

.wpo-swatches-image .wpo-swatch {
	display: flex; flex-direction: column; align-items: center; width: 92px;
	border: 2px solid var(--wpo-border); border-radius: var(--wpo-radius); padding: 4px; background: #fff;
	transition: border-color .15s;
}
.wpo-swatches-image .wpo-swatch:hover { border-color: var(--wpo-border-strong); }
.wpo-swatches-image .wpo-swatch:has(input:checked) { border-color: var(--wpo-accent); }
.wpo-swatches-image img, .wpo-swatch-noimg { width: 80px; height: 80px; object-fit: cover; border-radius: 3px; display: block; background: #eee; }
.wpo-swatch-label { font-size: .8em; text-align: center; margin-top: 4px; line-height: 1.25; }

/* Upload */
.wpo-dropzone {
	position: relative; border: 2px dashed var(--wpo-border); border-radius: var(--wpo-radius);
	background: var(--wpo-bg); padding: 1.2em 1em; text-align: center; cursor: pointer;
	transition: border-color .15s, background .15s;
}
.wpo-dropzone:hover, .wpo-dropzone:focus, .wpo-dropzone.is-over { border-color: var(--wpo-border-strong); background: #f3f3f3; outline: none; }
.wpo-dz-msg { display: flex; flex-direction: column; align-items: center; gap: .3em; opacity: .75; font-size: .92em; }
.wpo-dropzone.has-files .wpo-dz-msg { flex-direction: row; justify-content: center; font-size: .85em; margin-top: .7em; }
.wpo-dropzone.has-files .wpo-dz-msg svg { width: 20px; height: 20px; }
.wpo-dropzone.is-full { cursor: default; }
.wpo-dropzone.is-full .wpo-dz-msg { display: none; }
.wpo-files { display: flex; flex-direction: column; gap: .5em; }
.wpo-dropzone.has-files { display: flex; flex-direction: column; padding: .7em; }
.wpo-dropzone.has-files .wpo-files { order: -1; }
.wpo-file-item {
	position: relative; display: flex; align-items: center; gap: .75em; text-align: left;
	background: #fff; border: 1px solid var(--wpo-border); border-radius: var(--wpo-radius); padding: .4em; overflow: hidden;
}
.wpo-thumb { width: 52px; height: 52px; flex: 0 0 52px; border-radius: 3px; overflow: hidden; background: #eee; display: flex; align-items: center; justify-content: center; font-size: .75em; font-weight: 700; }
.wpo-thumb img { width: 100%; height: 100%; object-fit: cover; }
.wpo-thumb.is-doc { background: #e53935; color: #fff; }
.wpo-fname { flex: 1; font-size: .88em; word-break: break-all; }
.wpo-remove { border: 0; background: transparent; cursor: pointer; font-size: 1.4em; line-height: 1; padding: 0 .3em; opacity: .55; color: inherit; }
.wpo-remove:hover { opacity: 1; }
.wpo-bar { position: absolute; left: 0; right: 0; bottom: 0; height: 3px; background: rgba(0,0,0,.05); display: none; }
.wpo-file-item.is-loading .wpo-bar { display: block; }
.wpo-bar i { display: block; height: 100%; width: 0; background: #43a047; transition: width .2s; }

/* Price summary */
.wpo-summary { border-top: 1px solid var(--wpo-border); margin-top: .5em; padding-top: .7em; font-size: .95em; }
.wpo-summary[hidden] { display: none; }
.wpo-sum-row { display: flex; justify-content: space-between; padding: .15em 0; }
.wpo-sum-total { font-weight: 700; font-size: 1.05em; }
