/**
 * Contact Form — base styles. Elementor controls override most of these.
 */

.cfe-form-wrap {
	width: 100%;
}

.cfe-form {
	box-sizing: border-box;
	width: 100%;
	display: block;
}

.cfe-form *,
.cfe-form *::before,
.cfe-form *::after {
	box-sizing: border-box;
}

/* Grid */
.cfe-form-grid {
	display: grid;
	grid-template-columns: repeat( 12, 1fr );
	row-gap: 16px;
	column-gap: 16px;
	width: 100%;
}

.cfe-form-field {
	grid-column: span 12;
	min-width: 0;
}

/* Labels */
.cfe-form-label {
	display: block;
	margin-bottom: 6px;
	font-weight: 500;
	color: inherit;
}

/* Visually hidden label — keeps it readable to screen readers and to label-for behavior. */
.cfe-form-label--sr {
	position: absolute !important;
	width: 1px !important;
	height: 1px !important;
	padding: 0 !important;
	margin: -1px !important;
	overflow: hidden !important;
	clip: rect( 0, 0, 0, 0 ) !important;
	white-space: nowrap !important;
	border: 0 !important;
}

.cfe-form-required {
	color: #dc2626;
}

.cfe-hide-required .cfe-form-required {
	display: none !important;
}

/* Inputs */
.cfe-form-input,
.cfe-form-select,
.cfe-form-textarea {
	width: 100%;
	display: block;
	font: inherit;
	color: inherit;
	background: #ffffff;
	border: 1px solid #d1d5db;
	border-radius: 6px;
	padding: 10px 12px;
	height: 44px;
	line-height: 1.4;
	-webkit-appearance: none;
	appearance: none;
	transition: border-color 150ms ease, box-shadow 150ms ease, background-color 150ms ease;
}

.cfe-form-textarea {
	min-height: 120px;
	height: auto;
	resize: vertical;
}

.cfe-form-input:focus,
.cfe-form-select:focus,
.cfe-form-textarea:focus {
	outline: 2px solid transparent;
	outline-offset: 2px;
	border-color: #2563eb;
	box-shadow: 0 0 0 3px rgba( 37, 99, 235, 0.15 );
}

.cfe-form-input:disabled,
.cfe-form-select:disabled,
.cfe-form-textarea:disabled {
	background-color: #f3f4f6;
	cursor: not-allowed;
}

.cfe-has-error .cfe-form-input,
.cfe-has-error .cfe-form-select,
.cfe-has-error .cfe-form-textarea,
.cfe-has-error .cfe-form-file {
	border-color: #dc2626;
	box-shadow: 0 0 0 3px rgba( 220, 38, 38, 0.15 );
}

/* intl-tel-input: stretch the wrapper to fill the field column and keep error
   styling on the inner input. The library adds `.iti` around the <input>; it also
   sets `padding-left` as an inline style on the input (sized to fit the selected
   dial code), so DON'T add a static padding-left rule here — it would be ignored
   anyway. Admins can override the auto-padding via the "Phone Input Padding"
   control under Style → Phone Country Code (which emits !important). */
.cfe-form-field .iti {
	width: 100%;
	display: block;
}
.cfe-has-error .iti .cfe-form-input {
	border-color: #dc2626;
	box-shadow: 0 0 0 3px rgba( 220, 38, 38, 0.15 );
}

/* Custom select dropdown (button + listbox + hidden input) */
.cfe-form-select-wrap {
	position: relative;
	width: 100%;
}

button.cfe-form-select {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	width: 100%;
	text-align: left;
	cursor: pointer;
	padding-right: 14px;
}

button.cfe-form-select:hover {
	border-color: #9ca3af;
}

.cfe-form-select-value {
	flex: 1;
	min-width: 0;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.cfe-form-select-value.is-placeholder {
	color: #9ca3af;
}

.cfe-form-select-arrow {
	flex: none;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	color: #6b7280;
	font-size: 14px;
	line-height: 1;
	transition: transform 150ms ease;
}

.cfe-form-select-arrow svg,
.cfe-form-select-arrow i {
	width: 1em;
	height: 1em;
	font-size: inherit;
	fill: currentColor;
}

button.cfe-form-select[aria-expanded="true"] .cfe-form-select-arrow {
	transform: rotate( 180deg );
}

.cfe-form-select-list {
	position: absolute;
	z-index: 1000;
	top: calc( 100% + 4px );
	left: 0;
	right: 0;
	margin: 0;
	padding: 4px 0;
	list-style: none;
	background: #ffffff;
	border: 1px solid #d1d5db;
	border-radius: 6px;
	box-shadow: 0 8px 24px rgba( 17, 24, 39, 0.12 );
	max-height: 260px;
	overflow-y: auto;
	overscroll-behavior: contain;
}

.cfe-form-select-list[hidden] {
	display: none;
}

.cfe-form-select-option {
	padding: 10px 14px;
	cursor: pointer;
	color: inherit;
	user-select: none;
	transition: background-color 100ms ease, color 100ms ease;
}

.cfe-form-select-option:hover,
.cfe-form-select-option.is-active {
	background-color: #f3f4f6;
}

.cfe-form-select-option[aria-selected="true"] {
	background-color: #eff6ff;
	color: #1d4ed8;
	font-weight: 500;
}

/* Country field. Reuses the custom-select chrome and prefixes each option with a
   flag glyph. Flags render as Unicode regional-indicator emoji pairs (e.g. "🇨🇾"
   for Cyprus) — that decouples us from intl-tel-input's class-based flag sprite,
   so the country picker stays consistent whether or not iti's stylesheet has
   loaded. Twemoji Country Flags is shipped as a same-origin @font-face below so
   Windows (which lacks colour flag emoji in its system fonts) still renders the
   actual flag instead of a regional-indicator letter pair. */
@font-face {
	font-family: 'Twemoji Country Flags';
	unicode-range: U+1F1E6-1F1FF, U+1F3F4, U+E0062-E0063, U+E0065, U+E0067, U+E006C, U+E006E, U+E0073-E0074, U+E0077, U+E007F;
	font-display: swap;
	/* Mozilla's polyfill font (~13 KB woff2), pulled from jsdelivr. The unicode-range
	   restricts the font to flag code points only — browsers that render flag emoji
	   natively (macOS, iOS, Android, Linux) never fetch this file. */
	src: url( 'https://cdn.jsdelivr.net/npm/country-flag-emoji-polyfill@0.1.4/dist/TwemojiCountryFlags.woff2' ) format( 'woff2' );
}

.cfe-form-country-option {
	display: flex;
	align-items: center;
	gap: 10px;
}

/* Each country option carries its flag in `data-flag="🇨🇾"`. We render it via
   ::before so the emoji never appears in the option's `textContent` — the
   custom-select code copies textContent into the visible button label on
   selection, and we don't want the flag duplicated alongside the dedicated
   flag span. */
.cfe-form-country-option[data-flag]::before {
	content: attr( data-flag );
	flex: none;
	font-family: 'Twemoji Country Flags', 'Segoe UI Emoji', 'Apple Color Emoji', 'Noto Color Emoji', sans-serif;
	font-size: 18px;
	line-height: 1;
	width: 20px;
	text-align: center;
}

.cfe-form-country-flag {
	flex: none;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 20px;
	font-family: 'Twemoji Country Flags', 'Segoe UI Emoji', 'Apple Color Emoji', 'Noto Color Emoji', sans-serif;
	font-size: 18px;
	line-height: 1;
}

.cfe-form-country-name {
	flex: 1;
	min-width: 0;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

/* No country picked yet: render a neutral placeholder chip instead of an empty
   1-character-wide gap. JS adds `is-empty` on init and removes it once a
   country is chosen. */
button.cfe-form-country .cfe-form-country-flag.is-empty {
	width: 20px;
	height: 14px;
	background-color: #e5e7eb;
	border-radius: 2px;
}

/* Radio / checkbox group */
.cfe-form-options {
	display: flex;
	flex-wrap: wrap;
	align-items: flex-start;
	gap: 12px;
}

/* Vertical layout — toggled per field type from the Style tab
   (Checkbox Fields / Radio Fields → Options Layout). */
.cfe-checkbox-layout-vertical .cfe-form-field-checkbox .cfe-form-options,
.cfe-radio-layout-vertical .cfe-form-field-radio .cfe-form-options {
	flex-direction: column;
	flex-wrap: nowrap;
}

.cfe-form-option {
	position: relative;
	display: inline-flex;
	align-items: center;
	gap: 8px;
	cursor: pointer;
	line-height: 1.4;
}

/* The native input stays in the DOM — validation and conditional logic read its
   `.checked` state — but it is taken out of view. The styled box below is what
   the visitor actually sees and clicks (the wrapping <label> forwards the click). */
.cfe-form-option input {
	position: absolute;
	top: 0;
	left: 0;
	width: 1px;
	height: 1px;
	margin: 0;
	padding: 0;
	opacity: 0;
	pointer-events: none;
}

.cfe-form-option-box {
	flex: 0 0 auto;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	box-sizing: border-box;
	width: 20px;
	height: 20px;
	background-color: #fff;
	border: 2px solid #9ca3af;
	transition: background-color 150ms ease, border-color 150ms ease;
}

.cfe-form-field-checkbox .cfe-form-option-box {
	border-radius: 4px;
}

.cfe-form-field-radio .cfe-form-option-box {
	border-radius: 50%;
}

/* The selected-state icon — hidden until the option is checked. */
.cfe-form-option-icon {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	color: #fff;
	font-size: 13px;
	line-height: 0;
	opacity: 0;
	transform: scale( 0.4 );
	transition: opacity 120ms ease, transform 120ms ease;
}

.cfe-form-option-icon svg {
	display: block;
	width: 1em;
	height: 1em;
}

.cfe-form-option-icon i {
	font-size: 1em;
	line-height: 1;
}

.cfe-form-option input:checked ~ .cfe-form-option-box {
	background-color: #2563eb;
	border-color: #2563eb;
}

.cfe-form-option input:checked ~ .cfe-form-option-box .cfe-form-option-icon {
	opacity: 1;
	transform: scale( 1 );
}

.cfe-form-option input:focus-visible ~ .cfe-form-option-box {
	outline: 3px solid rgba( 29, 78, 216, 0.35 );
	outline-offset: 2px;
}

.cfe-form-option-text {
	flex: 1 1 auto;
}

/* File upload — picked-files card list (rendered by JS above the dropzone) */
.cfe-form-file-wrap {
	display: flex;
	flex-direction: column;
	gap: 12px;
	width: 100%;
}

.cfe-form-file-list {
	list-style: none;
	margin: 0;
	padding: 0;
	display: flex;
	flex-direction: column;
	gap: 8px;
}

.cfe-form-file-list[hidden] {
	display: none;
}

.cfe-form-file-card {
	display: flex;
	align-items: center;
	gap: 14px;
	padding: 14px 16px;
	background: #f9fafb;
	border-radius: 8px;
	color: inherit;
	font-size: 0.95em;
}

.cfe-form-file-card-icon {
	flex: none;
	color: #1f2937;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	font-size: 22px;
	line-height: 1;
}

.cfe-form-file-card-icon svg,
.cfe-form-file-card-icon i {
	width: 1em;
	height: 1em;
	font-size: inherit;
	fill: currentColor;
}

.cfe-form-file-card-name {
	flex: 1 1 auto;
	min-width: 0;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

/*
 * Compound `button.cfe-form-file-card-remove` (tag + class) beats theme button rules
 * like `.elementor-widget-container button { background: var(--primary) }` without
 * needing !important. Every common button property is reset explicitly so the theme's
 * brand color, gradient, border, or shadow can't bleed through unstyled. Elementor
 * controls (selectors below in PHP) layer on top of this base.
 */
.cfe-form-file-wrap button.cfe-form-file-card-remove,
button.cfe-form-file-card-remove {
	flex: none;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	/* Box sizes itself around the icon: width = font-size + 2 * padding. Setting the
	   Elementor "Remove Button Size" slider sets font-size only, so the icon visibly
	   scales to whatever the user picks while the click area stays proportional. */
	width: auto;
	height: auto;
	min-width: 0;
	min-height: 0;
	margin: 0;
	padding: 4px;
	border: 0;
	border-radius: 4px;
	background: transparent;
	background-color: transparent;
	background-image: none;
	box-shadow: none;
	text-shadow: none;
	color: inherit;
	font: inherit;
	font-size: 14px;
	line-height: 1;
	letter-spacing: normal;
	text-transform: none;
	text-decoration: none;
	cursor: pointer;
	-webkit-appearance: none;
	appearance: none;
	transition: background-color 120ms ease, color 120ms ease;
}

.cfe-form-file-wrap button.cfe-form-file-card-remove svg,
.cfe-form-file-wrap button.cfe-form-file-card-remove i {
	width: 1em;
	height: 1em;
	font-size: inherit;
	line-height: 1;
	fill: currentColor;
}

.cfe-form-file-wrap button.cfe-form-file-card-remove:hover,
.cfe-form-file-wrap button.cfe-form-file-card-remove:focus-visible {
	background: rgba( 17, 24, 39, 0.08 );
	background-color: rgba( 17, 24, 39, 0.08 );
	color: #b91c1c;
	outline: none;
}

/* File upload */
.cfe-form-file {
	position: relative;
	display: flex;
	align-items: center;
	gap: 10px;
	padding: 14px 16px;
	border: 1.5px dashed #d1d5db;
	border-radius: 8px;
	background: #f9fafb;
	cursor: pointer;
	transition: border-color 150ms ease, background-color 150ms ease;
}

.cfe-form-file:hover {
	border-color: #2563eb;
	background: #f3f6ff;
}

.cfe-form-file-input {
	position: absolute;
	inset: 0;
	opacity: 0;
	cursor: pointer;
}

.cfe-form-file-icon {
	color: #6b7280;
	flex: none;
	font-size: 20px;
	line-height: 1;
	display: inline-flex;
	align-items: center;
	justify-content: center;
}

.cfe-form-file-icon svg {
	width: 1em;
	height: 1em;
	fill: currentColor;
}

.cfe-form-file-text {
	color: inherit;
	font-weight: 500;
}

.cfe-form-file-help {
	margin-left: auto;
	font-size: 0.875em;
	color: #6b7280;
	max-width: 60%;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

/* Submit button */
.cfe-form-submit-field {
	grid-column: span 12;
}

.cfe-form-submit-wrap {
	text-align: left;
}

.cfe-form-submit {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 6px;
	font: inherit;
	font-weight: 600;
	color: #ffffff;
	background: #1d4ed8;
	border: 1px solid transparent;
	border-radius: 6px;
	padding: 12px 28px;
	cursor: pointer;
	transition: background-color 200ms ease, color 200ms ease, transform 200ms ease, box-shadow 200ms ease;
}

.cfe-form-submit:hover {
	background: #1e40af;
}

.cfe-form-submit:focus-visible {
	outline: 3px solid rgba( 29, 78, 216, 0.4 );
	outline-offset: 2px;
}

.cfe-form-submit:disabled,
.cfe-form-submit.is-loading {
	cursor: progress;
	opacity: 0.85;
}

.cfe-form-submit-spinner {
	display: none;
	width: 14px;
	height: 14px;
	border: 2px solid currentColor;
	border-top-color: transparent;
	border-radius: 50%;
	animation: cfe-spin 0.8s linear infinite;
	margin-left: 8px;
}

.cfe-form-submit.is-loading .cfe-form-submit-spinner {
	display: inline-block;
}

@keyframes cfe-spin {
	to {
		transform: rotate( 360deg );
	}
}

/* Per-field error */
.cfe-form-error {
	display: block;
	min-height: 1em;
	margin-top: 4px;
	color: #dc2626;
	font-size: 0.875em;
}

.cfe-form-error:empty {
	min-height: 0;
}

/* Form-level messages */
.cfe-form-message {
	margin-top: 16px;
	padding: 12px 16px;
	border-radius: 6px;
	border: 1px solid transparent;
}

.cfe-form-message-success {
	color: #065f46;
	background: #ecfdf5;
	border-color: #a7f3d0;
}

.cfe-form-message-error {
	color: #991b1b;
	background: #fef2f2;
	border-color: #fecaca;
}

/* Honeypot — off-screen, NOT display:none. */
.cfe-form-honey {
	position: absolute !important;
	left: -9999px !important;
	top: auto !important;
	width: 1px !important;
	height: 1px !important;
	overflow: hidden !important;
	clip: rect( 0, 0, 0, 0 ) !important;
}

/* =========================================================
   Multi-step form
   ========================================================= */

/* A hidden step. [hidden] alone is enough in modern browsers, but some themes
   set `display` on generic divs, so we pin it. */
.cfe-form-step[hidden] {
	display: none;
}

.cfe-form-step-header {
	margin-bottom: 16px;
}

.cfe-form-step-title {
	margin: 0;
	font-size: 1.1em;
	font-weight: 700;
	line-height: 1.3;
}

.cfe-form-step-desc {
	margin: 4px 0 0;
	font-size: 0.9em;
	opacity: 0.75;
}

/* Progress indicator */
.cfe-form-progress {
	margin-bottom: 24px;
}

.cfe-form-progress-bar {
	display: flex;
	align-items: center;
	gap: 6px;
}

.cfe-form-progress-segment {
	flex: 1 1 0;
	height: 6px;
	background-color: #e5e7eb;
	border-radius: 999px;
	transition: background-color 250ms ease;
}

.cfe-form-progress-segment.is-complete {
	background-color: #2563eb;
}

.cfe-form-progress-segment.is-active {
	background-color: #2563eb;
}

/* The progress text sits above the segmented bar; the gap goes beneath it. */
.cfe-form-progress-text {
	margin-bottom: 8px;
	text-align: right;
	font-size: 0.85em;
	color: #6b7280;
}

/* Step navigation row */
.cfe-form-nav {
	display: flex;
	align-items: center;
	gap: 12px;
	margin-top: 24px;
}

/* Pushes Previous to the left and Next / Submit to the right (the default
   "split" position). The other positions hide the spacer and use
   justify-content instead — see the `.cfe-navlayout-*` rules below. */
.cfe-form-nav-spacer {
	flex: 1 1 auto;
}

/* Buttons Position — set from the Step Navigation Buttons style controls.
   The chosen value is added to the widget wrapper as `.cfe-navlayout-{value}`. */
.cfe-navlayout-start .cfe-form-nav {
	justify-content: flex-start;
}

.cfe-navlayout-end .cfe-form-nav {
	justify-content: flex-end;
}

.cfe-navlayout-center .cfe-form-nav {
	justify-content: center;
}

.cfe-navlayout-stacked .cfe-form-nav {
	flex-direction: column;
	align-items: stretch;
}

.cfe-navlayout-start .cfe-form-nav-spacer,
.cfe-navlayout-end .cfe-form-nav-spacer,
.cfe-navlayout-center .cfe-form-nav-spacer,
.cfe-navlayout-stacked .cfe-form-nav-spacer {
	display: none;
}

.cfe-form-nav-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	font: inherit;
	font-weight: 600;
	color: #1f2937;
	background: #f3f4f6;
	border: 1px solid #d1d5db;
	border-radius: 6px;
	padding: 11px 24px;
	cursor: pointer;
	transition: background-color 150ms ease, color 150ms ease, border-color 150ms ease, opacity 150ms ease;
}

.cfe-form-nav-btn:hover {
	background: #e5e7eb;
}

.cfe-form-nav-btn:focus-visible {
	outline: 3px solid rgba( 29, 78, 216, 0.35 );
	outline-offset: 2px;
}

/* The Next button is disabled until the current step's required fields are done. */
.cfe-form-nav-btn:disabled {
	cursor: not-allowed;
	opacity: 0.5;
}

.cfe-form-nav-btn[hidden] {
	display: none;
}

/* Multi-step: the submit button gets its own row below the Previous / Next nav,
   never inside it. The row collapses to nothing on every step but the last,
   where the JS reveals the button. */
.cfe-form-submit-row .cfe-form-submit[hidden] {
	display: none;
}

.cfe-form-submit-row .cfe-form-submit {
	margin-top: 24px;
}

/* =========================================================
   Success block
   ========================================================= */

/* When a Success Block is revealed, collapse every other form child so the
   chosen Elementor template visually replaces the form in place. */
.cfe-form.cfe-has-success-block > *:not(.cfe-form-success-block) {
	display: none !important;
}

.cfe-form-success-block:focus {
	outline: none;
}

.cfe-form-success-block[hidden] {
	display: none;
}
