/* Catering Inquiry Form */

.rew-form {
	--rew-form-cols: 2;
	--rew-form-gap: 20px;
	--rew-input-text: var(--mg-text);
	--rew-input-bg: #fff;
	--rew-input-border: var(--mg-border-strong);
	--rew-input-focus: var(--mg-primary);
	--rew-input-radius: 12px;
	--rew-form-error: var(--mg-danger);
	--rew-form-success: var(--mg-success);
	display: grid;
	gap: var(--rew-form-gap);
}

.rew-form__hint {
	margin: 0;
	color: var(--rew-muted);
	font-size: .9rem;
}

.rew-form__grid {
	display: grid;
	grid-template-columns: repeat(var(--rew-form-cols), minmax(0, 1fr));
	gap: var(--rew-form-gap);
}

.rew-field {
	display: grid;
	gap: 6px;
	align-content: start;
	min-width: 0;
	margin: 0;
	padding: 0;
	border: 0;
}

.rew-field--full {
	grid-column: 1 / -1;
}

.rew-field__label {
	padding: 0;
	color: var(--rew-ink);
	font-size: 15px;
	font-weight: 600;
}

.rew-field__req {
	color: var(--rew-form-error);
}

.rew-field__opt {
	color: var(--rew-muted);
	font-weight: 400;
	font-size: .9em;
}

.rew-field__control {
	width: 100%;
	min-height: 52px;
	padding: 12px 14px;
	border: 1.5px solid var(--rew-input-border);
	border-radius: var(--rew-input-radius);
	background: var(--rew-input-bg);
	color: var(--rew-input-text);
	font: inherit;
	font-size: 16px; /* 16px stops iOS zooming into fields. */
	line-height: 1.4;
	transition: border-color .2s ease, box-shadow .2s ease;
}

textarea.rew-field__control {
	min-height: 140px;
	resize: vertical;
}

select.rew-field__control {
	appearance: none;
	padding-inline-end: 44px;
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Cpath d='M5 8l5 5 5-5' fill='none' stroke='%231e2457' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
	background-repeat: no-repeat;
	background-position: right 14px center;
	background-size: 18px;
}

.rew-field__control:focus,
.rew-field__control:focus-visible {
	border-color: var(--rew-input-focus);
	outline: 3px solid color-mix(in srgb, var(--rew-input-focus) 30%, transparent);
	outline-offset: 1px;
}

.rew-field__control[aria-invalid="true"] {
	border-color: var(--rew-form-error);
}

.rew-field__error {
	display: flex;
	gap: 6px;
	margin: 0;
	color: var(--rew-form-error);
	font-size: 14px;
	font-weight: 600;
}

.rew-field__error::before {
	content: "!";
	display: inline-flex;
	align-items: center;
	justify-content: center;
	flex: none;
	width: 18px;
	height: 18px;
	margin-top: 1px;
	border-radius: 50%;
	background: var(--rew-form-error);
	color: #fff;
	font-size: 12px;
	font-weight: 800;
}

.rew-field__error[hidden] {
	display: none;
}

.rew-choices {
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
}

.rew-choice {
	display: inline-flex;
	align-items: center;
	gap: 10px;
	min-height: 44px;
	padding: 6px 16px 6px 12px;
	border: 1.5px solid var(--mg-border);
	border-radius: 999px;
	background: #fff;
	cursor: pointer;
}

.rew-choice input {
	width: 20px;
	height: 20px;
	margin: 0;
	accent-color: var(--rew-ink);
}

.rew-choice:has(input:checked) {
	border-color: var(--rew-ink);
}

.rew-form__status:empty {
	display: none;
}

.rew-form__status {
	padding: 14px 16px;
	border-radius: 12px;
	border-inline-start: 4px solid currentColor;
	background: #fff;
	font-weight: 600;
	outline: none;
}

.rew-form__status.is-sent {
	color: var(--rew-form-success);
}

.rew-form__status.is-error {
	color: var(--rew-form-error);
}

.rew-form__footer {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 14px 20px;
}

body button.rew-form__submit {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-height: 54px;
	padding: 0 30px;
	border: 1.5px solid transparent;
	border-radius: 999px;
	background: var(--mg-primary);
	color: #FFF;
	font: inherit;
	font-size: 16px;
	font-weight: 700;
	cursor: pointer;
	transition: background-color .2s ease, transform .2s var(--rew-ease);
}

body button.rew-form__submit:hover,
body button.rew-form__submit:focus {
	background: var(--mg-primary-hover);
	color: #FFF;
}

body button.rew-form__submit[aria-disabled="true"] {
	cursor: progress;
	opacity: .75;
}

.rew-form__privacy {
	margin: 0;
	color: var(--rew-muted);
	font-size: .9rem;
}

body .rew-form__privacy a {
	color: var(--rew-ink);
	text-decoration: underline;
	text-underline-offset: 3px;
}

@media (max-width: 767px) {
	body button.rew-form__submit {
		width: 100%;
	}
}

@media (prefers-reduced-motion: reduce) {
	.rew-field__control,
	body button.rew-form__submit {
		transition: none;
	}
}
