.ec-pi-form-wrap {
	max-width: 640px;
	margin: 0 auto 2rem;
	padding: 0 0.5rem;
}

.ec-pi-meta {
	color: #555;
	font-size: 0.95rem;
	margin-bottom: 1rem;
}

.ec-pi-progress {
	position: relative;
	height: 8px;
	background: #e8e8e8;
	border-radius: 4px;
	margin-bottom: 1.5rem;
	overflow: hidden;
}

.ec-pi-progress-bar {
	height: 100%;
	background: #2271b1;
	border-radius: 4px;
	transition: width 0.25s ease;
}

.ec-pi-progress-label {
	position: absolute;
	right: 0;
	top: 10px;
	font-size: 0.8rem;
	color: #555;
}

.ec-pi-step[hidden] {
	display: none !important;
}

.ec-pi-step-title {
	font-size: 1.25rem;
	margin: 0 0 1rem;
}

.ec-pi-field {
	margin-bottom: 1rem;
}

.ec-pi-field label {
	display: block;
	font-weight: 600;
	margin-bottom: 0.35rem;
}

.ec-pi-field-hint {
	display: block;
	font-size: 0.875rem;
	line-height: 1.45;
	color: #646970;
	margin: 0 0 0.45rem;
}

.ec-pi-field input[type='text'],
.ec-pi-field input[type='tel'],
.ec-pi-field input[type='email'],
.ec-pi-field select,
.ec-pi-field textarea {
	width: 100%;
	max-width: 100%;
	box-sizing: border-box;
	padding: 0.5rem 0.65rem;
	border: 1px solid #ccc;
	border-radius: 4px;
	font: inherit;
}

.ec-pi-field textarea {
	resize: vertical;
	min-height: 96px;
}

.ec-pi-field--error input,
.ec-pi-field--error textarea,
.ec-pi-field--error select,
.ec-pi-fieldset.ec-pi-field--error {
	border-color: #b32d2e;
}

.ec-pi-fieldset {
	border: 1px solid #ddd;
	padding: 0.75rem 1rem;
	margin: 0 0 1rem;
	border-radius: 4px;
}

.ec-pi-fieldset legend {
	font-weight: 600;
	padding: 0 0.25rem;
}

.ec-pi-check {
	display: inline-block;
	margin: 0.35rem 1rem 0.35rem 0;
	font-weight: normal;
}

.ec-pi-lang-row {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 0.75rem;
	margin-bottom: 0.5rem;
}

.ec-pi-lang-level {
	max-width: 160px;
}

.ec-pi-honeypot {
	position: absolute;
	left: -9999px;
	width: 1px;
	height: 1px;
	overflow: hidden;
}

.ec-pi-hint {
	color: #555;
	font-size: 0.95rem;
	margin: -0.5rem 0 1rem;
}

.ec-pi-actions {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 0.75rem;
	margin-top: 1.75rem;
	padding-top: 1.25rem;
	border-top: 1px solid rgba(0, 0, 0, 0.08);
}

/* .ec-pi-btn sets display — without this, [hidden] on nav buttons loses to that rule and Submit can look visible while JS still treats it as hidden + disabled */
.ec-pi-actions .ec-pi-btn[hidden] {
	display: none !important;
}

.ec-pi-prev {
	margin-right: auto;
}

/* ---- Form navigation & file picker buttons ---- */
.ec-pi-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-height: 2.65rem;
	padding: 0 1.35rem;
	font-size: 0.9375rem;
	font-weight: 600;
	font-family: inherit;
	line-height: 1.2;
	letter-spacing: 0.02em;
	border-radius: 8px;
	border: 2px solid transparent;
	cursor: pointer;
	text-decoration: none;
	transition:
		background 0.2s ease,
		color 0.2s ease,
		border-color 0.2s ease,
		box-shadow 0.2s ease,
		transform 0.15s ease,
		filter 0.2s ease;
	box-sizing: border-box;
}

.ec-pi-btn:disabled {
	opacity: 0.45;
	cursor: not-allowed;
	filter: none;
	transform: none;
	box-shadow: none;
}

.ec-pi-btn--ghost {
	background: #fff;
	color: #1d2327;
	border-color: #c3c4c7;
	box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
}

.ec-pi-btn--ghost:hover:not(:disabled) {
	background: #f6f7f7;
	border-color: #8c8f94;
	box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
}

.ec-pi-btn--primary {
	background: linear-gradient(165deg, #c9353a 0%, #9e2428 100%);
	color: #fff;
	border-color: #7c1d20;
	box-shadow: 0 2px 10px rgba(158, 36, 40, 0.35);
}

.ec-pi-btn--primary:hover:not(:disabled) {
	filter: brightness(1.06);
	box-shadow: 0 4px 16px rgba(158, 36, 40, 0.42);
	transform: translateY(-1px);
}

.ec-pi-btn--primary:active:not(:disabled) {
	transform: translateY(0);
	filter: brightness(0.98);
}

.ec-pi-btn--submit {
	min-width: 12rem;
	padding-left: 1.6rem;
	padding-right: 1.6rem;
}

.ec-pi-btn--outline {
	background: #fff;
	color: #1d2327;
	border-color: #2271b1;
	box-shadow: 0 1px 3px rgba(34, 113, 177, 0.12);
}

.ec-pi-btn--outline:hover:not(:disabled) {
	background: #f0f6fc;
	border-color: #135e96;
	color: #135e96;
	box-shadow: 0 2px 8px rgba(34, 113, 177, 0.18);
}

.ec-pi-file-row {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 0.65rem;
	margin-top: 0.35rem;
}

.ec-pi-sr-only {
	position: absolute;
	width: 1px;
	height: 1px;
	padding: 0;
	margin: -1px;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	white-space: nowrap;
	border: 0;
}

.ec-pi-error {
	display: block;
	color: #b32d2e;
	font-size: 0.875rem;
	margin-top: 0.35rem;
	min-height: 1.2em;
}

.ec-pi-message {
	margin-top: 1rem;
	padding: 0.75rem 1rem;
	border-radius: 4px;
	background: #f6f7f7;
	border: 1px solid #ddd;
}

.ec-pi-message--success {
	background: #edfaef;
	border-color: #46b450;
	color: #1e4620;
}

.ec-pi-message--error {
	background: #fcf0f1;
	border-color: #d63638;
	color: #3c1f1f;
}

.required {
	color: #b32d2e;
}

.ec-pi-hint--tight {
	margin: 0 0 0.75rem;
	font-size: 0.9rem;
}

.ec-pi-check--block {
	display: block;
	margin: 0.5rem 0;
}

.ec-pi-check-label {
	font-weight: normal;
}

.ec-pi-field-label {
	display: block;
	font-weight: 600;
	margin-bottom: 0.35rem;
}

.ec-pi-file-name {
	display: block;
	margin-top: 0.5rem;
	font-size: 0.9rem;
	color: #333;
	word-break: break-all;
}
