/**
 * Premium Elementor Forms — frontend styles.
 * Everything here is a sane default: the Elementor Style tab overrides it.
 */

.pef-form-wrapper {
	--pef-col-gap: 16px;
	--pef-row-gap: 18px;
	--pef-accent: #2563eb;
	--pef-border: #d5d9e0;
	--pef-error: #d63638;
	--pef-success: #0a7c42;
	--pef-muted: #6b7280;
}

.pef-form {
	margin: 0;
}

.pef-fields {
	display: flex;
	flex-wrap: wrap;
	column-gap: var(--pef-col-gap);
	row-gap: var(--pef-row-gap);
	align-items: flex-start;
}

.pef-field-group {
	display: flex;
	flex-direction: column;
	min-width: 0;
	width: 100%;
}

.pef-field-group[hidden],
.pef-field-group.pef-hidden {
	display: none !important;
}

/* Column widths: P% minus its share of the gap. */
.pef-w-100 { width: 100%; }
.pef-w-80  { width: calc(80% - var(--pef-col-gap) * 0.2); }
.pef-w-75  { width: calc(75% - var(--pef-col-gap) * 0.25); }
.pef-w-66  { width: calc(66.666% - var(--pef-col-gap) * 0.334); }
.pef-w-60  { width: calc(60% - var(--pef-col-gap) * 0.4); }
.pef-w-50  { width: calc(50% - var(--pef-col-gap) * 0.5); }
.pef-w-40  { width: calc(40% - var(--pef-col-gap) * 0.6); }
.pef-w-33  { width: calc(33.333% - var(--pef-col-gap) * 0.667); }
.pef-w-25  { width: calc(25% - var(--pef-col-gap) * 0.75); }
.pef-w-20  { width: calc(20% - var(--pef-col-gap) * 0.8); }

@media (max-width: 1024px) {
	.pef-w-md-100 { width: 100%; }
	.pef-w-md-80  { width: calc(80% - var(--pef-col-gap) * 0.2); }
	.pef-w-md-75  { width: calc(75% - var(--pef-col-gap) * 0.25); }
	.pef-w-md-66  { width: calc(66.666% - var(--pef-col-gap) * 0.334); }
	.pef-w-md-60  { width: calc(60% - var(--pef-col-gap) * 0.4); }
	.pef-w-md-50  { width: calc(50% - var(--pef-col-gap) * 0.5); }
	.pef-w-md-40  { width: calc(40% - var(--pef-col-gap) * 0.6); }
	.pef-w-md-33  { width: calc(33.333% - var(--pef-col-gap) * 0.667); }
	.pef-w-md-25  { width: calc(25% - var(--pef-col-gap) * 0.75); }
	.pef-w-md-20  { width: calc(20% - var(--pef-col-gap) * 0.8); }
}

@media (max-width: 767px) {
	.pef-field-group { width: 100%; }
	.pef-w-sm-100 { width: 100%; }
	.pef-w-sm-80  { width: calc(80% - var(--pef-col-gap) * 0.2); }
	.pef-w-sm-75  { width: calc(75% - var(--pef-col-gap) * 0.25); }
	.pef-w-sm-66  { width: calc(66.666% - var(--pef-col-gap) * 0.334); }
	.pef-w-sm-60  { width: calc(60% - var(--pef-col-gap) * 0.4); }
	.pef-w-sm-50  { width: calc(50% - var(--pef-col-gap) * 0.5); }
	.pef-w-sm-40  { width: calc(40% - var(--pef-col-gap) * 0.6); }
	.pef-w-sm-33  { width: calc(33.333% - var(--pef-col-gap) * 0.667); }
	.pef-w-sm-25  { width: calc(25% - var(--pef-col-gap) * 0.75); }
	.pef-w-sm-20  { width: calc(20% - var(--pef-col-gap) * 0.8); }
}

/* Labels. */
.pef-label {
	display: block;
	margin-bottom: 6px;
	font-weight: 600;
	line-height: 1.35;
}

.pef-labels-hidden .pef-label {
	position: absolute !important;
	width: 1px;
	height: 1px;
	padding: 0;
	margin: -1px;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	white-space: nowrap;
	border: 0;
}

.pef-required {
	margin-left: 3px;
	color: var(--pef-error);
}

/* Controls. */
.pef-control {
	width: 100%;
}

.pef-input {
	width: 100%;
	max-width: 100%;
	padding: 10px 12px;
	border: 1px solid var(--pef-border);
	border-radius: 6px;
	background: #fff;
	color: inherit;
	font: inherit;
	line-height: 1.4;
	transition: border-color .15s ease, box-shadow .15s ease;
	box-sizing: border-box;
}

textarea.pef-input {
	min-height: 90px;
	resize: vertical;
}

.pef-input:focus {
	outline: none;
	border-color: var(--pef-accent);
	box-shadow: 0 0 0 3px rgba(37, 99, 235, .15);
}

.pef-input[readonly] {
	background: #f6f7f9;
	cursor: default;
}

.pef-input-hidden {
	display: none;
}

/* Choices. */
.pef-choices {
	display: flex;
	flex-direction: column;
	gap: 8px;
}

.pef-choices-inline {
	flex-direction: row;
	flex-wrap: wrap;
	gap: 8px 20px;
}

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

.pef-choice input {
	margin: 2px 0 0;
	flex: 0 0 auto;
	width: 17px;
	height: 17px;
	accent-color: var(--pef-accent);
}

.pef-choice-indicator {
	display: none;
}

.pef-acceptance {
	align-items: flex-start;
}

/* Files. */
.pef-file-wrap {
	display: flex;
	flex-direction: column;
	gap: 8px;
}

.pef-input-file {
	padding: 8px;
	background: #fbfbfc;
	border-style: dashed;
	cursor: pointer;
}

.pef-file-list {
	display: flex;
	flex-wrap: wrap;
	gap: 6px;
}

.pef-file-chip {
	display: inline-block;
	padding: 3px 8px;
	border-radius: 999px;
	background: #eef2ff;
	color: #3730a3;
	font-size: 12px;
}

.pef-file-hint {
	margin-top: 4px;
	color: var(--pef-muted);
	font-size: 12px;
}

/* Signature. */
.pef-signature {
	position: relative;
	display: flex;
	flex-direction: column;
	gap: 6px;
}

.pef-signature-canvas {
	width: 100%;
	height: 160px;
	border: 1px dashed var(--pef-border);
	border-radius: 6px;
	background: #fff;
	touch-action: none;
	cursor: crosshair;
}

.pef-signature-clear {
	align-self: flex-start;
	padding: 2px 10px;
	border: 1px solid var(--pef-border);
	border-radius: 4px;
	background: #fff;
	font-size: 12px;
	cursor: pointer;
}

/* Help & errors. */
.pef-help {
	margin-top: 5px;
	color: var(--pef-muted);
	font-size: 13px;
	line-height: 1.4;
}

.pef-error {
	display: none;
	margin-top: 5px;
	color: var(--pef-error);
	font-size: 13px;
	line-height: 1.4;
}

.pef-field-group.pef-has-error .pef-error {
	display: block;
}

.pef-field-group.pef-has-error .pef-input {
	border-color: var(--pef-error);
}

/* Honeypot. */
.pef-hp {
	position: absolute !important;
	left: -9999px !important;
	width: 1px;
	height: 1px;
	overflow: hidden;
}

/* The hidden attribute must win over our own display rules. */
.pef-form-wrapper [hidden] {
	display: none !important;
}

/* Footer & buttons. */
.pef-form-footer {
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
	margin-top: 22px;
}

.pef-form-footer.pef-align-stretch .pef-btn {
	flex: 1 1 auto;
}

.pef-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	padding: 12px 26px;
	border: 1px solid transparent;
	border-radius: 6px;
	background: var(--pef-accent);
	color: #fff;
	font: inherit;
	font-weight: 600;
	line-height: 1.2;
	cursor: pointer;
	transition: background-color .15s ease, opacity .15s ease;
}

.pef-btn:hover {
	opacity: .92;
}

.pef-btn:disabled {
	cursor: not-allowed;
	opacity: .7;
}

.pef-btn-prev {
	background: transparent;
	border-color: var(--pef-border);
	color: inherit;
}

.pef-btn-spinner {
	display: none;
	width: 15px;
	height: 15px;
	border: 2px solid rgba(255, 255, 255, .45);
	border-top-color: #fff;
	border-radius: 50%;
	animation: pef-spin .7s linear infinite;
}

.pef-btn.is-loading .pef-btn-spinner {
	display: inline-block;
}

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

/* Steps. */
.pef-step {
	display: none;
}

.pef-step.pef-step-active {
	display: block;
	animation: pef-fade .25s ease;
}

@keyframes pef-fade {
	from { opacity: 0; transform: translateY(6px); }
	to   { opacity: 1; transform: none; }
}

.pef-step-title {
	margin: 0 0 16px;
	font-size: 1.15em;
}

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

.pef-progress-track {
	height: 6px;
	border-radius: 999px;
	background: #e6e8ec;
	overflow: hidden;
}

.pef-progress-fill {
	display: block;
	height: 100%;
	border-radius: 999px;
	background: var(--pef-accent);
	transition: width .3s ease;
}

.pef-progress-text {
	margin-top: 6px;
	color: var(--pef-muted);
	font-size: 13px;
}

.pef-progress-steps {
	display: flex;
	flex-wrap: wrap;
	gap: 10px 22px;
	margin: 0;
	padding: 0;
	list-style: none;
	counter-reset: none;
}

.pef-progress-step {
	display: flex;
	align-items: center;
	gap: 8px;
	color: var(--pef-muted);
	font-size: 14px;
}

.pef-progress-number {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 26px;
	height: 26px;
	border: 1px solid var(--pef-border);
	border-radius: 50%;
	font-size: 13px;
	font-weight: 600;
}

.pef-progress-step.is-active,
.pef-progress-step.is-done {
	color: inherit;
}

.pef-progress-step.is-active .pef-progress-number {
	background: var(--pef-accent);
	border-color: var(--pef-accent);
	color: #fff;
}

.pef-progress-step.is-done .pef-progress-number {
	border-color: var(--pef-accent);
	color: var(--pef-accent);
}

/* Messages. */
.pef-form-message {
	margin-top: 16px;
	padding: 0;
	border-radius: 6px;
	line-height: 1.5;
}

.pef-form-message.is-success,
.pef-form-message.is-error {
	padding: 12px 14px;
}

.pef-form-message.is-success {
	background: #e8f6ef;
	color: var(--pef-success);
}

.pef-form-message.is-error {
	background: #fdeaea;
	color: var(--pef-error);
}

.pef-captcha-notice {
	color: var(--pef-muted);
	font-size: 13px;
}

/* Confirmation screen shown in place of the form. */
.pef-form-message.pef-success-panel {
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	gap: 14px;
	margin-top: 0;
	padding: 28px 26px;
	border-radius: 8px;
}

.pef-success-head {
	display: flex;
	align-items: center;
	gap: 12px;
}

.pef-success-icon {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	flex: 0 0 auto;
	width: 38px;
	height: 38px;
	border-radius: 50%;
	background: currentColor;
	color: #fff;
}

.pef-success-icon svg {
	width: 20px;
	height: 20px;
	stroke: #fff;
	fill: none;
	stroke-width: 2.5;
	stroke-linecap: round;
	stroke-linejoin: round;
}

.pef-success-text {
	margin: 0;
	font-size: 1.05em;
	line-height: 1.55;
}

.pef-success-panel .pef-cta {
	text-decoration: none;
}
