/* Citta Enquiry Form
 * Override any colour/size by redefining the --cef-* variables on .cef in your theme CSS.
 */
.cef {
	--cef-bg: #faf7f0;
	--cef-field-bg: #ffffff;
	--cef-border: #e6dcc8;
	--cef-border-focus: #b0772c;
	--cef-text: #1c1c1c;
	--cef-muted: #8c8273;
	--cef-placeholder: #a39a8a;
	--cef-body: #55524c;
	--cef-divider: #e3dccf;
	--cef-accent: #b0772c;
	--cef-accent-hover: #96631f;
	--cef-check: #2a3240;
	--cef-error: #b3261e;
	--cef-success-bg: #eef5ea;
	--cef-success: #2f5d24;
	--cef-radius-card: 24px;
	--cef-radius-field: 10px;

	box-sizing: border-box;
	width: 100%;
	max-width: 712px;
	margin: 0 auto;
	padding: 48px;
	background: var(--cef-bg);
	border-radius: var(--cef-radius-card);
	color: var(--cef-text);
	font-family: inherit;
}

.cef *,
.cef *::before,
.cef *::after {
	box-sizing: border-box;
}

/* Grid */
.cef-grid {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 26px 20px;
}

.cef-field {
	display: flex;
	flex-direction: column;
	min-width: 0;
}

.cef-field--wide {
	grid-column: 1 / -1;
}

/* Labels */
.cef label {
	margin: 0 0 9px;
	font-size: 14px;
	font-weight: 500;
	line-height: 1.4;
	color: var(--cef-text);
}

.cef-optional {
	font-weight: 400;
	color: var(--cef-body);
}

/* Inputs & selects */
.cef input[type="text"],
.cef input[type="email"],
.cef input[type="tel"],
.cef select {
	display: block;
	width: 100%;
	height: 50px;
	margin: 0;
	padding: 0 16px;
	background: var(--cef-field-bg);
	border: 1px solid var(--cef-border);
	border-radius: var(--cef-radius-field);
	box-shadow: none;
	color: var(--cef-text);
	font: inherit;
	font-size: 15px;
	line-height: 1.4;
	transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.cef input:focus,
.cef select:focus {
	outline: none;
	border-color: var(--cef-border-focus);
	box-shadow: 0 0 0 3px rgba(176, 119, 44, 0.15);
}

.cef-select {
	position: relative;
}

.cef-select select {
	height: 52px;
	padding-right: 40px;
	-webkit-appearance: none;
	-moz-appearance: none;
	appearance: none;
	background-image: none;
	cursor: pointer;
}

/* Small triangle like the design */
.cef-select::after {
	content: "";
	position: absolute;
	top: 50%;
	right: 18px;
	width: 0;
	height: 0;
	margin-top: -2px;
	border-left: 3px solid transparent;
	border-right: 3px solid transparent;
	border-top: 4px solid var(--cef-text);
	pointer-events: none;
}

/* "Select" placeholder colour until a value is chosen */
.cef-select select:invalid,
.cef-select select.cef-empty {
	color: var(--cef-placeholder);
}

.cef-select option {
	color: var(--cef-text);
}

/* Helper text under selects */
.cef-hint {
	margin: 10px 0 0;
	font-size: 12px;
	line-height: 1.5;
	color: var(--cef-muted);
}

/* Errors */
.cef-error {
	margin: 6px 0 0;
	font-size: 13px;
	line-height: 1.4;
	color: var(--cef-error);
}

.cef-error:empty {
	display: none;
}

.cef .cef-invalid input,
.cef .cef-invalid select {
	border-color: var(--cef-error);
}

/* Divider */
.cef .cef-divider {
	display: block;
	width: 100%;
	height: 1px;
	margin: 30px 0 28px;
	padding: 0;
	border: 0;
	background: var(--cef-divider);
}

/* Consent checkbox */
.cef .cef-consent {
	position: relative;
	display: flex;
	align-items: flex-start;
	gap: 14px;
	margin: 0;
	font-weight: 400;
	cursor: pointer;
}

.cef-consent input {
	position: absolute;
	opacity: 0;
	width: 20px;
	height: 20px;
	margin: 0;
}

.cef-check {
	flex: 0 0 20px;
	width: 20px;
	height: 20px;
	margin-top: 1px;
	border: 1.5px solid var(--cef-check);
	border-radius: 5px;
	background: var(--cef-field-bg);
	transition: background-color 0.15s ease;
}

.cef-consent input:checked + .cef-check {
	background: var(--cef-check) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath fill='none' stroke='%23fff' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round' d='M3.5 8.5l3 3 6-7'/%3E%3C/svg%3E") center / 14px no-repeat;
}

.cef-consent input:focus-visible + .cef-check {
	box-shadow: 0 0 0 3px rgba(176, 119, 44, 0.3);
}

.cef-invalid .cef-check {
	border-color: var(--cef-error);
}

.cef-consent-text {
	font-size: 14.5px;
	line-height: 1.6;
	color: var(--cef-body);
}

.cef-consent-text a {
	color: inherit;
	text-decoration: underline;
}

.cef-consent-wrap .cef-error {
	margin-left: 34px;
}

/* CAPTCHA */
.cef-captcha {
	margin-top: 22px;
}

/* Footer */
.cef-footer {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 20px;
	margin-top: 30px;
}

.cef-note {
	margin: 0;
	font-size: 13px;
	color: var(--cef-body);
}

.cef .cef-submit {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-height: 50px;
	margin: 0;
	padding: 12px 28px;
	border: 0;
	border-radius: 999px;
	background: var(--cef-accent);
	color: #fff;
	font: inherit;
	font-size: 16px;
	font-weight: 600;
	line-height: 1.2;
	letter-spacing: 0;
	text-transform: none;
	cursor: pointer;
	transition: background-color 0.15s ease, opacity 0.15s ease;
}

.cef .cef-submit:hover,
.cef .cef-submit:focus-visible {
	background: var(--cef-accent-hover);
	color: #fff;
}

.cef .cef-submit:focus-visible {
	outline: 2px solid var(--cef-accent);
	outline-offset: 3px;
}

.cef .cef-submit[disabled] {
	opacity: 0.7;
	cursor: wait;
}

/* Messages */
.cef-message {
	margin-top: 22px;
	padding: 14px 18px;
	border-radius: var(--cef-radius-field);
	font-size: 14.5px;
	line-height: 1.6;
}

.cef-form > .cef-message:first-of-type {
	margin: 0 0 24px;
}

.cef-message--error {
	background: #fbeceb;
	color: var(--cef-error);
}

.cef-message--success {
	margin: 0;
	padding: 24px;
	background: var(--cef-success-bg);
	color: var(--cef-success);
	font-size: 16px;
}

/* Honeypot */
.cef-hp {
	position: absolute !important;
	left: -9999px !important;
	width: 1px;
	height: 1px;
	overflow: hidden;
}

/* Mobile */
@media (max-width: 640px) {
	.cef {
		padding: 28px 20px;
		border-radius: 18px;
	}

	.cef-grid {
		grid-template-columns: 1fr;
		gap: 22px;
	}

	.cef-footer {
		flex-direction: column-reverse;
		align-items: stretch;
		text-align: center;
	}

	.cef .cef-submit {
		width: 100%;
	}
}
