/* MCE Custom Forms — light theme, MCE palette.
 * Override any token on .mcecf from the theme / Elementor custom CSS if needed. */
.mcecf {
	--mcecf-text: #202020;          /* Anthracite: text on light backgrounds */
	--mcecf-field-text: #202020;    /* Text inside the white fields and on the gold button */
	--mcecf-muted: #79745E;         /* Oxidized */
	--mcecf-field-bg: #FFFFFF;
	--mcecf-border: #D9D6CB;
	--mcecf-border-hover: #B9B4A4;
	--mcecf-accent: #BC982D;        /* Gold */
	--mcecf-accent-hover: #A6851F;
	--mcecf-focus: rgba(188, 152, 45, .25);
	--mcecf-error: #B42318;
	--mcecf-success-bg: #F0EEE6;    /* Bright Oxidized */
	--mcecf-radius: 10px;
	--mcecf-gap: 18px 16px;

	color: inherit;                 /* Follows the page; data-scheme below can force light / dark. */
	background: transparent;
	font-family: inherit;
	font-size: 15px;
	line-height: 1.45;
	max-width: 100%;
	container-type: inline-size;
}
.mcecf *, .mcecf *::before, .mcecf *::after { box-sizing: border-box; }

/* Colour scheme: "auto" (default) inherits the page's text colour and the script picks
   the matching tokens; "light" / "dark" force them (form setting or shortcode scheme="…"). */
.mcecf[data-scheme="light"] { color: var(--mcecf-text); }
.mcecf[data-scheme="dark"] {
	--mcecf-text: #F4F3EE;          /* Ivory */
	--mcecf-muted: #C9C4B1;
	--mcecf-error: #FDA29B;
	--mcecf-border: #D9D6CB;
	--mcecf-focus: rgba(188, 152, 45, .45);
	--mcecf-success-bg: rgba(244, 243, 238, .08);
	color: var(--mcecf-text);
}
.mcecf[data-scheme="dark"] .mcecf-check a:hover { color: #E2C46A; }

/* Grid: columns from the form setting, fields span 1..4 or full width. */
.mcecf .mcecf-grid { display: grid; gap: var(--mcecf-gap); grid-template-columns: minmax(0, 1fr); }
.mcecf [data-cols="2"] .mcecf-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.mcecf [data-cols="3"] .mcecf-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.mcecf [data-cols="4"] .mcecf-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.mcecf [data-span="2"] { grid-column: span 2; }
.mcecf [data-span="3"] { grid-column: span 3; }
.mcecf [data-span="full"] { grid-column: 1 / -1; }

/* Breakpoints follow the form's own width, so it adapts inside narrow Elementor columns. */
@container (max-width: 640px) {
	.mcecf [data-cols="3"] .mcecf-grid,
	.mcecf [data-cols="4"] .mcecf-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
	.mcecf [data-cols="3"] [data-span="2"],
	.mcecf [data-cols="4"] [data-span="2"],
	.mcecf [data-span="3"] { grid-column: 1 / -1; }
}
@container (max-width: 440px) {
	.mcecf .mcecf-form .mcecf-grid { grid-template-columns: minmax(0, 1fr); }
	.mcecf .mcecf-grid > * { grid-column: 1 / -1; }
}

.mcecf .mcecf-field { display: flex; flex-direction: column; min-width: 0; }
.mcecf .mcecf-msgs:empty { display: none; }

/* Each field = label / control / messages. With subgrid, those three rows line up across
   the whole grid row, so inputs stay aligned when a label wraps or a field shows an error. */
@supports (grid-template-rows: subgrid) {
	.mcecf .mcecf-grid { row-gap: 0; }
	.mcecf .mcecf-grid > * { grid-row: span 3; margin-bottom: 18px; }
	.mcecf .mcecf-field:not(.mcecf-field-stacked) {
		display: grid;
		grid-template-rows: subgrid;
		row-gap: 0;
		align-items: end;
	}
	.mcecf .mcecf-field:not(.mcecf-field-stacked) > .mcecf-msgs { align-self: start; }
	.mcecf .mcecf-msgs:empty { display: block; }
	.mcecf .mcecf-actions { margin-top: 6px; }
	.mcecf .mcecf-grid > [data-span="full"].mcecf-field-check + [data-span="full"].mcecf-field-check { margin-top: -6px; }
}

.mcecf .mcecf-field > label:not(.mcecf-check),
.mcecf legend {
	display: block;
	margin: 0 0 7px;
	padding: 0;
	font-size: 14px;
	font-weight: 500;
	color: inherit;
}
.mcecf .mcecf-opt { color: var(--mcecf-muted); font-weight: 400; }
.mcecf .mcecf-help { margin-top: 6px; font-size: 13px; color: var(--mcecf-muted); }

.mcecf input[type="text"],
.mcecf input[type="email"],
.mcecf input[type="tel"],
.mcecf input[type="number"],
.mcecf input[type="date"],
.mcecf select,
.mcecf textarea {
	width: 100%;
	height: 46px;
	margin: 0;
	padding: 0 14px;
	font: inherit;
	font-size: 15px;
	color: var(--mcecf-field-text);
	background-color: var(--mcecf-field-bg);
	border: 1px solid var(--mcecf-border);
	border-radius: var(--mcecf-radius);
	box-shadow: none;
	outline: none;
	transition: border-color .15s ease, box-shadow .15s ease;
	-webkit-appearance: none;
	appearance: none;
}
.mcecf textarea { height: auto; min-height: 110px; padding: 12px 14px; resize: vertical; line-height: 1.45; }
.mcecf input::placeholder, .mcecf textarea::placeholder { color: #A8A495; opacity: 1; }
.mcecf input[type="number"] { -moz-appearance: textfield; }
.mcecf input[type="number"]::-webkit-inner-spin-button,
.mcecf input[type="number"]::-webkit-outer-spin-button { -webkit-appearance: none; margin: 0; }

.mcecf select {
	padding-right: 40px;
	cursor: pointer;
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1.5l5 5 5-5' fill='none' stroke='%23202020' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
	background-repeat: no-repeat;
	background-position: right 14px center;
	background-size: 12px 8px;
}

.mcecf input:hover, .mcecf select:hover, .mcecf textarea:hover { border-color: var(--mcecf-border-hover); }
.mcecf input:focus, .mcecf select:focus, .mcecf textarea:focus {
	border-color: var(--mcecf-accent);
	box-shadow: 0 0 0 3px var(--mcecf-focus);
}

/* Layout blocks */
.mcecf .mcecf-heading h3 { margin: 10px 0 0; font-size: 18px; font-weight: 600; color: inherit; }
.mcecf .mcecf-paragraph p { margin: 0; color: inherit; }

/* Choices + checkboxes */
.mcecf fieldset.mcecf-choices { margin: 0; padding: 0; border: 0; min-width: 0; display: grid; gap: 8px; }
.mcecf fieldset.mcecf-choices legend { margin-bottom: 4px; }
.mcecf .mcecf-check {
	display: flex;
	align-items: flex-start;
	gap: 12px;
	margin: 0;
	font-size: 14px;
	font-weight: 400;
	color: inherit;
	cursor: pointer;
}
.mcecf .mcecf-check input[type="checkbox"],
.mcecf .mcecf-check input[type="radio"] {
	flex: 0 0 18px;
	width: 18px;
	height: 18px;
	margin: 1px 0 0;
	accent-color: var(--mcecf-accent);
	cursor: pointer;
}
.mcecf .mcecf-check a { color: inherit; text-decoration: underline; text-underline-offset: 2px; }
.mcecf .mcecf-check a:hover { color: var(--mcecf-accent-hover); }
/* Consecutive full-width checkboxes sit closer together. */
.mcecf .mcecf-field-check + .mcecf-field-check { margin-top: -6px; }
.mcecf .mcecf-check span { flex: 1; min-width: 0; }

/* Submit */
.mcecf .mcecf-actions { margin-top: 24px; }
.mcecf .mcecf-submit {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-height: 48px;
	padding: 0 30px;
	font: inherit;
	font-size: 15px;
	font-weight: 600;
	color: var(--mcecf-field-text);
	background: var(--mcecf-accent);
	border: 0;
	border-radius: 999px;
	cursor: pointer;
	transition: background-color .15s ease, transform .05s ease;
}
.mcecf .mcecf-submit:hover { background: var(--mcecf-accent-hover); color: var(--mcecf-field-text); }
.mcecf .mcecf-submit:active { transform: translateY(1px); }
.mcecf .mcecf-submit:focus-visible { outline: none; box-shadow: 0 0 0 3px var(--mcecf-focus); }
.mcecf .mcecf-submit[disabled] { opacity: .65; cursor: wait; }

/* Errors */
.mcecf .mcecf-invalid input,
.mcecf .mcecf-invalid select,
.mcecf .mcecf-invalid textarea { border-color: var(--mcecf-error); }
.mcecf .mcecf-error { margin-top: 6px; font-size: 13px; color: var(--mcecf-error); }
.mcecf .mcecf-invalid .mcecf-check span,
.mcecf .mcecf-invalid > .mcecf-check span,
.mcecf .mcecf-invalid legend { color: var(--mcecf-error); }
.mcecf .mcecf-status:not(:empty) { margin-top: 14px; font-size: 14px; color: var(--mcecf-error); }

/* Success */
.mcecf .mcecf-success {
	padding: 22px 24px;
	background: var(--mcecf-success-bg);
	border-left: 4px solid var(--mcecf-accent);
	border-radius: var(--mcecf-radius);
	outline: none;
}
.mcecf .mcecf-success p { margin: 0; font-size: 16px; }

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