/**
 * Partner inquiry modal — "List your events with ACC".
 *
 * Deliberately the same shape as the Post Oak signup dialog (acc-newsletter):
 * a reader who has met one of these on this site should recognize the other.
 * Colors come from the theme presets, with fallbacks so the shortcode still
 * looks right if it is ever dropped on a page outside the ACC theme.
 */

.acc-inq {
	display: contents; /* the trigger keeps the layout slot the old <a> had */
}

.acc-inq__open {
	font-family: inherit;
	cursor: pointer;
}

/* Standalone trigger for the shortcode, where no host card supplies a style. */
.acc-inq__btn {
	display: inline-flex;
	align-items: center;
	padding: 0.7em 1.5em;
	border: 0;
	border-radius: 999px;
	background: var(--wp--preset--color--primary, #1a3a1f);
	color: var(--wp--preset--color--sand, #fbf3e7);
	font-size: 0.85rem;
	font-weight: 600;
	letter-spacing: 0.04em;
	transition: background 160ms ease;
}

.acc-inq__btn:hover {
	background: var(--wp--preset--color--primary-light, #2c5e34);
}

/* ---- Modal ---- */

.acc-inq__modal {
	position: fixed;
	inset: 0;
	z-index: 9999;
	display: flex;
	/* Top-aligned and scrolled at the shell, not centered: a centered dialog
	   taller than the visible viewport spills past both ends with no way to
	   reach either, and `vh` does not shrink when the keyboard opens. */
	align-items: flex-start;
	justify-content: center;
	padding: 1.25rem 1.25rem calc(1.25rem + env(safe-area-inset-bottom));
	overflow-y: auto;
	overscroll-behavior: contain;
}

.acc-inq__modal[hidden] {
	display: none;
}

/* `overflow: hidden` on <body> alone does nothing while the theme sets
   `html, body { overflow-x: clip }` — <html> has to be pinned too. */
body.acc-inq-open {
	overflow: hidden;
}

html:has(body.acc-inq-open) {
	overflow: hidden;
}

.acc-inq__backdrop {
	position: absolute;
	inset: 0;
	background: rgba(20, 32, 22, 0.55);
}

.acc-inq__dialog {
	position: relative;
	width: min(32rem, 100%);
	margin: auto; /* still centers when it fits */
	overflow-y: visible;
	padding: clamp(1.6rem, 4vw, 2.4rem);
	border-radius: 18px;
	background: #f7f1e2;
	border: 1px solid var(--wp--preset--color--border, #d9d5c7);
	box-shadow: 0 40px 80px -40px rgba(26, 58, 31, 0.6);
	text-align: left;
}

.acc-inq__dialog:focus {
	outline: none;
}

.acc-inq__close {
	position: absolute;
	top: 0.4rem;
	right: 0.5rem;
	width: 44px;
	height: 44px;
	padding: 0;
	border: 0;
	background: none;
	color: var(--wp--preset--color--primary, #1a3a1f);
	font-size: 1.7rem;
	line-height: 1;
	cursor: pointer;
	opacity: 0.65;
}

.acc-inq__close:hover {
	opacity: 1;
}

	/* Reserve the close button's corner. It is 44px wide, absolutely
	   positioned at the top right, and the title had no space set aside for
	   it -- so any title that wrapped ran underneath the x. */
.acc-inq__title {
	padding-right: 3rem;
	margin: 0 0 0.5rem;
	font-size: clamp(1.5rem, 3vw, 1.9rem);
	font-weight: 500;
	line-height: 1.15;
	color: var(--wp--preset--color--primary, #1a3a1f);
}

.acc-inq__lede {
	margin: 0 0 1.4rem;
	font-size: 0.95rem;
	line-height: 1.6;
	color: var(--wp--preset--color--muted, #5f6b5f);
}

/* ---- Form ---- */

.acc-inq__form[hidden],
.acc-inq__done[hidden] {
	display: none;
}

.acc-inq__field {
	display: block;
	margin-bottom: 0.9rem;
}

.acc-inq__field > span {
	display: block;
	margin-bottom: 0.35rem;
	font-size: 0.72rem;
	font-weight: 700;
	letter-spacing: 0.12em;
	text-transform: uppercase;
	color: var(--wp--preset--color--primary, #1a3a1f);
}

.acc-inq__field > span small {
	font-weight: 500;
	letter-spacing: 0.06em;
	text-transform: none;
	color: var(--wp--preset--color--muted, #5f6b5f);
}

.acc-inq__field input,
.acc-inq__field textarea {
	width: 100%;
	padding: 0.75rem 0.9rem;
	border: 1px solid var(--wp--preset--color--border, #d9d5c7);
	border-radius: 10px;
	background: #fff;
	font-family: inherit;
	font-size: 1rem;
	line-height: 1.5;
	color: inherit;
}

.acc-inq__field textarea {
	resize: vertical;
	min-height: 5.5rem;
}

.acc-inq__field input:focus,
.acc-inq__field textarea:focus {
	outline: none;
	border-color: var(--wp--preset--color--primary, #1a3a1f);
	box-shadow: 0 0 0 3px rgba(26, 58, 31, 0.14);
}

.acc-inq__field input.is-invalid,
.acc-inq__field textarea.is-invalid {
	border-color: #a3341f;
}

/* Takes no room until it has something to say — reserving a line's height
   between every field is what made the Post Oak form look airy. */
.acc-inq__error {
	display: block;
	margin-top: 0.3rem;
	font-size: 0.82rem;
	font-style: normal;
	color: #a3341f;
}

.acc-inq__error:empty {
	display: none;
}

.acc-inq__formerror {
	margin: 0 0 1rem;
	padding: 0.7rem 0.9rem;
	border-radius: 10px;
	background: rgba(163, 52, 31, 0.09);
	font-size: 0.9rem;
	color: #a3341f;
}

.acc-inq__formerror[hidden] {
	display: none;
}

/* Off-screen rather than display:none — a bot reading the DOM should still
   find it, while nobody using the page ever sees or tabs into it. */
.acc-inq__hp {
	position: absolute;
	left: -9999px;
	width: 1px;
	height: 1px;
	overflow: hidden;
}

.acc-inq__turnstile,
.acc-inq .cf-turnstile {
	margin: 0 0 1rem;
}

.acc-inq__submit {
	width: 100%;
	margin-top: 0.4rem;
	padding: 0.85rem 1.5rem;
	border: 0;
	border-radius: 999px;
	background: var(--wp--preset--color--primary, #1a3a1f);
	color: var(--wp--preset--color--sand, #fbf3e7);
	font-family: inherit;
	font-size: 0.82rem;
	font-weight: 700;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	cursor: pointer;
	transition: background 160ms ease;
}

.acc-inq__submit:hover:not(:disabled) {
	background: var(--wp--preset--color--primary-light, #2c5e34);
}

.acc-inq__submit:disabled {
	opacity: 0.6;
	cursor: default;
}

.acc-inq__donemsg {
	margin: 0 0 1.4rem;
	font-size: 1.05rem;
	line-height: 1.6;
	color: var(--wp--preset--color--primary, #1a3a1f);
}
