/**
 * AirmanForms frontend styles.
 */

.airmanforms-frontend {
	box-sizing: border-box;
	margin: 24px 0;
	max-width: 100%;
}

.airmanforms-frontend *,
.airmanforms-frontend *::before,
.airmanforms-frontend *::after {
	box-sizing: border-box;
}

.airmanforms-form {
	display: block;
	width: 100%;
}

.airmanforms-form-fields {
	display: flex;
	flex-direction: column;
	gap: 20px;
}

.airmanforms-field {
	border: 0;
	margin: 0;
	min-width: 0;
	padding: 0;
}

.airmanforms-label {
	display: block;
	font-size: 14px;
	font-weight: 600;
	line-height: 1.4;
	margin: 0 0 7px;
}

.airmanforms-required {
	margin-left: 4px;
}

.airmanforms-control {
	background: #fff;
	border: 1px solid #8c8f94;
	border-radius: 4px;
	box-shadow: none;
	display: block;
	font: inherit;
	line-height: 1.4;
	max-width: 100%;
	min-height: 42px;
	padding: 8px 10px;
	width: 100%;
}

textarea.airmanforms-control {
	min-height: 110px;
	resize: vertical;
}

.airmanforms-control:focus {
	border-color: #2271b1;
	box-shadow: 0 0 0 1px #2271b1;
	outline: 0;
}

.airmanforms-choice-group {
	display: flex;
	flex-direction: column;
	gap: 8px;
}

.airmanforms-choice {
	align-items: flex-start;
	cursor: pointer;
	display: flex;
	gap: 8px;
	line-height: 1.4;
}

.airmanforms-choice input {
	margin-top: 3px;
}

.airmanforms-grid {
	display: grid;
	gap: 14px;
}

.airmanforms-grid--2 {
	grid-template-columns: repeat(2, minmax(0, 1fr));
}

.airmanforms-sub-label {
	display: block;
	font-size: 13px;
	margin-bottom: 5px;
}

.airmanforms-address-fields {
	display: flex;
	flex-direction: column;
	gap: 14px;
}

.airmanforms-slider-wrap {
	align-items: center;
	display: flex;
	gap: 14px;
}

.airmanforms-slider {
	flex: 1 1 auto;
	min-width: 0;
}

.airmanforms-slider-value {
	flex: 0 0 auto;
	font-weight: 600;
	min-width: 42px;
	text-align: center;
}

.airmanforms-section-divider {
	border-bottom: 1px solid #dcdcde;
	margin: 8px 0 2px;
	padding-bottom: 10px;
}

.airmanforms-section-title {
	margin: 0;
}

.airmanforms-section-description {
	margin: 6px 0 0;
}

.airmanforms-content {
	line-height: 1.6;
}

.airmanforms-content--notice {
	background: #f6f7f7;
	border-left: 4px solid #2271b1;
	padding: 14px 16px;
}

.airmanforms-html {
	line-height: 1.6;
}

.airmanforms-submit-container {
	margin-top: 24px;
}

.airmanforms-submit-button {
	border: 0;
	border-radius: 4px;
	cursor: pointer;
	font: inherit;
	font-weight: 600;
	min-height: 42px;
	padding: 9px 18px;
}

.airmanforms-form-notice,
.airmanforms-runtime-notice {
	border: 1px solid #dcdcde;
	border-radius: 4px;
	margin-top: 16px;
	padding: 12px 14px;
}

.airmanforms-field--runtime-pending {
	background: #f6f7f7;
	border: 1px dashed #a7aaad;
	border-radius: 4px;
	display: flex;
	flex-direction: column;
	gap: 4px;
	padding: 12px;
}

.airmanforms-field--runtime-pending span {
	font-size: 12px;
}

@media (max-width: 640px) {

	.airmanforms-grid--2 {
		grid-template-columns: 1fr;
	}

	.airmanforms-slider-wrap {
		align-items: stretch;
		flex-direction: column;
	}

	.airmanforms-slider-value {
		text-align: left;
	}
}

/* =========================================================
 * Administrator Preview Mode
 * ======================================================= */

body.airmanforms-preview-body {
	margin: 0;
	min-height: 100vh;
}

.airmanforms-preview-toolbar {
	align-items: center;
	background: #1d2327;
	box-sizing: border-box;
	color: #ffffff;
	display: flex;
	gap: 20px;
	justify-content: space-between;
	min-height: 58px;
	padding: 10px 24px;
	position: sticky;
	top: 0;
	width: 100%;
	z-index: 99999;
}

.airmanforms-preview-toolbar__info {
	align-items: center;
	display: flex;
	flex-wrap: wrap;
	gap: 12px;
}

.airmanforms-preview-toolbar__info strong {
	font-size: 15px;
}

.airmanforms-preview-status {
	background: rgba(255, 255, 255, 0.14);
	border-radius: 999px;
	font-size: 12px;
	padding: 4px 9px;
}

.airmanforms-preview-toolbar__button {
	background: #ffffff;
	border-radius: 4px;
	color: #1d2327;
	display: inline-block;
	font-size: 13px;
	font-weight: 600;
	padding: 7px 12px;
	text-decoration: none;
	white-space: nowrap;
}

.airmanforms-preview-toolbar__button:hover,
.airmanforms-preview-toolbar__button:focus {
	color: #135e96;
}

.airmanforms-preview-main {
	box-sizing: border-box;
	margin: 0 auto;
	max-width: 1040px;
	padding: 36px 24px 60px;
	width: 100%;
}

.airmanforms-preview-card {
	background: #ffffff;
	border: 1px solid #dcdcde;
	border-radius: 8px;
	box-sizing: border-box;
	padding: 28px;
	width: 100%;
}

@media (max-width: 640px) {

	.airmanforms-preview-toolbar {
		align-items: flex-start;
		flex-direction: column;
		gap: 8px;
		padding: 12px 16px;
	}

	.airmanforms-preview-main {
		padding: 20px 12px 40px;
	}

	.airmanforms-preview-card {
		padding: 18px;
	}
}

/* =========================================================
 * Submission engine
 * ======================================================= */

.airmanforms-hp {
	height: 1px !important;
	left: -10000px !important;
	overflow: hidden !important;
	position: absolute !important;
	top: auto !important;
	width: 1px !important;
}

.airmanforms-submit-button[disabled] {
	cursor: wait;
	opacity: 0.65;
}

.airmanforms-form-notice--success {
	background: #edfaef;
	border-color: #46b450;
}

.airmanforms-form-notice--error {
	background: #fcf0f1;
	border-color: #d63638;
}

/* =========================================================
 * Advanced Media & Location fields
 * ======================================================= */

.airmanforms-file-control {
	padding: 7px;
}

.airmanforms-camera-preview {
	margin-top: 12px;
}

.airmanforms-camera-preview img {
	border: 1px solid #dcdcde;
	border-radius: 5px;
	display: block;
	height: auto;
	max-height: 360px;
	max-width: 100%;
	object-fit: contain;
}

.airmanforms-signature-wrap {
	width: 100%;
}

.airmanforms-signature-canvas {
	background: #ffffff;
	border: 1px solid #8c8f94;
	border-radius: 4px;
	cursor: crosshair;
	display: block;
	max-width: 100%;
	touch-action: none;
	width: 100%;
}

.airmanforms-signature-canvas:focus {
	border-color: #2271b1;
	box-shadow: 0 0 0 1px #2271b1;
	outline: 0;
}

.airmanforms-signature-clear,
.airmanforms-map-current-location {
	border: 1px solid #8c8f94;
	border-radius: 4px;
	cursor: pointer;
	font: inherit;
	margin-top: 10px;
	min-height: 36px;
	padding: 6px 12px;
}

.airmanforms-map-address-label {
	display: block;
	margin-bottom: 14px;
}

.airmanforms-map-preview {
	margin-top: 14px;
	width: 100%;
}

.airmanforms-map-preview iframe {
	border: 1px solid #dcdcde;
	border-radius: 5px;
	height: 320px;
	width: 100%;
}

.airmanforms-map-placeholder,
.airmanforms-map-provider-notice {
	background: #f6f7f7;
	border: 1px dashed #a7aaad;
	border-radius: 4px;
	margin: 12px 0 0;
	padding: 12px;
}

/* =========================================================
 * Live Camera
 * ======================================================= */

.airmanforms-camera-runtime {
	width: 100%;
}

.airmanforms-camera-actions {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	margin-bottom: 10px;
}

.airmanforms-camera-button {
	border: 1px solid #8c8f94;
	border-radius: 4px;
	cursor: pointer;
	font: inherit;
	min-height: 38px;
	padding: 7px 14px;
}

.airmanforms-camera-button[disabled] {
	cursor: wait;
	opacity: 0.65;
}

.airmanforms-camera-status {
	font-size: 13px;
	margin: 7px 0;
	min-height: 18px;
}

.airmanforms-camera-video {
	background: #111111;
	border-radius: 6px;
	display: block;
	height: auto;
	max-height: 520px;
	max-width: 100%;
	object-fit: contain;
	width: 100%;
}

.airmanforms-camera-video[hidden] {
	display: none;
}

.airmanforms-camera-canvas {
	display: none;
}

.airmanforms-camera-preview {
	margin-top: 10px;
}

.airmanforms-camera-preview img {
	border: 1px solid #dcdcde;
	border-radius: 6px;
	display: block;
	height: auto;
	max-height: 520px;
	max-width: 100%;
	object-fit: contain;
}

.airmanforms-camera-fallback {
	background: #f6f7f7;
	border: 1px dashed #a7aaad;
	border-radius: 4px;
	margin-top: 10px;
	padding: 12px;
}

.airmanforms-camera-fallback p {
	margin-top: 0;
}

.airmanforms-field-help {
	color: #646970;
	font-size: 12px;
	line-height: 1.5;
	margin: 6px 0 0;
}

/* =========================================================
 * Stage 11 — Structural & Interactive Runtime
 * ======================================================= */

.airmanforms-layout {
	margin-bottom: 18px;
}

.airmanforms-layout-title {
	font-size: 16px;
	font-weight: 600;
	margin-bottom: 10px;
}

.airmanforms-layout-grid {
	display: grid;
	gap: 18px;
	grid-template-columns:
		repeat(
			var(--airmanforms-columns),
			minmax(0, 1fr)
		);
}

.airmanforms-layout--ratio-1-2
.airmanforms-layout-grid {
	grid-template-columns: 1fr 2fr;
}

.airmanforms-layout--ratio-2-1
.airmanforms-layout-grid {
	grid-template-columns: 2fr 1fr;
}

.airmanforms-field--repeater {
	border: 1px solid #dcdcde;
	border-radius: 6px;
	margin-bottom: 18px;
	padding: 14px;
}

.airmanforms-repeater-row {
	background: #f6f7f7;
	border: 1px solid #dcdcde;
	border-radius: 5px;
	margin-bottom: 12px;
	padding: 12px;
}

.airmanforms-repeater-row__heading {
	align-items: center;
	display: flex;
	justify-content: space-between;
	margin-bottom: 12px;
}

.airmanforms-repeater-row__fields {
	display: grid;
	gap: 14px;
}

.airmanforms-repeater-child .airmanforms-label {
	display: block;
	margin-bottom: 5px;
}

.airmanforms-repeater-add,
.airmanforms-repeater-remove,
.airmanforms-page-button {
	border: 1px solid #8c8f94;
	border-radius: 4px;
	cursor: pointer;
	font: inherit;
	min-height: 36px;
	padding: 6px 12px;
}

.airmanforms-repeater-remove {
	font-size: 12px;
}

.airmanforms-page[hidden],
.airmanforms-final-actions[hidden] {
	display: none !important;
}

.airmanforms-page-navigation {
	display: flex;
	gap: 10px;
	justify-content: space-between;
	margin-top: 22px;
}

.airmanforms-page-button--next {
	margin-left: auto;
}

.airmanforms-page-title {
	margin: 0 0 18px;
}

.airmanforms-progress {
	margin-bottom: 22px;
}

.airmanforms-progress__text {
	font-size: 13px;
	font-weight: 600;
	margin-bottom: 7px;
}

.airmanforms-progress__track {
	background: #dcdcde;
	border-radius: 999px;
	height: 8px;
	overflow: hidden;
}

.airmanforms-progress__fill {
	background: currentColor;
	height: 100%;
	transition: width 0.25s ease;
	width: 0;
}

.airmanforms-rich-text {
	border: 1px solid #8c8f94;
	border-radius: 5px;
	overflow: hidden;
}

.airmanforms-rich-text-toolbar {
	background: #f6f7f7;
	border-bottom: 1px solid #dcdcde;
	display: flex;
	flex-wrap: wrap;
	gap: 3px;
	padding: 6px;
}

.airmanforms-rich-text-toolbar button {
	background: #fff;
	border: 1px solid #c3c4c7;
	border-radius: 3px;
	cursor: pointer;
	min-width: 32px;
	padding: 5px 7px;
}

.airmanforms-rich-text-editor {
	background: #fff;
	min-height: 220px;
	outline: 0;
	overflow: auto;
	padding: 10px;
}

.airmanforms-rich-text-editor:focus {
	box-shadow: inset 0 0 0 1px #2271b1;
}

.airmanforms-rich-text-editor:empty::before {
	color: #8c8f94;
	content: attr(data-placeholder);
	pointer-events: none;
}

.airmanforms-field--entry-preview {
	background: #f6f7f7;
	border: 1px solid #dcdcde;
	border-radius: 6px;
	padding: 16px;
}

.airmanforms-entry-preview-item {
	border-bottom: 1px solid #dcdcde;
	padding: 9px 0;
}

.airmanforms-entry-preview-item:last-child {
	border-bottom: 0;
}

.airmanforms-entry-preview-item strong {
	display: block;
	margin-bottom: 3px;
}

.airmanforms-entry-preview-table {
	border-collapse: collapse;
	width: 100%;
}

.airmanforms-entry-preview-table th,
.airmanforms-entry-preview-table td {
	border-bottom: 1px solid #dcdcde;
	padding: 9px;
	text-align: left;
	vertical-align: top;
}

.airmanforms-entry-preview-table th {
	width: 35%;
}

@media (max-width: 782px) {
	.airmanforms-layout--stack
	.airmanforms-layout-grid {
		grid-template-columns: 1fr !important;
	}
}


/* ==========================================================
 * AirmanForms Stage 12A Survey Fields
 * ========================================================== */

.airmanforms-field--rating,
.airmanforms-field--likert-scale,
.airmanforms-field--net-promoter-score,
.airmanforms-field--custom-captcha {
	margin-bottom: 22px;
}

.airmanforms-field--rating,
.airmanforms-field--likert-scale,
.airmanforms-field--net-promoter-score {
	border: 0;
	padding: 0;
	min-width: 0;
}

.airmanforms-rating-options {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 6px;
	margin-top: 8px;
}

.airmanforms-rating-option {
	position: relative;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	cursor: pointer;
}

.airmanforms-rating-option input {
	position: absolute;
	opacity: 0;
	pointer-events: none;
}

.airmanforms-rating-icon {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 38px;
	min-height: 38px;
	font-size: 30px;
	line-height: 1;
	opacity: 0.35;
	transform: scale(1);
	transition:
		opacity 0.15s ease,
		transform 0.15s ease;
}

.airmanforms-rating-option:hover .airmanforms-rating-icon,
.airmanforms-rating-option input:focus + .airmanforms-rating-icon,
.airmanforms-rating-option input:checked + .airmanforms-rating-icon {
	opacity: 1;
	transform: scale(1.08);
}

.airmanforms-rating-option input:focus-visible + .airmanforms-rating-icon {
	outline: 2px solid currentColor;
	outline-offset: 3px;
	border-radius: 4px;
}

.airmanforms-survey-end-labels {
	display: flex;
	justify-content: space-between;
	gap: 20px;
	margin-top: 8px;
	font-size: 13px;
	opacity: 0.8;
}

.airmanforms-likert-scroll {
	width: 100%;
	overflow-x: auto;
	margin-top: 10px;
}

.airmanforms-likert-table {
	width: 100%;
	min-width: 620px;
	border-collapse: collapse;
	background: #fff;
}

.airmanforms-likert-table th,
.airmanforms-likert-table td {
	padding: 10px;
	border: 1px solid #dcdcde;
	text-align: center;
	vertical-align: middle;
}

.airmanforms-likert-table thead th {
	font-weight: 600;
}

.airmanforms-likert-table tbody th {
	text-align: left;
	font-weight: 500;
}

.airmanforms-likert-choice {
	display: flex;
	align-items: center;
	justify-content: center;
	min-height: 30px;
	cursor: pointer;
}

.airmanforms-likert-choice input {
	width: 18px;
	height: 18px;
	margin: 0;
}

.airmanforms-nps-options {
	display: grid;
	grid-template-columns: repeat(11, minmax(36px, 1fr));
	gap: 5px;
	margin-top: 10px;
}

.airmanforms-nps-option {
	position: relative;
	cursor: pointer;
}

.airmanforms-nps-option input {
	position: absolute;
	opacity: 0;
	pointer-events: none;
}

.airmanforms-nps-option span {
	display: flex;
	align-items: center;
	justify-content: center;
	min-height: 42px;
	border: 1px solid #c3c4c7;
	border-radius: 5px;
	background: #fff;
	font-weight: 600;
	transition:
		border-color 0.15s ease,
		box-shadow 0.15s ease,
		transform 0.15s ease;
}

.airmanforms-nps-option:hover span,
.airmanforms-nps-option input:focus + span,
.airmanforms-nps-option input:checked + span {
	border-color: currentColor;
	box-shadow: 0 0 0 1px currentColor;
	transform: translateY(-1px);
}

.airmanforms-nps-option input:focus-visible + span {
	outline: 2px solid currentColor;
	outline-offset: 2px;
}

.airmanforms-captcha-question {
	margin: 7px 0 10px;
	padding: 10px 12px;
	border-left: 3px solid currentColor;
	background: rgba(0, 0, 0, 0.035);
	font-weight: 600;
}

.airmanforms-field--custom-captcha .airmanforms-input {
	width: 100%;
	max-width: 420px;
}

.airmanforms-security-warning {
	padding: 10px 12px;
	border: 1px solid #d63638;
	border-radius: 4px;
	background: #fcf0f1;
}

@media (max-width: 700px) {

	.airmanforms-nps-options {
		grid-template-columns:
			repeat(
				6,
				minmax(40px, 1fr)
			);
	}

	.airmanforms-survey-end-labels {
		font-size: 12px;
	}

	.airmanforms-likert-table {
		min-width: 560px;
	}
}


/* ==========================================================
 * AirmanForms Stage 12B reCAPTCHA
 * ========================================================== */

.airmanforms-field--recaptcha {
	margin-bottom: 22px;
}

.airmanforms-recaptcha-widget {
	margin-top: 8px;
	max-width: 100%;
}

.airmanforms-recaptcha-widget iframe {
	max-width: 100%;
}

.airmanforms-recaptcha-widget--invisible {
	width: 1px;
	height: 1px;
	overflow: hidden;
}

.airmanforms-recaptcha-status {
	margin-top: 8px;
	padding: 9px 12px;
	border: 1px solid #dcdcde;
	border-radius: 4px;
	background: rgba(0, 0, 0, 0.025);
	font-size: 13px;
}

.airmanforms-recaptcha-message {
	margin-top: 7px;
	font-size: 13px;
	line-height: 1.4;
}

.airmanforms-recaptcha-message:not(:empty) {
	padding: 8px 10px;
	border-left: 3px solid currentColor;
	background: rgba(0, 0, 0, 0.035);
}

@media (max-width: 420px) {

	.airmanforms-field--recaptcha {
		max-width: 100%;
		overflow-x: auto;
	}

	.airmanforms-recaptcha-widget {
		transform-origin: left top;
	}
}


/* ==========================================================
 * AirmanForms Standard Field Vertical Spacing
 * ========================================================== */

/*
 * Keep ordinary input fields visually separated from the
 * field that follows them.
 */
.airmanforms-field--text,
.airmanforms-field--name,
.airmanforms-field--email,
.airmanforms-field--phone,
.airmanforms-field--number,
.airmanforms-field--url,
.airmanforms-field--password,
.airmanforms-field--select,
.airmanforms-field--textarea,
.airmanforms-field--datetime,
.airmanforms-field--address,
.airmanforms-field--number-slider {
	margin-bottom: 22px;
}



/* ==========================================================
 * AirmanForms Rating Cumulative Active State
 * ========================================================== */

.airmanforms-rating-option.is-active .airmanforms-rating-icon {
	opacity: 1;
	transform: scale(1.08);
}



/* ==========================================================
 * AirmanForms Final Actions Spacing
 * ========================================================== */

/*
 * Separate page navigation from the final receipt/submission
 * section on the last page.
 */
.airmanforms-page-navigation {
	margin-bottom: 22px;
}

/*
 * Keep receipt field and final submit action comfortably
 * separated.
 */
.airmanforms-final-actions {
	margin-top: 4px;
}

.airmanforms-final-actions .airmanforms-field--receipt-email {
	margin-bottom: 22px;
}



/* ==========================================================
 * AirmanForms Stage 13 Conditional Logic Runtime
 * ========================================================== */

.airmanforms-runtime-field {
	min-width: 0;
}

.airmanforms-runtime-field[hidden],
.airmanforms-runtime-field[data-airmanforms-condition-hidden="1"] {
	display: none !important;
}

