/**
 * Editor-independent Form Platform frontend styles.
 *
 * Functional selectors remain scoped to .wcsuite-form. Visual values are
 * exposed as CSS custom properties so themes and the later Elementor adapter
 * can style the same renderer without replacing its markup.
 */

.wcsuite-form {
	--wcsuite-form-gap: 20px;
	--wcsuite-form-field-gap: 8px;
	--wcsuite-form-control-height: 52px;
	--wcsuite-form-control-padding-x: 14px;
	--wcsuite-form-control-padding-y: 12px;
	--wcsuite-form-background: #fff;
	--wcsuite-form-control-background: #fff;
	--wcsuite-form-control-text: #1d2327;
	--wcsuite-form-control-border: #c3c4c7;
	--wcsuite-form-control-border-focus: var(--wcsuite-frontend-accent, #2271b1);
	--wcsuite-form-label-text: #1d2327;
	--wcsuite-form-help-text: #646970;
	--wcsuite-form-button-background: var(--wcsuite-frontend-accent, #2271b1);
	--wcsuite-form-button-text: #fff;
	--wcsuite-form-radius: 8px;
	--wcsuite-form-error: #d63638;

	background: var(--wcsuite-form-background);
	border: 1px solid #dcdcde;
	border-radius: 14px;
	max-width: 760px;
	padding: 24px;
	width: 100%;
}

.wcsuite-form__header {
	margin: 0 0 24px;
}

.wcsuite-form__title {
	color: inherit;
	margin: 0;
}

.wcsuite-form__intro {
	color: var(--wcsuite-form-help-text);
	line-height: 1.6;
	margin: 8px 0 22px;
}

.wcsuite-form__header .wcsuite-form__intro {
	margin-bottom: 0;
}

.wcsuite-form__intro > :first-child {
	margin-top: 0;
}

.wcsuite-form__intro > :last-child {
	margin-bottom: 0;
}

.wcsuite-form__preview-notice {
	align-items: flex-start;
	background: color-mix(in srgb, var(--wcsuite-frontend-accent, #2271b1) 7%, transparent);
	border: 1px dashed color-mix(in srgb, var(--wcsuite-frontend-accent, #2271b1) 35%, transparent);
	border-radius: var(--wcsuite-form-radius);
	display: grid;
	gap: 3px;
	margin: 0 0 20px;
	padding: 12px 14px;
}

.wcsuite-form__preview-notice span {
	color: var(--wcsuite-form-help-text);
	font-size: 0.9em;
	line-height: 1.5;
}

.wcsuite-form__form,
.wcsuite-form__fieldset {
	border: 0;
	margin: 0;
	min-width: 0;
	padding: 0;
}

.wcsuite-form__fields {
	display: grid;
	gap: var(--wcsuite-form-gap);
	grid-template-columns: repeat(2, minmax(0, 1fr));
}

.wcsuite-form__field {
	grid-column: 1 / -1;
}

.wcsuite-form__field[data-field-key="first_name"],
.wcsuite-form__field[data-field-key="last_name"] {
	grid-column: auto;
}

.wcsuite-form__field {
	display: grid;
	gap: var(--wcsuite-form-field-gap);
	min-width: 0;
}

.wcsuite-form__label,
.wcsuite-form__check-label,
.wcsuite-form__choice {
	color: var(--wcsuite-form-label-text);
}

.wcsuite-form__label {
	font-size: 14px;
	font-weight: 600;
	line-height: 1.4;
}

.wcsuite-form__required {
	color: var(--wcsuite-form-error);
	margin-left: 0.2em;
}

.wcsuite-form__control {
	appearance: none;
	background: var(--wcsuite-form-control-background);
	border: 1px solid var(--wcsuite-form-control-border);
	border-radius: var(--wcsuite-form-radius);
	color: var(--wcsuite-form-control-text);
	font: inherit;
	font-size: 16px;
	line-height: 1.4;
	max-width: 100%;
	min-height: var(--wcsuite-form-control-height);
	padding: var(--wcsuite-form-control-padding-y) var(--wcsuite-form-control-padding-x);
	transition: border-color 140ms ease, box-shadow 140ms ease, background-color 140ms ease;
	width: 100%;
}

/*
 * Keep Suite field backgrounds authoritative on themes that apply global
 * form-control backgrounds with higher specificity. The CSS custom property
 * remains the single source for both the default and Elementor styling.
 */
.wcsuite-form input.wcsuite-form__control,
.wcsuite-form textarea.wcsuite-form__control,
.wcsuite-form select.wcsuite-form__control {
	background-color: var(--wcsuite-form-control-background) !important;
}

textarea.wcsuite-form__control {
	min-height: 130px;
	resize: vertical;
}

select.wcsuite-form__control {
	background-image:
		linear-gradient(45deg, transparent 50%, currentColor 50%),
		linear-gradient(135deg, currentColor 50%, transparent 50%);
	background-position:
		calc(100% - 18px) calc(50% - 2px),
		calc(100% - 13px) calc(50% - 2px);
	background-repeat: no-repeat;
	background-size: 5px 5px, 5px 5px;
	padding-right: 38px;
}


.wcsuite-form__date-parts {
	display: grid;
	gap: 10px;
	grid-template-columns: minmax(0, 0.75fr) minmax(0, 1.35fr) minmax(0, 1fr);
	min-width: 0;
}

.wcsuite-form__date-parts .wcsuite-form__control {
	min-width: 0;
}

.wcsuite-form__control--upload {
	appearance: auto;
	padding-block: 9px;
}

.wcsuite-form__control::placeholder {
	color: color-mix(in srgb, currentColor 52%, transparent);
	opacity: 1;
}

.wcsuite-form__control:hover {
	border-color: color-mix(in srgb, var(--wcsuite-form-control-border-focus) 55%, var(--wcsuite-form-control-border));
}

.wcsuite-form__control:focus,
.wcsuite-form__control:focus-visible {
	border-color: var(--wcsuite-form-control-border-focus);
	box-shadow: 0 0 0 1px var(--wcsuite-form-control-border-focus);
	outline: 0;
}

.wcsuite-form__help {
	color: var(--wcsuite-form-help-text);
	font-size: 0.9em;
	line-height: 1.5;
	margin: 0;
}

.wcsuite-form__choice-group {
	border: 0;
	margin: 0;
	min-width: 0;
	padding: 0;
}

.wcsuite-form__choices {
	display: grid;
	gap: 10px;
	margin-top: 10px;
}

.wcsuite-form__choice,
.wcsuite-form__check-label {
	align-items: flex-start;
	cursor: pointer;
	display: flex;
	gap: 10px;
	line-height: 1.5;
}

.wcsuite-form__choice input,
.wcsuite-form__check-label input {
	accent-color: var(--wcsuite-form-control-border-focus);
	flex: 0 0 auto;
	margin: 0.22em 0 0;
}

.wcsuite-form__choice input:focus-visible,
.wcsuite-form__check-label input:focus-visible {
	outline: 2px solid var(--wcsuite-form-control-border-focus);
	outline-offset: 3px;
}

.wcsuite-form__actions {
	margin-top: 24px;
}

.wcsuite-form__submit {
	align-items: center;
	background: var(--wcsuite-form-button-background);
	border: 1px solid var(--wcsuite-form-button-background);
	border-radius: var(--wcsuite-form-radius);
	color: var(--wcsuite-form-button-text);
	cursor: pointer;
	display: inline-flex;
	font: inherit;
	font-weight: 650;
	justify-content: center;
	line-height: 1.2;
	min-height: 44px;
	padding: 11px 20px;
	text-decoration: none;
	transition: filter 140ms ease, transform 140ms ease;
}

.wcsuite-form__submit:hover,
.wcsuite-form__submit:focus {
	color: var(--wcsuite-form-button-text);
	filter: brightness(0.92);
}

.wcsuite-form__submit:focus-visible {
	outline: 2px solid var(--wcsuite-form-button-background);
	outline-offset: 3px;
}

.wcsuite-form__submit:disabled,
.wcsuite-form__fieldset:disabled .wcsuite-form__submit {
	cursor: not-allowed;
	filter: grayscale(0.25);
	opacity: 0.55;
}

.wcsuite-form__fieldset:disabled .wcsuite-form__control,
.wcsuite-form__fieldset:disabled .wcsuite-form__choice,
.wcsuite-form__fieldset:disabled .wcsuite-form__check-label {
	cursor: not-allowed;
	opacity: 0.72;
}

.wcsuite-form__honeypot {
	clip: rect(0 0 0 0);
	clip-path: inset(50%);
	height: 1px;
	overflow: hidden;
	position: absolute;
	white-space: nowrap;
	width: 1px;
}

@media (max-width: 640px) {
	.wcsuite-form {
		--wcsuite-form-gap: 18px;
		--wcsuite-form-control-height: 50px;
		padding: 18px;
	}

	.wcsuite-form__fields {
		grid-template-columns: minmax(0, 1fr);
	}

	.wcsuite-form__field[data-field-key="first_name"],
	.wcsuite-form__field[data-field-key="last_name"] {
		grid-column: 1 / -1;
	}

	.wcsuite-form__submit {
		width: 100%;
	}
}

@media (prefers-reduced-motion: reduce) {
	.wcsuite-form__control,
	.wcsuite-form__submit {
		transition: none;
	}
}

.wcsuite-form__error {
	color: var(--wcsuite-form-error);
	font-size: 13px;
	font-weight: 400;
	line-height: 1.4;
	margin: 0;
}

.wcsuite-form__field--error .wcsuite-form__control {
	border-color: var(--wcsuite-form-error);
	box-shadow: 0 0 0 1px var(--wcsuite-form-error);
}

.wcsuite-form__field--error .wcsuite-form__control:focus,
.wcsuite-form__field--error .wcsuite-form__control:focus-visible {
	border-color: var(--wcsuite-form-error);
	box-shadow: 0 0 0 1px var(--wcsuite-form-error);
}

/* Additive upload picker. The native input remains visible until JavaScript
 * confirms DataTransfer support, so the field keeps a functional fallback. */
.wcsuite-form__upload {
	display: grid;
	gap: 10px;
}

.wcsuite-form__upload.is-enhanced .wcsuite-form__control--upload {
	clip: rect(0 0 0 0);
	clip-path: inset(50%);
	height: 1px;
	overflow: hidden;
	position: absolute;
	white-space: nowrap;
	width: 1px;
}

.wcsuite-form__upload-actions {
	align-items: center;
	display: flex;
	flex-wrap: wrap;
	gap: 10px 14px;
}

.wcsuite-form__upload-add {
	align-items: center;
	background: var(--wcsuite-form-control-background);
	border: 1px solid var(--wcsuite-form-control-border);
	border-radius: var(--wcsuite-form-radius);
	color: var(--wcsuite-form-control-text);
	cursor: pointer;
	display: inline-flex;
	font: inherit;
	font-weight: 600;
	justify-content: center;
	min-height: 42px;
	padding: 9px 14px;
}

.wcsuite-form__upload-add:hover,
.wcsuite-form__upload-add:focus-visible {
	border-color: var(--wcsuite-form-control-border-focus);
	box-shadow: 0 0 0 1px var(--wcsuite-form-control-border-focus);
	outline: 0;
}

.wcsuite-form__upload-add:disabled {
	cursor: not-allowed;
	opacity: 0.55;
}

.wcsuite-form__upload-counter {
	color: var(--wcsuite-form-help-text);
	font-size: 0.9em;
	line-height: 1.4;
}

.wcsuite-form__upload-list {
	display: grid;
	gap: 8px;
	list-style: none;
	margin: 0;
	padding: 0;
}

.wcsuite-form__upload-list:empty {
	display: none;
}

.wcsuite-form__upload-item {
	align-items: center;
	background: color-mix(in srgb, var(--wcsuite-form-control-background) 94%, var(--wcsuite-form-control-border));
	border: 1px solid var(--wcsuite-form-control-border);
	border-radius: var(--wcsuite-form-radius);
	display: grid;
	gap: 10px;
	grid-template-columns: minmax(0, 1fr) auto;
	padding: 10px 12px;
}

.wcsuite-form__upload-file {
	min-width: 0;
}

.wcsuite-form__upload-name {
	display: block;
	font-weight: 600;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.wcsuite-form__upload-size {
	color: var(--wcsuite-form-help-text);
	display: block;
	font-size: 0.85em;
	margin-top: 2px;
}

.wcsuite-form__upload-remove {
	background: transparent;
	border: 0;
	color: var(--wcsuite-form-error);
	cursor: pointer;
	font: inherit;
	font-size: 0.9em;
	font-weight: 600;
	padding: 6px;
}

.wcsuite-form__upload-remove:hover,
.wcsuite-form__upload-remove:focus-visible {
	text-decoration: underline;
}

.wcsuite-form__upload-remove:focus-visible {
	outline: 2px solid currentColor;
	outline-offset: 2px;
}

.wcsuite-form__field--error .wcsuite-form__upload-add {
	border-color: var(--wcsuite-form-error);
	box-shadow: 0 0 0 1px var(--wcsuite-form-error);
}


/* Touch-up conditionele meldingen sluiten aan op de standaard formulierkaart. */
.wcsuite-form__touchup-note {
	background: #f6f7f7;
	border: 1px solid var(--wcsuite-form-control-border);
	border-radius: var(--wcsuite-form-radius);
	box-sizing: border-box;
	font-size: 0.94em;
	grid-column: 1 / -1;
	line-height: 1.55;
	margin: 10px 0 4px;
	min-width: 0;
	overflow-wrap: anywhere;
	padding: 12px 14px;
	white-space: normal;
	width: 100%;
}

.wcsuite-form__touchup-note[hidden],
.wcsuite-form__field[data-field-key="touchup_age"][hidden] {
	display: none !important;
}
