/**
 * Holder fields on the product page.
 *
 * Deliberately restrained: the theme owns the look of the shop, so this only
 * groups the fieldsets and keeps them legible inside any add-to-cart form.
 */

.offida-tessera-fields {
	margin: 1.5em 0;
}

.offida-tessera-intro {
	margin: 0 0 1em;
}

.offida-tessera-item {
	margin: 0 0 1em;
	padding: 0.75em 1em 0.25em;
	border: 1px solid currentColor;
	border-radius: 4px;
	/* currentColor at full strength fights every theme; fade the frame instead. */
	border-color: rgba( 128, 128, 128, 0.35 );
}

.offida-tessera-legend {
	padding: 0 0.4em;
	font-weight: 600;
	font-size: 0.95em;
	text-transform: uppercase;
	letter-spacing: 0.04em;
}

.offida-tessera-row {
	margin: 0 0 0.75em;
}

.offida-tessera-row label {
	display: block;
	margin-bottom: 0.25em;
	font-weight: 600;
}

.offida-tessera-row input[type="text"] {
	box-sizing: border-box;
	width: 100%;
	max-width: 22em;
	padding: 0.5em 0.7em;
}

.offida-tessera-row input[type="text"][aria-invalid="true"] {
	outline: 2px solid #b32d2e;
	outline-offset: 1px;
}

.offida-tessera-item-actions {
	margin: 0 0 0.5em;
	text-align: right;
}

.offida-tessera-remove {
	padding: 0;
	border: 0;
	background: none;
	color: inherit;
	font-size: 0.85em;
	text-decoration: underline;
	cursor: pointer;
	opacity: 0.75;
}

.offida-tessera-remove:hover,
.offida-tessera-remove:focus {
	opacity: 1;
}

.offida-tessera-actions {
	display: flex;
	flex-wrap: wrap;
	gap: 0.75em;
	align-items: center;
	margin: 0 0 1em;
}

.offida-tessera-actions .offida-tessera-add[disabled] {
	opacity: 0.5;
	cursor: not-allowed;
}

.offida-tessera-limit {
	font-size: 0.9em;
	opacity: 0.8;
}

/* Themes that style every element block-level would otherwise show the controls
   the script is meant to reveal. */
.offida-tessera-fields [hidden] {
	display: none !important;
}

.offida-tessera-vat {
	margin: 0.5em 0 1em;
	font-size: 0.9em;
	opacity: 0.85;
}

/* Mirrors WordPress's own screen-reader-text, which front-end themes do not
   always ship. */
.offida-tessera-fields .screen-reader-text {
	position: absolute !important;
	width: 1px;
	height: 1px;
	margin: -1px;
	padding: 0;
	border: 0;
	overflow: hidden;
	clip: rect( 1px, 1px, 1px, 1px );
	clip-path: inset( 50% );
	white-space: nowrap;
}
