/* Lana Data Forms — front-end styles */

.ldf-wrapper {
	--ldf-primary: #2d2a4a;
	--ldf-star: #f5b400;
	--ldf-border: #ece9f3;
	--ldf-bg-input: #fbfbfd;
	--ldf-text: #241f3d;
	--ldf-muted: #8b8b93;
	--ldf-error: #e14545;
	--ldf-badge-bg: color-mix(in srgb, var(--ldf-primary) 10%, white);

	font-family: 'Cairo', Tahoma, Arial, sans-serif;
	direction: rtl;
	max-width: 440px;
	margin: 0 auto;
	box-sizing: border-box;
}

.ldf-wrapper *,
.ldf-wrapper *::before,
.ldf-wrapper *::after {
	box-sizing: border-box;
}

.ldf-card {
	position: relative;
	background: #ffffff;
	border-radius: 22px;
	padding: 32px 28px 28px;
	box-shadow: 0 2px 8px rgba(36, 31, 61, 0.05), 0 8px 24px rgba(36, 31, 61, 0.07), 0 24px 48px rgba(36, 31, 61, 0.06);
	animation: ldf-fade-up 0.55s cubic-bezier(0.22, 1, 0.36, 1);
	transition: box-shadow 0.35s ease;
	overflow: hidden;
}

.ldf-card:hover {
	box-shadow: 0 2px 8px rgba(36, 31, 61, 0.06), 0 10px 28px rgba(36, 31, 61, 0.09), 0 30px 60px rgba(36, 31, 61, 0.08);
}

@keyframes ldf-fade-up {
	from {
		opacity: 0;
		transform: translateY(14px);
	}
	to {
		opacity: 1;
		transform: translateY(0);
	}
}

.ldf-top-row {
	display: flex !important;
	flex-flow: row nowrap !important;
	direction: rtl !important;
	align-items: center !important;
	justify-content: space-between !important;
	gap: 10px;
	margin-bottom: 6px;
	width: 100%;
}

.ldf-top-row > .ldf-heading {
	order: 1 !important;
	display: inline-block !important;
	width: auto !important;
	max-width: 100%;
	flex: 1 1 auto !important;
	min-width: 0 !important;
	text-align: right !important;
}

.ldf-top-row > .ldf-badge {
	order: 2 !important;
	flex: 0 0 auto !important;
	width: auto !important;
	margin-inline-start: 10px;
}

.ldf-badge {
	display: inline-flex !important;
	align-items: center;
	flex-shrink: 0;
	gap: 5px;
	background: var(--ldf-badge-bg, #f3f0ff);
	color: var(--ldf-primary);
	font-weight: 700;
	font-size: 13px;
	padding: 6px 12px;
	border-radius: 999px;
	box-shadow: 0 2px 8px color-mix(in srgb, var(--ldf-primary) 18%, transparent);
	white-space: nowrap;
	margin-top: 2px;
}

.ldf-star {
	width: 14px;
	height: 14px;
	color: var(--ldf-star);
}

.ldf-heading {
	margin: 0;
	font-size: 22px;
	font-weight: 800;
	color: var(--ldf-text);
	line-height: 1.4;
}

.ldf-subheading {
	margin: 0 0 24px;
	font-size: 14px;
	color: var(--ldf-muted);
	line-height: 1.6;
}

.ldf-field-group {
	margin-bottom: 16px;
	position: relative;
}

.ldf-label {
	display: block;
	font-size: 13px;
	font-weight: 600;
	color: var(--ldf-text);
	margin-bottom: 7px;
}

.ldf-input {
	width: 100%;
	appearance: none;
	-webkit-appearance: none;
	background: var(--ldf-bg-input);
	border: 1.5px solid var(--ldf-border);
	border-radius: 14px;
	padding: 14px 16px;
	font-size: 15px;
	font-family: inherit;
	color: var(--ldf-text);
	box-shadow: 0 1px 2px rgba(36, 31, 61, 0.03);
	transition: border-color 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease;
	outline: none;
}

.ldf-input::placeholder {
	color: #b7b5c2;
}

.ldf-input:hover {
	border-color: color-mix(in srgb, var(--ldf-primary) 35%, var(--ldf-border));
}

.ldf-input:focus {
	border-color: var(--ldf-primary);
	background: #ffffff;
	box-shadow: 0 0 0 4px color-mix(in srgb, var(--ldf-primary) 12%, transparent);
}

.ldf-input-phone {
	direction: ltr;
	text-align: right;
}

.ldf-select-wrap {
	position: relative;
}

.ldf-select {
	padding-left: 40px;
	cursor: pointer;
}

.ldf-select-wrap::after {
	content: '';
	position: absolute;
	left: 16px;
	top: 50%;
	width: 10px;
	height: 10px;
	border-right: 2px solid var(--ldf-muted);
	border-bottom: 2px solid var(--ldf-muted);
	transform: translateY(-65%) rotate(45deg);
	pointer-events: none;
	transition: transform 0.2s ease;
}

.ldf-select-wrap:focus-within::after {
	transform: translateY(-35%) rotate(225deg);
	border-color: var(--ldf-primary);
}

.ldf-field-group.ldf-has-error .ldf-input {
	border-color: var(--ldf-error);
	background: #fff6f6;
}

.ldf-field-group.ldf-has-error .ldf-input:focus {
	box-shadow: 0 0 0 4px rgba(225, 69, 69, 0.12);
}

.ldf-error-msg {
	display: block;
	min-height: 0;
	font-size: 12.5px;
	color: var(--ldf-error);
	margin-top: 6px;
	opacity: 0;
	transform: translateY(-4px);
	transition: opacity 0.2s ease, transform 0.2s ease;
}

.ldf-field-group.ldf-has-error .ldf-error-msg {
	opacity: 1;
	transform: translateY(0);
}

.ldf-hp-field {
	position: absolute !important;
	left: -9999px !important;
	top: -9999px !important;
	height: 0;
	overflow: hidden;
}

.ldf-submit-btn {
	position: relative;
	width: 100%;
	border: none;
	border-radius: 14px;
	padding: 16px 20px;
	background: linear-gradient(135deg, var(--ldf-primary), color-mix(in srgb, var(--ldf-primary) 80%, black));
	color: #ffffff;
	font-family: inherit;
	font-size: 16px;
	font-weight: 700;
	cursor: pointer;
	margin-top: 6px;
	box-shadow: 0 8px 20px color-mix(in srgb, var(--ldf-primary) 30%, transparent);
	transition: transform 0.2s ease, box-shadow 0.2s ease, filter 0.2s ease;
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 10px;
}

.ldf-btn-icon {
	width: 16px !important;
	height: 16px !important;
	max-width: 16px;
	max-height: 16px;
	flex-shrink: 0;
	transition: transform 0.25s ease;
}

.ldf-submit-btn:hover {
	transform: translateY(-2px);
	box-shadow: 0 12px 28px color-mix(in srgb, var(--ldf-primary) 48%, transparent);
	filter: brightness(1.05);
}

.ldf-submit-btn:hover .ldf-btn-icon {
	transform: scale(1.1) rotate(-4deg);
}

.ldf-submit-btn:active {
	transform: translateY(0);
	filter: brightness(0.97);
}

.ldf-submit-btn:disabled {
	cursor: default;
	opacity: 0.85;
	transform: none;
}

.ldf-submit-btn.is-loading .ldf-btn-icon {
	display: none;
}

.ldf-btn-spinner {
	display: none;
	width: 16px;
	height: 16px;
	border-radius: 50%;
	border: 2px solid rgba(255, 255, 255, 0.35);
	border-top-color: #ffffff;
	animation: ldf-spin 0.7s linear infinite;
}

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

.ldf-submit-btn.is-loading .ldf-btn-text {
	opacity: 0.85;
}

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

.ldf-privacy {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 6px;
	margin: 16px 0 0;
	font-size: 12.5px;
	color: var(--ldf-muted);
	text-align: center;
}

.ldf-shield-icon {
	width: 14px;
	height: 14px;
	flex-shrink: 0;
	color: color-mix(in srgb, var(--ldf-primary) 60%, var(--ldf-muted));
}

.ldf-submit-error {
	display: none;
	margin-top: 14px;
	padding: 10px 14px;
	border-radius: 10px;
	background: #fff1f1;
	color: #b32a2a;
	font-size: 13px;
	text-align: center;
}

.ldf-submit-error.is-visible {
	display: block;
}

.ldf-success-panel {
	display: none;
	position: absolute;
	inset: 0;
	background: #ffffff;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: 14px;
	padding: 30px;
	text-align: center;
	border-radius: 22px;
}

.ldf-card.is-success .ldf-success-panel {
	display: flex;
	animation: ldf-fade-up 0.4s ease;
}

.ldf-card.is-success > *:not(.ldf-success-panel) {
	visibility: hidden;
}

.ldf-success-check {
	width: 64px;
	height: 64px;
	color: #2fa86b;
}

.ldf-success-check circle {
	stroke: #2fa86b;
	stroke-width: 2;
	stroke-dasharray: 166;
	stroke-dashoffset: 166;
	animation: ldf-draw 0.5s ease forwards 0.1s;
}

.ldf-success-check path {
	stroke: #2fa86b;
	stroke-width: 3;
	stroke-linecap: round;
	stroke-linejoin: round;
	stroke-dasharray: 48;
	stroke-dashoffset: 48;
	animation: ldf-draw 0.35s ease forwards 0.55s;
}

@keyframes ldf-draw {
	to {
		stroke-dashoffset: 0;
	}
}

.ldf-success-text {
	margin: 0;
	font-size: 15px;
	font-weight: 600;
	color: var(--ldf-text);
	line-height: 1.7;
}

@media (max-width: 480px) {
	.ldf-card {
		padding: 26px 20px 22px;
		border-radius: 18px;
	}
	.ldf-heading {
		font-size: 19px;
	}
}
