/* HyperSite Form Flow — scoped frontend styles (all tokens on .hff-flow) */

.hff-flow {
	--hff-accent: #111111;
	--hff-font-family: inherit;
	--hff-font-size: 16px;
	--hff-text: #333333;
	--hff-title-size: 24px;
	--hff-title-color: #333333;
	--hff-label-size: 15px;
	--hff-label-color: #111111;
	--hff-label-weight: 600;
	--hff-field-bg: #ffffff;
	--hff-field-text: #333333;
	--hff-field-border-color: #cccccc;
	--hff-field-border-width: 1px;
	--hff-field-radius: 8px;
	--hff-field-pad-x: 12px;
	--hff-field-pad-y: 10px;
	--hff-field-focus-border: var(--hff-accent);
	--hff-field-gap: 16px;
	--hff-panel-bg: #ffffff;
	--hff-panel-border-color: #e2e2e2;
	--hff-panel-border-width: 1px;
	--hff-panel-radius: 12px;
	--hff-panel-padding: 28px;
	--hff-panel-shadow: 0 4px 20px rgba(0, 0, 0, 0.04);
	--hff-button-bg: var(--hff-accent);
	--hff-button-text: #ffffff;
	--hff-button-radius: 8px;
	--hff-button-font-size: 16px;
	--hff-choice-bg: #fafafa;
	--hff-choice-border-color: #e2e2e2;
	--hff-choice-border-width: 2px;
	--hff-choice-radius: 10px;
	--hff-choice-hover-bg: #ffffff;
	--hff-choice-hover-border: var(--hff-accent);
	--hff-transition: 0.3s ease;

	width: 100%;
	max-width: 960px;
	margin: 0 auto;
	font-family: var(--hff-font-family);
	font-size: var(--hff-font-size);
	color: var(--hff-text);
	box-sizing: border-box;
}

.hff-flow,
.hff-flow *::before,
.hff-flow *::after,
.hff-flow * {
	transition: background 0.3s ease, background-color 0.3s ease, border-color 0.3s ease, color 0.3s ease, box-shadow 0.3s ease, opacity 0.3s ease, filter 0.3s ease, transform 0.3s ease, outline 0.3s ease, outline-color 0.3s ease;
}

.hff-flow__back,
.hff-flow__choice,
.hff-flow__submit,
.hff-flow__close,
.hff-flow__field input,
.hff-flow__field textarea,
.hff-flow__field select {
	transition: background 0.3s ease, background-color 0.3s ease, border-color 0.3s ease, color 0.3s ease, box-shadow 0.3s ease, opacity 0.3s ease, filter 0.3s ease, transform 0.3s ease, outline 0.3s ease, outline-color 0.3s ease;
}

.hff-flow *,
.hff-flow *::before,
.hff-flow *::after {
	box-sizing: border-box;
}

.hff-flow__breadcrumb {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 8px;
	margin-bottom: 16px;
	font-size: 0.875em;
	color: color-mix(in srgb, var(--hff-text) 70%, transparent);
}

.hff-flow__back {
	appearance: none;
	border: var(--hff-field-border-width) solid var(--hff-field-border-color);
	background: var(--hff-field-bg);
	color: var(--hff-field-text);
	border-radius: var(--hff-field-radius);
	padding: 6px 12px;
	cursor: pointer;
	font: inherit;
}

.hff-flow__back:hover {
	border-color: var(--hff-choice-hover-border);
}

.hff-flow__crumb {
	color: var(--hff-text);
}

.hff-flow__sep {
	color: color-mix(in srgb, var(--hff-text) 45%, transparent);
}

.hff-flow__stage {
	background: var(--hff-panel-bg);
	border: var(--hff-panel-border-width) solid var(--hff-panel-border-color);
	border-radius: var(--hff-panel-radius);
	padding: var(--hff-panel-padding) calc(var(--hff-panel-padding) - 4px);
	box-shadow: var(--hff-panel-shadow);
}

/* Landing / embedded form-only — parent section or Bricks shell owns panel chrome. */
.hff-flow--form-only,
.hff-flow--standalone {
	max-width: none;
	margin: 0;
}

.hff-flow--form-only .hff-flow__panel,
.hff-flow--standalone .hff-flow__panel {
	background: transparent;
	box-shadow: none;
	border: 0;
	padding: 0;
	max-width: none;
}

.hff-flow--form-only .hff-flow__stage,
.hff-flow--standalone .hff-flow__stage {
	background: transparent;
	border: 0;
	box-shadow: none;
	padding: 0;
	border-radius: 0;
}

/*
 * Bricks Style tab (css_selector) can paint border/background on .hff-flow.
 * Landing embeds must stay chromeless — parent section owns the shell.
 */
.brxe-hff-form-step > .hff-flow,
.hff-flow--standalone,
.hff-flow--form-only {
	border: 0 !important;
	outline: none !important;
	box-shadow: none !important;
	background: transparent !important;
}

.brxe-hff-form-step > .hff-flow .hff-flow__panel,
.brxe-hff-form-step > .hff-flow .hff-flow__stage,
.brxe-hff-form-step > .hff-flow .hff-flow__step--form,
.brxe-hff-form-step > .hff-flow form[data-hff-form],
.brxe-hff-form-step > .hff-flow .hff-flow__fields,
.hff-flow--standalone .hff-flow__panel,
.hff-flow--standalone .hff-flow__stage,
.hff-flow--standalone .hff-flow__step--form,
.hff-flow--standalone form[data-hff-form],
.hff-flow--standalone .hff-flow__fields,
.hff-flow--form-only .hff-flow__panel,
.hff-flow--form-only .hff-flow__stage,
.hff-flow--form-only .hff-flow__step--form,
.hff-flow--form-only form[data-hff-form],
.hff-flow--form-only .hff-flow__fields {
	border: 0 !important;
	outline: none !important;
	box-shadow: none !important;
	background: transparent !important;
}

.hff-flow__title {
	margin: 0 0 20px;
	font-size: var(--hff-title-size);
	line-height: 1.3;
	color: var(--hff-title-color);
	font-weight: 700;
}

.hff-flow__choices {
	display: grid;
	gap: 10px;
}

.hff-flow__choice {
	appearance: none;
	width: 100%;
	text-align: left;
	padding: 14px 16px;
	border: var(--hff-choice-border-width) solid var(--hff-choice-border-color);
	border-radius: var(--hff-choice-radius);
	background-color: var(--hff-choice-bg);
	color: var(--hff-text);
	font: inherit;
	font-size: 1em;
	cursor: pointer;
}

.hff-flow__choice:hover:not(:disabled) {
	border-color: var(--hff-choice-hover-border);
	background-color: var(--hff-choice-hover-bg);
}

.hff-flow__choice:disabled {
	opacity: 0.45;
	cursor: not-allowed;
}

.hff-flow__field {
	display: block;
	margin-bottom: 0;
	min-width: 0;
}

.hff-flow__form-layout {
	width: 100%;
}

.hff-flow__form-layout.hff-flow__width-sm {
	max-width: 640px;
	margin-inline: auto;
}

.hff-flow__form-layout.hff-flow__width-md {
	max-width: 800px;
	margin-inline: auto;
}

.hff-flow__form-layout.hff-flow__width-lg {
	max-width: 960px;
	margin-inline: auto;
}

.hff-flow__form-layout.hff-flow__width-full {
	max-width: none;
}

.hff-flow__gap-compact {
	--hff-field-gap: 10px;
}

.hff-flow__gap-normal {
	--hff-field-gap: 16px;
}

.hff-flow__gap-spacious {
	--hff-field-gap: 24px;
}

.hff-flow__fields {
	display: grid;
	grid-template-columns: repeat(12, minmax(0, 1fr));
	gap: var(--hff-field-gap, 16px);
	align-items: start;
}

.hff-flow__field--w-full,
.hff-flow__section-title.hff-flow__field--w-full {
	grid-column: span 12;
}

.hff-flow__field--w-half {
	grid-column: span 6;
}

.hff-flow__field--w-third {
	grid-column: span 4;
}

.hff-flow__field--w-quarter {
	grid-column: span 3;
}

.hff-flow__label {
	display: block;
	margin-bottom: 6px;
	font-weight: var(--hff-label-weight);
	font-size: var(--hff-label-size);
	color: var(--hff-label-color);
}

.hff-flow__required {
	color: #c00;
}

.hff-flow__field input,
.hff-flow__field textarea,
.hff-flow__field select {
	width: 100%;
	padding: var(--hff-field-pad-y) var(--hff-field-pad-x);
	border: var(--hff-field-border-width) solid var(--hff-field-border-color);
	border-radius: var(--hff-field-radius);
	font: inherit;
	font-size: var(--hff-font-size);
	color: var(--hff-field-text);
	background: var(--hff-field-bg);
}

.hff-flow__field input:focus,
.hff-flow__field textarea:focus,
.hff-flow__field select:focus {
	outline: none;
	border-color: var(--hff-field-focus-border);
	box-shadow: 0 0 0 2px color-mix(in srgb, var(--hff-field-focus-border) 20%, transparent);
}

.hff-flow__field select {
	cursor: pointer;
	background-image: linear-gradient(45deg, transparent 50%, #666 50%), linear-gradient(135deg, #666 50%, transparent 50%);
	background-position: calc(100% - 18px) calc(50% + 2px), calc(100% - 13px) calc(50% + 2px);
	background-size: 5px 5px, 5px 5px;
	background-repeat: no-repeat;
	padding-right: 2.2rem;
}

.hff-flow__field--date input,
.hff-flow__field--time input,
.hff-flow__field--datetime input {
	color-scheme: light;
}

.hff-flow__field--date input::-webkit-calendar-picker-indicator,
.hff-flow__field--time input::-webkit-calendar-picker-indicator,
.hff-flow__field--datetime input::-webkit-calendar-picker-indicator {
	cursor: pointer;
	opacity: 0.65;
}

.hff-flow__field textarea {
	min-height: 100px;
	resize: vertical;
}

.hff-flow__field--turnstile {
	margin-bottom: 0;
}

.hff-flow__turnstile-widget {
	min-height: 65px;
	background: transparent;
}

.hff-flow--form-only .hff-flow__turnstile-widget,
.hff-flow--standalone .hff-flow__turnstile-widget {
	min-height: 0;
}

.hff-theme-luxury .hff-flow__field--turnstile {
	width: 100%;
	max-width: 300px;
}

.hff-flow__submit {
	appearance: none;
	display: block;
	width: 100%;
	margin-top: calc(var(--hff-field-gap, 16px) + 4px);
	padding: 12px 24px;
	border: none;
	border-radius: var(--hff-button-radius);
	background: var(--hff-button-bg);
	color: var(--hff-button-text);
	font: inherit;
	font-size: var(--hff-button-font-size);
	cursor: pointer;
}

.hff-flow__submit:hover:not(:disabled) {
	filter: brightness(1.08);
}

.hff-flow__submit:disabled {
	opacity: 0.6;
	cursor: wait;
}

.hff-flow__status {
	margin-top: 12px;
	font-size: 0.95em;
}

.hff-flow__status--error {
	color: #b32d2e;
}

.hff-flow__step--success {
	text-align: center;
}

.hff-flow__section-title {
	margin: 0;
	padding-top: 8px;
	font-size: calc(var(--hff-font-size) * 1.1);
	color: var(--hff-title-color);
}

.hff-flow__section-title:not(:first-child) {
	margin-top: calc(var(--hff-field-gap, 16px) / 2);
	padding-top: calc(var(--hff-field-gap, 16px) + 4px);
	border-top: 1px solid color-mix(in srgb, var(--hff-panel-border-color) 80%, transparent);
}

.hff-flow__field--radio {
	border: 0;
	padding: 0;
}

.hff-flow__radio-option {
	display: flex;
	align-items: center;
	gap: 8px;
	margin-bottom: 8px;
	font-weight: normal;
	color: var(--hff-text);
}

.hff-flow__hint {
	margin: 6px 0 0;
	font-size: 0.85em;
	color: color-mix(in srgb, var(--hff-text) 65%, transparent);
}

.hff-flow__select-wrap {
	position: relative;
	width: 100%;
}

.hff-flow--placeholder {
	padding: 24px;
	border: 2px dashed var(--hff-field-border-color);
	border-radius: var(--hff-field-radius);
	color: color-mix(in srgb, var(--hff-text) 65%, transparent);
	text-align: center;
}

.hff-flow__sandbox form {
	margin-top: 12px;
}

.hff-flow__sandbox label {
	display: block;
	margin-bottom: 6px;
	font-weight: var(--hff-label-weight);
	color: var(--hff-label-color);
}

.hff-flow__sandbox input,
.hff-flow__sandbox textarea,
.hff-flow__sandbox select {
	width: 100%;
	padding: var(--hff-field-pad-y) var(--hff-field-pad-x);
	border: var(--hff-field-border-width) solid var(--hff-field-border-color);
	border-radius: var(--hff-field-radius);
	font: inherit;
	color: var(--hff-field-text);
	background: var(--hff-field-bg);
	margin-bottom: 12px;
}

.hff-flow__sandbox button,
.hff-flow__sandbox [type='submit'] {
	appearance: none;
	padding: 12px 24px;
	border: none;
	border-radius: var(--hff-button-radius);
	background: var(--hff-button-bg);
	color: var(--hff-button-text);
	font: inherit;
	cursor: pointer;
}

@media (max-width: 640px) {
	.hff-flow__fields .hff-flow__field--w-half,
	.hff-flow__fields .hff-flow__field--w-third,
	.hff-flow__fields .hff-flow__field--w-quarter {
		grid-column: span 12;
	}
}
