/**
 * Custom fields on the lamp product page (rendered by inc/woocommerce-product-fields.php).
 *
 * Brand rules: square corners, 2px rules, amber only as an accent on ink.
 * Written on the theme tokens (assets/css/tokens.css) — no Avada variables.
 */

.cp-product-fields {
	margin: var(--cp-space-md) 0;
	padding: var(--cp-space-md);
	background: var(--cp-sheet);
	border: 2px solid var(--cp-ink);
	border-radius: 0;
	font-family: var(--cp-font-body);
}

.cp-product-fields__title {
	margin: 0 0 var(--cp-space-2xs);
	color: var(--cp-ink);
	font-family: var(--cp-font-display);
	font-size: var(--cp-text-lg);
	font-weight: 400;
	letter-spacing: 0.01em;
	line-height: 1.1;
	text-transform: uppercase;
}

.cp-product-fields__title::after {
	display: block;
	width: 3rem;
	height: 4px;
	margin-top: var(--cp-space-2xs);
	background: var(--cp-amber);
	content: "";
}

.cp-product-fields__intro {
	margin: 0 0 var(--cp-space-md);
	color: var(--cp-graphite);
	font-size: var(--cp-text-sm);
	line-height: 1.55;
}

.cp-product-fields__intro strong {
	color: var(--cp-ink);
	font-weight: 700;
}

.cp-product-fields .cp-field {
	margin: 0 0 var(--cp-space-sm);
}

.cp-product-fields label {
	display: block;
	margin-bottom: var(--cp-space-2xs);
	color: var(--cp-ink);
	font-size: var(--cp-text-sm);
	font-weight: 600;
	letter-spacing: 0.01em;
}

/* The required asterisk keeps WooCommerce's own colour: `.woocommerce form
   .form-row .required` outranks anything this file can declare, and it already
   measures 7.75:1 on the sheet. */

.cp-product-fields input[type="text"],
.cp-product-fields input[type="file"] {
	box-sizing: border-box;
	width: 100%;
	padding: 0.75rem 0.875rem;
	background: var(--cp-page);
	border: 2px solid var(--cp-ink);
	border-radius: 0;
	color: var(--cp-ink);
	font-family: var(--cp-font-body);
	/* 15px here zoomed the page on iOS the moment the buyer tapped the field, on the form
	   that sells the flagship product — QA F-10. The floor is a token, see tokens.css. */
	font-size: var(--cp-control-font-min);
	line-height: 1.4;
	min-height: var(--cp-control-target-min);
	transition: background-color var(--cp-duration) var(--cp-ease);
}

.cp-product-fields input[type="text"]::placeholder {
	color: var(--cp-graphite);
	opacity: 1;
}

.cp-product-fields input[type="text"]:focus,
.cp-product-fields input[type="file"]:focus,
.cp-product-fields input[type="checkbox"]:focus-visible {
	background: var(--cp-sheet);
	border-color: var(--cp-ink);
	outline: 3px solid var(--cp-amber);
	outline-offset: 1px;
}

.cp-product-fields input[type="file"] {
	padding: 0.625rem 0.875rem;
}

.cp-product-fields input[type="file"]::file-selector-button {
	margin-right: var(--cp-space-xs);
	padding: 0.375rem 0.75rem;
	background: var(--cp-ink);
	border: 0;
	border-radius: 0;
	color: var(--cp-sheet);
	font-family: var(--cp-font-body);
	font-size: var(--cp-text-xs);
	font-weight: 600;
	letter-spacing: 0.02em;
	text-transform: uppercase;
	cursor: pointer;
}

.cp-product-fields small {
	display: block;
	margin-top: var(--cp-space-2xs);
	color: var(--cp-graphite);
	font-size: var(--cp-text-xs);
	line-height: 1.45;
}

.cp-product-fields .cp-field--checkbox {
	padding-top: var(--cp-space-xs);
	border-top: 1px solid var(--cp-line);
}

.cp-product-fields .cp-field--checkbox label {
	display: flex;
	gap: var(--cp-space-xs);
	align-items: flex-start;
	color: var(--cp-ink);
	font-size: var(--cp-text-sm);
	font-weight: 400;
	line-height: 1.5;
}

.cp-product-fields .cp-field--checkbox input {
	flex: 0 0 auto;
	width: 1.125rem;
	height: 1.125rem;
	margin: 0.1875rem 0 0;
	accent-color: var(--cp-ink);
}
