/* ==========================================================================
   MMC guided print ordering -- Step 1 vendor / 2 product / 3 template /
   4 order form / 5 proof and submit.

   Self-contained on purpose: it does not depend on smart-forms.css, so the
   legacy form and this one can never fight over a selector.
   Brand blue #0194D3 is taken from the Maimonides mark itself.
   ========================================================================== */

/* Real Helvetica Neue (from Maimonides, 28 Aug 2026), so the live proof --
   which is inline-styled font-family:"Helvetica Neue",Arial,... straight out
   of php/proofs/templates.php -- renders in the brand font on machines that
   don't have it installed as a system font, instead of silently falling
   back to Arial. Only Regular/Bold are shipped; the proofs never use italic. */
@font-face {
  font-family: "Helvetica Neue";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("../fonts/helveticaneue/HelveticaNeue.woff2") format("woff2"),
       url("../fonts/helveticaneue/HelveticaNeue.ttf") format("truetype");
}
@font-face {
  font-family: "Helvetica Neue";
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("../fonts/helveticaneue/HelveticaNeue-Bold.woff2") format("woff2"),
       url("../fonts/helveticaneue/HelveticaNeue-Bold.ttf") format("truetype");
}

:root {
  --brand:        #0194D3;
  --brand-dark:   #0177a8;
  --brand-tint:   #eaf6fc;
  --ink:          #1f2933;
  --ink-2:        #52606d;
  --ink-3:        #7b8794;
  --line:         #dbe1e8;
  --line-2:       #eef1f5;
  --bg:           #f4f6f8;
  --card:         #ffffff;
  --ok:           #0f7b4f;
  --ok-bg:        #e8f6ef;
  --err:          #b42318;
  --err-bg:       #fdeceb;
  --warn-bg:      #fff8e6;
  --warn-line:    #e8c56a;
  --radius:       8px;
  --shadow:       0 1px 2px rgba(16,24,40,.06), 0 1px 3px rgba(16,24,40,.10);
  --shadow-lift:  0 4px 12px rgba(16,24,40,.10), 0 2px 4px rgba(16,24,40,.06);
}

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

body.mmc-order {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 15px/1.5 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
        "Helvetica Neue", Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
}

.mmc-shell { max-width: 1180px; margin: 0 auto; padding: 24px 20px 72px; }

/* ---------- masthead ---------------------------------------------------- */
.mmc-masthead {
  display: flex; align-items: center; justify-content: space-between;
  gap: 20px; flex-wrap: wrap; margin-bottom: 22px;
}
.mmc-masthead h1 { margin: 0; font-size: 21px; font-weight: 650; letter-spacing: -.01em; }
.mmc-masthead p  { margin: 3px 0 0; color: var(--ink-3); font-size: 13.5px; }
.mmc-help {
  font-size: 13px; color: var(--ink-2); text-align: right; line-height: 1.45;
}
.mmc-help strong { display: block; color: var(--ink); }

/* ---------- step rail --------------------------------------------------- */
.mmc-rail { list-style: none; display: flex; gap: 6px; margin: 0 0 24px; padding: 0; }
.mmc-rail li {
  flex: 1 1 0; min-width: 0; display: flex; align-items: center; gap: 9px;
  padding: 10px 12px; background: var(--card); border: 1px solid var(--line);
  border-radius: var(--radius); font-size: 13px; color: var(--ink-3);
  overflow: hidden;
}
.mmc-rail .n {
  flex: none; width: 22px; height: 22px; border-radius: 50%;
  display: grid; place-items: center; font-size: 12px; font-weight: 650;
  background: var(--line-2); color: var(--ink-3);
}
.mmc-rail-copy { min-width: 0; overflow: hidden; flex: 1; }
.mmc-rail .lbl { font-weight: 550; }
.mmc-rail .val {
  display: block; font-weight: 400; font-size: 12px; color: var(--ink-3);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
@media (max-width: 720px) {
  .mmc-rail { flex-wrap: wrap; }
  .mmc-rail li { flex: 1 1 calc(50% - 6px); }
}
.mmc-rail li.is-done { color: var(--ink); border-color: #cfe6f3; background: #fbfdff; }
.mmc-rail li.is-done .n { background: var(--ok-bg); color: var(--ok); }
.mmc-rail li.is-done .val { color: var(--brand-dark); }
.mmc-rail li.is-current { color: var(--ink); border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-tint); }
.mmc-rail li.is-current .n { background: var(--brand); color: #fff; }
/* a completed step is a button back to that step; a future step is inert */
.mmc-rail li.is-done { cursor: pointer; }
.mmc-rail li.is-done:hover { border-color: var(--brand); }
.mmc-rail li:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }

/* ---------- panels ------------------------------------------------------ */
.mmc-step { display: none; }
.mmc-step.is-active { display: block; }

.mmc-panel {
  background: var(--card); border: 1px solid var(--line);
  border-radius: var(--radius); box-shadow: var(--shadow); padding: 26px 28px;
}
.mmc-panel > h2 { margin: 0 0 4px; font-size: 17px; font-weight: 650; }
/* focus is moved here programmatically to announce the step; no ring */
.mmc-panel > h2:focus { outline: none; }
.mmc-panel > .sub { margin: 0 0 20px; color: var(--ink-3); font-size: 13.5px; }

/* ---------- choice grids (steps 1-3) ----------------------------------- */
.mmc-choices { display: grid; gap: 12px; }
.mmc-choices.cols-3 { grid-template-columns: repeat(auto-fit, minmax(238px, 1fr)); }
.mmc-choices.cols-2 { grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); }

.mmc-choice {
  position: relative; display: block; margin: 0; cursor: pointer;
  background: var(--card); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 16px 18px; transition: border-color .12s, box-shadow .12s;
}
.mmc-choice:hover { border-color: var(--brand); box-shadow: var(--shadow-lift); }
.mmc-choice input { position: absolute; opacity: 0; width: 0; height: 0; }
.mmc-choice .name { display: block; font-weight: 600; font-size: 15px; }
.mmc-choice .desc { display: block; margin-top: 3px; color: var(--ink-3); font-size: 13px; }
.mmc-choice .sku  {
  display: inline-block; margin-top: 8px; padding: 2px 7px; border-radius: 4px;
  background: var(--line-2); color: var(--ink-2);
  font: 600 11px/1.5 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  letter-spacing: .04em;
}
.mmc-choice:has(input:checked) { border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-tint); }
.mmc-choice input:focus-visible + * { outline: 2px solid var(--brand); outline-offset: 3px; }
/* fallback for browsers without :has() */
.mmc-choice.is-checked { border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-tint); }

/* template cards carry a scaled thumbnail of the real proof */
.mmc-choice.has-thumb { padding: 0; overflow: hidden; }
.mmc-choice.has-thumb .thumb {
  display: block; background: #fff; border-bottom: 1px solid var(--line-2);
  padding: 14px; overflow: hidden;
}
.mmc-choice.has-thumb .thumb-inner { transform-origin: top left; }
.mmc-choice.has-thumb .meta { display: block; padding: 13px 16px 15px; }

/* ---------- form (step 4) ---------------------------------------------- */
.mmc-cols { display: grid; grid-template-columns: minmax(0,1fr) minmax(0,600px); gap: 22px; align-items: start; }
@media (max-width: 1080px) { .mmc-cols { grid-template-columns: minmax(0,1fr); } }

fieldset.mmc-group { border: 0; margin: 0 0 26px; padding: 0; }
fieldset.mmc-group:last-of-type { margin-bottom: 8px; }
.mmc-group > legend {
  padding: 0 0 12px; font-size: 12px; font-weight: 700; letter-spacing: .06em;
  text-transform: uppercase; color: var(--ink-3);
}
.mmc-group > .hint { margin: -6px 0 14px; font-size: 13px; color: var(--ink-3); }

.mmc-fields { display: grid; grid-template-columns: repeat(12, 1fr); gap: 14px 12px; }
.mmc-field { grid-column: span 12; }
.mmc-field.w2  { grid-column: span 2; }
.mmc-field.w3  { grid-column: span 3; }
.mmc-field.w4  { grid-column: span 4; }
.mmc-field.w5  { grid-column: span 5; }
.mmc-field.w6  { grid-column: span 6; }
.mmc-field.w7  { grid-column: span 7; }
.mmc-field.w8  { grid-column: span 8; }
@media (max-width: 620px) {
  .mmc-field.w2, .mmc-field.w3, .mmc-field.w4, .mmc-field.w5,
  .mmc-field.w6, .mmc-field.w7, .mmc-field.w8 { grid-column: span 12; }
}

.mmc-field label { display: block; margin-bottom: 5px; font-size: 13px; font-weight: 550; color: var(--ink-2); }
.mmc-field .req { color: var(--err); margin-left: 2px; }
.mmc-field .note { margin-top: 4px; font-size: 12px; color: var(--ink-3); }

.mmc-field input[type=text], .mmc-field input[type=tel], .mmc-field input[type=email],
.mmc-field input[type=number], .mmc-field select, .mmc-field textarea {
  width: 100%; padding: 9px 11px; font: inherit; font-size: 14px; color: var(--ink);
  background: var(--card); border: 1px solid var(--line); border-radius: 6px;
  transition: border-color .12s, box-shadow .12s;
}
.mmc-field textarea { min-height: 78px; resize: vertical; }
.mmc-field select { appearance: none; background-image:
  url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='7' viewBox='0 0 12 7'%3E%3Cpath fill='%237b8794' d='M1 1l5 5 5-5'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 11px center; padding-right: 32px; }
.mmc-field :is(input, select, textarea):focus {
  outline: 0; border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-tint);
}
/* City / State / Zip come from the address book, so they are not editable */
.mmc-field input[readonly] { background: #f7f9fb; color: var(--ink-2); cursor: default; }
.mmc-field input[readonly]:focus { border-color: var(--line); box-shadow: none; }

.mmc-field.has-error input, .mmc-field.has-error select { border-color: var(--err); }
.mmc-field .msg { display: none; margin-top: 4px; font-size: 12px; color: var(--err); }
.mmc-field.has-error .msg { display: block; }

/* quantity row reads "N boxes of 500" like the mock-up */
.mmc-qty { display: flex; align-items: flex-end; gap: 12px; flex-wrap: wrap; }
.mmc-qty .mmc-field { flex: 0 0 210px; }
.mmc-qty .unit { padding-bottom: 10px; font-size: 14px; color: var(--ink-2); font-weight: 550; }
.mmc-price {
  margin-left: auto; padding: 7px 13px; border-radius: 6px;
  background: var(--ok-bg); color: var(--ok); font-size: 13.5px; font-weight: 600;
}

/* phone rows: Type dropdown beside the number, per the mock-up */
.mmc-phone { display: grid; grid-template-columns: 130px minmax(0,1fr); gap: 10px; align-items: end; }
.mmc-phone.no-type { grid-template-columns: minmax(0,1fr); }
@media (max-width: 620px) { .mmc-phone { grid-template-columns: minmax(0,1fr); } }

/* ---------- live proof ------------------------------------------------- */
.mmc-proof-dock { position: sticky; top: 18px; }
.mmc-proof-card {
  background: var(--card); border: 1px solid var(--line);
  border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden;
}
.mmc-proof-head {
  display: flex; align-items: baseline; justify-content: space-between; gap: 12px;
  padding: 14px 18px; border-bottom: 1px solid var(--line-2); background: #fbfcfd;
}
.mmc-proof-head h3 { margin: 0; font-size: 14px; font-weight: 650; }
.mmc-proof-head .live {
  font-size: 11.5px; font-weight: 600; letter-spacing: .05em; text-transform: uppercase;
  color: var(--ok); display: inline-flex; align-items: center; gap: 6px;
}
.mmc-proof-head .live::before {
  content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--ok);
}
.mmc-proof-body { padding: 18px; background: #f7f8fa; }

.mmc-proof-panel + .mmc-proof-panel { margin-top: 18px; }
.mmc-proof-caption {
  margin: 0 0 7px; font-size: 12px; color: var(--ink-3);
  display: flex; justify-content: space-between; gap: 10px;
}
.mmc-proof-caption .sku {
  font: 600 11px/1.5 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  color: var(--ink-2); letter-spacing: .04em;
}
/* the artwork is authored at fixed pixel sizes (see php/proofs/templates.php)
   and scaled to fit here, so screen and e-mail render the same markup */
.mmc-proof-stage { overflow: hidden; }
.mmc-proof-scale { transform-origin: top left; }

.mmc-proof-note {
  margin: 14px 18px 18px; padding: 10px 12px; border-radius: 6px;
  background: var(--warn-bg); border: 1px solid var(--warn-line);
  font-size: 12.5px; color: #6b5416;
}
.mmc-proof-overflow {
  margin: 0 18px 18px; padding: 10px 12px; border-radius: 6px;
  background: var(--err-bg); border: 1px solid #f0b4ae;
  font-size: 12.5px; color: var(--err);
}
.mmc-proof-overflow[hidden] { display: none; }
.mmc-proof-note + .mmc-proof-overflow { margin-top: -8px; }

/* ---------- review (step 5) -------------------------------------------- */
.mmc-review { display: grid; gap: 10px; margin: 0 0 22px; }
.mmc-review dl { display: grid; grid-template-columns: 190px minmax(0,1fr); gap: 8px 16px; margin: 0; }
.mmc-review dt { color: var(--ink-3); font-size: 13px; }
.mmc-review dd { margin: 0; font-size: 14px; }
.mmc-mail-plan { display: grid; gap: 10px; margin: 20px 0 0; }
.mmc-mail-plan li {
  list-style: none; padding: 12px 14px; border: 1px solid var(--line);
  border-radius: 6px; background: #fbfcfd; font-size: 13.5px;
}
.mmc-mail-plan .who { display: block; margin-top: 4px; color: var(--ink-3); font-size: 12.5px; }

.mmc-confirm {
  display: flex; gap: 10px; align-items: flex-start; margin: 22px 0 0;
  padding: 14px 16px; border: 1px solid var(--line); border-radius: 6px; background: #fbfcfd;
}
.mmc-confirm input { margin: 2px 0 0; width: 17px; height: 17px; flex: none; accent-color: var(--brand); }
.mmc-confirm label { font-size: 13.5px; color: var(--ink-2); }

/* ---------- actions ---------------------------------------------------- */
.mmc-actions {
  display: flex; align-items: center; gap: 12px; margin-top: 22px;
  padding-top: 20px; border-top: 1px solid var(--line-2);
}
.mmc-actions .spacer { margin-left: auto; }

.mmc-btn {
  appearance: none; font: inherit; font-size: 14px; font-weight: 600;
  padding: 10px 20px; border-radius: 6px; border: 1px solid transparent; cursor: pointer;
  transition: background .12s, border-color .12s, color .12s;
}
.mmc-btn-primary { background: var(--brand); color: #fff; }
.mmc-btn-primary:hover:not([disabled]) { background: var(--brand-dark); }
.mmc-btn-ghost { background: var(--card); border-color: var(--line); color: var(--ink-2); }
.mmc-btn-ghost:hover { border-color: var(--ink-3); color: var(--ink); }
.mmc-btn[disabled] { opacity: .5; cursor: not-allowed; }
.mmc-btn:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }

/* ---------- notices ---------------------------------------------------- */
.mmc-notice { padding: 13px 16px; border-radius: 6px; font-size: 14px; margin: 0 0 18px; }
.mmc-notice-error   { background: var(--err-bg); border: 1px solid #f3b9b4; color: var(--err); }
.mmc-notice-success { background: var(--ok-bg);  border: 1px solid #a9dcc4; color: var(--ok); }
.mmc-notice-info    { background: var(--brand-tint); border: 1px solid #b6dff2; color: var(--brand-dark); }
.mmc-notice ul { margin: 8px 0 0; padding-left: 20px; }

.mmc-punchout {
  display: flex; align-items: center; gap: 14px; flex-wrap: wrap;
  padding: 12px 16px; margin-bottom: 18px; border-radius: 6px;
  background: var(--ok-bg); border: 1px solid #a9dcc4; color: #145c3d; font-size: 13.5px;
}
.mmc-punchout a {
  margin-left: auto; background: #fff; color: var(--ok); text-decoration: none;
  padding: 7px 15px; border-radius: 6px; font-weight: 600; border: 1px solid #a9dcc4;
}

.mmc-sr {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

@media print {
  .mmc-rail, .mmc-actions, .mmc-masthead .mmc-help { display: none; }
  body.mmc-order { background: #fff; }
  .mmc-panel, .mmc-proof-card { border: 0; box-shadow: none; }
}
