/* Abdallah.Team Forms — matches the theme's "عندك فكرة ؟" design (underline fields, floating labels). */
.atf {
	--atf-accent: var(--abt-orange, #fd853a);
	--atf-accent-dark: var(--abt-orange-dark, #f36b26);
	--atf-ink: var(--abt-ink, #171717);
	--atf-error: #d92d20;
	--atf-label: clamp(17px, 1.65vw, 23.7px);
	direction: rtl;
}
.atf-form { margin: 0; }
.atf-grid {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: clamp(28px, 4.6vw, 64px) 23px;
}
.atf-field { position: relative; padding-top: 14px; min-width: 0; }
.atf-field--full { grid-column: 1 / -1; }
.atf-field input,
.atf-field select,
.atf-field textarea {
	display: block;
	width: 100%;
	height: 52px;
	margin: 0;
	padding: 12px 0 8px;
	border: 0;
	border-bottom: 1.2px solid var(--atf-ink);
	border-radius: 0;
	background: transparent;
	color: var(--atf-ink);
	font: inherit;
	font-size: clamp(16px, 1.4vw, 20px);
	line-height: 1.5;
	box-shadow: none;
	outline: none;
	transition: border-color .2s;
	-webkit-appearance: none;
	appearance: none;
}
.atf-field textarea { height: 52px; min-height: 52px; resize: none; overflow: hidden; }
.atf-field select { padding-inline-end: 34px; cursor: pointer; }
.atf-field input[dir="ltr"] { text-align: right; }
.atf-field label {
	position: absolute;
	inset-inline-start: 0;
	top: 20px;
	max-width: 100%;
	color: var(--atf-ink);
	font-size: var(--atf-label);
	line-height: 1.4;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
	pointer-events: none;
	transform-origin: right top;
	transition: transform .2s cubic-bezier(.22,.61,.36,1), color .2s, top .2s;
}
.atf-req { color: var(--atf-accent); }
.atf-field:focus-within input,
.atf-field:focus-within select,
.atf-field:focus-within textarea { border-bottom-color: var(--atf-accent); border-bottom-width: 2px; }
.atf-field:focus-within label { color: var(--atf-accent); }
.atf-field:focus-within label,
.atf-field input:not(:placeholder-shown) + label,
.atf-field textarea:not(:placeholder-shown) + label,
.atf-field.has-value label {
	top: -8px;
	transform: scale(.68);
}
.atf-chevron {
	position: absolute;
	inset-inline-end: 4px;
	top: 34px;
	width: 19px;
	height: 10px;
	color: var(--atf-ink);
	pointer-events: none;
	transition: transform .2s;
}
.atf-field:focus-within .atf-chevron { color: var(--atf-accent); transform: rotate(180deg); }
.atf-error { display: block; min-height: 0; margin-top: 6px; color: var(--atf-error); font-size: 14px; line-height: 1.4; }
.atf-field.has-error input,
.atf-field.has-error select,
.atf-field.has-error textarea { border-bottom-color: var(--atf-error); }
.atf-field.has-error label { color: var(--atf-error); }

/* Honeypot */
.atf-hp { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap; }

.atf-actions { display: flex; justify-content: center; margin-top: clamp(32px, 3.5vw, 50px); }
.atf-submit {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 14px;
	min-width: 214px;
	min-height: clamp(56px, 4.9vw, 70px);
	padding: 8px 30px;
	border: 0;
	border-radius: 16px 0 16px 0;
	background: var(--atf-accent);
	color: #fff;
	font: inherit;
	font-size: clamp(18px, 1.65vw, 23.7px);
	font-weight: 700;
	line-height: 1.2;
	cursor: pointer;
	transition: background-color .25s, transform .25s cubic-bezier(.22,.61,.36,1), opacity .2s;
}
.atf-submit:hover { background: var(--atf-accent-dark); transform: translateY(-2px); }
.atf-submit:focus-visible { outline: 3px solid var(--atf-ink); outline-offset: 3px; }
.atf-submit:disabled { opacity: .75; cursor: progress; transform: none; }
.atf-arrow { width: 32px; height: 20px; flex: none; transition: transform .3s; }
.atf-submit:hover .atf-arrow { transform: translateX(5px); }
.atf-form.is-sending .atf-arrow { animation: atf-pulse 1s ease-in-out infinite; }
@keyframes atf-pulse { 50% { transform: translateX(6px); opacity: .5; } }

.atf-status { margin: 18px 0 0; text-align: center; font-size: 16px; line-height: 1.6; outline: none; }
.atf-status:empty { display: none; }
.atf-status.is-success { padding: 14px 18px; border-radius: 14px; background: #ecfdf3; color: #067647; font-weight: 600; }
.atf-status.is-error { color: var(--atf-error); }

@media (max-width: 599px) {
	.atf-grid { grid-template-columns: 1fr; gap: 10px; }
	.atf-submit { width: 100%; }
}
@media (prefers-reduced-motion: reduce) {
	.atf-field label, .atf-submit, .atf-arrow { transition: none; }
}
