.chargeforms-form {
	/* Matches assets/css/admin.css's --fc-primary-500/600/50 exactly — the
	   front end never got the blue-to-violet design-token migration the
	   admin UI did (found live: the Preview & Design screen's rendered
	   Submit button was still the old blue, a real bug affecting every
	   front-end form on every site running this plugin, not just an
	   internal admin screen). */
	--fc-accent: #6c4ef5;
	--fc-accent-dark: #5638d8;
	--fc-accent-soft: #f2effe;
	--fc-border: #dadbdd;
	max-width: 560px;
	display: flex;
	flex-direction: column;
	gap: 16px;
}

.chargeforms-elementor-title {
	margin: 0 0 8px;
	font-size: 24px;
	font-weight: 700;
}

.chargeforms-elementor-description {
	margin: 0 0 16px;
	font-size: 14px;
}

.chargeforms-field {
	display: flex;
	flex-direction: column;
	gap: 6px;
}

.chargeforms-field label {
	font-weight: 600;
	font-size: 14px;
}

/* Milestone 5 — real front-end rendering for the container types the
   builder has supported since Milestone 2 (Section/Row/Column/Container).
   `.chargeforms-form`'s own `display:flex; flex-direction:column; gap`
   already spaces top-level fields; containers reproduce the same rhythm
   one level down instead of inheriting it implicitly, since a nested
   .chargeforms-row's columns need horizontal flex, not vertical. */
.chargeforms-container {
	display: flex;
	flex-direction: column;
	gap: 16px;
}
.chargeforms-container-title {
	margin: 0;
	font-size: 17px;
}
.chargeforms-row {
	display: flex;
	flex-wrap: wrap;
	gap: 16px;
}
.chargeforms-column {
	display: flex;
	flex-direction: column;
	gap: 16px;
	min-width: 0;
	/* Width is the inline --fc-col custom property the builder writes per
	   column (see Shortcode::column_width_style()); 50% covers a column
	   saved before per-device widths existed. Layerable, unlike an inline
	   flex-basis, which no media query below could outrank. */
	flex-basis: var(--fc-col, 50%);
	max-width: var(--fc-col, 50%);
}
/* Tablet: an explicit tablet width wins; otherwise the desktop width is
   inherited rather than collapsing a two-column form at 900px. */
@media (max-width: 1024px) {
	.chargeforms-column {
		flex-basis: var(--fc-col-tablet, var(--fc-col, 50%));
		max-width: var(--fc-col-tablet, var(--fc-col, 50%));
	}
}
/* Mobile: a column with no explicit mobile width stacks full-width, while
   one the author deliberately sized (e.g. 50% for a paired first/last
   name) keeps it. .chargeforms-row already wraps, so the stack needs no
   direction switch - flex-basis keeps meaning width here. */
@media (max-width: 600px) {
	.chargeforms-column {
		flex-basis: var(--fc-col-mobile, 100%);
		max-width: var(--fc-col-mobile, 100%);
	}
}

/* Milestone 5B — Toggle field. A real checkbox under the hood (keyboard
   space-to-toggle, screen readers announce it as a checkbox), CSS-only
   switch skin on top — same "native control, styled" approach the
   builder-side preview (fc-preview-toggle) already uses. */
.chargeforms-toggle-field {
	display: inline-flex;
	align-items: center;
	cursor: pointer;
}
.chargeforms-toggle-field input {
	position: absolute;
	opacity: 0;
	width: 1px;
	height: 1px;
}
.chargeforms-toggle-track {
	display: inline-block;
	width: 40px;
	height: 22px;
	border-radius: 999px;
	background: var(--fc-border);
	position: relative;
	transition: background 0.15s ease;
}
.chargeforms-toggle-field input:checked + .chargeforms-toggle-track {
	background: var(--fc-accent);
}
.chargeforms-toggle-field input:focus-visible + .chargeforms-toggle-track {
	outline: 2px solid var(--fc-accent);
	outline-offset: 2px;
}
.chargeforms-toggle-thumb {
	position: absolute;
	top: 2px;
	left: 2px;
	width: 18px;
	height: 18px;
	border-radius: 50%;
	background: #fff;
	box-shadow: 0 1px 3px rgba(0, 0, 0, 0.25);
	transition: left 0.15s ease;
}
.chargeforms-toggle-field input:checked + .chargeforms-toggle-track .chargeforms-toggle-thumb {
	left: 20px;
}

/* Milestone 5B — Image Choice field. Each option is a real
   radio/checkbox (native keyboard + screen-reader semantics) with the
   image/label as its visible content; the native input is visually
   hidden and the whole tile re-styled on :checked, same technique as the
   toggle switch above. */
.chargeforms-image-choice {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
	gap: 10px;
}
.chargeforms-image-choice-option {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 6px;
	padding: 10px;
	border: 2px solid var(--fc-border);
	border-radius: 8px;
	cursor: pointer;
	text-align: center;
	font-size: 13px;
	transition: border-color 0.15s ease;
}
.chargeforms-image-choice-option input {
	position: absolute;
	opacity: 0;
	width: 1px;
	height: 1px;
}
.chargeforms-image-choice-option:has(input:checked) {
	border-color: var(--fc-accent);
}
.chargeforms-image-choice-option:has(input:focus-visible) {
	outline: 2px solid var(--fc-accent);
	outline-offset: 2px;
}
.chargeforms-image-choice-thumb {
	display: block;
	width: 100%;
	height: 80px;
	border-radius: 4px;
	overflow: hidden;
	background: #f2f3f5;
}
.chargeforms-image-choice-thumb img {
	width: 100%;
	height: 100%;
	object-fit: cover;
}

/* Milestone 5C — Commerce & Calculation fields. */
.chargeforms-commerce-line {
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 10px 14px;
	background: #f7f8fa;
	border: 1px solid var(--fc-border);
	border-radius: 6px;
	font-size: 14px;
}
.chargeforms-commerce-computed {
	background: transparent;
	border-style: dashed;
	color: var(--fc-muted, #606266);
}
.chargeforms-commerce-total {
	background: var(--fc-accent-soft, #f2effe);
	border-color: var(--fc-accent);
	font-weight: 700;
	font-size: 16px;
}
.chargeforms-formula-field code {
	font-size: 12px;
	background: #eef0f2;
	padding: 3px 6px;
	border-radius: 4px;
}

.chargeforms-quiz-score {
	display: flex;
	align-items: baseline;
	gap: 8px;
	padding: 14px 16px;
	border: 1px solid #e1d8fd;
	border-radius: 8px;
	background: #faf9ff;
	color: #1e1f21;
}
.chargeforms-quiz-score strong {
	color: #5a3ee0;
	font-size: 1.25em;
}
.chargeforms-quiz-score em {
	color: #606266;
	font-style: normal;
}

.chargeforms-ranking {
	margin: 0;
	padding: 0;
	list-style: none;
}
.chargeforms-ranking li {
	display: flex;
	align-items: center;
	gap: 8px;
	margin: 0 0 8px;
	padding: 10px 12px;
	border: 1px solid #dadbdd;
	border-radius: 7px;
	background: #fff;
	cursor: grab;
}
.chargeforms-ranking li.is-dragging { opacity: .55; }
.chargeforms-ranking-label { flex: 1; }
.chargeforms-ranking button { min-width: 28px; padding: 3px 6px; }
.chargeforms-coupon-field {
	display: flex;
	flex-direction: column;
	gap: 4px;
}
.chargeforms-coupon-note {
	font-size: 11px;
	color: var(--fc-muted, #909399);
	font-style: italic;
}
.chargeforms-shipping-options {
	display: flex;
	flex-direction: column;
	gap: 8px;
}
.chargeforms-shipping-option {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 10px;
	padding: 10px 14px;
	border: 1px solid var(--fc-border);
	border-radius: 6px;
	cursor: pointer;
}
.chargeforms-shipping-option:has(input:checked) {
	border-color: var(--fc-accent);
	background: var(--fc-accent-soft, #f2effe);
}
.chargeforms-shipping-option input {
	margin-right: 8px;
}

/* Milestone 5D — Tabs. Inactive panes are hidden via .is-active
   (assets/js/frontend.js's initTabs()) — same "requires JS, consistent
   with the existing multi-step Page Break behavior" tradeoff already
   made elsewhere in this file, not a new inconsistency. */
.chargeforms-tabs-strip {
	display: flex;
	gap: 4px;
	border-bottom: 2px solid var(--fc-border);
	margin-bottom: 16px;
}
.chargeforms-tab-btn {
	padding: 10px 16px;
	border: none;
	background: none;
	cursor: pointer;
	font-size: 14px;
	font-weight: 600;
	color: var(--fc-muted, #606266);
	border-bottom: 2px solid transparent;
	margin-bottom: -2px;
}
.chargeforms-tab-btn.is-active {
	color: var(--fc-accent);
	border-bottom-color: var(--fc-accent);
}
.chargeforms-tab-panel {
	display: none;
	flex-direction: column;
	gap: 16px;
}
.chargeforms-tab-panel.is-active {
	display: flex;
}

/* Milestone 5D — Accordion. Native <details>/<summary>, no JS needed. */
.chargeforms-accordion {
	display: flex;
	flex-direction: column;
	gap: 8px;
}
.chargeforms-accordion-panel {
	border: 1px solid var(--fc-border);
	border-radius: 6px;
	overflow: hidden;
}
.chargeforms-accordion-panel summary {
	padding: 12px 16px;
	cursor: pointer;
	font-weight: 600;
	background: #f7f8fa;
	list-style: none;
}
.chargeforms-accordion-panel summary::-webkit-details-marker {
	display: none;
}
.chargeforms-accordion-panel summary::before {
	content: '+';
	display: inline-block;
	width: 16px;
	font-weight: 700;
	color: var(--fc-accent);
}
.chargeforms-accordion-panel[open] summary::before {
	content: '−';
}
.chargeforms-accordion-panel-body {
	display: flex;
	flex-direction: column;
	gap: 16px;
	padding: 16px;
}

/* Milestone 5D — Repeater. */
.chargeforms-repeater-rows {
	display: flex;
	flex-direction: column;
	gap: 12px;
}
.chargeforms-repeater-row {
	display: flex;
	flex-direction: column;
	gap: 16px;
	padding: 16px;
	border: 1px dashed var(--fc-border);
	border-radius: 6px;
	position: relative;
}
.chargeforms-repeater-remove {
	align-self: flex-end;
	border: none;
	background: none;
	color: var(--fc-danger, #e5484d);
	font-size: 12px;
	cursor: pointer;
	text-decoration: underline;
}
.chargeforms-repeater-add {
	margin-top: 10px;
	padding: 8px 16px;
	border: 1px dashed var(--fc-accent);
	background: none;
	color: var(--fc-accent);
	border-radius: 6px;
	cursor: pointer;
	font-weight: 600;
}
.chargeforms-repeater-template {
	display: none;
}

/* Label placement (Global Settings > Layout) */
.chargeforms-label-left .chargeforms-field {
	flex-direction: row;
	align-items: baseline;
	gap: 12px;
}
.chargeforms-label-left .chargeforms-field label {
	width: 160px;
	flex-shrink: 0;
	text-align: right;
}
.chargeforms-label-left .chargeforms-field > input,
.chargeforms-label-left .chargeforms-field > select,
.chargeforms-label-left .chargeforms-field > textarea {
	flex: 1;
}

/* Per-field label placement override (Field Settings > Label Placement) — takes precedence over the form-wide Global Setting above. */
.chargeforms-field-label-left {
	flex-direction: row;
	align-items: baseline;
	gap: 12px;
}
.chargeforms-field-label-left label {
	width: 160px;
	flex-shrink: 0;
	text-align: right;
}
.chargeforms-field-label-right {
	flex-direction: row-reverse;
	align-items: baseline;
	gap: 12px;
	justify-content: flex-end;
}
.chargeforms-field-label-right label {
	width: 160px;
	flex-shrink: 0;
}
.chargeforms-field-label-top {
	flex-direction: column;
}

/* Field-level tooltip (Developer setting "Tooltip") — distinct from the
   help-message placement below it. aria-label carries the text to screen
   readers regardless of hover/focus state; this is only the visible glyph. */
.chargeforms-field-tooltip {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 15px;
	height: 15px;
	margin-left: 4px;
	border-radius: 50%;
	background: #dcdfe6;
	color: #606266;
	font-size: 10px;
	font-weight: 700;
	line-height: 1;
	cursor: help;
	vertical-align: middle;
}
.chargeforms-field-tooltip:focus-visible {
	outline: 2px solid #6c4ef5;
	outline-offset: 1px;
}

/* Help message placement */
.chargeforms-help-tooltip .chargeforms-field-help {
	display: inline-block;
	margin-left: 4px;
	cursor: help;
}
.chargeforms-help-below .chargeforms-field-help {
	display: block;
	font-size: 12px;
	color: #909399;
	margin-top: 2px;
}

/* Error message placement */
.chargeforms-error-above .chargeforms-field-error {
	order: -1;
}
.chargeforms-field-error {
	color: #e5484d;
	font-size: 12px;
}

.chargeforms-field.is-invalid input,
.chargeforms-field.is-invalid select,
.chargeforms-field.is-invalid textarea {
	border-color: #e5484d;
	box-shadow: 0 0 0 3px rgba( 229, 72, 77, 0.12 );
}

/* Error-summary banner — rendered by initValidation() in
   frontend-entry.js above the form when submit (or a multi-step "Next")
   fails validation; the form is rendered with novalidate specifically so
   this custom, styled treatment replaces the browser's own popups. */
.chargeforms-error-summary {
	display: flex;
	gap: 10px;
	align-items: flex-start;
	padding: 14px 16px;
	margin-bottom: 16px;
	border: 1px solid #f3b4b6;
	border-radius: 8px;
	background: #fdecec;
	color: #b3221f;
}
.chargeforms-error-summary-icon {
	flex-shrink: 0;
	line-height: 1.3;
	font-size: 15px;
}
.chargeforms-error-summary-body p {
	margin: 0 0 6px;
	font-weight: 600;
	font-size: 14px;
}
.chargeforms-error-summary-body ul {
	margin: 0;
	padding-left: 18px;
}
.chargeforms-error-summary-body li {
	font-size: 13px;
}
.chargeforms-error-summary-body a {
	color: inherit;
	text-decoration: underline;
	cursor: pointer;
}

.chargeforms-field .req {
	color: #b3452e;
	margin-left: 2px;
}
/* Asterisk Position (v0.107.0) — the reference product's real per-form setting
   (the plugin's internal reference-screenshot archive/global-settings-layout--02.webp: "Right to
   Label" default). Left-position needs the asterisk to render BEFORE the
   label text, but the markup always emits it after (frontend/
   class-shortcode.php) — :has() lets this stay CSS-only instead of
   restructuring every label call site: hide the trailing .req and grow a
   matching one in front via ::before, only on labels that actually
   contain a required-field .req (never on a field with no asterisk at all). */
.chargeforms-asterisk-left .chargeforms-field label:has(.req)::before {
	content: "* ";
	color: #b3452e;
}
.chargeforms-asterisk-left .chargeforms-field .req {
	display: none;
}

.chargeforms-field input[type="text"],
.chargeforms-field input[type="email"],
.chargeforms-field input[type="number"],
.chargeforms-field input[type="tel"],
.chargeforms-field input[type="date"],
.chargeforms-field input[type="url"],
.chargeforms-field input[type="password"],
.chargeforms-field select,
.chargeforms-field textarea {
	font: inherit;
	padding: 10px 12px;
	border: 1px solid var(--fc-border);
	border-radius: 6px;
	background: #fff;
	width: 100%;
	box-sizing: border-box;
}

/* Prefix/Suffix Label (Field Settings > Advanced) */
.chargeforms-input-affixed {
	display: flex;
	align-items: stretch;
	width: 100%;
}
.chargeforms-input-affixed input {
	border-radius: 0;
	flex: 1;
	min-width: 0;
}
.chargeforms-input-prefix,
.chargeforms-input-suffix {
	display: flex;
	align-items: center;
	padding: 0 10px;
	background: #f4f5f6;
	border: 1px solid var(--fc-border);
	font-size: 13px;
	color: #606266;
	white-space: nowrap;
}
.chargeforms-input-prefix {
	border-right: 0;
	border-radius: 6px 0 0 6px;
}
.chargeforms-input-suffix {
	border-left: 0;
	border-radius: 0 6px 6px 0;
}
.chargeforms-input-affixed input:first-child {
	border-radius: 6px 0 0 6px;
}
.chargeforms-input-affixed input:last-child {
	border-radius: 0 6px 6px 0;
}

.chargeforms-field textarea {
	min-height: 120px;
	resize: vertical;
}

.chargeforms-field input:focus,
.chargeforms-field select:focus,
.chargeforms-field textarea:focus {
	outline: 2px solid var(--fc-accent);
	outline-offset: 1px;
}

.chargeforms-field-checkbox {
	flex-direction: row;
	align-items: center;
}

.chargeforms-radio-group {
	display: flex;
	flex-direction: column;
	gap: 8px;
}
.chargeforms-radio-option {
	display: flex;
	align-items: center;
	gap: 8px;
	font-weight: 400;
	font-size: 14px;
}

.chargeforms-checkbox-group {
	display: flex;
	flex-direction: column;
	gap: 8px;
}
.chargeforms-checkbox-option {
	display: flex;
	align-items: center;
	gap: 8px;
	font-weight: 400;
	font-size: 14px;
}

.chargeforms-consent-option {
	display: flex;
	align-items: flex-start;
	gap: 8px;
	font-weight: 400;
	font-size: 13px;
}

/* Address (composite field) */
.chargeforms-address-fields {
	display: flex;
	flex-direction: column;
	gap: 8px;
}
.chargeforms-address-fields input,
.chargeforms-address-fields select {
	font: inherit;
	padding: 10px 12px;
	border: 1px solid var(--fc-border);
	border-radius: 6px;
	background: #fff;
	width: 100%;
	box-sizing: border-box;
}
.chargeforms-address-row {
	display: flex;
	gap: 8px;
}
.chargeforms-address-row input,
.chargeforms-address-row select {
	flex: 1;
	min-width: 0;
}

/* Social Media Links — was six fixed platforms, now a plain, unlimited
   add/remove list of URLs (see class-shortcode.php's
   render_social_links_field()), built on the exact same
   .chargeforms-repeater markup the Repeater field type uses. This
   modifier only lightens ITS rows to one inline line (input + Remove) —
   `.chargeforms-repeater-row` on its own stays the padded, dashed-border
   "card" look Repeater's multi-field rows need, untouched. */
.chargeforms-repeater--links .chargeforms-repeater-row {
	flex-direction: row;
	align-items: center;
	gap: 8px;
	padding: 0;
	border: none;
}
.chargeforms-repeater--links .chargeforms-repeater-row input {
	flex: 1;
	min-width: 0;
	font: inherit;
	padding: 10px 12px;
	border: 1px solid var(--fc-border);
	border-radius: 6px;
	background: #fff;
	box-sizing: border-box;
	transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.chargeforms-repeater--links .chargeforms-repeater-row input:focus {
	outline: none;
	border-color: var(--fc-accent, #6c4ef5);
	box-shadow: 0 0 0 3px rgba(108, 78, 245, 0.15);
}
.chargeforms-repeater--links .chargeforms-repeater-remove {
	align-self: center;
	flex-shrink: 0;
}

/* Range Slider */
.chargeforms-field input[type="range"] {
	width: 100%;
}
.chargeforms-field output {
	display: block;
	font-size: 13px;
	color: #606266;
	margin-top: 4px;
}

/* Ratings — CSS-only star widget: radios rendered in reverse DOM order so
   the ~ sibling selector can highlight "this star and everything before it"
   without JS. */
.chargeforms-star-rating {
	display: flex;
	flex-direction: row-reverse;
	justify-content: flex-end;
	gap: 2px;
}
.chargeforms-star-rating input {
	position: absolute;
	opacity: 0;
	width: 1px;
	height: 1px;
}
.chargeforms-star-rating label {
	font-size: 28px;
	line-height: 1;
	color: #dadbdd;
	cursor: pointer;
	font-weight: 400;
}
.chargeforms-star-rating input:checked ~ label,
.chargeforms-star-rating label:hover,
.chargeforms-star-rating label:hover ~ label {
	color: #f0a020;
}

/* NPS */
.chargeforms-nps-scale {
	display: flex;
	gap: 4px;
}
.chargeforms-nps-option {
	flex: 1;
	font-weight: 400;
}
.chargeforms-nps-option input {
	position: absolute;
	opacity: 0;
	width: 1px;
	height: 1px;
}
.chargeforms-nps-option span {
	display: block;
	text-align: center;
	padding: 8px 0;
	border: 1px solid var(--fc-border);
	border-radius: 6px;
	cursor: pointer;
	font-size: 13px;
}
.chargeforms-nps-option input:checked + span {
	background: var(--fc-accent);
	border-color: var(--fc-accent-dark);
	color: #fff;
}
.chargeforms-nps-labels {
	display: flex;
	justify-content: space-between;
	font-size: 11px;
	color: #909399;
	margin-top: 4px;
}

.chargeforms-html-block {
	font-size: 14px;
	color: #303133;
}

.chargeforms-section-break {
	padding-top: 8px;
	border-top: 1px solid var(--fc-border);
}
.chargeforms-section-break h3 {
	margin: 0 0 4px;
	font-size: 16px;
}
.chargeforms-section-break p {
	margin: 0;
	color: #606266;
	font-size: 13px;
}

.chargeforms-submit {
	align-self: flex-start;
	background: var(--fc-accent);
	color: #fff;
	border: none;
	padding: 12px 24px;
	border-radius: 6px;
	font-weight: 600;
	cursor: pointer;
}
.chargeforms-submit:hover {
	background: var(--fc-accent-dark);
}

.chargeforms-success {
	display: flex;
	gap: 12px;
	align-items: flex-start;
	background: #e6f7ee;
	color: #1a7f4e;
	padding: 16px 18px;
	border: 1px solid #b7e1c1;
	border-radius: 10px;
	font-size: 14px;
	max-width: 560px;
}
.chargeforms-success-icon {
	flex-shrink: 0;
	line-height: 1.4;
	font-size: 16px;
}
.chargeforms-success-title {
	font-weight: 700;
	margin-bottom: 4px;
}
.chargeforms-success-body {
	line-height: 1.5;
}
.chargeforms-success-pending {
	background: #f2effe;
	color: #4527ab;
	border-color: #e0d9fd;
}

.chargeforms-file-hint {
	margin: 4px 0 0;
	font-size: 12px;
	color: #909399;
}

/* Payments */
.chargeforms-payment-item {
	display: flex;
	justify-content: space-between;
	align-items: center;
	padding: 12px 14px;
	background: #f9fafb;
	border: 1px solid var(--fc-border);
	border-radius: 6px;
	font-size: 14px;
}
.chargeforms-payment-summary {
	display: flex;
	justify-content: space-between;
	padding: 12px 14px;
	background: var(--fc-accent-soft);
	border-radius: 6px;
	font-size: 15px;
	font-weight: 600;
}
.chargeforms-stripe-mount {
	padding: 12px;
	border: 1px solid var(--fc-border);
	border-radius: 6px;
	background: #fff;
}
.chargeforms-stripe-error {
	color: #b3452e;
	font-size: 13px;
	margin-top: 6px;
}
.chargeforms-stripe-error:empty {
	display: none;
}

.chargeforms-notice {
	background: #f5f7fa;
	color: #606266;
	border: 1px solid #dadbdd;
	padding: 12px 16px;
	border-radius: 6px;
	font-size: 14px;
	max-width: 560px;
}

/* Restriction card (login/schedule/entry-limit blocks) — one tone per
   restriction type, matching design_handoff_chargeforms/ChargeForms
   Front-End.dc.html's isRestricted state. */
.chargeforms-restriction-card {
	display: flex;
	gap: 13px;
	padding: 20px 22px;
	border-radius: 12px;
	max-width: 560px;
}
.chargeforms-restriction-icon {
	flex-shrink: 0;
	font-size: 18px;
	line-height: 1.3;
}
.chargeforms-restriction-title {
	font-size: 15px;
	font-weight: 700;
	margin-bottom: 5px;
}
.chargeforms-restriction-body {
	font-size: 13.5px;
	line-height: 1.6;
}
.chargeforms-restriction-setting {
	font-size: 12px;
	margin-top: 9px;
	font-family: ui-monospace, monospace;
	opacity: 0.75;
}
.chargeforms-restriction-warn {
	background: #fff8e6;
	border: 1px solid #f5e0a8;
	color: #8a6d2f;
}
.chargeforms-restriction-warn .chargeforms-restriction-title { color: #6b5320; }
.chargeforms-restriction-info {
	background: #f2effe;
	border: 1px solid #e0d9fd;
	color: #4527ab;
}
.chargeforms-restriction-info .chargeforms-restriction-title { color: #382089; }

/* Multi-step — numbered-dot stepper, matching
   design_handoff_chargeforms/ChargeForms Front-End.dc.html's stepper():
   done steps get a checkmark, the current step a filled accent dot,
   everything after stays flat gray. */
.chargeforms-progress {
	display: flex;
	align-items: center;
	margin-bottom: 26px;
}
.chargeforms-progress-item {
	display: flex;
	align-items: center;
	gap: 9px;
	flex-shrink: 0;
}
.chargeforms-progress-dot {
	width: 28px;
	height: 28px;
	border-radius: 50%;
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: 12.5px;
	font-weight: 700;
	flex-shrink: 0;
	background: #f2f2f2;
	color: #909399;
}
.chargeforms-progress-label {
	font-size: 13px;
	white-space: nowrap;
	font-weight: 500;
	color: #909399;
}
.chargeforms-progress-line {
	flex: 1;
	height: 2px;
	margin: 0 12px;
	border-radius: 2px;
	background: #e3e5e9;
}
.chargeforms-progress-item.is-active .chargeforms-progress-dot {
	background: var(--fc-accent);
	color: #fff;
}
.chargeforms-progress-item.is-active .chargeforms-progress-label {
	color: #1e1f21;
	font-weight: 600;
}
.chargeforms-progress-item.is-done .chargeforms-progress-dot {
	background: #e6f4ea;
	color: #1e7e34;
}
.chargeforms-progress-item.is-done .chargeforms-progress-label {
	color: #1e7e34;
}
.chargeforms-progress-line.is-done {
	background: #b7e1c1;
}

.chargeforms-step {
	display: flex;
	flex-direction: column;
	gap: 16px;
}

.chargeforms-step-actions {
	display: flex;
	justify-content: space-between;
	gap: 8px;
}
.chargeforms-step-actions:has(.chargeforms-step-prev:only-child) {
	justify-content: flex-end;
}
.chargeforms-step-next,
.chargeforms-step-prev {
	padding: 10px 20px;
	border-radius: 6px;
	font-weight: 600;
	cursor: pointer;
	border: 1px solid var(--fc-border);
	background: #fff;
	color: #1e1f21;
}
.chargeforms-step-next {
	background: var(--fc-accent);
	border-color: var(--fc-accent-dark);
	color: #fff;
	margin-left: auto;
}
.chargeforms-step-next:hover {
	background: var(--fc-accent-dark);
}

/* Mobile — visitors fill these out on phones far more than admins use the
   builder, so this is the highest-priority responsive surface in the
   plugin. A fixed 160px label next to a squeezed input, 4-5 step names
   fighting for space on a 320px screen, and small side-by-side buttons are
   all real usability problems below ~480px, not just cosmetic ones. */
@media (max-width: 480px) {
	.chargeforms-label-left .chargeforms-field,
	.chargeforms-field-label-left,
	.chargeforms-field-label-right {
		flex-direction: column;
		align-items: stretch;
	}
	.chargeforms-label-left .chargeforms-field label,
	.chargeforms-field-label-left label,
	.chargeforms-field-label-right label {
		width: auto;
		text-align: left;
	}

	.chargeforms-progress-label {
		display: none;
	}
	.chargeforms-progress-item.is-active .chargeforms-progress-label {
		display: block;
	}
	.chargeforms-progress-line {
		margin: 0 6px;
	}

	.chargeforms-step-actions {
		flex-direction: column-reverse;
	}
	.chargeforms-step-next,
	.chargeforms-step-prev,
	.chargeforms-submit {
		width: 100%;
		text-align: center;
	}
	.chargeforms-step-next {
		margin-left: 0;
	}

	.chargeforms-address-row {
		flex-direction: column;
	}

	.chargeforms-nps-scale {
		flex-wrap: wrap;
	}
	.chargeforms-nps-option {
		flex: 1 1 18%;
	}

	.chargeforms-star-rating label {
		font-size: 22px;
	}
}

/* "Default Style Template" (Global Settings > Miscellaneous) — purely
   additive polish on top of the always-on base styling above, not a
   replacement for it. */
.chargeforms-styled-theme {
	background: #fff;
	border: 1px solid var(--fc-border);
	border-radius: 10px;
	padding: 24px;
	box-shadow: 0 1px 3px rgba(30, 31, 33, 0.06), 0 4px 12px rgba(30, 31, 33, 0.04);
}
.chargeforms-styled-theme .chargeforms-submit {
	box-shadow: 0 2px 6px rgba(26, 115, 232, 0.25);
}

/* Color Picker field */
.chargeforms-field input[type="color"] {
	width: 60px;
	height: 40px;
	padding: 3px;
	border: 1px solid var(--fc-border);
	border-radius: 6px;
	background: #fff;
	cursor: pointer;
}

/* Signature field — a real <canvas> the visitor draws on, see
   assets/js/frontend.js' initSignatures(). */
.chargeforms-signature-pad {
	display: inline-block;
	max-width: 100%;
}
.chargeforms-signature-canvas {
	display: block;
	width: 100%;
	max-width: 500px;
	height: 150px;
	border: 1px dashed var(--fc-border);
	border-radius: 6px;
	background: #fafbfd;
	touch-action: none;
	cursor: crosshair;
}
.chargeforms-signature-actions {
	margin-top: 6px;
}
.chargeforms-signature-clear {
	font: inherit;
	font-size: 13px;
	background: none;
	border: none;
	color: var(--fc-primary, #6c4ef5);
	text-decoration: underline;
	cursor: pointer;
	padding: 0;
}
/* Conversational form mode: quiet, focused progression using the existing
 * ChargeForms field and button language. */
.chargeforms-conversational .chargeforms-field[hidden] {
	display: none !important;
}
.chargeforms-conversational .chargeforms-field.is-conversation-active {
	animation: chargeforms-conversation-in 180ms ease-out both;
}
.chargeforms-conversation-controls {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	margin-top: 20px;
}
.chargeforms-conversation-controls button {
	min-height: 42px;
	padding: 10px 18px;
	border: 1px solid var(--fc-primary, #6c4ef5);
	border-radius: var(--fc-radius-md, 7px);
	background: var(--fc-primary, #6c4ef5);
	color: #fff;
	cursor: pointer;
}
.chargeforms-conversation-controls .chargeforms-conversation-back {
	background: transparent;
	color: var(--fc-primary, #6c4ef5);
}
@keyframes chargeforms-conversation-in {
	from { opacity: 0; transform: translateY(6px); }
	to { opacity: 1; transform: translateY(0); }
}
@media (prefers-reduced-motion: reduce) {
	.chargeforms-conversational .chargeforms-field.is-conversation-active { animation: none; }
}
