/**
 * WC Registration Fields — frontend layout.
 *
 * Deliberately minimal: fields render through woocommerce_form_field(), so
 * their look (boxed inputs, floating/placeholder labels, required marks)
 * comes from WooCommerce + the theme — Astra addon's "modern" input
 * treatment styles them exactly like the core Email/Password fields, and
 * nothing here may override label or input styling or that breaks again.
 * This file only covers what the theme doesn't know about: the half-width
 * option, multi-option groups, headings, and the admin profile fallback.
 */

.afreg_extra_fields {
	display: flex;
	flex-wrap: wrap;
	gap: 0 4%;
	width: 100%;
}

.afreg_extra_fields .form-row,
.afreg_extra_fields .afreg-field-heading {
	width: 100%;
}

.afreg_extra_fields .form-row.half_width {
	width: 48%;
}

.afreg_extra_fields .afreg-field-heading {
	margin: 0.5em 0;
}

/* Dropdowns sized exactly like text inputs. Astra addon's modern input CSS
   already gives selects the same padding as inputs (0.9em/0.8em empty,
   1.45em/0.8em/0.35em with floated label — identical totals); these guards
   neutralize the couple of pixels of native <select> rendering drift and
   any leftover fixed-height overrides so every field box comes out equal.
   (An ID + !important rule, like the old per-field #afreg_additional_NNN
   patches in site CSS, still outranks this — those must be deleted.) */
.afreg_extra_fields .form-row select {
	box-sizing: border-box;
	height: auto;
	max-height: none;
	min-height: 0;
	line-height: 1.625;
}

.afreg_extra_fields .wreg-description-field {
	font-size: 0.9em;
	opacity: 0.85;
}

/* Multi-option groups (multiselect substitute, checkbox lists). */
.afreg_extra_fields .wreg-choice {
	display: block;
	margin: 0.25em 0;
}

.afreg_extra_fields .wreg-choice .input-checkbox {
	margin-right: 0.4em;
	vertical-align: middle;
}

/* Admin user-profile screen (legacy markup — no WooCommerce/theme styling
   there, so give it basic structure). */
.wreg-profile-fields {
	max-width: 640px;
	display: block;
}

.wreg-profile-fields .form-row {
	margin-bottom: 1em;
}

.wreg-profile-fields .form-row label {
	display: block;
	margin-bottom: 0.35em;
	font-weight: 600;
}

.wreg-profile-fields .form-row .input-text,
.wreg-profile-fields .form-row .input-select,
.wreg-profile-fields .form-row textarea,
.wreg-profile-fields .form-row select {
	width: 100%;
	max-width: 25em;
	box-sizing: border-box;
}

.wreg-profile-fields .afreg_radio_option,
.wreg-profile-fields .afreg_checkbox_option {
	display: block;
	margin: 0.25em 0;
}

.wreg-profile-fields .afreg_field_message {
	display: block;
	margin-top: 0.35em;
	font-size: 0.875em;
	opacity: 0.75;
}

@media (max-width: 600px) {
	.afreg_extra_fields .form-row.half_width {
		width: 100%;
	}
}
