/* ==========================================================
   Ebook Download Form
   Structure is always applied. Visual "skin" only when .edf-skin
   is present (Settings → Form & Messages → Use built-in styling).
   Elementor widget controls override everything below.
   ========================================================== */

.edf-form-wrap {
	position: relative;
	width: 100%;
	box-sizing: border-box;
}
.edf-form-wrap *,
.edf-form-wrap *::before,
.edf-form-wrap *::after {
	box-sizing: border-box;
}
.edf-form { margin: 0; }

.edf-fields {
	display: flex;
	align-items: stretch;
	gap: var(--edf-gap, 40px);
}
.edf-field-email { flex: 1 1 auto; min-width: 0; }
.edf-field-submit { flex: 0 0 auto; display: flex; }
.edf-input { width: 100%; }
.edf-button {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 10px;
	cursor: pointer;
	width: 100%;
}

.edf-layout-stacked .edf-fields { flex-direction: column; }
.edf-layout-stacked .edf-field-submit { justify-content: flex-start; }

@media (max-width: 600px) {
	.edf-stack-mobile .edf-fields { flex-direction: column; gap: 14px; }
	.edf-stack-mobile .edf-field-email,
	.edf-stack-mobile .edf-field-submit { flex: 0 0 auto !important; width: 100% !important; }
	.edf-stack-mobile .edf-field-submit .edf-button { width: 100%; min-width: 0; }
}

.edf-label { display: block; margin-bottom: 8px; }

.edf-sr {
	position: absolute !important;
	width: 1px; height: 1px;
	padding: 0; margin: -1px;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	white-space: nowrap;
	border: 0;
}
.edf-hp {
	position: absolute !important;
	left: -10000px;
	top: auto;
	width: 1px; height: 1px;
	overflow: hidden;
}

.edf-consent {
	display: flex;
	align-items: flex-start;
	gap: 10px;
	margin-top: 14px;
	font-size: 14px;
	line-height: 1.5;
	cursor: pointer;
}
.edf-consent-input { margin-top: 4px; flex: 0 0 auto; }

/* Loading state */
.edf-spinner {
	display: none;
	width: 16px; height: 16px;
	border: 2px solid currentColor;
	border-right-color: transparent;
	border-radius: 50%;
	animation: edf-spin 0.7s linear infinite;
}
.edf-form.is-loading .edf-spinner { display: inline-block; }
.edf-form.is-loading .edf-button { opacity: 0.85; cursor: progress; }

@keyframes edf-spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) {
	.edf-spinner { animation-duration: 2s; }
}

/* Messages */
.edf-message {
	display: none;
	margin-top: 16px;
	font-size: 15px;
	line-height: 1.5;
}
.edf-message.is-visible { display: block; }
.edf-message.is-success { color: var(--edf-success, #2e7d5b); }
.edf-message.is-error { color: var(--edf-error, #c0392b); }
.edf-message p { margin: 0; }

.edf-form.is-done .edf-fields { opacity: 0.55; pointer-events: none; }

/* ---------- Skin ---------- */
.edf-skin .edf-input {
	height: var(--edf-input-height, 50px);
	padding: 0 20px;
	font-family: inherit;
	font-size: var(--edf-font-size, 16px);
	color: var(--edf-input-text, #333);
	background: var(--edf-input-bg, #fff);
	border: 1px solid var(--edf-input-border, #ddd);
	border-radius: var(--edf-input-radius, 0);
	box-shadow: none;
	outline: none;
	transition: border-color 0.2s ease;
	-webkit-appearance: none;
	appearance: none;
}
.edf-skin .edf-input::placeholder { font-style: italic; color: #9a9a9a; opacity: 1; }
.edf-skin .edf-input:focus { border-color: var(--edf-input-focus, #7f8bc0); }
.edf-skin .edf-input:focus-visible { box-shadow: 0 0 0 3px rgba(127, 139, 192, 0.25); }
.edf-skin .edf-input.is-invalid { border-color: var(--edf-error, #c0392b); }

.edf-skin .edf-button {
	height: var(--edf-btn-height, 50px);
	min-width: var(--edf-btn-width, auto);
	padding: 0 36px;
	font-family: inherit;
	font-size: var(--edf-font-size, 16px);
	font-weight: 700;
	letter-spacing: 0.04em;
	text-transform: uppercase;
	color: var(--edf-btn-text, #fff);
	background: var(--edf-btn-bg, #7f8bc0);
	border: 0;
	border-radius: var(--edf-btn-radius, 50px);
	transition: background-color 0.2s ease, color 0.2s ease;
}
.edf-skin .edf-button:hover,
.edf-skin .edf-button:focus {
	color: var(--edf-btn-hover-text, #fff);
	background: var(--edf-btn-hover-bg, #6874ab);
}
.edf-skin .edf-button:focus-visible { outline: 2px solid var(--edf-btn-bg, #7f8bc0); outline-offset: 3px; }
