/* ==========================================================================
   Maison 812 — forms (theme forms and the base for CRM forms)
   ========================================================================== */
.m812-form-wrap { width: 100%; }
.m812-form__grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 22px 20px; }
.m812-field { display: flex; flex-direction: column; gap: 8px; min-width: 0; margin: 0; }
.m812-field--full { grid-column: 1 / -1; }
.m812-form label, .m812-form legend { font-size: .76rem; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; color: #3F3126; }
.m812-req { color: #8E5558; }
.m812-field__help { margin: 0; font-size: .82rem; color: #5A4B3F; }

.m812-form :where(input[type="text"], input[type="email"], input[type="tel"], input[type="url"], input[type="date"], input[type="time"], input[type="number"], input[type="password"], input[type="search"], select, textarea),
.m812-crm-slot :where(input[type="text"], input[type="email"], input[type="tel"], input[type="url"], input[type="date"], input[type="time"], input[type="number"], input[type="password"], input[type="search"], select, textarea) {
	width: 100%; min-height: 52px; padding: 14px 16px;
	font: 400 1rem/1.4 'Glacial Indifference', 'Jost', 'Avenir Next', 'Segoe UI', system-ui, sans-serif; color: #3F3126;
	background: rgba(255, 255, 255, 0.78); border: 1px solid #D9C8B2; border-radius: 16px;
	-webkit-appearance: none; appearance: none;
	transition: border-color .25s, box-shadow .25s, background-color .25s;
}
.m812-form :where(textarea), .m812-crm-slot :where(textarea) { min-height: 140px; resize: vertical; }
.m812-form :where(select), .m812-crm-slot :where(select) {
	padding-right: 44px;
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 8' width='12' height='8'%3E%3Cpath d='M1 1.5 6 6.5 11 1.5' fill='none' stroke='%238E5558' stroke-width='1.5'/%3E%3C/svg%3E");
	background-repeat: no-repeat; background-position: right 18px center;
}
.m812-form :where(input, select, textarea):hover, .m812-crm-slot :where(input, select, textarea):hover { border-color: #C58C8E; }
.m812-form :where(input, select, textarea):focus, .m812-crm-slot :where(input, select, textarea):focus { outline: 0; border-color: #8E5558; box-shadow: 0 0 0 3px rgba(201, 163, 96, .3); }
.m812-form :where(input, select, textarea):user-invalid { border-color: #a4443a; }
.m812-form input[type="file"] { padding: 14px; border-style: dashed; background: #F8F3E9; width: 100%; font-size: .9rem; }
.m812-form input[type="file"]::file-selector-button { margin-right: 14px; padding: 9px 18px; border: 1px solid #C58C8E; border-radius: 999px; background: #FCF9F4; color: #3F3126; font: 600 .72rem/1 'Glacial Indifference', 'Jost', 'Avenir Next', 'Segoe UI', system-ui, sans-serif; letter-spacing: .12em; text-transform: uppercase; cursor: pointer; }
.m812-form input[type="date"], .m812-form input[type="time"] { min-height: 52px; }

.m812-choices { border: 0; padding: 0; margin: 0; min-width: 0; }
.m812-choices legend { padding: 0; margin-bottom: 12px; }
.m812-choices__list { display: flex; flex-wrap: wrap; gap: 10px; }
.m812-choice { position: relative; display: inline-flex; margin: 0; cursor: pointer; text-transform: none !important; letter-spacing: 0 !important; font-weight: 500 !important; font-size: .9rem !important; }
.m812-choice input { position: absolute; opacity: 0; inset: 0; width: 100%; height: 100%; margin: 0; cursor: pointer; }
.m812-choice span { display: inline-flex; align-items: center; min-height: 44px; padding: 10px 18px; border: 1px solid #D9C8B2; border-radius: 999px; background: #FCF9F4; transition: background-color .25s, border-color .25s, color .25s; }
.m812-choice:hover span { border-color: #C58C8E; }
.m812-choice input:checked + span { background: #4A3A2D; border-color: #4A3A2D; color: #fff; }
.m812-choice input:focus-visible + span { outline: 2px solid #8E5558; outline-offset: 3px; }

.m812-form__foot { display: flex; align-items: center; flex-wrap: wrap; gap: 16px 28px; margin-top: 28px; }
.m812-form__note { margin: 0; font-size: .82rem; color: #5A4B3F; max-width: 40ch; }
.m812-hp { position: absolute !important; left: -9999px !important; width: 1px; height: 1px; overflow: hidden; }

.m812-notice { margin: 0 0 24px; padding: 18px 22px; border: 1px solid #D9C8B2; border-left-width: 4px; border-radius: 18px; background: rgba(255, 255, 255, 0.92); color: #3F3126; }
.m812-notice ul { margin: 8px 0 0; padding-left: 1.2em; }
.m812-notice--success { border-color: #b9c9a9; border-left-color: #6d8a54; background: #f3f7ee; }
.m812-notice--error { border-color: #e2bdb7; border-left-color: #a4443a; background: #fbf1ef; }
.m812-notice--info { border-left-color: #C58C8E; margin: 26px 0 0; }
.m812-notice--admin { margin-top: 24px; border-left-color: #8E5558; font-size: .88rem; }
.m812-notice:focus { outline: 2px solid #8E5558; outline-offset: 3px; }

@media (max-width: 640px) {
	.m812-form__grid { grid-template-columns: 1fr; }
	.m812-field--half { grid-column: 1 / -1; }
	.m812-form__foot .btn { width: 100%; }
	.m812-form :where(input, select, textarea) { font-size: 16px; } /* prevents iOS zoom */
}
