.rp-customization-fields {
	box-sizing: border-box;
	clear: both;
	margin: 1.25rem 0;
	padding: 1rem;
	border: 1px solid rgba( 0, 0, 0, 0.12 );
	border-radius: var( --wd-brd-radius, 4px );
	text-align: right;
}

.rp-customization-fields legend {
	padding: 0 0.5rem;
	font-weight: 700;
	font-size: 1.1em;
}

.rp-customization-intro {
	margin: 0 0 1rem;
	color: var( --color-gray-600, #666 );
}

.rp-customization-field {
	display: block;
	float: none;
	width: 100%;
	margin: 0 0 1rem;
}

.rp-customization-field label,
.rp-customization-field select,
.rp-customization-field textarea {
	display: block;
	width: 100%;
	text-align: right;
}

.rp-customization-field label {
	margin-bottom: 0.35rem;
	font-weight: 600;
}

.rp-field-label {
	display: block;
	margin-bottom: 0.5rem;
	font-weight: 600;
}

.rp-color-swatches {
	display: flex;
	flex-wrap: wrap;
	gap: 0.75rem;
}

.rp-color-option {
	display: inline-flex !important;
	align-items: center;
	gap: 0.4rem;
	width: auto !important;
	margin: 0;
	cursor: pointer;
}

.rp-color-option input {
	position: absolute;
	opacity: 0;
	pointer-events: none;
}

.rp-color-swatch {
	display: inline-block;
	box-sizing: border-box;
	width: 2rem;
	height: 2rem;
	border: 2px solid #c3c4c7;
	border-radius: 50%;
	background: var( --rp-swatch-color, #ccc );
	box-shadow: 0 0 0 2px transparent;
}

.rp-color-option.is-transparent .rp-color-swatch {
	background-color: #fff;
	background-image: linear-gradient( 45deg, #ddd 25%, transparent 25% ), linear-gradient( -45deg, #ddd 25%, transparent 25% ), linear-gradient( 45deg, transparent 75%, #ddd 75% ), linear-gradient( -45deg, transparent 75%, #ddd 75% );
	background-position: 0 0, 0 0.25rem, 0.25rem -0.25rem, -0.25rem 0;
	background-size: 0.5rem 0.5rem;
}

.rp-color-option input:checked + .rp-color-swatch {
	border-color: #2271b1;
	box-shadow: 0 0 0 2px #fff, 0 0 0 4px #2271b1;
}

.rp-color-option input:focus-visible + .rp-color-swatch {
	outline: 2px solid #2271b1;
	outline-offset: 3px;
}

.rp-color-name {
	font-size: 0.9em;
}

.rp-customization-confirmation {
	padding: 0.75rem;
	border-radius: 4px;
	background: #fff8e5;
}

.rp-customization-confirmation label {
	display: flex;
	align-items: flex-start;
	gap: 0.5rem;
	cursor: pointer;
}

.rp-customization-confirmation input {
	margin-top: 0.25rem;
}

.rp-customization-field textarea {
	min-height: 5.5rem;
	resize: vertical;
}

.rp-character-counter {
	display: block;
	margin-top: 0.35rem;
	font-size: 0.875em;
	color: var( --color-gray-600, #666 );
}

.rp-character-counter.is-near-limit {
	color: #b32d2e;
	font-weight: 600;
}

.rp-customization-fields .required {
	color: #b32d2e;
	text-decoration: none;
}

.rp-live-preview {
	margin: 1rem 0;
	padding: 0.85rem;
	border: 1px dashed #c3c4c7;
	border-radius: 4px;
	background: #f8f8f8;
}

.rp-live-preview p { margin: 0.4rem 0; }
