/*!
 * MyPetDMV live card editor. Fonts come from the theme.
 *
 * Every selector starts with :is(#mpdl-editor, .mpdl). The #id gives the editor's rules ID-level
 * weight, so the theme's rules for inputs, selects, labels, paragraphs, images and buttons can't
 * change the editor. No CSS "sticky", and the layout doesn't use container queries: the theme sets
 * html, body { overflow-x: hidden }, which switches sticky off, so editor.js keeps the card in view
 * and picks the layout:
 *   .mpdl-split  computers and wide tablets: card on the left, pinned while the form flows down the
 *                page (.mpdl-box: the form scrolls in its own box instead — "Form scroll box" setting)
 *   .mpdl-stack  phones: card on top, pinned while the form scrolls underneath
 * .mpdl-steps: the form in two steps (photo, name and address, then pet details).
 */

/* ---------- root ---------- */
:is(#mpdl-editor, .mpdl) {
  --mpdl-navy: #0B1E3D;
  --mpdl-sky: #1CA7E0;
  --mpdl-orange: #F7941D;
  --mpdl-orange-dark: #e07f08;
  --mpdl-tint: #EAF6FD;
  --mpdl-line: #d5dde6;
  --mpdl-muted: #5b6b80;
  --mpdl-ok: #1e8a4c;
  --mpdl-bad: #c0392b;
  --mpdl-radius: 12px;
  display: block;
  position: relative;
  box-sizing: border-box;
  width: 100%;
  max-width: 1200px;
  min-width: 0;
  flex: 1 1 100%;
  align-self: stretch;
  float: none;
  clear: both;
  margin: 8px auto 32px;
  padding: 0;
  color: var(--mpdl-navy);
  text-align: left;
  line-height: 1.4;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}
:is(#mpdl-editor, .mpdl).mpdl-gutter { padding-left: 16px; padding-right: 16px; }
:is(#mpdl-editor, .mpdl) *, :is(#mpdl-editor, .mpdl) *::before, :is(#mpdl-editor, .mpdl) *::after { box-sizing: border-box; }
:is(#mpdl-editor, .mpdl) [hidden] { display: none !important; }
:is(#mpdl-editor, .mpdl) div, :is(#mpdl-editor, .mpdl) span { line-height: inherit; }
:is(#mpdl-editor, .mpdl) p { margin: 0; padding: 0; font-size: inherit; line-height: 1.4; }
:is(#mpdl-editor, .mpdl) svg { display: block; flex: none; max-width: none; margin: 0; }
:is(#mpdl-editor, .mpdl) label { position: static; float: none; }

/* Body-level helpers that hold the card or the dialog when a theme wrapper would get in the way. */
:is(#mpdl-editor, .mpdl):is(.mpdl-dock, .mpdl-portal) { position: static; width: 0; height: 0; max-width: none; margin: 0; padding: 0; flex: none; }

/* ---------- grid ---------- */
:is(#mpdl-editor, .mpdl) .mpdl-grid {
  display: grid; grid-template-columns: minmax(0, 1fr); gap: 16px; align-items: start;
  width: auto; margin: 0; padding: 0; float: none;
}
:is(#mpdl-editor, .mpdl) .mpdl-left, :is(#mpdl-editor, .mpdl) .mpdl-right { min-width: 0; width: auto; margin: 0; padding: 0; float: none; }
:is(#mpdl-editor, .mpdl) .mpdl-left { position: relative; }
/* Before editor.js has measured the editor: two columns on wide screens. */
@media (min-width: 861px) {
  :is(#mpdl-editor, .mpdl):not(.mpdl-stack) .mpdl-grid { grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: 32px; }
}

/* ---------- card ---------- */
:is(#mpdl-editor, .mpdl) .mpdl-stage {
  position: relative;
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 1031 / 638;
  margin: 0;
  padding: 0;
  border-radius: 3.2% / 5.2%;
  overflow: hidden;
  background: #eef2f6;
  box-shadow: 0 1px 2px rgba(11, 30, 61, .08), 0 12px 32px rgba(11, 30, 61, .16);
  user-select: none;
  -webkit-user-select: none;
  line-height: 1;
  container-type: inline-size;
}
@supports not (aspect-ratio: 1 / 1) {
  :is(#mpdl-editor, .mpdl) .mpdl-stage::before { content: ""; display: block; padding-top: 61.882%; }
}
:is(#mpdl-editor, .mpdl) .mpdl-stage img.mpdl-card,
:is(#mpdl-editor, .mpdl) .mpdl-stage canvas.mpdl-instant {
  position: absolute; top: 0; left: 0; right: 0; bottom: 0;
  display: block; width: 100%; height: 100%; max-width: none; max-height: none; min-width: 0;
  margin: 0; padding: 0; border: 0; border-radius: 0; box-shadow: none; background: none; opacity: 1; float: none;
  object-fit: fill; transform: none; filter: none;
}
:is(#mpdl-editor, .mpdl) .mpdl-stage canvas.mpdl-instant { pointer-events: none; }
:is(#mpdl-editor, .mpdl) .mpdl-stage canvas.mpdl-photo {
  position: absolute; display: block; max-width: none; max-height: none; margin: 0; padding: 0; border: 0;
  border-radius: 0; box-shadow: none; float: none; cursor: pointer;
}
:is(#mpdl-editor, .mpdl) .mpdl-photo-hit {
  position: absolute; display: flex; align-items: center; justify-content: center;
  width: auto; height: auto; min-width: 0; min-height: 0; margin: 0; padding: 6px; float: none;
  border: 2px dashed rgba(28, 167, 224, .9); border-radius: 4px; background: rgba(255, 255, 255, .72);
  color: var(--mpdl-navy); cursor: pointer; font: inherit; line-height: 1.2; text-align: center; text-transform: none;
  letter-spacing: normal; box-shadow: none; transition: background .15s;
}
:is(#mpdl-editor, .mpdl) .mpdl-photo-hit:hover, :is(#mpdl-editor, .mpdl) .mpdl-photo-hit:focus-visible { background: rgba(234, 246, 253, .92); outline: none; }
:is(#mpdl-editor, .mpdl) .mpdl-photo-hit-inner { display: flex; flex-direction: column; align-items: center; gap: 6px; font-size: 13px; font-size: clamp(9px, 2.3cqi, 15px); font-weight: 700; line-height: 1.2; }
:is(#mpdl-editor, .mpdl) .mpdl-photo-hit svg { width: 24px; height: 24px; width: clamp(16px, 4cqi, 28px); height: clamp(16px, 4cqi, 28px); }
:is(#mpdl-editor, .mpdl) .mpdl-busy {
  position: absolute; right: 10px; top: 10px; width: 18px; height: 18px; border-radius: 50%;
  border: 2.5px solid rgba(11, 30, 61, .15); border-top-color: var(--mpdl-sky);
  opacity: 0; transition: opacity .2s .25s; animation: mpdl-spin .8s linear infinite; pointer-events: none;
}
:is(#mpdl-editor, .mpdl) .mpdl-loading .mpdl-busy { opacity: 1; }
@keyframes mpdl-spin { to { transform: rotate(360deg); } }

:is(#mpdl-editor, .mpdl) .mpdl-sample-note {
  display: flex; align-items: center; gap: 8px; margin: 12px 2px 0; font-size: 13px; line-height: 1.35; color: var(--mpdl-muted);
}
:is(#mpdl-editor, .mpdl) .mpdl-note-short { display: none; }
:is(#mpdl-editor, .mpdl).mpdl-stack .mpdl-note-long { display: none; }
:is(#mpdl-editor, .mpdl).mpdl-stack .mpdl-note-short { display: inline; }
:is(#mpdl-editor, .mpdl) .mpdl-badge {
  flex: none; display: inline-block; padding: 2px 8px; border-radius: 20px; background: var(--mpdl-tint);
  color: var(--mpdl-navy); font-size: 11px; font-weight: 800; letter-spacing: .04em; text-transform: uppercase; line-height: 1.5;
}
:is(#mpdl-editor, .mpdl) .mpdl-stage-note { margin: 10px 2px 4px; font-size: 14px; color: var(--mpdl-muted); }
:is(#mpdl-editor, .mpdl) .mpdl-novelty { margin: 4px 2px 0; font-size: 12.5px; color: var(--mpdl-muted); }
:is(#mpdl-editor, .mpdl) .mpdl-novelty-m { display: none; }

/* ---------- form column ---------- */
:is(#mpdl-editor, .mpdl) .mpdl-title {
  margin: 0 0 6px; padding: 0; font-size: 1.75em; line-height: 1.2; color: var(--mpdl-navy);
  text-transform: none; letter-spacing: normal; text-align: left; float: none; width: auto;
}
:is(#mpdl-editor, .mpdl) .mpdl-price { margin: 0 0 18px; font-size: 1.35em; font-weight: 700; line-height: 1.3; color: var(--mpdl-navy); }
:is(#mpdl-editor, .mpdl) .mpdl-price del { color: var(--mpdl-muted); font-weight: 400; margin-right: 6px; }
:is(#mpdl-editor, .mpdl) .mpdl-price ins { text-decoration: none; background: none; }

:is(#mpdl-editor, .mpdl) .mpdl-form, :is(#mpdl-editor, .mpdl) .mpdl-crop { display: flex; flex-direction: column; gap: 14px; margin: 0; }
:is(#mpdl-editor, .mpdl) .mpdl-field { display: flex; flex-direction: column; min-width: 0; margin: 0; padding: 0; }
:is(#mpdl-editor, .mpdl) .mpdl-field > label, :is(#mpdl-editor, .mpdl) .mpdl-owner-title {
  display: block; width: auto; max-width: none; min-width: 0; margin: 0 0 6px; padding: 0;
  font-size: 15px; font-weight: 700; line-height: 1.3; color: var(--mpdl-navy);
  text-transform: none; letter-spacing: normal; text-align: left; white-space: normal;
}
:is(#mpdl-editor, .mpdl) .mpdl-row { display: grid; gap: 12px; margin: 0; padding: 0; }
:is(#mpdl-editor, .mpdl) .mpdl-row-2 { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
:is(#mpdl-editor, .mpdl) .mpdl-row-addr { grid-template-columns: minmax(0, 1.7fr) auto minmax(0, 1fr); margin-top: 10px; align-items: center; }
:is(#mpdl-editor, .mpdl) .mpdl-row-hw { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 8px; }

:is(#mpdl-editor, .mpdl) .mpdl-in {
  display: block; position: static; float: none;
  width: 100%; min-width: 0; max-width: none; height: 46px; min-height: 0; max-height: none;
  margin: 0; padding: 0 14px;
  border: 1.5px solid var(--mpdl-line); border-radius: var(--mpdl-radius);
  background-color: #fff; color: var(--mpdl-navy);
  font: inherit; font-size: 16px; font-weight: 400; line-height: normal;
  text-transform: none; letter-spacing: normal; text-indent: 0; text-align: left; vertical-align: middle;
  box-shadow: none; outline: none; opacity: 1; transition: border-color .15s, box-shadow .15s;
  -webkit-appearance: none; -moz-appearance: none; appearance: none;
}
:is(#mpdl-editor, .mpdl) select.mpdl-in {
  padding-right: 34px; 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 1l5 5 5-5' stroke='%230B1E3D' stroke-width='1.8' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 13px center; background-size: 12px 8px;
}
:is(#mpdl-editor, .mpdl) input[type="date"].mpdl-in { padding-right: 8px; }
:is(#mpdl-editor, .mpdl) .mpdl-in::placeholder { color: #98a6b6; opacity: 1; }
:is(#mpdl-editor, .mpdl) .mpdl-in:focus { border-color: var(--mpdl-sky); box-shadow: 0 0 0 3px rgba(28, 167, 224, .2); outline: none; }
:is(#mpdl-editor, .mpdl) .mpdl-in.mpdl-err { border-color: var(--mpdl-bad); box-shadow: 0 0 0 3px rgba(192, 57, 43, .15); }
:is(#mpdl-editor, .mpdl) .mpdl-other { margin-top: 8px; }

:is(#mpdl-editor, .mpdl) .mpdl-count-wrap { position: relative; margin: 0; padding: 0; }
:is(#mpdl-editor, .mpdl) .mpdl-count-wrap .mpdl-in { padding-right: 132px; }
:is(#mpdl-editor, .mpdl) .mpdl-count {
  position: absolute; right: 14px; top: 50%; transform: translateY(-50%); margin: 0;
  font-size: 12px; line-height: 1; color: #8494a8; pointer-events: none; white-space: nowrap;
}
:is(#mpdl-editor, .mpdl) .mpdl-count-low { color: var(--mpdl-orange-dark); }
:is(#mpdl-editor, .mpdl) .mpdl-count-wrap.mpdl-count-short .mpdl-in { padding-right: 64px; }

:is(#mpdl-editor, .mpdl) .mpdl-state {
  height: 46px; min-width: 52px; margin: 0; padding: 0 12px; display: flex; align-items: center; justify-content: center;
  border-radius: var(--mpdl-radius); background: var(--mpdl-tint); color: var(--mpdl-navy); font-weight: 700; font-size: 15px; line-height: 1;
}

:is(#mpdl-editor, .mpdl) .mpdl-warn { margin: 0; font-size: 13px; line-height: 1.35; color: var(--mpdl-bad); }
:is(#mpdl-editor, .mpdl) .mpdl-warn:empty { display: none; }
:is(#mpdl-editor, .mpdl) .mpdl-warn.mpdl-on { margin-top: 6px; }
:is(#mpdl-editor, .mpdl) .mpdl-warn.mpdl-on::before { content: "⚠ "; }
:is(#mpdl-editor, .mpdl) .mpdl-msg { margin: 0; font-size: 14px; line-height: 1.4; color: var(--mpdl-bad); }
:is(#mpdl-editor, .mpdl) .mpdl-msg:empty { display: none; }
:is(#mpdl-editor, .mpdl) .mpdl-msg.mpdl-info { color: var(--mpdl-muted); }
:is(#mpdl-editor, .mpdl) .mpdl-msg.mpdl-on { margin-top: 8px; }

/* ---------- photo upload ---------- */
:is(#mpdl-editor, .mpdl) .mpdl-upload { border-radius: 16px; margin: 0; }
:is(#mpdl-editor, .mpdl) .mpdl-upload-btn {
  width: 100%; min-width: 0; height: auto; display: flex; align-items: center; gap: 14px; float: none;
  margin: 0; padding: 14px 16px;
  border: 2px dashed #9fd5ef; border-radius: 16px; background: var(--mpdl-tint); color: var(--mpdl-navy);
  font: inherit; font-size: 16px; line-height: 1.3; text-align: left; text-transform: none; letter-spacing: normal;
  box-shadow: none; cursor: pointer; transition: border-color .15s, background .15s;
}
:is(#mpdl-editor, .mpdl) .mpdl-upload-btn:hover, :is(#mpdl-editor, .mpdl) .mpdl-upload-btn:focus-visible, :is(#mpdl-editor, .mpdl) .mpdl-drag .mpdl-upload-btn { border-color: var(--mpdl-sky); background: #dff1fb; outline: none; }
:is(#mpdl-editor, .mpdl) .mpdl-upload-icon { flex: 0 0 44px; width: 44px; height: 44px; border-radius: 50%; display: flex; align-items: center; justify-content: center; background: var(--mpdl-sky); color: #fff; }
:is(#mpdl-editor, .mpdl) .mpdl-upload-icon svg { width: 22px; height: 22px; }
:is(#mpdl-editor, .mpdl) .mpdl-upload-text { flex: 1; min-width: 0; display: flex; flex-direction: column; }
:is(#mpdl-editor, .mpdl) .mpdl-upload-text strong { font-size: 16px; font-weight: 700; }
:is(#mpdl-editor, .mpdl) .mpdl-upload-text small { font-size: 13px; color: var(--mpdl-muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
:is(#mpdl-editor, .mpdl) .mpdl-upload-change { font-weight: 700; font-size: 14px; color: var(--mpdl-sky); }
:is(#mpdl-editor, .mpdl) .mpdl-has-photo .mpdl-upload-btn { border-style: solid; border-color: #9ad3b3; background: #f0faf4; }
:is(#mpdl-editor, .mpdl) .mpdl-has-photo .mpdl-upload-icon { background: var(--mpdl-ok); }
:is(#mpdl-editor, .mpdl) .mpdl-upload-tools { display: flex; gap: 18px; margin: 8px 4px 0; }
:is(#mpdl-editor, .mpdl) .mpdl-linkbtn {
  width: auto; height: auto; min-width: 0; margin: 0; padding: 0; float: none; border: 0; border-radius: 0; background: none; box-shadow: none;
  color: var(--mpdl-sky); font: inherit; font-size: 14px; font-weight: 700; line-height: 1.4; text-transform: none; letter-spacing: normal;
  text-decoration: underline; text-underline-offset: 2px; cursor: pointer;
}

/* ---------- crop ---------- */
:is(#mpdl-editor, .mpdl) .mpdl-crop { border: 1.5px solid var(--mpdl-line); border-radius: 16px; padding: 12px; background: #fff; }
:is(#mpdl-editor, .mpdl) .mpdl-crop-bar { display: flex; justify-content: center; gap: 8px; flex-wrap: wrap; padding: 0 0 12px; border-bottom: 1px solid #e6ecf2; }
/* Each button's colours come from the settings as --mpdl-tool-bg / -fg / -bd / -hv (hover). */
:is(#mpdl-editor, .mpdl) .mpdl-tool {
  width: 44px; height: 40px; min-width: 0; margin: 0; padding: 0; float: none; display: flex; align-items: center; justify-content: center; gap: 6px;
  border: 2px solid var(--mpdl-tool-bd, var(--mpdl-navy)); border-radius: 8px; background: var(--mpdl-tool-bg, #fff); color: var(--mpdl-tool-fg, var(--mpdl-navy));
  box-shadow: none; cursor: pointer; font: inherit; font-size: 14px; font-weight: 700; line-height: 1; text-transform: none; letter-spacing: normal; white-space: nowrap;
}
:is(#mpdl-editor, .mpdl) .mpdl-tool svg { width: 20px; height: 20px; }
:is(#mpdl-editor, .mpdl) .mpdl-tool:hover, :is(#mpdl-editor, .mpdl) .mpdl-tool:focus-visible { background: var(--mpdl-tool-hv, var(--mpdl-tint)); color: var(--mpdl-tool-fg, var(--mpdl-navy)); outline: none; }
:is(#mpdl-editor, .mpdl) .mpdl-tool-done { background: var(--mpdl-tool-bg, var(--mpdl-navy)); color: var(--mpdl-tool-fg, #fff); }
:is(#mpdl-editor, .mpdl) .mpdl-tool-done:hover, :is(#mpdl-editor, .mpdl) .mpdl-tool-done:focus-visible { background: var(--mpdl-tool-hv, #1b3a66); color: var(--mpdl-tool-fg, #fff); }
:is(#mpdl-editor, .mpdl) .mpdl-tool-text { display: none; }
/* "Show buttons as": text, or icons and text. */
:is(#mpdl-editor, .mpdl) .mpdl-tb-text .mpdl-tool, :is(#mpdl-editor, .mpdl) .mpdl-tb-both .mpdl-tool { width: auto; padding: 0 12px; }
:is(#mpdl-editor, .mpdl) .mpdl-tb-text .mpdl-tool svg { display: none; }
:is(#mpdl-editor, .mpdl) .mpdl-tb-text .mpdl-tool-text, :is(#mpdl-editor, .mpdl) .mpdl-tb-both .mpdl-tool-text { display: inline; }
:is(#mpdl-editor, .mpdl) .mpdl-tb-both .mpdl-tool svg { width: 18px; height: 18px; }
:is(#mpdl-editor, .mpdl) .mpdl-crop-area { height: clamp(260px, 52vh, 460px); margin: 0; background: #f4f6f8; border-radius: 8px; overflow: hidden; line-height: 1; }
:is(#mpdl-editor, .mpdl) .mpdl-crop-area img { display: block; max-width: 100%; height: auto; margin: 0; border: 0; box-shadow: none; }
:is(#mpdl-editor, .mpdl) .mpdl-crop-help { margin: 0; font-size: 13px; color: var(--mpdl-muted); text-align: center; }

/* ---------- owner ---------- */
:is(#mpdl-editor, .mpdl) .mpdl-owner { border-top: 1px dashed var(--mpdl-line); padding-top: 14px; display: flex; flex-direction: column; gap: 12px; }

/* ---------- cart (WooCommerce form + Product Add-ons live inside) ---------- */
:is(#mpdl-editor, .mpdl) .mpdl-cart { margin: 20px 0 0; padding: 16px 0 0; border-top: 1px solid #e6ecf2; }
:is(#mpdl-editor, .mpdl) .mpdl-cart form.cart { margin: 0 !important; padding: 0; display: block !important; float: none; width: auto; }
:is(#mpdl-editor, .mpdl) .mpdl-cart form.cart::after { content: ""; display: table; clear: both; }
:is(#mpdl-editor, .mpdl) .mpdl-cart form.cart .quantity { display: none !important; }
:is(#mpdl-editor, .mpdl) .mpdl-cart form.cart .single_add_to_cart_button,
:is(#mpdl-editor, .mpdl) .mpdl-cart form.cart button[type="submit"] {
  display: block !important; float: none !important; width: 100% !important; min-width: 0 !important; height: 56px !important; margin: 14px 0 0 !important; padding: 0 16px !important;
  border: 0 !important; border-radius: 14px !important; background: var(--mpdl-orange) !important; color: #fff !important;
  font-size: 18px !important; font-weight: 800 !important; line-height: 56px !important; letter-spacing: .02em; text-transform: uppercase; text-align: center;
  box-shadow: 0 6px 16px rgba(247, 148, 29, .35) !important; cursor: pointer; transition: background .15s, transform .1s;
}
:is(#mpdl-editor, .mpdl) .mpdl-cart form.cart .single_add_to_cart_button:hover { background: var(--mpdl-orange-dark) !important; }
:is(#mpdl-editor, .mpdl) .mpdl-cart form.cart .single_add_to_cart_button:active { transform: translateY(1px); }
:is(#mpdl-editor, .mpdl) .mpdl-cart form.cart .single_add_to_cart_button:disabled { opacity: .75; cursor: progress; }

/* ---------- progress: "Step 1 of 2" and "4 of 13 details filled" ---------- */
:is(#mpdl-editor, .mpdl) .mpdl-progress {
  display: flex; flex-direction: column; gap: 8px; margin: 0; padding: 12px 14px;
  border-radius: var(--mpdl-radius); background: var(--mpdl-tint); color: var(--mpdl-navy);
}
:is(#mpdl-editor, .mpdl) .mpdl-step-line { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 10px; margin: 0; font-size: 16px; line-height: 1.3; outline: none; }
:is(#mpdl-editor, .mpdl) .mpdl-step-count { flex: none; font-size: 12px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; color: #0d6e98; }
:is(#mpdl-editor, .mpdl) .mpdl-step-name { font-weight: 800; }
:is(#mpdl-editor, .mpdl) .mpdl-filled { display: flex; flex-direction: column; gap: 6px; margin: 0; }
:is(#mpdl-editor, .mpdl) .mpdl-filled-text { margin: 0; font-size: 14px; line-height: 1.3; color: var(--mpdl-navy); }
:is(#mpdl-editor, .mpdl) .mpdl-filled-bar { display: block; position: relative; width: 100%; height: 6px; margin: 0; padding: 0; overflow: hidden; border-radius: 6px; background: #cfe9f7; }
:is(#mpdl-editor, .mpdl) .mpdl-filled-fill { display: block; width: 0; height: 100%; margin: 0; border-radius: 6px; background: var(--mpdl-sky); transition: width .25s ease, background-color .25s ease; }
:is(#mpdl-editor, .mpdl) .mpdl-filled-done .mpdl-filled-fill { background: var(--mpdl-ok); }

/* ---------- two steps ---------- */
:is(#mpdl-editor, .mpdl) .mpdl-step { display: flex; flex-direction: column; gap: 14px; margin: 0; padding: 0; outline: none; }
:is(#mpdl-editor, .mpdl).mpdl-steps[data-current-step="1"] [data-step="2"],
:is(#mpdl-editor, .mpdl).mpdl-steps[data-current-step="1"] .mpdl-cart,
:is(#mpdl-editor, .mpdl).mpdl-steps[data-current-step="2"] [data-step="1"] { display: none; }
:is(#mpdl-editor, .mpdl) .mpdl-step-nav { margin: 6px 0 0; padding: 0; }
:is(#mpdl-editor, .mpdl) .mpdl-next {
  display: flex; align-items: center; justify-content: center; gap: 10px; width: 100%; min-width: 0; height: 54px; margin: 0; padding: 0 16px; float: none;
  border: 0; border-radius: 14px; background: var(--mpdl-navy); color: #fff; box-shadow: 0 6px 16px rgba(11, 30, 61, .22);
  font: inherit; font-size: 17px; font-weight: 800; line-height: 1; text-align: center; text-transform: none; letter-spacing: .01em; cursor: pointer;
  transition: background .15s, transform .1s;
}
:is(#mpdl-editor, .mpdl) .mpdl-next:hover, :is(#mpdl-editor, .mpdl) .mpdl-next:focus-visible { background: #1b3a66; outline: none; }
:is(#mpdl-editor, .mpdl) .mpdl-next:focus-visible { box-shadow: 0 0 0 3px rgba(28, 167, 224, .45); }
:is(#mpdl-editor, .mpdl) .mpdl-next:active { transform: translateY(1px); }
:is(#mpdl-editor, .mpdl) .mpdl-next svg { width: 20px; height: 20px; }
:is(#mpdl-editor, .mpdl) .mpdl-step-back { margin: 0; }

/* ---------- dialog ---------- */
:is(#mpdl-editor, .mpdl) .mpdl-modal { position: fixed; top: 0; right: 0; bottom: 0; left: 0; z-index: 100000; display: flex; align-items: center; justify-content: center; margin: 0; padding: 16px; background: rgba(11, 30, 61, .55); }
:is(#mpdl-editor, .mpdl) .mpdl-modal-box { width: 100%; max-width: 440px; max-height: calc(100% - 16px); overflow-y: auto; margin: 0; background: #fff; border-radius: 16px; padding: 22px; box-shadow: 0 20px 50px rgba(0, 0, 0, .25); color: var(--mpdl-navy); text-align: left; }
:is(#mpdl-editor, .mpdl) .mpdl-modal-title { margin: 0 0 8px; font-size: 19px; font-weight: 800; line-height: 1.3; }
:is(#mpdl-editor, .mpdl) .mpdl-modal-part p { margin: 0 0 10px; font-size: 15px; }
:is(#mpdl-editor, .mpdl) .mpdl-modal-list { margin: 0 0 14px; padding: 0 0 0 22px; list-style: disc; font-size: 15px; font-weight: 700; columns: 2; column-gap: 28px; }
:is(#mpdl-editor, .mpdl) .mpdl-modal-list li { margin: 0 0 4px; padding: 0; list-style: disc; break-inside: avoid; }
:is(#mpdl-editor, .mpdl) .mpdl-modal-actions { display: flex; flex-direction: column; gap: 10px; margin-top: 6px; }
:is(#mpdl-editor, .mpdl) .mpdl-btn {
  display: block; width: 100%; height: 48px; min-width: 0; margin: 0; padding: 0 14px; float: none; border-radius: 12px; box-shadow: none;
  font: inherit; font-weight: 700; font-size: 16px; line-height: 1; text-transform: none; letter-spacing: normal; cursor: pointer;
}
:is(#mpdl-editor, .mpdl) .mpdl-btn-primary { border: 0; background: var(--mpdl-orange); color: #fff; }
:is(#mpdl-editor, .mpdl) .mpdl-btn-ghost { border: 1.5px solid var(--mpdl-line); background: #fff; color: var(--mpdl-navy); }
/* "Add to cart" and "Go back and fill them in": colours from the settings (--mpdl-cart-* / --mpdl-back-*). */
:is(#mpdl-editor, .mpdl) .mpdl-btn-cart { border: 0; background: var(--mpdl-cart-bg, var(--mpdl-orange)); color: var(--mpdl-cart-fg, #fff); }
:is(#mpdl-editor, .mpdl) .mpdl-btn-back { border: 1.5px solid var(--mpdl-back-bd, var(--mpdl-line)); background: var(--mpdl-back-bg, #fff); color: var(--mpdl-back-fg, var(--mpdl-navy)); }

.mpdl-product-info { max-width: 1200px; margin: 0 auto; }

/* ---------- computers: card on the left, kept in view while the form flows down the page ---------- */
:is(#mpdl-editor, .mpdl).mpdl-split .mpdl-grid { grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: 32px; }
/* The card is never taller than the screen (below a fixed header), so all of it stays in view. */
:is(#mpdl-editor, .mpdl).mpdl-split .mpdl-stage { max-width: calc((var(--mpdl-pane-h, 9999px) - 96px) * 1031 / 638); }
/* "Form scroll box" on: the form scrolls in its own box beside the card. */
:is(#mpdl-editor, .mpdl).mpdl-split.mpdl-box .mpdl-right {
  position: relative;
  max-height: var(--mpdl-pane-h, none);
  overflow-x: hidden;
  overflow-y: auto;
  padding: 4px 14px 4px 4px;
  scrollbar-gutter: stable;
}
:is(#mpdl-editor, .mpdl).mpdl-split.mpdl-box .mpdl-right::-webkit-scrollbar { width: 10px; }
:is(#mpdl-editor, .mpdl).mpdl-split.mpdl-box .mpdl-right::-webkit-scrollbar-track { background: var(--mpdl-tint); border-radius: 10px; }
:is(#mpdl-editor, .mpdl).mpdl-split.mpdl-box .mpdl-right::-webkit-scrollbar-thumb { background: #9fd5ef; border: 2px solid var(--mpdl-tint); border-radius: 10px; }
:is(#mpdl-editor, .mpdl).mpdl-split.mpdl-box .mpdl-right::-webkit-scrollbar-thumb:hover { background: var(--mpdl-sky); }
@supports not selector(::-webkit-scrollbar) {
  :is(#mpdl-editor, .mpdl).mpdl-split.mpdl-box .mpdl-right { scrollbar-width: thin; scrollbar-color: #9fd5ef var(--mpdl-tint); }
}
:is(#mpdl-editor, .mpdl).mpdl-split .mpdl-crop-area { height: clamp(220px, calc(var(--mpdl-pane-h, 700px) - 190px), 460px); }

/* ---------- phones: card on top, pinned while the form scrolls underneath ---------- */
:is(#mpdl-editor, .mpdl).mpdl-stack .mpdl-sticky { padding: 8px 0; }
:is(#mpdl-editor, .mpdl).mpdl-stack .mpdl-stage { max-width: calc(var(--mpdl-card-h, 34vh) * 1031 / 638); margin: 0 auto; }
:is(#mpdl-editor, .mpdl).mpdl-stack .mpdl-stage-note, :is(#mpdl-editor, .mpdl).mpdl-stack .mpdl-novelty { display: none; }
:is(#mpdl-editor, .mpdl).mpdl-stack .mpdl-novelty-m { display: block; margin-top: 14px; }
:is(#mpdl-editor, .mpdl).mpdl-stack .mpdl-title { font-size: 1.4em; }
:is(#mpdl-editor, .mpdl).mpdl-stack .mpdl-sample-note { justify-content: center; margin: 8px 0 0; font-size: 12px; text-align: center; }
:is(#mpdl-editor, .mpdl).mpdl-stack .mpdl-crop-area { height: var(--mpdl-crop-h, clamp(200px, 38vh, 380px)); }
:is(#mpdl-editor, .mpdl).mpdl-narrow .mpdl-row-2 { grid-template-columns: minmax(0, 1fr); }
@media (max-width: 420px) {
  :is(#mpdl-editor, .mpdl):not(.mpdl-split) .mpdl-row-2 { grid-template-columns: minmax(0, 1fr); }
}

/* The card while it stays in view (editor.js sets its position). */
:is(#mpdl-editor, .mpdl) .mpdl-sticky.mpdl-pinned { position: fixed; top: 0; z-index: 90; margin: 0; will-change: transform; }
:is(#mpdl-editor, .mpdl).mpdl-stack .mpdl-sticky.mpdl-pinned {
  left: 0; right: 0; width: auto; padding: 8px 16px 8px;
  background: #fff; box-shadow: 0 8px 16px -10px rgba(11, 30, 61, .45);
}
:is(#mpdl-editor, .mpdl).mpdl-stack .mpdl-sticky.mpdl-pinned .mpdl-stage { max-width: calc(var(--mpdl-pin-card-h, 30vh) * 1031 / 638); }
:is(#mpdl-editor, .mpdl).mpdl-stack .mpdl-sticky.mpdl-pinned .mpdl-sample-note { margin-top: 6px; }
:is(#mpdl-editor, .mpdl).mpdl-stack.mpdl-kb .mpdl-sticky.mpdl-pinned .mpdl-sample-note { display: none; }
