/**
 * [wix_form]: a Wix Forms form drawn from its schema. Field rows, inputs,
 * errors and status lines come from wix-apps.css (.wixhc-app-form,
 * .wixhc-app-field); this adds choices, steps, the required marker, the
 * submit button and the thank-you box. Colours come from the storefront
 * tokens (--wixhc-*, wixhc-tokens.css).
 *
 * @package Headless_Connect_For_Wix
 */

.wixhc-form .wixhc-app-form { max-width: var(--wixhc-form-width, 640px); }
.wixhc-form__text > :first-child { margin-top: 0; }
.wixhc-form__text > :last-child { margin-bottom: 0; }

.wixhc-form__step { border: 0; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 12px; }
.wixhc-form__step + .wixhc-form__step { border-top: 1px solid var(--wixhc-border); padding-top: var(--wixhc-space-4); }
.wixhc-form__step-title { font-weight: 700; font-size: 1.05em; padding: 0; margin-bottom: 4px; }

/* Radio, checkbox group and rating: a fieldset with a legend. */
fieldset.wixhc-form__field { border: 0; margin: 0; padding: 0; min-width: 0; }
fieldset.wixhc-form__field > legend { padding: 0; margin-bottom: 4px; }
.wixhc-form__choices { display: flex; flex-direction: column; gap: 6px; }
.wixhc-form__choices--two,
.wixhc-form__choices--three { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.wixhc-form__choices--three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.wixhc-form__choices--zero,
.wixhc-form__field--rating .wixhc-form__choices { flex-direction: row; flex-wrap: wrap; gap: 6px 16px; }
@media (max-width: 600px) {
	.wixhc-form__choices--two,
	.wixhc-form__choices--three { grid-template-columns: minmax(0, 1fr); }
}
.wixhc-form__choice { display: flex; align-items: flex-start; gap: 8px; cursor: pointer; line-height: 1.4; }
.wixhc-app-field .wixhc-form__choice input { width: 18px; height: 18px; margin: 0.2em 0 0; margin-top: calc((1lh - 18px) / 2); padding: 0; flex: 0 0 auto; accent-color: var(--wixhc-brand); }
.wixhc-form__choice a { color: inherit; text-decoration: underline; text-underline-offset: 0.15em; }

.wixhc-form__req { color: var(--wixhc-danger); font-weight: 400; }
.wixhc-form__req--text { color: var(--wixhc-muted); font-size: 0.875em; }

/* Field focus: the shared ring (wix-frontend.css). */

.wixhc-form__actions { display: flex; }
.wixhc-root .wixhc-form__submit {
	min-height: var(--wixhc-control-h);
	background: var(--wixhc-brand);
	border: 1px solid var(--wixhc-brand);
	color: var(--wixhc-on-brand);
	border-radius: var(--wixhc-radius-control);
	padding: 0 var(--wixhc-space-5);
	font: inherit;
	font-weight: 600;
	cursor: pointer;
}
.wixhc-root .wixhc-form__submit:hover { background: var(--wixhc-brand-hover); border-color: var(--wixhc-brand-hover); color: var(--wixhc-on-brand); }
.wixhc-root .wixhc-form__submit:disabled { opacity: 0.7; cursor: progress; }

.wixhc-form__success {
	padding: var(--wixhc-space-4) var(--wixhc-space-5);
	border: 1px solid var(--wixhc-success);
	border-radius: var(--wixhc-radius-l);
	background: var(--wixhc-success-soft);
	color: inherit;
}
.wixhc-form__success:focus { outline: none; }
.wixhc-form__success > :first-child { margin-top: 0; }
.wixhc-form__success > :last-child { margin-bottom: 0; }

.wixhc-form__list { margin: 6px 0 0; padding-left: 1.2em; }
.wixhc-form__list code { font-size: 0.9em; }

/* Off-screen pieces: the honeypot, and labels the form hides visually. */
.wixhc-form__trap { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.wixhc-form__sr {
	position: absolute !important;
	width: 1px;
	height: 1px;
	padding: 0;
	margin: -1px;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	white-space: nowrap;
	border: 0;
}
