/* إدخال — تنسيقات النماذج (تستخدم رموز تصميم القالب مع قيم احتياطية). */
.idk-formbox {
	--f-ink: var(--idk-forest, #0a3a2f); --f-green: var(--idk-green, #12936f); --f-mint: var(--idk-mint, #22d3ad);
	--f-line: var(--idk-line, #d9e6e0); --f-muted: var(--idk-muted, #586d66); --f-mist: var(--idk-mist, #e7f6f0);
	--f-display: var(--idk-display, inherit);
	background: #fff; border: 1px solid var(--f-line); border-radius: 28px; padding: clamp(22px, 4vw, 44px);
	box-shadow: 0 1px 2px rgba(5, 31, 25, .04), 0 24px 60px -30px rgba(5, 31, 25, .25);
	scroll-margin-top: 120px;
}
.idk-form[hidden], .idk-form__done[hidden] { display: none; }
.idk-form__hp { position: absolute !important; inset-inline-start: -9999px; width: 1px; height: 1px; overflow: hidden; }

.idk-form__group { border: 0; margin: 0; padding: 0; min-width: 0; }
.idk-form__group + .idk-form__group { margin-block-start: 36px; padding-block-start: 32px; border-block-start: 1px solid var(--f-line); }
.idk-form__group > legend { display: flex; align-items: baseline; gap: 12px; padding: 0; margin-block-end: 20px; font-family: var(--f-display); font-weight: 700; font-size: 20px; color: var(--f-ink); }
.idk-form__group > legend span { font-family: ui-monospace, Consolas, monospace; font-size: 12.5px; font-weight: 500; color: var(--f-green); direction: ltr; }
.idk-form__fields { display: grid; grid-template-columns: 1fr 1fr; gap: 18px 20px; }
.idk-field { min-width: 0; }
.idk-field--wide, .idk-field--consent { grid-column: 1 / -1; }

.idk-field > label, .idk-field__label, .idk-chips > legend { display: block; padding: 0; margin-block-end: 8px; font-family: var(--f-display); font-weight: 500; font-size: 14.5px; color: var(--f-ink); }
.idk-field i { font-style: normal; color: #c2573f; }
.idk-field small { font-weight: 400; font-size: 12.5px; color: var(--f-muted); margin-inline-start: 4px; }

.idk-field input[type="text"], .idk-field input[type="email"], .idk-field input[type="tel"], .idk-field input[type="url"], .idk-field select, .idk-field textarea {
	display: block; width: 100%; min-height: 54px; padding: 14px 16px; margin: 0;
	font: inherit; font-size: 16px; color: inherit; background: var(--idk-paper, #f4f7f5);
	border: 1.5px solid transparent; border-radius: 14px; outline: 0; appearance: none; -webkit-appearance: none;
	transition: border-color .2s, background-color .2s, box-shadow .2s;
}
.idk-field textarea { min-height: 140px; resize: vertical; line-height: 1.7; }
[dir="rtl"] .idk-field input[dir="ltr"] { text-align: right; }
.idk-field input::placeholder, .idk-field textarea::placeholder { color: #93a59e; }
.idk-field select {
	padding-inline-end: 44px; cursor: pointer;
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' fill='none' stroke='%230a3a2f' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m1 1.5 5 5 5-5'/%3E%3C/svg%3E");
	background-repeat: no-repeat; background-position: left 18px center;
}
[dir="ltr"] .idk-field select { background-position: right 18px center; }
.idk-field input:hover, .idk-field select:hover, .idk-field textarea:hover { border-color: var(--f-line); }
.idk-field input:focus, .idk-field select:focus, .idk-field textarea:focus { background-color: #fff; border-color: var(--f-green); box-shadow: 0 0 0 4px rgba(34, 211, 173, .2); }

.idk-chips { border: 0; margin: 0; padding: 0; min-width: 0; }
.idk-chips > div { display: flex; flex-wrap: wrap; gap: 8px; }
.idk-chip { position: relative; margin: 0; cursor: pointer; }
.idk-chip input { position: absolute; opacity: 0; inset: 0; width: 100%; height: 100%; margin: 0; cursor: pointer; }
.idk-chip span { display: inline-flex; align-items: center; gap: 8px; min-height: 46px; padding: 8px 18px; border: 1.5px solid var(--f-line); border-radius: 999px; font-size: 15px; line-height: 1.4; transition: background-color .2s, border-color .2s, color .2s; }
.idk-chip span::before { content: ""; flex: none; width: 16px; height: 16px; border-radius: 50%; border: 1.5px solid #b4c6bf; transition: background-color .2s, border-color .2s, box-shadow .2s; }
.idk-chip input[type="checkbox"] + span::before { border-radius: 5px; }
.idk-chip:hover span { border-color: var(--f-green); }
.idk-chip input:checked + span { background: var(--f-ink); border-color: var(--f-ink); color: #fff; }
.idk-chip input:checked + span::before { background: var(--f-mint); border-color: var(--f-mint); box-shadow: inset 0 0 0 3px var(--f-ink); }
.idk-chip input:focus-visible + span { box-shadow: 0 0 0 4px rgba(34, 211, 173, .3); }

.idk-field > .idk-file { display: flex; margin: 0; font-family: inherit; align-items: center; gap: 14px; padding: 12px; border: 1.5px dashed #b4c6bf; border-radius: 14px; cursor: pointer; transition: border-color .2s, background-color .2s; }
.idk-file:hover, .idk-file:focus-within { border-color: var(--f-green); background: var(--f-mist); }
.idk-file input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.idk-file__btn { flex: none; padding: 10px 18px; border-radius: 999px; background: var(--f-ink); color: #fff; font-family: var(--f-display); font-weight: 600; font-size: 14px; }
.idk-file__name { font-size: 14.5px; color: var(--f-muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.idk-file.has-file { border-style: solid; border-color: var(--f-green); }
.idk-file.has-file .idk-file__name { color: var(--f-ink); font-weight: 500; }

.idk-field .idk-consent { display: flex; align-items: flex-start; gap: 12px; margin: 6px 0 0; font-family: inherit; font-weight: 400; font-size: 15px; color: var(--f-muted); line-height: 1.7; cursor: pointer; }
.idk-consent input { flex: none; width: 22px; height: 22px; margin: 2px 0 0; accent-color: var(--f-ink); cursor: pointer; }

.idk-field__err { margin: 6px 0 0; font-size: 13.5px; color: #b3402a; }
.idk-field__err:empty { display: none; }
.idk-field.is-invalid input:not([type="checkbox"]):not([type="radio"]):not([type="file"]), .idk-field.is-invalid select, .idk-field.is-invalid textarea { border-color: #c2573f; background-color: #fdf4f1; }
.idk-field.is-invalid .idk-file { border-color: #c2573f; }

.idk-form__foot { display: flex; flex-wrap: wrap; align-items: center; gap: 14px 20px; margin-block-start: 32px; }
.idk-form__msg { margin: 0; font-size: 15px; color: var(--f-muted); }
.idk-form__msg.is-error { color: #b3402a; }
.idk-form > .idk-form__msg { margin-block-end: 20px; }
.idk-form.is-sending { opacity: .7; pointer-events: none; }

.idk-form__done { text-align: center; padding: clamp(20px, 5vw, 56px) 0; outline: 0; }
.idk-form__tick { position: relative; display: block; width: 76px; height: 76px; margin: 0 auto 24px; border-radius: 50%; background: var(--f-ink); animation: idk-pop .5s cubic-bezier(.2, 1.4, .4, 1) both; }
.idk-form__tick::after { content: ""; position: absolute; inset: 22px 28px 28px; border: solid var(--f-mint); border-width: 0 3px 3px 0; transform: rotate(45deg); }
.idk-form__done h3 { font-family: var(--f-display); font-size: 28px; color: var(--f-ink); margin: 0 0 10px; }
.idk-form__done p { max-width: 46ch; margin: 0 auto; color: var(--f-muted); }
.idk-form__done .idk-form__ref { margin-block-start: 22px; }
.idk-form__ref strong { display: inline-block; margin-inline-start: 6px; padding: 4px 14px; border-radius: 999px; background: var(--f-mist); color: var(--f-ink); font-family: ui-monospace, Consolas, monospace; letter-spacing: .04em; }
@keyframes idk-pop { from { transform: scale(.4); opacity: 0; } }

@media (max-width: 640px) {
	.idk-form__fields { grid-template-columns: 1fr; }
	.idk-form__foot .idk-btn { width: 100%; }
}
