/* Override these variables in your theme to restyle the form. */
.kcm-form-wrap {
	--kcm-accent: #1d4e89;
	--kcm-accent-hover: #163c6a;
	--kcm-border: #d5d9e0;
	--kcm-bg: #fff;
	--kcm-text: #1f2328;
	--kcm-muted: #5c6370;
	--kcm-error: #b42318;
	--kcm-radius: 10px;
	direction: rtl;
	text-align: right;
	color: var(--kcm-text);
	max-width: 640px;
	margin: 0 auto;
}
.kcm-form-title { margin: 0 0 6px; }
.kcm-form-sub { margin: 0 0 20px; color: var(--kcm-muted); }
.kcm-form { display: flex; flex-direction: column; gap: 14px; }
.kcm-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.kcm-field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.kcm-field label { font-weight: 600; font-size: 0.95em; }
.kcm-field input,
.kcm-field select,
.kcm-field textarea {
	width: 100%;
	box-sizing: border-box;
	padding: 11px 13px;
	border: 1px solid var(--kcm-border);
	border-radius: var(--kcm-radius);
	background: var(--kcm-bg);
	color: inherit;
	font: inherit;
}
.kcm-field input[dir="ltr"] { text-align: right; }
.kcm-field input:focus,
.kcm-field select:focus,
.kcm-field textarea:focus {
	outline: 2px solid var(--kcm-accent);
	outline-offset: 1px;
	border-color: var(--kcm-accent);
}
.kcm-submit {
	padding: 13px 20px;
	border: 0;
	border-radius: var(--kcm-radius);
	background: var(--kcm-accent);
	color: #fff;
	font: inherit;
	font-weight: 700;
	cursor: pointer;
}
.kcm-submit:hover { background: var(--kcm-accent-hover); }
.kcm-submit:disabled { opacity: 0.7; cursor: wait; }
.kcm-error { color: var(--kcm-error); font-weight: 600; }
.kcm-thank-you { text-align: center; padding: 24px 0; }
.kcm-hp { position: absolute !important; left: -9999px !important; width: 1px; height: 1px; overflow: hidden; }
[hidden].kcm-error, [hidden].kcm-thank-you, form.kcm-form[hidden] { display: none !important; }
@media (max-width: 560px) {
	.kcm-row { grid-template-columns: 1fr; }
}

/* Phone with country picker (intl-tel-input). The widget is laid out left-to-right inside
   the RTL form, as on the landing pages, so the flag + dial code never overlap the number. */
.kcm-form-wrap .iti { width: 100%; direction: ltr; }
.kcm-form-wrap .iti__flag-container { direction: ltr; }
.kcm-form-wrap .iti input,
.kcm-form-wrap .iti input[dir="ltr"] { text-align: left !important; direction: ltr !important; }
.kcm-form-wrap .iti--separate-dial-code .iti__selected-flag { border-radius: var(--kcm-radius) 0 0 var(--kcm-radius); background: rgba(0, 0, 0, 0.04); }
.kcm-form-wrap .iti__country-list { direction: ltr; text-align: left; color: #1f2328; z-index: 30; max-width: 320px; white-space: normal; }
.kcm-form-wrap .iti__country { white-space: nowrap; }

/* Captcha (only after repeated submissions) */
.kcm-captcha { padding: 12px; border: 1px dashed var(--kcm-border); border-radius: var(--kcm-radius); background: rgba(0, 0, 0, 0.02); }
.kcm-captcha input[name="kcm_captcha"] { max-width: 140px; text-align: center; }
