/* SmokyForms: layout only. Fonts, colours and input styles come from the theme. */
.smokyforms-fields {
	display: flex;
	flex-wrap: wrap;
	gap: 1.25em 1.5em;
	margin-block-end: 1.25em;
}
.smokyforms-field {
	flex: 1 1 100%;
	min-width: 0;
}
.smokyforms-width-half {
	flex: 1 1 calc(50% - 0.75em);
}
.smokyforms-width-third {
	flex: 1 1 calc(33.333% - 1em);
}
.smokyforms-width-two-thirds {
	flex: 1 1 calc(66.666% - 0.5em);
}
.smokyforms-width-quarter {
	flex: 1 1 calc(25% - 1.125em);
}
.smokyforms-width-three-quarters {
	flex: 1 1 calc(75% - 0.375em);
}
@media (max-width: 600px) {
	.smokyforms-width-half,
	.smokyforms-width-third,
	.smokyforms-width-two-thirds,
	.smokyforms-width-quarter,
	.smokyforms-width-three-quarters {
		flex-basis: 100%;
	}
}
.smokyforms-field[hidden] {
	display: none;
}
.smokyforms-label {
	display: block;
	margin-block-end: 0.35em;
	font-weight: 600;
}
.smokyforms-field input:not([type="checkbox"]):not([type="radio"]),
.smokyforms-field select,
.smokyforms-field textarea {
	box-sizing: border-box;
	width: 100%;
	max-width: 100%;
}
/* Base sizing for themes that do not style form fields. :where() keeps it at zero specificity,
   so any theme style wins. The theme's font is used. */
:where(.smokyforms-field, .smokyforms-math) :where(input:not([type="checkbox"]):not([type="radio"]), select, textarea) {
	font: inherit;
	padding: 0.6em 0.75em;
	border: 1px solid #8c8f94;
	border-radius: 4px;
	background-color: transparent;
	color: inherit;
}
:where(.smokyforms-field) :where(select) {
	background-color: Canvas;
}
.smokyforms-choices {
	margin: 0;
	padding: 0;
	border: 0;
	min-width: 0;
}
.smokyforms-choices legend {
	padding: 0;
}
.smokyforms-choice {
	display: flex;
	align-items: baseline;
	gap: 0.5em;
	margin-block: 0.25em;
	font-weight: normal;
	cursor: pointer;
}
.smokyforms-choice input {
	flex: none;
	margin: 0;
}
.smokyforms-choices-images {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(8rem, 1fr));
	gap: 0.75em;
}
.smokyforms-choices-images legend {
	grid-column: 1 / -1;
}
.smokyforms-choices-images .smokyforms-choice {
	display: grid;
	grid-template-columns: auto 1fr;
	align-items: center;
	gap: 0.4em;
	margin: 0;
	padding: 0.5em;
	border: 1px solid currentColor;
	border-radius: 6px;
	opacity: 0.85;
}
.smokyforms-choices-images .smokyforms-choice:has(input:checked) {
	opacity: 1;
	outline: 2px solid currentColor;
	outline-offset: 1px;
}
.smokyforms-choice-image {
	grid-column: 1 / -1;
	width: 100%;
	height: auto;
	aspect-ratio: 1;
	object-fit: cover;
	border-radius: 4px;
}
.smokyforms-help {
	margin: 0.35em 0 0;
	font-size: 0.875em;
	opacity: 0.8;
}
.smokyforms-heading {
	margin: 0.5em 0 0;
}
.smokyforms-result {
	display: block;
	font-size: 1.5em;
	font-weight: 700;
	font-variant-numeric: tabular-nums;
}
.smokyforms-required,
.smokyforms-error,
.smokyforms-message[data-state="error"] {
	color: #b32d2e;
}
.smokyforms-error {
	margin: 0.35em 0 0;
	font-size: 0.875em;
}
.smokyforms-error[hidden],
.smokyforms-message[hidden] {
	display: none;
}
.smokyforms-has-error input,
.smokyforms-has-error select,
.smokyforms-has-error textarea {
	outline: 1px solid #b32d2e;
	outline-offset: 0;
}
.smokyforms-captcha {
	margin-block-end: 1.25em;
}
.smokyforms-math {
	margin-block-end: 1em;
}
.smokyforms-math label {
	display: block;
	margin-block-end: 0.35em;
	font-weight: 600;
}
.smokyforms-math-label {
	font-weight: 600;
}
.smokyforms-math-question {
	font-weight: 600;
}
.smokyforms-math input {
	box-sizing: border-box;
	width: 9em;
	max-width: 100%;
}
.smokyforms-message {
	margin-block-start: 1em;
}
.smokyforms-message p:last-child {
	margin-block-end: 0;
}
.smokyforms-message:focus {
	outline: none;
}
.smokyforms-button[disabled] {
	opacity: 0.6;
	cursor: wait;
}
/* Trap field for bots: off screen, not display:none (some bots skip hidden fields). */
.smokyforms-hp {
	position: absolute !important;
	inset-inline-start: -9999px !important;
	width: 1px;
	height: 1px;
	overflow: hidden;
}
/* Steps */
.smokyforms-step[hidden],
.smokyforms-progress[hidden],
.smokyforms-button[hidden],
.smokyforms-captcha[hidden] {
	display: none;
}
.smokyforms-step-title {
	margin: 0 0 1em;
}
.smokyforms-step-title:focus {
	outline: none;
}
.smokyforms-progress {
	margin-block-end: 1.5em;
}
.smokyforms-progress-text {
	margin: 0 0 0.4em;
	font-size: 0.875em;
}
.smokyforms-progress-bar {
	height: 6px;
	border-radius: 3px;
	background: rgba(127, 127, 127, 0.25);
	overflow: hidden;
}
.smokyforms-progress-bar span {
	display: block;
	height: 100%;
	width: 0;
	background: currentColor;
	transition: width 0.2s ease;
}
.smokyforms-submit {
	display: flex;
	flex-wrap: wrap;
	gap: 0.75em;
}
.smokyforms-prev {
	order: -1;
}
/* Rating */
.smokyforms-stars {
	display: inline-flex;
	gap: 0.15em;
}
.smokyforms-star-input {
	position: absolute;
	opacity: 0;
	width: 1px;
	height: 1px;
}
.smokyforms-star {
	font-size: 1.75em;
	line-height: 1;
	cursor: pointer;
	color: #f0b000;
}
.smokyforms-star-icon {
	transition: opacity 0.1s;
}
/* Same specificity everywhere, so the order decides: filled up to the chosen or hovered star. */
:where(.smokyforms-stars) .smokyforms-star-icon {
	opacity: 0.25;
}
:where(.smokyforms-stars:has(input:checked)) .smokyforms-star-icon {
	opacity: 1;
}
:where(.smokyforms-stars input:checked + .smokyforms-star ~ .smokyforms-star) .smokyforms-star-icon {
	opacity: 0.25;
}
:where(.smokyforms-stars:hover) .smokyforms-star-icon {
	opacity: 1;
}
:where(.smokyforms-star:hover ~ .smokyforms-star) .smokyforms-star-icon {
	opacity: 0.25;
}
.smokyforms-star-input:focus-visible + .smokyforms-star {
	outline: 2px solid currentColor;
	outline-offset: 2px;
	border-radius: 2px;
}
.smokyforms-sr {
	position: absolute;
	width: 1px;
	height: 1px;
	overflow: hidden;
	clip: rect(0 0 0 0);
	white-space: nowrap;
}
/* Net Promoter Score */
.smokyforms-nps-scale {
	display: flex;
	flex-wrap: wrap;
	gap: 0.3em;
}
.smokyforms-nps-input {
	position: absolute;
	opacity: 0;
	width: 1px;
	height: 1px;
}
.smokyforms-nps-option {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	box-sizing: border-box;
	min-width: 2.5em;
	padding: 0.5em 0.4em;
	border: 1px solid #8c8f94;
	border-radius: 4px;
	line-height: 1;
	cursor: pointer;
}
.smokyforms-nps-input:checked + .smokyforms-nps-option {
	background: CanvasText;
	color: Canvas;
	border-color: CanvasText;
}
.smokyforms-nps-input:focus-visible + .smokyforms-nps-option {
	outline: 2px solid currentColor;
	outline-offset: 2px;
}
.smokyforms-nps-ends {
	display: flex;
	justify-content: space-between;
	gap: 1em;
	margin-block-start: 0.35em;
	font-size: 0.875em;
	opacity: 0.8;
}
/* Likert scale */
.smokyforms-likert-scroll {
	overflow-x: auto;
}
.smokyforms-likert-table {
	width: 100%;
	border-collapse: collapse;
}
.smokyforms-likert-table th,
.smokyforms-likert-table td {
	padding: 0.5em 0.6em;
	text-align: center;
	vertical-align: middle;
	font-weight: normal;
}
.smokyforms-likert-table tbody th {
	text-align: start;
	font-weight: 600;
}
.smokyforms-likert-table thead th {
	font-size: 0.875em;
}
.smokyforms-likert-table tbody tr + tr > * {
	border-block-start: 1px solid rgba(128, 128, 128, 0.3);
}
.smokyforms-likert-table label {
	display: inline-flex;
	cursor: pointer;
}
.smokyforms-likert-text {
	position: absolute;
	width: 1px;
	height: 1px;
	overflow: hidden;
	clip: rect(0 0 0 0);
	white-space: nowrap;
}
@media (max-width: 600px) {
	.smokyforms-likert-table,
	.smokyforms-likert-table tbody,
	.smokyforms-likert-table tr,
	.smokyforms-likert-table th,
	.smokyforms-likert-table td {
		display: block;
		text-align: start;
	}
	.smokyforms-likert-table thead {
		position: absolute;
		width: 1px;
		height: 1px;
		overflow: hidden;
		clip: rect(0 0 0 0);
	}
	.smokyforms-likert-table tbody tr {
		padding-block: 0.6em;
	}
	.smokyforms-likert-table td {
		padding-block: 0.15em;
	}
	.smokyforms-likert-table label {
		align-items: baseline;
		gap: 0.5em;
	}
	.smokyforms-likert-text {
		position: static;
		width: auto;
		height: auto;
		clip: auto;
		white-space: normal;
	}
}
/* Ranking */
.smokyforms-ranking-list {
	margin: 0;
	padding: 0 0 0 1.75em;
	list-style: decimal;
}
.smokyforms-ranking-item {
	margin-block: 0.3em;
	padding-inline-start: 0.25em;
}
.smokyforms-ranking-item::marker {
	font-weight: 600;
}
.smokyforms-ranking-text {
	min-width: 0;
}
.smokyforms-ranking-row {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 0.75em;
}
.smokyforms-ranking-buttons {
	display: inline-flex;
	gap: 0.3em;
}
.smokyforms-ranking-buttons[hidden] {
	display: none;
}
.smokyforms-ranking-buttons button {
	min-width: 2em;
	padding: 0.2em 0.5em;
	font: inherit;
	font-size: 0.85em;
	border: 1px solid #8c8f94;
	border-radius: 3px;
	background: Canvas;
	color: CanvasText;
	cursor: pointer;
}
.smokyforms-ranking-buttons button:disabled {
	opacity: 0.35;
	cursor: default;
}
/* Address */
.smokyforms-address {
	display: flex;
	flex-wrap: wrap;
	gap: 0.75em 1em;
}
.smokyforms-address legend {
	flex: 1 1 100%;
}
.smokyforms-address-part {
	flex: 1 1 100%;
	min-width: 0;
}
.smokyforms-address-city,
.smokyforms-address-state,
.smokyforms-address-zip,
.smokyforms-address-country {
	flex-basis: calc(50% - 0.5em);
}
.smokyforms-sublabel {
	display: block;
	margin-block-end: 0.2em;
	font-size: 0.875em;
}
@media (max-width: 600px) {
	.smokyforms-address-city,
	.smokyforms-address-state,
	.smokyforms-address-zip,
	.smokyforms-address-country {
		flex-basis: 100%;
	}
}
/* Signature */
.smokyforms-signature {
	position: relative;
}
.smokyforms-signature-pad {
	display: block;
	width: 100%;
	height: 160px;
	border: 1px solid #8c8f94;
	border-radius: 4px;
	touch-action: none;
	cursor: crosshair;
}
.smokyforms-signature-clear {
	position: absolute;
	inset-block-start: 0.4em;
	inset-inline-end: 0.4em;
	padding: 0.2em 0.6em;
	font: inherit;
	font-size: 0.8em;
	border: 1px solid #8c8f94;
	border-radius: 3px;
	background: Canvas;
	color: CanvasText;
	cursor: pointer;
}
/* Repeating group */
.smokyforms-repeater {
	margin: 0;
	padding: 0;
	border: 0;
	min-width: 0;
}
.smokyforms-repeater legend {
	padding: 0;
}
.smokyforms-row {
	position: relative;
	padding: 1em 2.5em 1em 1em;
	margin-block-end: 0.75em;
	border: 1px solid rgba(127, 127, 127, 0.35);
	border-radius: 4px;
}
.smokyforms-row .smokyforms-fields {
	margin: 0;
	gap: 1em;
}
.smokyforms-remove-row {
	position: absolute;
	inset-block-start: 0.4em;
	inset-inline-end: 0.4em;
	width: 1.8em;
	height: 1.8em;
	padding: 0;
	font: inherit;
	line-height: 1;
	border: 0;
	background: transparent;
	color: inherit;
	cursor: pointer;
	font-size: 1.1em;
}
.smokyforms-remove-row[hidden],
.smokyforms-add-row[hidden] {
	display: none;
}
.smokyforms-add-row {
	font: inherit;
	cursor: pointer;
}
:where(.smokyforms-add-row) {
	padding: 0.45em 1em;
	border: 1px solid currentColor;
	border-radius: 4px;
	background: transparent;
	color: inherit;
}
.smokyforms-type-file input[type="file"] {
	padding: 0.4em;
}
/* Title and description (optional, block or shortcode option) */
.smokyforms-header {
	margin-block-end: 1.5em;
}
.smokyforms-title {
	margin: 0 0 0.5em;
}
.smokyforms-description > :last-child {
	margin-block-end: 0;
}

/* Without JavaScript the fields hidden by logic are shown again. */
@media (scripting:none){.smokyforms .smokyforms-field[data-logic][hidden]{display:block!important}}

.smokyforms-review {
	margin: 0.5em 0 0;
}
.smokyforms-review dt {
	font-weight: 600;
	margin-top: 0.5em;
}
.smokyforms-review dd {
	margin: 0;
	white-space: pre-wrap;
}

.smokyforms-range {
	display: flex;
	align-items: center;
	gap: 0.75em;
}
.smokyforms-range input[type="range"] {
	flex: 1;
	min-width: 0;
}
.smokyforms-range-value {
	min-width: 3em;
	text-align: right;
	font-variant-numeric: tabular-nums;
}

.smokyforms-chained-row {
	display: flex;
	flex-wrap: wrap;
	gap: 0.75em 1em;
}
.smokyforms-chained-item {
	flex: 1 1 10em;
	min-width: 0;
}
.smokyforms-chained-label {
	display: block;
	margin-block-end: 0.25em;
}
