/* Mariah's Table order form. Inherits the theme's fonts; change the accent below to match the brand. */
.mto {
	--mto-accent: #8a5a3c;
	--mto-accent-ink: #ffffff;
	--mto-accent-hover: color-mix(in srgb, var(--mto-accent) 82%, #000);
	--mto-ink: #2b2522;
	--mto-muted: #6f6660;
	--mto-line: #e4ddd6;
	--mto-soft: #faf6f2;
	--mto-radius: 10px;
	color: var(--mto-ink);
	max-width: 100%;
	width: 100%;
	margin: 0 auto;
	box-sizing: border-box;
}
.mto *, .mto *::before, .mto *::after { box-sizing: border-box; }
.mto [hidden] { display: none !important; }

/* Tabs (hidden until JS runs, so every form shows without JS). */
.mto:not(.mto-js) .mto-tabs { display: none; }
.mto:not(.mto-js) .mto-tabs-label { display: none; }
.mto-tabs-label { margin: 0 0 10px; font-weight: 600; font-size: 1.05em; }
.mto-tabs { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 12px; margin: 0 0 28px; }
.mto .mto-tab {
	appearance: none; position: relative; display: flex; flex-direction: column; align-items: flex-start; gap: 4px;
	width: 100%; min-height: 0; margin: 0; padding: 16px 44px 16px 18px; text-align: left;
	background: #fff; color: var(--mto-ink); border: 2px solid var(--mto-line); border-radius: var(--mto-radius);
	font: inherit; line-height: 1.3; cursor: pointer; box-shadow: 0 1px 2px rgba(0, 0, 0, .04);
	text-transform: none; letter-spacing: normal; transition: border-color .15s, box-shadow .15s, background-color .15s;
}
.mto .mto-tab-title { font-weight: 700; font-size: 1.05em; }
.mto .mto-tab-sub { font-size: .88em; color: var(--mto-muted); font-weight: 400; }
/* Round "radio" marker in the corner so each card reads as a choice. */
.mto .mto-tab::after {
	content: ""; position: absolute; top: 16px; right: 16px; width: 18px; height: 18px;
	border: 2px solid var(--mto-line); border-radius: 50%; background: #fff; box-sizing: border-box;
}
.mto .mto-tab:hover { border-color: var(--mto-accent); background: var(--mto-soft); color: var(--mto-ink); box-shadow: 0 2px 8px rgba(0, 0, 0, .08); }
.mto .mto-tab:hover::after { border-color: var(--mto-accent); }
.mto .mto-tab.is-active { border-color: var(--mto-accent); background: var(--mto-soft); box-shadow: 0 0 0 3px color-mix(in srgb, var(--mto-accent) 18%, transparent); }
.mto .mto-tab.is-active::after { border: 5px solid var(--mto-accent); }
.mto .mto-tab.is-active .mto-tab-sub { color: var(--mto-ink); }
.mto .mto-tab:focus-visible { outline: 2px solid var(--mto-accent); outline-offset: 3px; }

.mto:not(.mto-js) .mto-panel + .mto-panel { margin-top: 48px; padding-top: 32px; border-top: 1px solid var(--mto-line); }
.mto-panel-head h3 { margin: 0 0 6px; }
.mto-panel-head p { margin: 0 0 18px; color: var(--mto-muted); }

/* Fields */
.mto-form { margin: 0; }
.mto-field { margin: 0 0 16px; }
.mto-field > label, .mto-choices legend { display: block; font-weight: 600; margin-bottom: 6px; padding: 0; }
.mto-req { color: var(--mto-accent); }
.mto-form input[type="text"], .mto-form input[type="email"], .mto-form input[type="tel"],
.mto-form input[type="date"], .mto-form input[type="time"], .mto-form input[type="number"],
.mto-form select, .mto-form textarea {
	width: 100%; padding: 10px 12px; border: 1px solid var(--mto-line); border-radius: 8px;
	background: #fff; color: var(--mto-ink); font: inherit; line-height: 1.4; min-height: 44px; margin: 0;
}
.mto-form textarea { min-height: 0; resize: vertical; }
.mto-form input:focus, .mto-form select:focus, .mto-form textarea:focus {
	outline: none; border-color: var(--mto-accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--mto-accent) 20%, transparent);
}
.mto-help { display: block; margin-top: 4px; color: var(--mto-muted); font-size: .9em; }
.mto-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 0 16px; }
/* Choice groups. Many themes style fieldset/legend as a floating label on a boxed
   border and hide native checkboxes, so these rules deliberately win over the theme. */
.mto fieldset.mto-choices {
	position: static !important; display: block !important; border: 0 !important; padding: 0 !important;
	margin: 0 0 16px !important; min-width: 0; background: none !important; box-shadow: none !important;
}
.mto fieldset.mto-choices > legend {
	position: static !important; float: none !important; display: block !important; width: 100% !important;
	top: auto !important; left: auto !important; transform: none !important;
	margin: 0 0 8px !important; padding: 0 !important; background: none !important; border: 0 !important;
	font-size: inherit !important; font-style: normal !important; font-weight: 600 !important; line-height: 1.4 !important;
	color: inherit !important; letter-spacing: normal !important; text-transform: none !important;
}
.mto .mto-choice {
	position: relative; display: flex !important; align-items: flex-start; gap: 10px; margin: 0 0 8px !important;
	padding: 0 !important; font-weight: normal; line-height: 1.4; cursor: pointer;
}
.mto .mto-choice::before, .mto .mto-choice::after,
.mto .mto-choice > span::before, .mto .mto-choice > span::after { content: none !important; display: none !important; }
.mto .mto-choice > input[type="checkbox"], .mto .mto-choice > input[type="radio"] {
	position: static !important; clip: auto !important; clip-path: none !important; opacity: 1 !important;
	visibility: visible !important; display: inline-block !important; flex: 0 0 auto;
	width: 18px !important; height: 18px !important; min-height: 0 !important; margin: .1em 0 0 !important; padding: 0 !important;
	overflow: visible !important; -webkit-appearance: auto !important; appearance: auto !important;
	accent-color: var(--mto-accent); cursor: pointer;
}
.mto .mto-choice > span { flex: 1 1 auto; padding: 0 !important; margin: 0 !important; }

.mto-field--feature { background: var(--mto-soft); border: 1px solid var(--mto-line); border-radius: var(--mto-radius); padding: 14px; }

/* Meal cards */
.mto-meals { display: grid; gap: 12px; margin-bottom: 12px; }
.mto-meal {
	display: flex; gap: 16px; align-items: center; justify-content: space-between;
	border: 1px solid var(--mto-line); border-radius: var(--mto-radius); padding: 16px; background: #fff;
}
.mto-meal-info h4 { margin: 0 0 4px; }
.mto-meal-info p { margin: 0 0 6px; color: var(--mto-muted); }
.mto-price { font-weight: 600; color: var(--mto-accent); }
.mto-qty { flex: 0 0 auto; text-align: center; }
.mto-qty label { display: block; font-size: .85em; color: var(--mto-muted); margin-bottom: 4px; }
.mto-stepper { display: inline-flex; align-items: center; border: 1px solid var(--mto-line); border-radius: 999px; overflow: hidden; background: #fff; }
.mto .mto-step {
	appearance: none; border: 0; background: var(--mto-soft); color: var(--mto-ink); width: 40px; height: 40px;
	font-size: 20px; line-height: 1; cursor: pointer; padding: 0; border-radius: 0; box-shadow: none;
}
.mto .mto-step:hover { background: var(--mto-line); color: var(--mto-ink); }
.mto-form .mto-stepper input[type="number"] {
	width: 52px; min-height: 40px; border: 0; border-radius: 0; text-align: center; padding: 0; -moz-appearance: textfield;
}
.mto-stepper input::-webkit-outer-spin-button, .mto-stepper input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.mto:not(.mto-js) .mto-step { display: none; }
@media (max-width: 520px) {
	.mto-meal { flex-direction: column; align-items: stretch; }
	.mto-qty { text-align: left; }
}

.mto-summary {
	display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap;
	padding: 12px 16px; background: var(--mto-soft); border-radius: var(--mto-radius); margin: 0 0 20px;
}
.mto-cutoff, .mto-welcome { margin: 0 0 14px; }
.mto-closed { padding: 16px; background: var(--mto-soft); border-radius: var(--mto-radius); }

/* Submit + notes */
.mto-note { color: var(--mto-muted); font-size: .95em; margin: 8px 0 12px; }
.mto .mto-button {
	appearance: none; display: inline-block; background: var(--mto-accent); color: var(--mto-accent-ink);
	border: 0; border-radius: 999px; padding: 14px 28px; font: inherit; font-weight: 600; cursor: pointer;
	min-height: 48px; text-transform: none; letter-spacing: normal;
}
/* Themes often restyle button:hover (e.g. white background), so these states are locked in. */
.mto .mto-button,
.mto a.mto-button:visited {
	background: var(--mto-accent) !important; background-image: none !important;
	color: var(--mto-accent-ink) !important; border: 0 !important; text-decoration: none !important;
}
.mto .mto-button:hover,
.mto .mto-button:focus,
.mto .mto-button:active {
	background: var(--mto-accent-hover) !important; background-image: none !important;
	color: var(--mto-accent-ink) !important; border-color: transparent !important;
	box-shadow: 0 2px 8px rgba(0, 0, 0, .15) !important; filter: none !important; opacity: 1 !important;
	transform: none !important; text-decoration: none !important;
}
.mto .mto-button::before, .mto .mto-button::after { content: none !important; display: none !important; }
.mto .mto-button:focus-visible { outline: 2px solid var(--mto-ink); outline-offset: 3px; }
.mto-unsub { margin-top: 18px; }
.mto .mto-link { background: none; border: 0; padding: 0; color: var(--mto-muted); text-decoration: underline; cursor: pointer; font: inherit; font-size: .9em; box-shadow: none; }

/* Notices */
.mto-notice { padding: 14px 16px; border-radius: var(--mto-radius); margin: 0 0 18px; border: 1px solid; }
.mto-notice p { margin: 0 0 6px; }
.mto-notice ul { margin: 0; padding-left: 20px; }
.mto-notice--ok { background: #eef7ef; border-color: #b9dcbd; color: #1e4d24; }
.mto-notice--error { background: #fcefee; border-color: #efc2be; color: #7a1f17; }

/* Spam trap, visually hidden */
.mto-hp { position: absolute !important; left: -9999px !important; width: 1px; height: 1px; overflow: hidden; }

/* ---------- v2: allergens, plans, subscriber page ---------- */
.mto-contains { font-size: .9em; color: var(--mto-muted); margin: 4px 0 0 !important; }
.mto-clash { font-size: .9em; color: #9b2c22; font-weight: 600; margin: 4px 0 0 !important; }
.mto-meal.is-off { opacity: .6; background: var(--mto-soft); }
.mto-meal.is-off .mto-step { cursor: not-allowed; }
.mto-unit { color: var(--mto-muted); font-size: .9em; }
.mto-min-msg { color: #9b2c22; font-weight: 600; margin: -10px 0 16px; }
.mto-people input { max-width: 140px; }
.mto-allergies .mto-choice { display: inline-flex !important; width: 48%; min-width: 180px; }
@media (max-width: 520px) { .mto-allergies .mto-choice { width: 100%; } }

.mto .mto-button.mto-button--quiet { background: #fff !important; color: var(--mto-ink) !important; border: 1px solid var(--mto-line) !important; }
.mto .mto-button.mto-button--quiet:hover,
.mto .mto-button.mto-button--quiet:focus,
.mto .mto-button.mto-button--quiet:active { background: var(--mto-soft) !important; color: var(--mto-ink) !important; border-color: var(--mto-accent) !important; box-shadow: none !important; }

.mto-lookup { margin-top: 28px; padding: 14px 16px; border: 1px solid var(--mto-line); border-radius: var(--mto-radius); }
.mto-lookup summary { cursor: pointer; font-weight: 600; }
.mto-lookup form { margin-top: 12px; }

.mto-acct-section { padding: 20px 0; border-top: 1px solid var(--mto-line); }
.mto-acct-section:first-of-type { border-top: 0; padding-top: 4px; }
.mto-acct-section h4 { margin: 0 0 10px; }
.mto-acct-section > p { margin: 0 0 12px; }
.mto-acct-section form + form { margin-top: 4px; }
.mto-meal-list { font-weight: 600; }
.mto-plan-edit summary { cursor: pointer; font-weight: 600; color: var(--mto-accent); margin-bottom: 12px; }
.mto-acct-cancel { padding-top: 12px; }
