/*
 * AH Contact Form: labels above the fields, two columns on wide screens (the message spans both),
 * one on phones. Card (paper) or plain, light or dark.
 */
.ah-cf {
	display: grid;
	gap: 10px;
	align-content: start;
	min-width: 0;
	font-family: var(--ah-f-body);
	font-size: 17px;
	line-height: 1.75;
	color: var(--ah-ink);
	scroll-margin-top: 110px;
}
.ah-cf.ah-cf--card { gap: 12px; padding: 28px; border: 1px solid var(--ah-card-line); border-radius: var(--ah-r-card); background: var(--ah-card); box-shadow: var(--ah-shadow); }
.ah-cf:target { box-shadow: 0 0 0 4px rgba(197, 165, 114, .22); }
.ah-cf .ah-cf__note { font-size: 1.15rem; }
.ah-cf .ah-cf__title {
	margin: 0;
	font-family: var(--ah-f-display);
	font-weight: 700;
	font-size: 1.35rem;
	line-height: 1.5;
	letter-spacing: 0;
	color: inherit;
	text-wrap: balance;
}
.ah-cf .ah-cf__text { margin: 0; font-size: .95rem; line-height: 1.75; color: var(--ah-muted); }

.ah-cf .ah-cf__form { display: grid; gap: 16px; margin: 6px 0 0; }
.ah-cf .ah-cf__grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px 16px; }
.ah-cf .ah-cf__field { display: grid; gap: 6px; margin: 0; min-width: 0; }
.ah-cf .ah-cf__field--full { grid-column: 1 / -1; }
.ah-cf .ah-cf__label { font-size: .88rem; font-weight: 600; line-height: 1.5; color: inherit; }
.ah-cf .ah-cf__input {
	box-sizing: border-box;
	width: 100%;
	min-height: 48px;
	margin: 0;
	padding: 11px 14px;
	border: 1px solid var(--ah-line);
	border-radius: 10px;
	background: var(--ah-ivory);
	box-shadow: none;
	color: var(--ah-ink);
	font-family: var(--ah-f-body);
	font-size: 1rem;
	line-height: 1.5;
	transition: border-color .2s, box-shadow .2s;
}
.ah-cf .ah-cf__area { min-height: 140px; resize: vertical; }
.ah-cf .ah-cf__select { appearance: none; padding-inline-end: 40px; background-image: linear-gradient(45deg, transparent 50%, currentColor 50%), linear-gradient(135deg, currentColor 50%, transparent 50%); background-position: calc(100% - 22px) 50%, calc(100% - 17px) 50%; background-size: 5px 5px; background-repeat: no-repeat; cursor: pointer; }
[dir="rtl"] .ah-cf .ah-cf__select { background-position: 17px 50%, 22px 50%; }
.ah-cf .ah-cf__input::placeholder { color: var(--ah-soft); opacity: 1; }
.ah-cf .ah-cf__input:focus { border-color: var(--ah-ink-gold); outline: 2px solid var(--ah-gold); outline-offset: 1px; }
.ah-cf .ah-cf__input[aria-invalid="true"] { border-color: var(--ah-red); }
/* email and phone are typed left to right; in Arabic they still sit on the right */
[dir="rtl"] .ah-cf .ah-cf__input[dir="ltr"] { text-align: right; }
[dir="rtl"] .ah-cf .ah-cf__input[dir="ltr"]::placeholder { text-align: right; }

.ah-cf .ah-cf__hp { position: absolute; width: 1px; height: 1px; overflow: hidden; opacity: 0; pointer-events: none; inset-inline-start: -9999px; }
.ah-cf .ah-cf__ts { min-height: 65px; }
.ah-cf .ah-cf__foot { display: flex; flex-wrap: wrap; gap: 12px 20px; align-items: center; }
.ah-cf .ah-cf__foot .ah-btn:disabled { opacity: .6; cursor: progress; }
.ah-cf .ah-cf__foot .ah-btn:focus-visible { outline: 2px solid var(--ah-gold); outline-offset: 3px; }
.ah-cf .ah-cf__privacy { flex: 1 1 220px; margin: 0; font-size: .82rem; line-height: 1.6; color: var(--ah-muted); }
.ah-cf .ah-cf__privacy a { color: var(--ah-ink-gold); text-decoration: underline; text-underline-offset: 3px; }
.ah-cf .ah-cf__msg { margin: 0; min-height: 1.6em; font-size: .9rem; line-height: 1.6; color: var(--ah-muted); }
.ah-cf .ah-cf__msg[data-state="ok"] { color: var(--ah-ink-gold); font-weight: 600; }
.ah-cf .ah-cf__msg:is([data-state="fields"], [data-state="bad"], [data-state="captcha"], [data-state="busy"], [data-state="error"]) { color: var(--ah-red); }

/* dark: plain on navy, or a navy card */
.ah-cf.ah-on-dark { color: var(--ah-on-navy); }
.ah-cf.ah-on-dark .ah-cf__text,
.ah-cf.ah-on-dark .ah-cf__privacy,
.ah-cf.ah-on-dark .ah-cf__msg { color: var(--ah-on-navy-muted); }
.ah-cf.ah-on-dark.ah-cf--card { border-color: var(--ah-line-navy); background: rgba(255, 255, 255, .04); }
.ah-cf.ah-on-dark .ah-cf__input { border-color: var(--ah-line-navy); background: rgba(255, 255, 255, .06); color: var(--ah-on-navy); }
.ah-cf.ah-on-dark .ah-cf__privacy a,
.ah-cf.ah-on-dark .ah-cf__msg[data-state="ok"] { color: var(--ah-gold-hi); }

@media (max-width: 767px) {
	.ah-cf.ah-cf--card { padding: 20px; }
	.ah-cf .ah-cf__grid { grid-template-columns: minmax(0, 1fr); }
}
@media (prefers-reduced-motion: reduce) {
	.ah-cf .ah-cf__input { transition: none; }
}
