/*
 * MG Print Manager — product designer redesign (Phase 1: modal shell).
 *
 * Loaded after frontend.css. Restyles and enhances the artwork designer modal
 * (`.mgpm-artwork-modal`) into the new 3-column shell with an icon rail +
 * slide-in navigation, a floating front/back switch, a contextual properties
 * column, a bottom bar (quantity + price + variants), and a hover canvas toolbar.
 *
 * The modal body is built dynamically by frontend.js (ensureArtworkModalLayout);
 * designer.js augments that DOM and toggles the classes these rules key off.
 * Keep all designer-specific styling here so frontend.css does not keep growing.
 */

/* Design tokens mirror .mgpm-artwork-modal in frontend.css. */
.mgpm-artwork-modal.mgpm-designer {
  --mgpm-designer-rail-w: 76px;
  --mgpm-designer-nav-w: 272px;
  --mgpm-designer-props-w: 328px;
}

/* ---- 3-column body: icon rail | stage | tools ---- */
.mgpm-artwork-modal.mgpm-designer .mgpm-artwork-modal__body {
  position: relative;
  display: grid;
  grid-template-columns: var(--mgpm-designer-rail-w) minmax(0, 1fr) var(--mgpm-designer-props-w);
  gap: 0;
  padding: 0;
}
/* Pin the designer's own 3-column placement so it survives the 861–1100px band,
   where frontend.css's legacy artwork-modal reflow (written for the old
   2-column layout) would otherwise force the icon rail full-width and collapse
   the canvas to a sliver. The ≤860px block below switches the body to flex,
   where these grid properties are simply ignored. */
.mgpm-artwork-modal.mgpm-designer .mgpm-artwork-tools--left {
  grid-column: 1;
  grid-row: 1;
  max-height: none;
}
.mgpm-artwork-modal.mgpm-designer .mgpm-artwork-stage {
  grid-column: 2;
  grid-row: 1;
}
.mgpm-artwork-modal.mgpm-designer .mgpm-artwork-tools--right {
  grid-column: 3;
  grid-row: 1;
}
.mgpm-artwork-modal.mgpm-designer .mgpm-artwork-canvas-wrap { margin: 12px 16px; }
.mgpm-artwork-modal.mgpm-designer .mgpm-artwork-tools--right {
  display: flex;
  flex-direction: column;
  gap: 18px;
  min-width: 0;
  margin: 0;
  padding: 16px;
  border: 0;
  border-left: 1px solid #e5e7eb;
  border-radius: 0;
  background: #fbfbfc;
  overflow-y: auto;
}

/* ---- icon rail (was the always-open left source panel) ---- */
.mgpm-artwork-tools.mgpm-designer-left {
  padding: 12px 7px;
  border: 0;
  border-right: 1px solid #e5e7eb;
  background: #f8fafc;
  border-radius: 0;
}
.mgpm-designer-rail { display: flex; flex-direction: column; gap: 10px; }
.mgpm-designer-rail__btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  width: 100%;
  min-height: 70px;
  padding: 8px 4px;
  background: #fff;
  border: 1px solid #d9dde5;
  border-radius: 8px;
  color: var(--mgpm-muted, rgba(22, 52, 71, 0.68));
  font: inherit;
  font-size: 10.5px;
  line-height: 1.2;
  text-align: center;
  cursor: pointer;
}
.mgpm-designer-rail__btn:hover {
  border-color: var(--mgpm-blue, #0d5a7f);
  color: var(--mgpm-blue, #0d5a7f);
}
.mgpm-designer-rail__btn.is-active {
  background: rgba(13, 90, 127, 0.08);
  border-color: var(--mgpm-blue, #0d5a7f);
  color: var(--mgpm-blue, #0d5a7f);
  font-weight: 600;
}
.mgpm-designer-rail__btn.is-disabled {
  color: rgba(22, 52, 71, 0.48);
  cursor: default;
}
/* The glyph inherits the button's colour, so hover/active/disabled need no rules. */
.mgpm-designer-rail__ico {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
}
.mgpm-designer-rail__ico svg {
  width: 100%;
  height: 100%;
}

/* ---- slide-in overlay anchored to the rail ---- */
.mgpm-designer-hidden { display: none !important; }
.mgpm-designer-slidein {
  position: absolute;
  top: 0;
  bottom: 0;
  left: var(--mgpm-designer-rail-w);
  width: var(--mgpm-designer-nav-w);
  z-index: 5;
  display: flex;
  flex-direction: column;
  background: #fff;
  border-right: 1px solid rgba(13, 90, 127, 0.14);
  box-shadow: 8px 0 24px rgba(15, 23, 42, 0.14);
  transform: translateX(-10px);
  opacity: 0;
  visibility: hidden;
  transition: transform 0.24s ease, opacity 0.2s ease, visibility 0.24s;
}
.mgpm-artwork-modal.mgpm-designer.mgpm-designer--nav-open .mgpm-designer-slidein {
  transform: translateX(0);
  opacity: 1;
  visibility: visible;
}
.mgpm-designer-slidein__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px;
  border-bottom: 1px solid #e5e7eb;
  flex: none;
}
.mgpm-designer-slidein__head strong { font-size: 14px; }
.mgpm-designer-slidein__close {
  border: 0;
  background: none;
  cursor: pointer;
  color: var(--mgpm-muted, rgba(22, 52, 71, 0.68));
  font-size: 20px;
  line-height: 1;
}
.mgpm-designer-slidein__body { flex: 1; overflow-y: auto; padding: 16px; }

/* ---- canvas overlays: persistent front/back + variant pill and hover toolbar ---- */
.mgpm-artwork-modal.mgpm-designer .mgpm-artwork-canvas-wrap.mgpm-designer-canvas { position: relative; }

/* Front/back and variant navigation stay visible above the product photo. */
.mgpm-artwork-modal.mgpm-designer .mgpm-designer-canvas .mgpm-artwork-view-tabs {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 3;
  display: flex;
  align-items: center;
  gap: 2px;
  margin: 0;
  padding: 3px;
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid #d9dde5;
  border-radius: 999px;
  box-shadow: 0 4px 14px rgba(15, 23, 42, 0.1);
  opacity: 1;
}
.mgpm-artwork-modal.mgpm-designer .mgpm-designer-canvas .mgpm-artwork-view-tabs__nav {
  width: 40px;
  height: 40px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--mgpm-muted, rgba(22, 52, 71, 0.68));
  cursor: pointer;
}
.mgpm-artwork-modal.mgpm-designer .mgpm-designer-canvas .mgpm-artwork-view-tabs__nav:hover {
  background: rgba(13, 90, 127, 0.1);
  color: var(--mgpm-blue, #0d5a7f);
}
.mgpm-artwork-modal.mgpm-designer .mgpm-designer-canvas .mgpm-artwork-view-tabs__label {
  color: var(--mgpm-blue, #0d5a7f);
  font: inherit;
  font-size: 13px;
  font-weight: 700;
}
.mgpm-artwork-modal.mgpm-designer .mgpm-artwork-variant-switcher__divider {
  width: 1px;
  height: 26px;
  margin: 0 3px;
  background: rgba(31, 47, 58, 0.14);
}
.mgpm-artwork-modal.mgpm-designer .mgpm-artwork-variant-switcher {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 2px;
}
.mgpm-artwork-modal.mgpm-designer .mgpm-artwork-variant-switcher__nav {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--mgpm-muted, rgba(22, 52, 71, 0.68));
  cursor: pointer;
}
.mgpm-artwork-modal.mgpm-designer .mgpm-artwork-variant-switcher__nav:hover {
  background: rgba(13, 90, 127, 0.1);
  color: var(--mgpm-blue, #0d5a7f);
}
.mgpm-artwork-modal.mgpm-designer .mgpm-artwork-variant-switcher__nav svg {
  width: 19px;
  height: 19px;
}
.mgpm-artwork-modal.mgpm-designer .mgpm-artwork-variant-switcher__trigger {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  height: 40px;
  padding: 0 10px 0 5px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: #314852;
  cursor: pointer;
  font: inherit;
}
.mgpm-artwork-modal.mgpm-designer .mgpm-artwork-variant-switcher__trigger:hover,
.mgpm-artwork-modal.mgpm-designer .mgpm-artwork-variant-switcher.is-open .mgpm-artwork-variant-switcher__trigger {
  background: rgba(13, 90, 127, 0.1);
  color: var(--mgpm-blue, #0d5a7f);
}
.mgpm-artwork-modal.mgpm-designer .mgpm-artwork-variant-switcher__trigger > svg {
  width: 16px;
  height: 16px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
  transition: transform 0.15s ease;
}
.mgpm-artwork-modal.mgpm-designer .mgpm-artwork-variant-switcher.is-open .mgpm-artwork-variant-switcher__trigger > svg {
  transform: rotate(180deg);
}
.mgpm-artwork-modal.mgpm-designer .mgpm-artwork-variant-switcher__swatch {
  display: grid;
  flex: 0 0 auto;
  place-items: center;
  width: 30px;
  height: 30px;
  overflow: hidden;
  border: 2px solid #fff;
  border-radius: 50%;
  background: #eef1f3;
  box-shadow: 0 0 0 1px #cfd6dc;
  color: #52656f;
  font-size: 11px;
  font-style: normal;
  font-weight: 800;
}
.mgpm-artwork-modal.mgpm-designer .mgpm-artwork-variant-switcher__swatch img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.mgpm-artwork-modal.mgpm-designer .mgpm-artwork-variant-switcher__label {
  max-width: 110px;
  overflow: hidden;
  font-size: 12px;
  font-weight: 750;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.mgpm-artwork-modal.mgpm-designer .mgpm-artwork-variant-switcher__menu {
  position: absolute;
  top: calc(100% + 9px);
  right: 0;
  z-index: 8;
  display: none;
  width: min(260px, calc(100vw - 40px));
  max-height: min(360px, calc(100vh - 160px));
  padding: 7px;
  overflow-y: auto;
  border: 1px solid #d9dfe4;
  border-radius: 13px;
  background: #fff;
  box-shadow: 0 16px 38px rgba(15, 31, 42, 0.2);
}
.mgpm-artwork-modal.mgpm-designer .mgpm-artwork-variant-switcher.is-open .mgpm-artwork-variant-switcher__menu {
  display: grid;
  gap: 3px;
}
.mgpm-artwork-modal.mgpm-designer .mgpm-artwork-variant-switcher__option {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr) 18px;
  align-items: center;
  gap: 10px;
  width: 100%;
  min-height: 46px;
  padding: 5px 8px;
  border: 0;
  border-radius: 9px;
  background: transparent;
  color: #263b45;
  cursor: pointer;
  font: inherit;
  font-size: 13px;
  font-weight: 650;
  text-align: left;
}
.mgpm-artwork-modal.mgpm-designer .mgpm-artwork-variant-switcher__option:hover,
.mgpm-artwork-modal.mgpm-designer .mgpm-artwork-variant-switcher__option:focus-visible {
  background: #edf4f7;
  outline: none;
}
.mgpm-artwork-modal.mgpm-designer .mgpm-artwork-variant-switcher__option.is-active {
  color: var(--mgpm-blue, #0d5a7f);
}
.mgpm-artwork-modal.mgpm-designer .mgpm-artwork-variant-switcher__option i {
  visibility: hidden;
  color: var(--mgpm-blue, #0d5a7f);
  font-style: normal;
  font-weight: 800;
}
.mgpm-artwork-modal.mgpm-designer .mgpm-artwork-variant-switcher__option.is-active i {
  visibility: visible;
}

/* History and zoom share one toolbar below the slide-in overlay (z-index 5). */
.mgpm-artwork-modal.mgpm-designer .mgpm-designer-canvas .mgpm-artwork-canvas-toolbar {
  position: absolute;
  left: 12px;
  right: auto;
  bottom: 12px;
  z-index: 3;
  display: flex;
  align-items: center;
  gap: 3px;
  padding: 4px;
  border: 1px solid rgba(31, 47, 58, 0.16);
  border-radius: 9px;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 4px 14px rgba(15, 23, 42, 0.1);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.15s ease;
}
.mgpm-artwork-modal.mgpm-designer .mgpm-designer-canvas:hover .mgpm-artwork-canvas-toolbar {
  opacity: 1;
  pointer-events: auto;
}
.mgpm-artwork-modal.mgpm-designer .mgpm-designer-canvas .mgpm-artwork-history,
.mgpm-artwork-modal.mgpm-designer .mgpm-designer-canvas .mgpm-artwork-zoom {
  position: static;
  display: flex;
  align-items: center;
  gap: 2px;
  margin: 0;
}
.mgpm-artwork-modal.mgpm-designer .mgpm-designer-canvas .mgpm-artwork-history {
  padding-right: 4px;
  margin-right: 1px;
  border-right: 1px solid rgba(31, 47, 58, 0.14);
}
.mgpm-artwork-modal.mgpm-designer .mgpm-designer-canvas .mgpm-artwork-canvas-toolbar button {
  min-width: 30px;
  height: 30px;
  padding: 0 7px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: #435761;
  box-shadow: none;
  font: inherit;
  font-size: 12px;
  font-weight: 750;
  cursor: pointer;
}
.mgpm-artwork-modal.mgpm-designer .mgpm-designer-canvas .mgpm-artwork-history__btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.mgpm-artwork-modal.mgpm-designer .mgpm-designer-canvas .mgpm-artwork-canvas-toolbar button:hover:not(:disabled) {
  background: #eaf2f5;
  color: var(--mgpm-blue, #0d5a7f);
}
.mgpm-artwork-modal.mgpm-designer .mgpm-designer-canvas .mgpm-artwork-history__btn:disabled {
  opacity: 0.4;
  cursor: default;
}
.mgpm-artwork-modal.mgpm-designer .mgpm-designer-canvas .mgpm-artwork-zoom span {
  min-width: 40px;
  color: #536873;
  font-size: 11px;
  font-weight: 800;
  text-align: center;
}

/* ---- floating action toolbar over the selected motif ---- */
.mgpm-artwork-modal.mgpm-designer .mgpm-designer-toolbar {
  --mgpm-caret-x: 50%;
  position: absolute;
  top: 0;
  left: 0;
  z-index: 6;
  display: flex;
  align-items: center;
  gap: 2px;
  padding: 5px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.98);
  border: 1px solid #e2e5ea;
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.18), 0 2px 6px rgba(15, 23, 42, 0.08);
  opacity: 0;
  transform: translateY(4px) scale(0.96);
  transform-origin: center bottom;
  pointer-events: none;
  transition: opacity 0.13s ease, transform 0.13s ease;
}
.mgpm-artwork-modal.mgpm-designer .mgpm-designer-toolbar.is-visible {
  opacity: 1;
  transform: translateY(0) scale(1);
  pointer-events: auto;
}
.mgpm-artwork-modal.mgpm-designer .mgpm-designer-toolbar.is-below {
  transform-origin: center top;
}

.mgpm-artwork-modal.mgpm-designer .mgpm-designer-toolbar__btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  padding: 0;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--mgpm-text, #1e3a4c);
  cursor: pointer;
  transition: background 0.12s ease, color 0.12s ease, transform 0.08s ease;
}
.mgpm-artwork-modal.mgpm-designer .mgpm-designer-toolbar__btn svg {
  width: 19px;
  height: 19px;
}
.mgpm-artwork-modal.mgpm-designer .mgpm-designer-toolbar__text {
  display: flex;
  align-items: center;
  gap: 6px;
  padding-right: 4px;
}
.mgpm-artwork-modal.mgpm-designer .mgpm-designer-toolbar__text[hidden] {
  display: none;
}
.mgpm-artwork-modal.mgpm-designer .mgpm-designer-toolbar__field,
.mgpm-artwork-modal.mgpm-designer .mgpm-designer-toolbar__color {
  display: inline-grid;
  gap: 2px;
  margin: 0;
  color: var(--mgpm-muted, rgba(22, 52, 71, 0.68));
  font-size: 9.5px;
  font-weight: 700;
  line-height: 1;
  text-transform: uppercase;
}
.mgpm-artwork-modal.mgpm-designer .mgpm-designer-toolbar__field select,
.mgpm-artwork-modal.mgpm-designer .mgpm-designer-toolbar__field input {
  box-sizing: border-box;
  height: 28px;
  min-width: 0;
  border: 1px solid #d9dde5;
  border-radius: 7px;
  background: #fff;
  color: var(--mgpm-text, #1e3a4c);
  font: inherit;
  font-size: 12px;
  font-weight: 650;
}
.mgpm-artwork-modal.mgpm-designer .mgpm-designer-toolbar__field select {
  width: 132px;
  padding: 0 22px 0 7px;
}
.mgpm-artwork-modal.mgpm-designer .mgpm-designer-toolbar__field--size input {
  width: 56px;
  padding: 0 5px;
}
.mgpm-artwork-modal.mgpm-designer .mgpm-designer-toolbar__color input {
  width: 32px;
  height: 28px;
  padding: 2px;
  border: 1px solid #d9dde5;
  border-radius: 7px;
  background: #fff;
  cursor: pointer;
}
.mgpm-artwork-modal.mgpm-designer .mgpm-designer-toolbar__field select:focus,
.mgpm-artwork-modal.mgpm-designer .mgpm-designer-toolbar__field input:focus,
.mgpm-artwork-modal.mgpm-designer .mgpm-designer-toolbar__color input:focus {
  border-color: var(--mgpm-blue, #0d5a7f);
  outline: 2px solid rgba(13, 90, 127, 0.16);
  outline-offset: 0;
}
.mgpm-artwork-modal.mgpm-designer .mgpm-designer-toolbar__btn:hover {
  background: rgba(13, 90, 127, 0.1);
  color: var(--mgpm-blue, #0d5a7f);
}
.mgpm-artwork-modal.mgpm-designer .mgpm-designer-toolbar__btn:active {
  transform: scale(0.9);
}
.mgpm-artwork-modal.mgpm-designer .mgpm-designer-toolbar__btn:focus-visible {
  outline: 2px solid rgba(13, 90, 127, 0.4);
  outline-offset: 1px;
}
.mgpm-artwork-modal.mgpm-designer .mgpm-designer-toolbar__btn.is-danger:hover {
  background: rgba(214, 69, 65, 0.12);
  color: #d64541;
}

/* armed "Flyt til andet felt" — filled blue + persistent hint */
.mgpm-artwork-modal.mgpm-designer .mgpm-designer-toolbar__btn.is-armed {
  background: var(--mgpm-blue, #0d5a7f);
  color: #fff;
}
.mgpm-artwork-modal.mgpm-designer .mgpm-designer-toolbar__btn.is-armed:hover {
  background: #0b4d6c;
  color: #fff;
}
.mgpm-artwork-modal.mgpm-designer .mgpm-designer-toolbar__btn.is-armed .mgpm-designer-toolbar__tip {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

.mgpm-artwork-modal.mgpm-designer .mgpm-designer-toolbar__divider {
  width: 1px;
  height: 20px;
  margin: 0 3px;
  background: #e2e5ea;
}

/* tooltip bubble */
.mgpm-artwork-modal.mgpm-designer .mgpm-designer-toolbar__tip {
  position: absolute;
  bottom: calc(100% + 8px);
  left: 50%;
  transform: translateX(-50%) translateY(3px);
  padding: 4px 8px;
  border-radius: 6px;
  background: #1e3a4c;
  color: #fff;
  font-size: 11px;
  font-weight: 600;
  line-height: 1.2;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.12s ease, transform 0.12s ease;
}
.mgpm-artwork-modal.mgpm-designer .mgpm-designer-toolbar.is-below .mgpm-designer-toolbar__tip {
  bottom: auto;
  top: calc(100% + 8px);
  transform: translateX(-50%) translateY(-3px);
}
.mgpm-artwork-modal.mgpm-designer .mgpm-designer-toolbar__btn:hover .mgpm-designer-toolbar__tip,
.mgpm-artwork-modal.mgpm-designer .mgpm-designer-toolbar__btn:focus-visible .mgpm-designer-toolbar__tip {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* caret pointing at the motif */
.mgpm-artwork-modal.mgpm-designer .mgpm-designer-toolbar__caret {
  position: absolute;
  top: 100%;
  left: var(--mgpm-caret-x);
  width: 12px;
  height: 12px;
  margin-left: -6px;
  margin-top: -6px;
  background: rgba(255, 255, 255, 0.98);
  border-right: 1px solid #e2e5ea;
  border-bottom: 1px solid #e2e5ea;
  transform: rotate(45deg);
}
.mgpm-artwork-modal.mgpm-designer .mgpm-designer-toolbar.is-below .mgpm-designer-toolbar__caret {
  top: 0;
  margin-top: -6px;
  border-right: 0;
  border-bottom: 0;
  border-left: 1px solid #e2e5ea;
  border-top: 1px solid #e2e5ea;
}

/* ---- bottom bar: stats + actions, right-aligned ----
   Layout: [ .............. ] [ Metode  Antal  Total ] | [ actions ]
   Each stat is a hover/focus "frame" (soft grey box) so it reads as tappable. */
.mgpm-artwork-modal.mgpm-designer .mgpm-artwork-footer.mgpm-designer-footer {
  display: flex;
  align-items: center;
  gap: 16px;
  min-height: 72px;
  padding: 10px 20px;
}

/* readiness chips are intentionally hidden (designer.js sets [hidden]) */
.mgpm-artwork-modal.mgpm-designer .mgpm-artwork-checklist[hidden] {
  display: none;
}

.mgpm-artwork-modal.mgpm-designer .mgpm-designer-footer .mgpm-artwork-footer__status:not(.is-error) {
  display: none;
}

.mgpm-artwork-modal.mgpm-designer .mgpm-designer-footer .mgpm-artwork-footer__status.is-error {
  display: block;
  max-width: 440px;
  margin-right: auto;
  padding: 9px 12px;
  border: 1px solid #f0b7a6;
  border-radius: 9px;
  background: #fff3ef;
  color: #8f2f17;
}

/* the whole meta + actions cluster sits to the right */
.mgpm-artwork-modal.mgpm-designer .mgpm-designer-footer .mgpm-artwork-footer__right {
  flex: 0 0 auto;
  margin-left: auto;
  gap: 0;
}

/* three inline stat blocks */
.mgpm-artwork-modal.mgpm-designer .mgpm-artwork-footer__meta {
  display: flex;
  align-items: stretch;
  gap: 6px;
  text-align: left;
}
.mgpm-artwork-modal.mgpm-designer .mgpm-artwork-footer__method,
.mgpm-artwork-modal.mgpm-designer .mgpm-artwork-footer__quantity,
.mgpm-artwork-modal.mgpm-designer .mgpm-artwork-footer__price {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;
  gap: 3px;
  width: auto;
  padding: 9px 16px;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: inherit;
  font: inherit;
  text-align: left;
  cursor: pointer;
  transition: background 0.15s ease;
}
.mgpm-artwork-modal.mgpm-designer .mgpm-artwork-footer__method { min-width: 116px; }
.mgpm-artwork-modal.mgpm-designer .mgpm-artwork-footer__quantity { min-width: 84px; }
/* the price needs enough room for the value + "inkl. moms" so it never clips */
.mgpm-artwork-modal.mgpm-designer .mgpm-artwork-footer__price {
  min-width: 176px;
}

/* soft grey hover/focus frame on all three stats — the single intended frame */
.mgpm-artwork-modal.mgpm-designer .mgpm-artwork-footer__method:hover,
.mgpm-artwork-modal.mgpm-designer .mgpm-artwork-footer__quantity:hover,
.mgpm-artwork-modal.mgpm-designer .mgpm-artwork-footer__price:hover,
.mgpm-artwork-modal.mgpm-designer .mgpm-artwork-footer__method:focus-visible,
.mgpm-artwork-modal.mgpm-designer .mgpm-artwork-footer__quantity:focus-visible,
.mgpm-artwork-modal.mgpm-designer .mgpm-artwork-footer__price:focus-within {
  background: rgba(22, 52, 71, 0.08);
  outline: none;
}

/* kill the base stylesheet's inner focus outlines so there is only ONE frame
   (the grey box above), not a second darker ring around the button/text */
.mgpm-artwork-modal.mgpm-designer .mgpm-artwork-footer__method,
.mgpm-artwork-modal.mgpm-designer .mgpm-artwork-footer__quantity,
.mgpm-artwork-modal.mgpm-designer .mgpm-artwork-footer__price-toggle,
.mgpm-artwork-modal.mgpm-designer .mgpm-artwork-footer__method:hover,
.mgpm-artwork-modal.mgpm-designer .mgpm-artwork-footer__quantity:hover,
.mgpm-artwork-modal.mgpm-designer .mgpm-artwork-footer__method:focus,
.mgpm-artwork-modal.mgpm-designer .mgpm-artwork-footer__quantity:focus,
.mgpm-artwork-modal.mgpm-designer .mgpm-artwork-footer__price-toggle:focus,
.mgpm-artwork-modal.mgpm-designer .mgpm-artwork-footer__method:focus-visible,
.mgpm-artwork-modal.mgpm-designer .mgpm-artwork-footer__quantity:focus-visible,
.mgpm-artwork-modal.mgpm-designer .mgpm-artwork-footer__price-toggle:focus-visible {
  outline: none;
  border: 0;
  box-shadow: none;
}

/* The price value lives inside a <button>, so the theme's `button`/`button:hover`
   rules (background + box-shadow) would paint a second darker box INSIDE the grey
   frame. Force the inner button fully transparent in every state — the only frame
   is the grey box on the parent .mgpm-artwork-footer__price. */
.mgpm-artwork-modal.mgpm-designer .mgpm-artwork-footer__price-toggle,
.mgpm-artwork-modal.mgpm-designer .mgpm-artwork-footer__price-toggle:hover,
.mgpm-artwork-modal.mgpm-designer .mgpm-artwork-footer__price-toggle:focus,
.mgpm-artwork-modal.mgpm-designer .mgpm-artwork-footer__price-toggle:focus-visible,
.mgpm-artwork-modal.mgpm-designer .mgpm-artwork-footer__price-toggle:active {
  background: transparent;
  box-shadow: none;
  outline: none;
  border: 0;
}

.mgpm-artwork-modal.mgpm-designer .mgpm-artwork-footer__meta .mgpm-artwork-footer__label {
  justify-content: flex-start;
  color: var(--mgpm-muted, rgba(22, 52, 71, 0.68));
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.mgpm-artwork-modal.mgpm-designer .mgpm-artwork-footer__quantity strong,
.mgpm-artwork-modal.mgpm-designer .mgpm-artwork-footer__method strong {
  color: var(--mgpm-text, #1e3a4c);
  font-size: 18px;
  line-height: 1.15;
  text-align: left;
}
.mgpm-artwork-modal.mgpm-designer .mgpm-artwork-footer__method strong {
  overflow: hidden;
  max-width: 180px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* price value left-aligned inside its block, no right-justify clipping */
.mgpm-artwork-modal.mgpm-designer .mgpm-artwork-footer__price-toggle {
  width: 100%;
  gap: 2px;
  padding: 0;
  justify-items: start;
  text-align: left;
  cursor: pointer;
}
.mgpm-artwork-modal.mgpm-designer .mgpm-artwork-footer__price-toggle strong {
  display: block;
  color: var(--mgpm-text, #1e3a4c);
  font-size: 21px;
  font-weight: 800;
  line-height: 1.1;
  text-align: left;
}
.mgpm-artwork-modal.mgpm-designer .mgpm-artwork-footer__price-toggle .mgpm-price-pair__primary {
  display: inline;
  white-space: nowrap;
}
.mgpm-artwork-modal.mgpm-designer .mgpm-artwork-footer__price-toggle .mgpm-price-pair__label {
  color: var(--mgpm-muted, rgba(22, 52, 71, 0.68));
  font-size: 11px;
  font-weight: 600;
}
/* excl. VAT is shown in the slide-up breakdown instead of here */
.mgpm-artwork-modal.mgpm-designer .mgpm-artwork-footer__price-toggle .mgpm-price-pair__secondary {
  display: none;
}

/* separator becomes a subtle vertical hairline instead of a big "|" glyph */
.mgpm-artwork-modal.mgpm-designer .mgpm-designer-footer .mgpm-artwork-footer__separator {
  align-self: center;
  width: 1px;
  height: 38px;
  margin: 0 14px;
  background: #e5e7eb;
  color: transparent;
  font-size: 0;
}

.mgpm-artwork-modal.mgpm-designer .mgpm-designer-footer .mgpm-artwork-footer__actions {
  margin-left: 0;
  gap: 10px;
}

/* price breakdown popover anchored to the right edge of the total stat */
.mgpm-artwork-modal.mgpm-designer .mgpm-artwork-footer__price .mgpm-artwork-price-panel {
  left: auto;
  right: 0;
  transform: none;
  animation: none;
  border-radius: 12px;
  box-shadow: 0 20px 48px rgba(15, 23, 42, 0.22);
}
.mgpm-artwork-modal.mgpm-designer .mgpm-artwork-footer__price .mgpm-artwork-price-panel[hidden] {
  display: none;
}

/* ---- quantity editor modal ---- */
.mgpm-artwork-modal.mgpm-designer .mgpm-artwork-quantity-modal[hidden] { display: none; }

.mgpm-artwork-modal.mgpm-designer .mgpm-artwork-review-modal[hidden] { display: none; }
.mgpm-artwork-modal.mgpm-designer .mgpm-artwork-review-modal {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: grid;
  place-items: center;
  padding: 18px;
}
.mgpm-artwork-modal.mgpm-designer .mgpm-designer-toolbar__align {
  box-sizing: border-box;
  width: 112px;
  height: 32px;
  min-height: 32px;
  padding: 0 22px 0 7px;
  border: 1px solid #d9dde5;
  border-radius: 7px;
  background: #fff;
  color: var(--mgpm-text, #1e3a4c);
  font-size: 11px;
  font-weight: 700;
}
.mgpm-artwork-modal.mgpm-designer .mgpm-artwork-review-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, 0.56);
}
.mgpm-artwork-modal.mgpm-designer .mgpm-artwork-review-modal__dialog {
  position: relative;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  width: min(820px, 100%);
  max-height: min(760px, calc(100vh - 36px));
  overflow: hidden;
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 24px 70px rgba(15, 23, 42, 0.3);
}
.mgpm-artwork-modal.mgpm-designer .mgpm-artwork-review-modal__dialog > header,
.mgpm-artwork-modal.mgpm-designer .mgpm-artwork-review-modal__dialog > footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 16px;
  border-bottom: 1px solid #e2e8ec;
}
.mgpm-artwork-modal.mgpm-designer .mgpm-artwork-review-modal__dialog > footer {
  justify-content: flex-end;
  border-top: 1px solid #e2e8ec;
  border-bottom: 0;
}
.mgpm-artwork-modal.mgpm-designer .mgpm-artwork-review-modal__dialog header span,
.mgpm-artwork-modal.mgpm-designer .mgpm-artwork-review-modal__dialog header strong { display: block; }
.mgpm-artwork-modal.mgpm-designer .mgpm-artwork-review-modal__dialog header span { color: #6b7d87; font-size: 11px; }
.mgpm-artwork-modal.mgpm-designer .mgpm-artwork-review-modal__dialog header strong { font-size: 18px; }
.mgpm-artwork-modal.mgpm-designer .mgpm-artwork-review-modal__dialog header button {
  width: 38px; height: 38px; border: 1px solid #d9e0e4; border-radius: 8px; background: #fff; font-size: 22px; cursor: pointer;
}
.mgpm-artwork-modal.mgpm-designer .mgpm-artwork-review-modal__list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  overflow-y: auto;
  padding: 16px;
}
.mgpm-artwork-modal.mgpm-designer .mgpm-artwork-review-card {
  display: grid;
  grid-template-columns: 104px minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  min-width: 0;
  padding: 10px;
  border: 1px solid #d9e0e4;
  border-radius: 10px;
  background: #fff;
  text-align: left;
  cursor: pointer;
}
.mgpm-artwork-modal.mgpm-designer .mgpm-artwork-review-card:hover { border-color: var(--mgpm-blue, #0d5a7f); background: #f6fafc; }
.mgpm-artwork-modal.mgpm-designer .mgpm-artwork-review-card__image { display:grid; place-items:center; height:88px; overflow:hidden; border-radius:7px; background:#f2f4f5; }
.mgpm-artwork-modal.mgpm-designer .mgpm-artwork-review-card__image img { width:100%; height:100%; object-fit:contain; }
.mgpm-artwork-modal.mgpm-designer .mgpm-artwork-review-card__image em { color:#7a878f; font-size:11px; }
.mgpm-artwork-modal.mgpm-designer .mgpm-artwork-review-card__copy { display:grid; min-width:0; gap:2px; }
.mgpm-artwork-modal.mgpm-designer .mgpm-artwork-review-card__copy small { color:#6b7d87; text-transform:uppercase; font-size:9px; font-weight:800; }
.mgpm-artwork-modal.mgpm-designer .mgpm-artwork-review-card__copy strong,
.mgpm-artwork-modal.mgpm-designer .mgpm-artwork-review-card__copy span { overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.mgpm-artwork-modal.mgpm-designer .mgpm-artwork-review-card__copy span { color:#60727d; font-size:11px; }
.mgpm-artwork-modal.mgpm-designer .mgpm-artwork-review-card > b { color:var(--mgpm-blue, #0d5a7f); font-size:11px; }
@media (max-width: 680px) {
  .mgpm-artwork-modal.mgpm-designer .mgpm-artwork-review-modal__list { grid-template-columns: 1fr; }
  .mgpm-artwork-modal.mgpm-designer .mgpm-artwork-review-card { grid-template-columns: 82px minmax(0, 1fr); }
  .mgpm-artwork-modal.mgpm-designer .mgpm-artwork-review-card > b { display:none; }
}
.mgpm-artwork-modal.mgpm-designer .mgpm-saved-designs-modal__body { display:grid; gap:12px; overflow-y:auto; padding:16px; }
.mgpm-artwork-modal.mgpm-designer .mgpm-saved-designs-modal__body form { display:grid; grid-template-columns:minmax(0,1fr) auto; gap:8px; }
.mgpm-artwork-modal.mgpm-designer .mgpm-saved-designs-modal__body form input { min-height:42px; padding:0 10px; border:1px solid #d9e0e4; border-radius:7px; }
.mgpm-artwork-modal.mgpm-designer .mgpm-saved-designs-modal__status { margin:0; padding:8px 10px; border-radius:7px; background:#edf6fa; color:#315667; font-size:12px; }
.mgpm-artwork-modal.mgpm-designer .mgpm-saved-designs-modal__status.is-error { background:#fff3f1; color:#a33b32; }
.mgpm-artwork-modal.mgpm-designer [data-mgpm-saved-designs-list] { display:grid; gap:7px; }
.mgpm-artwork-modal.mgpm-designer .mgpm-saved-design-row { display:grid; grid-template-columns:minmax(0,1fr) auto auto; gap:5px; align-items:center; padding:7px; border:1px solid #dfe5e9; border-radius:8px; }
.mgpm-artwork-modal.mgpm-designer .mgpm-saved-design-row button { min-height:34px; border:0; border-radius:6px; background:#f2f6f8; color:#435761; cursor:pointer; }
.mgpm-artwork-modal.mgpm-designer .mgpm-saved-design-row > button:first-child { display:grid; gap:2px; justify-items:start; padding:6px 9px; background:transparent; text-align:left; }
.mgpm-artwork-modal.mgpm-designer .mgpm-saved-design-row small { color:#71808a; font-size:10px; }
@media (max-width: 580px) {
  .mgpm-artwork-modal.mgpm-designer .mgpm-saved-designs-modal__body form { grid-template-columns:1fr; }
}
.mgpm-artwork-modal.mgpm-designer .mgpm-artwork-method-modal[hidden] { display: none; }
.mgpm-artwork-modal.mgpm-designer .mgpm-artwork-method-modal,
.mgpm-artwork-modal.mgpm-designer .mgpm-artwork-quantity-modal {
  position: absolute;
  inset: 0;
  z-index: 12;
}
.mgpm-artwork-modal.mgpm-designer .mgpm-artwork-method-modal__backdrop,
.mgpm-artwork-modal.mgpm-designer .mgpm-artwork-quantity-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(22, 28, 38, 0.55);
}
.mgpm-artwork-modal.mgpm-designer .mgpm-artwork-method-modal__dialog,
.mgpm-artwork-modal.mgpm-designer .mgpm-artwork-quantity-modal__dialog {
  position: absolute;
  top: 50%;
  left: 50%;
  width: min(640px, calc(100% - 32px));
  max-height: min(560px, calc(100% - 48px));
  display: flex;
  flex-direction: column;
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 20px 48px rgba(15, 23, 42, 0.28);
  transform: translate(-50%, -50%);
  overflow: hidden;
}
.mgpm-artwork-modal.mgpm-designer .mgpm-artwork-method-modal__dialog {
  width: min(520px, calc(100% - 32px));
}
.mgpm-artwork-modal.mgpm-designer .mgpm-artwork-method-modal__head,
.mgpm-artwork-modal.mgpm-designer .mgpm-artwork-method-modal__foot,
.mgpm-artwork-modal.mgpm-designer .mgpm-artwork-quantity-modal__head,
.mgpm-artwork-modal.mgpm-designer .mgpm-artwork-quantity-modal__foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 16px 18px;
  border-bottom: 1px solid #e5e7eb;
}
.mgpm-artwork-modal.mgpm-designer .mgpm-artwork-method-modal__foot,
.mgpm-artwork-modal.mgpm-designer .mgpm-artwork-quantity-modal__foot {
  border-top: 1px solid #e5e7eb;
  border-bottom: 0;
  flex: 0 0 auto;
}
.mgpm-artwork-modal.mgpm-designer .mgpm-artwork-method-modal__head span,
.mgpm-artwork-modal.mgpm-designer .mgpm-artwork-quantity-modal__head span {
  display: block;
  color: var(--mgpm-muted, rgba(22, 52, 71, 0.68));
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
}
.mgpm-artwork-modal.mgpm-designer .mgpm-artwork-method-modal__head strong,
.mgpm-artwork-modal.mgpm-designer .mgpm-artwork-quantity-modal__head strong {
  display: block;
  color: var(--mgpm-text, #1e3a4c);
  font-size: 20px;
}
.mgpm-artwork-modal.mgpm-designer .mgpm-artwork-method-modal__close,
.mgpm-artwork-modal.mgpm-designer .mgpm-artwork-quantity-modal__close {
  width: 38px;
  height: 38px;
  border: 1px solid #d9dde5;
  border-radius: 8px;
  background: #fff;
  color: var(--mgpm-text, #1e3a4c);
  font-size: 22px;
  cursor: pointer;
}
.mgpm-artwork-modal.mgpm-designer .mgpm-artwork-method-modal__body {
  padding: 18px;
  overflow-y: auto;
  background: #fbfbfc;
}
.mgpm-artwork-modal.mgpm-designer .mgpm-artwork-method-modal__body .mgpm-artwork-tool-group {
  display: grid;
  gap: 12px;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
}
.mgpm-artwork-modal.mgpm-designer .mgpm-artwork-method-modal__body .mgpm-artwork-tool-group > label {
  margin: 0;
  color: #374151;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.02em;
  line-height: 1.2;
  text-transform: uppercase;
}
.mgpm-artwork-modal.mgpm-designer .mgpm-artwork-method-modal__body .mgpm-decor-groups__options {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}
.mgpm-artwork-modal.mgpm-designer .mgpm-artwork-quantity-modal__list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  align-content: start;
  gap: 6px;
  overflow-y: auto;
  padding: 6px;
  background: #f8fafc;
}
.mgpm-artwork-modal.mgpm-designer .mgpm-artwork-quantity-row {
  box-sizing: border-box;
  display: grid;
  align-self: start;
  grid-template-columns: minmax(0, 1fr) 108px;
  gap: 12px;
  align-items: center;
  min-height: 56px;
  padding: 9px 12px;
  border: 1px solid #e6ebf0;
  border-radius: 8px;
  background: #fff;
  line-height: 1.25;
}
.mgpm-artwork-modal.mgpm-designer .mgpm-artwork-quantity-row__meta strong,
.mgpm-artwork-modal.mgpm-designer .mgpm-artwork-quantity-row__meta span {
  display: block;
}
.mgpm-artwork-modal.mgpm-designer .mgpm-artwork-quantity-row__meta strong {
  color: var(--mgpm-text, #1e3a4c);
  font-size: 14px;
}
.mgpm-artwork-modal.mgpm-designer .mgpm-artwork-quantity-row__meta span {
  margin-top: 3px;
  color: var(--mgpm-muted, rgba(22, 52, 71, 0.68));
  font-size: 12px;
}
.mgpm-artwork-modal.mgpm-designer .mgpm-artwork-quantity-row__meta .is-out-of-stock {
  color: #c2413a;
}
.mgpm-artwork-modal.mgpm-designer .mgpm-artwork-quantity-row__stepper {
  display: grid;
  grid-template-columns: 30px 48px 30px;
  overflow: hidden;
  border: 1px solid #d9dde5;
  border-radius: 8px;
}
.mgpm-artwork-modal.mgpm-designer .mgpm-artwork-quantity-row__stepper button,
.mgpm-artwork-modal.mgpm-designer .mgpm-artwork-quantity-row__stepper input {
  box-sizing: border-box;
  height: 34px;
  min-width: 0;
  margin: 0;
  padding: 0;
  border: 0;
  background: #fff;
  color: var(--mgpm-text, #1e3a4c);
  font: inherit;
  font-weight: 700;
  line-height: 1;
  text-align: center;
}
.mgpm-artwork-modal.mgpm-designer .mgpm-artwork-quantity-row__stepper button {
  display: flex;
  align-items: center;
  justify-content: center;
  background: #f3f6f9;
  cursor: pointer;
}
.mgpm-artwork-modal.mgpm-designer .mgpm-artwork-quantity-row__stepper button:disabled,
.mgpm-artwork-modal.mgpm-designer .mgpm-artwork-quantity-row__stepper input:disabled {
  color: rgba(22, 52, 71, 0.35);
  cursor: default;
}
.mgpm-artwork-modal.mgpm-designer .mgpm-artwork-quantity-modal__foot > div {
  display: flex;
  gap: 10px;
}

@media (max-width: 560px) {
  .mgpm-artwork-modal.mgpm-designer .mgpm-artwork-quantity-modal__dialog {
    width: calc(100% - 24px);
  }
  .mgpm-artwork-modal.mgpm-designer .mgpm-artwork-quantity-modal__list {
    grid-template-columns: 1fr;
  }
}

/* ---- layer list: selected placement object stack ---- */
.mgpm-artwork-modal.mgpm-designer .mgpm-artwork-layers {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.mgpm-artwork-modal.mgpm-designer .mgpm-artwork-layer {
  display: grid;
  gap: 6px;
  padding: 8px;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  background: #fff;
}
.mgpm-artwork-modal.mgpm-designer .mgpm-artwork-layer.is-active {
  border-color: var(--mgpm-blue, #0d5a7f);
  box-shadow: 0 0 0 2px rgba(13, 90, 127, 0.08);
}
.mgpm-artwork-modal.mgpm-designer .mgpm-artwork-layer.is-hidden {
  opacity: 0.62;
}
.mgpm-artwork-modal.mgpm-designer .mgpm-artwork-layer__select {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  gap: 8px;
  align-items: center;
  width: 100%;
  padding: 0;
  border: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  text-align: left;
  cursor: pointer;
}
.mgpm-artwork-modal.mgpm-designer .mgpm-artwork-layer__thumb {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: 7px;
  background: #eef1f5;
  color: var(--mgpm-blue, #0d5a7f);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}
.mgpm-artwork-modal.mgpm-designer .mgpm-artwork-layer__text {
  min-width: 0;
}
.mgpm-artwork-modal.mgpm-designer .mgpm-artwork-layer__text strong,
.mgpm-artwork-modal.mgpm-designer .mgpm-artwork-layer__text small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.mgpm-artwork-modal.mgpm-designer .mgpm-artwork-layer__text strong {
  color: var(--mgpm-text, #1e3a4c);
  font-size: 12.5px;
  line-height: 1.25;
}
.mgpm-artwork-modal.mgpm-designer .mgpm-artwork-layer__text small {
  color: var(--mgpm-muted, rgba(22, 52, 71, 0.68));
  font-size: 11px;
}
.mgpm-artwork-modal.mgpm-designer .mgpm-artwork-layer__actions {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 4px;
}
.mgpm-artwork-modal.mgpm-designer .mgpm-artwork-layer__actions button {
  min-width: 0;
  min-height: 28px;
  padding: 4px 5px;
  border: 1px solid #d9dde5;
  border-radius: 6px;
  background: #fbfbfc;
  color: var(--mgpm-text, #1e3a4c);
  font: inherit;
  font-size: 11px;
  font-weight: 650;
  cursor: pointer;
}
.mgpm-artwork-modal.mgpm-designer .mgpm-artwork-layer__actions button:hover:not(:disabled) {
  border-color: var(--mgpm-blue, #0d5a7f);
  color: var(--mgpm-blue, #0d5a7f);
}
.mgpm-artwork-modal.mgpm-designer .mgpm-artwork-layer__actions button:disabled {
  opacity: 0.45;
  cursor: default;
}

/* ---- numeric properties for the selected object ---- */
.mgpm-artwork-modal.mgpm-designer .mgpm-artwork-props {
  display: grid;
  gap: 10px;
}
.mgpm-artwork-modal.mgpm-designer .mgpm-artwork-props__grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}
.mgpm-artwork-modal.mgpm-designer .mgpm-artwork-props__grid label {
  display: grid;
  gap: 4px;
  margin: 0;
}
.mgpm-artwork-modal.mgpm-designer .mgpm-artwork-props__grid span,
.mgpm-artwork-modal.mgpm-designer .mgpm-artwork-props__lock {
  color: var(--mgpm-muted, rgba(22, 52, 71, 0.68));
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
}
.mgpm-artwork-modal.mgpm-designer .mgpm-artwork-props__grid input,
.mgpm-artwork-modal.mgpm-designer .mgpm-artwork-props__grid select,
.mgpm-artwork-modal.mgpm-designer .mgpm-artwork-props textarea {
  width: 100%;
  min-width: 0;
  padding: 0 8px;
  border: 1px solid #d9dde5;
  border-radius: 7px;
  color: var(--mgpm-text, #1e3a4c);
  font: inherit;
  font-size: 12px;
  font-weight: 650;
}
.mgpm-artwork-modal.mgpm-designer .mgpm-artwork-props__grid input,
.mgpm-artwork-modal.mgpm-designer .mgpm-artwork-props__grid select {
  height: 34px;
}
.mgpm-artwork-modal.mgpm-designer .mgpm-artwork-props textarea {
  min-height: 66px;
  padding: 8px;
  resize: vertical;
  line-height: 1.35;
}
.mgpm-artwork-modal.mgpm-designer .mgpm-artwork-props__grid input:focus,
.mgpm-artwork-modal.mgpm-designer .mgpm-artwork-props__grid select:focus,
.mgpm-artwork-modal.mgpm-designer .mgpm-artwork-props textarea:focus {
  border-color: var(--mgpm-blue, #0d5a7f);
  outline: 2px solid rgba(13, 90, 127, 0.12);
  outline-offset: 0;
}
.mgpm-artwork-modal.mgpm-designer .mgpm-artwork-props__lock {
  display: flex;
  align-items: center;
  gap: 7px;
  margin: 0;
  text-transform: none;
}
.mgpm-artwork-modal.mgpm-designer .mgpm-artwork-props__lock input {
  margin: 0;
}
.mgpm-artwork-modal.mgpm-designer .mgpm-artwork-props__text {
  display: grid;
  gap: 10px;
  padding-top: 10px;
  border-top: 1px solid #e5e7eb;
}
.mgpm-artwork-modal.mgpm-designer .mgpm-artwork-props__text[hidden] {
  display: none;
}
.mgpm-artwork-modal.mgpm-designer .mgpm-artwork-props__wide {
  display: grid;
  gap: 4px;
  margin: 0;
}
.mgpm-artwork-modal.mgpm-designer .mgpm-artwork-props__wide span {
  color: var(--mgpm-muted, rgba(22, 52, 71, 0.68));
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
}
.mgpm-artwork-modal.mgpm-designer .mgpm-artwork-props__toggles {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.mgpm-artwork-modal.mgpm-designer .mgpm-artwork-props__toggles label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin: 0;
  padding: 7px 9px;
  border: 1px solid #d9dde5;
  border-radius: 7px;
  color: var(--mgpm-text, #1e3a4c);
  font-size: 12px;
  font-weight: 700;
}
.mgpm-artwork-modal.mgpm-designer .mgpm-artwork-props__toggles input {
  margin: 0;
}

/* ---- right properties panel: clean card-based prototype style ---- */
.mgpm-artwork-modal.mgpm-designer .mgpm-artwork-tools--right .mgpm-artwork-tool-group,
.mgpm-artwork-modal.mgpm-designer .mgpm-artwork-tools--right .mgpm-artwork-readout,
.mgpm-artwork-modal.mgpm-designer .mgpm-artwork-tools--right .mgpm-artwork-object-actions {
  box-sizing: border-box;
  width: 100%;
  margin: 0;
}

.mgpm-artwork-modal.mgpm-designer .mgpm-artwork-tools--right .mgpm-artwork-tool-group {
  display: grid;
  gap: 10px;
  padding: 14px;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  background: #fff;
}

.mgpm-artwork-modal.mgpm-designer .mgpm-artwork-tools--right .mgpm-artwork-tool-group[hidden] {
  display: none !important;
}

.mgpm-artwork-modal.mgpm-designer .mgpm-artwork-tools--right .mgpm-designer-props-card__title,
.mgpm-artwork-modal.mgpm-designer .mgpm-artwork-tools--right .mgpm-artwork-tool-group > label:first-child {
  grid-column: 1 / -1;
  margin: 0;
  color: #374151;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.02em;
  line-height: 1.2;
  text-transform: uppercase;
}

.mgpm-artwork-modal.mgpm-designer .mgpm-artwork-tools--right input:not([type="checkbox"]),
.mgpm-artwork-modal.mgpm-designer .mgpm-artwork-tools--right select,
.mgpm-artwork-modal.mgpm-designer .mgpm-artwork-tools--right textarea {
  box-sizing: border-box;
  width: 100%;
  min-width: 0;
  border: 1px solid #d9dde5;
  border-radius: 6px;
  background: #fff;
  color: var(--mgpm-text, #1e3a4c);
  font: inherit;
  font-size: 12px;
  font-weight: 500;
}

.mgpm-artwork-modal.mgpm-designer .mgpm-artwork-tools--right input:not([type="checkbox"]),
.mgpm-artwork-modal.mgpm-designer .mgpm-artwork-tools--right select {
  height: 34px;
  min-height: 34px;
  padding: 0 8px;
}

.mgpm-artwork-modal.mgpm-designer .mgpm-artwork-tools--right textarea {
  min-height: 72px;
  padding: 8px;
  line-height: 1.35;
}

.mgpm-artwork-modal.mgpm-designer .mgpm-artwork-tools--right input:not([type="checkbox"]):focus,
.mgpm-artwork-modal.mgpm-designer .mgpm-artwork-tools--right select:focus,
.mgpm-artwork-modal.mgpm-designer .mgpm-artwork-tools--right textarea:focus {
  border-color: var(--mgpm-blue, #0d5a7f);
  box-shadow: 0 0 0 3px rgba(13, 90, 127, 0.14);
  outline: 0;
}

.mgpm-artwork-modal.mgpm-designer .mgpm-artwork-props {
  gap: 12px;
}

.mgpm-artwork-modal.mgpm-designer .mgpm-artwork-props__grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.mgpm-artwork-modal.mgpm-designer .mgpm-artwork-props__grid label,
.mgpm-artwork-modal.mgpm-designer .mgpm-artwork-props__wide {
  display: grid;
  gap: 4px;
}

.mgpm-artwork-modal.mgpm-designer .mgpm-artwork-props__grid span,
.mgpm-artwork-modal.mgpm-designer .mgpm-artwork-props__wide span,
.mgpm-artwork-modal.mgpm-designer .mgpm-artwork-props__lock {
  margin: 0;
  color: var(--mgpm-muted, rgba(22, 52, 71, 0.68));
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0;
  line-height: 1.2;
  text-transform: none;
}

.mgpm-artwork-modal.mgpm-designer .mgpm-artwork-props__lock {
  gap: 8px;
  padding: 2px 0;
}

.mgpm-artwork-modal.mgpm-designer .mgpm-artwork-props__text {
  gap: 10px;
  padding-top: 12px;
  border-top: 1px solid #e5e7eb;
}

.mgpm-artwork-modal.mgpm-designer .mgpm-artwork-props__toggles label {
  height: 34px;
  padding: 0 10px;
  border-color: #d9dde5;
  border-radius: 6px;
  background: #fff;
  color: var(--mgpm-text, #1e3a4c);
  font-size: 12px;
  font-weight: 600;
}

.mgpm-artwork-modal.mgpm-designer .mgpm-artwork-readout {
  display: grid;
  gap: 4px;
  padding: 12px 14px;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  background: #fff;
}

.mgpm-artwork-modal.mgpm-designer .mgpm-artwork-readout__label,
.mgpm-artwork-modal.mgpm-designer .mgpm-artwork-readout__limit {
  color: var(--mgpm-muted, rgba(22, 52, 71, 0.68));
  font-size: 12px;
  letter-spacing: 0;
  text-transform: none;
}

.mgpm-artwork-modal.mgpm-designer .mgpm-artwork-readout strong {
  color: var(--mgpm-text, #1e3a4c);
  font-size: 16px;
  line-height: 1.2;
}

.mgpm-artwork-modal.mgpm-designer .mgpm-svg-colors__list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 0;
}

.mgpm-artwork-modal.mgpm-designer .mgpm-svg-colors__item {
  display: grid;
  gap: 4px;
}

.mgpm-artwork-modal.mgpm-designer .mgpm-svg-colors__swatch {
  width: 26px;
  height: 26px;
  min-height: 26px;
  padding: 0;
  border: 1px solid #d9dde5;
  border-radius: 6px;
  cursor: pointer;
}

.mgpm-artwork-modal.mgpm-designer .mgpm-svg-colors__swatch:focus {
  border-color: var(--mgpm-blue, #0d5a7f);
  box-shadow: 0 0 0 2px #fff, 0 0 0 4px var(--mgpm-blue, #0d5a7f);
  outline: 0;
}

.mgpm-artwork-modal.mgpm-designer .mgpm-svg-colors__hint,
.mgpm-artwork-modal.mgpm-designer .mgpm-svg-colors__pms {
  color: var(--mgpm-muted, rgba(22, 52, 71, 0.68));
  font-size: 11px;
  line-height: 1.35;
}

.mgpm-artwork-modal.mgpm-designer .mgpm-artwork-layers {
  gap: 0;
  overflow: hidden;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  background: #fff;
}

.mgpm-artwork-modal.mgpm-designer .mgpm-artwork-layer {
  display: grid;
  gap: 6px;
  padding: 9px;
  border: 0;
  border-bottom: 1px solid #e5e7eb;
  border-radius: 0;
  background: #fff;
}

.mgpm-artwork-modal.mgpm-designer .mgpm-artwork-layer:last-child {
  border-bottom: 0;
}

.mgpm-artwork-modal.mgpm-designer .mgpm-artwork-layer.is-active {
  border-color: #e5e7eb;
  background: rgba(13, 90, 127, 0.08);
  box-shadow: none;
}

.mgpm-artwork-modal.mgpm-designer .mgpm-artwork-layer__thumb {
  width: 32px;
  height: 32px;
  border-radius: 6px;
  background: #eef1f5;
}

.mgpm-artwork-modal.mgpm-designer .mgpm-artwork-layer__actions {
  gap: 4px;
}

.mgpm-artwork-modal.mgpm-designer .mgpm-artwork-layer__actions button,
.mgpm-artwork-modal.mgpm-designer .mgpm-artwork-object-actions button,
.mgpm-artwork-modal.mgpm-designer .mgpm-artwork-object-actions .mgpm-btn {
  min-height: 34px;
  padding: 0 10px;
  border: 1px solid #d9dde5;
  border-radius: 8px;
  background: #fff;
  color: var(--mgpm-text, #1e3a4c);
  font: inherit;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
}

.mgpm-artwork-modal.mgpm-designer .mgpm-artwork-layer__actions button:hover:not(:disabled),
.mgpm-artwork-modal.mgpm-designer .mgpm-artwork-object-actions button:hover:not(:disabled),
.mgpm-artwork-modal.mgpm-designer .mgpm-artwork-object-actions .mgpm-btn:hover:not(:disabled) {
  border-color: var(--mgpm-blue, #0d5a7f);
  color: var(--mgpm-blue, #0d5a7f);
}

.mgpm-artwork-modal.mgpm-designer .mgpm-artwork-object-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  padding: 14px;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  background: #fff;
}

.mgpm-artwork-modal.mgpm-designer .mgpm-artwork-tools--right .mgpm-artwork-object-actions {
  display: none !important;
}

.mgpm-artwork-modal.mgpm-designer .mgpm-decor-groups--modal {
  display: grid;
  gap: 10px;
}

.mgpm-artwork-modal.mgpm-designer .mgpm-decor-groups__options {
  gap: 6px;
}

.mgpm-artwork-modal.mgpm-designer .mgpm-artwork-tools .mgpm-decor-groups--modal .mgpm-decor-group,
.mgpm-artwork-modal.mgpm-designer .mgpm-decor-groups--modal .mgpm-decor-group {
  min-height: 34px;
  padding: 8px 10px;
  border: 1px solid #d9dde5;
  border-radius: 8px;
  background: #fff;
}

.mgpm-artwork-modal.mgpm-designer .mgpm-decor-groups--modal .mgpm-decor-group:hover {
  border-color: var(--mgpm-blue, #0d5a7f);
  color: var(--mgpm-blue, #0d5a7f);
}

.mgpm-artwork-modal.mgpm-designer .mgpm-decor-groups--modal .mgpm-decor-group.is-active {
  border-color: var(--mgpm-blue, #0d5a7f);
  background: rgba(13, 90, 127, 0.08);
  box-shadow: none;
}

/* ---- compact unified inspector + layers panel ---- */
.mgpm-artwork-modal.mgpm-designer .mgpm-artwork-tools--right {
  min-height: 0;
  gap: 0;
  padding: 12px;
  overflow: hidden;
}

.mgpm-artwork-modal.mgpm-designer .mgpm-designer-compact-panel {
  display: grid;
  grid-template-rows: minmax(0, 1fr) auto;
  min-height: 0;
  height: 100%;
  width: 100%;
  overflow: hidden;
  border: 1px solid #dfe5e9;
  border-radius: 10px;
  background: #fff;
}

.mgpm-artwork-modal.mgpm-designer .mgpm-designer-compact-tabs {
  display: none;
}

.mgpm-artwork-modal.mgpm-designer .mgpm-designer-compact-pane--properties {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  min-height: 0;
}

.mgpm-artwork-modal.mgpm-designer .mgpm-designer-compact-pane--layers {
  min-height: 0;
}

.mgpm-artwork-modal.mgpm-designer .mgpm-designer-compact-panel__properties {
  min-height: 0;
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
}

.mgpm-artwork-modal.mgpm-designer .mgpm-designer-compact-section--layers {
  align-self: end;
}

.mgpm-artwork-modal.mgpm-designer .mgpm-artwork-inspector {
  grid-template-columns: 46px minmax(0, 1fr);
  gap: 10px;
  padding: 12px;
  border: 0;
  border-bottom: 1px solid #dfe5e9;
  border-radius: 0;
}

.mgpm-artwork-modal.mgpm-designer .mgpm-artwork-inspector__preview {
  width: 46px;
  height: 46px;
  border-radius: 7px;
  background-color: #f5f7f8;
  background-image:
    linear-gradient(45deg, #e8ecef 25%, transparent 25%),
    linear-gradient(-45deg, #e8ecef 25%, transparent 25%),
    linear-gradient(45deg, transparent 75%, #e8ecef 75%),
    linear-gradient(-45deg, transparent 75%, #e8ecef 75%);
  background-position: 0 0, 0 5px, 5px -5px, -5px 0;
  background-size: 10px 10px;
}

.mgpm-artwork-modal.mgpm-designer .mgpm-artwork-inspector__preview img {
  width: calc(100% - 8px);
  height: calc(100% - 8px);
  filter: drop-shadow(0 0 1px rgba(22, 52, 71, 0.9)) drop-shadow(0 1px 1px rgba(22, 52, 71, 0.35));
}

.mgpm-artwork-modal.mgpm-designer .mgpm-artwork-inspector__main {
  align-content: center;
  gap: 3px;
}

.mgpm-artwork-modal.mgpm-designer .mgpm-artwork-inspector__main strong {
  font-size: 13px;
}

.mgpm-artwork-modal.mgpm-designer .mgpm-artwork-inspector__main span {
  font-size: 11px;
}
.mgpm-artwork-modal.mgpm-designer .mgpm-artwork-inspector__main span.is-low-contrast {
  color: #9a5b12;
  font-weight: 750;
}

.mgpm-artwork-modal.mgpm-designer .mgpm-designer-compact-panel .mgpm-designer-compact-section,
.mgpm-artwork-modal.mgpm-designer .mgpm-artwork-tools--right .mgpm-designer-compact-panel .mgpm-artwork-tool-group {
  display: grid;
  gap: 9px;
  margin: 0;
  padding: 12px;
  border: 0;
  border-bottom: 1px solid #dfe5e9;
  border-radius: 0;
  background: #fff;
}

.mgpm-artwork-modal.mgpm-designer .mgpm-designer-compact-panel .mgpm-designer-compact-section:last-child {
  border-bottom: 0;
}

.mgpm-artwork-modal.mgpm-designer .mgpm-designer-compact-section__heading {
  display: flex;
  align-items: center;
  gap: 6px;
}

.mgpm-artwork-modal.mgpm-designer .mgpm-designer-compact-section__heading h3 {
  margin: 0;
  color: #435761;
  font-size: 10.5px;
  font-weight: 800;
  letter-spacing: 0.06em;
  line-height: 1.2;
  text-transform: uppercase;
}

.mgpm-artwork-modal.mgpm-designer .mgpm-designer-help-tip {
  position: relative;
  display: inline-grid;
  place-items: center;
  flex: 0 0 auto;
  width: 17px;
  height: 17px;
  min-height: 17px;
  padding: 0;
  border: 1px solid #aebbc3;
  border-radius: 50%;
  background: #fff;
  color: #667985;
  font-size: 10px;
  font-weight: 850;
  line-height: 1;
  cursor: help;
}

.mgpm-artwork-modal.mgpm-designer .mgpm-designer-help-tip::after {
  display: none;
}

.mgpm-artwork-modal.mgpm-designer .mgpm-designer-help-tip:focus-visible {
  outline: 2px solid rgba(13, 90, 127, 0.3);
  outline-offset: 2px;
}

.mgpm-designer-floating-tooltip {
  position: fixed;
  z-index: 2147483647;
  box-sizing: border-box;
  width: min(238px, calc(100vw - 16px));
  padding: 8px 9px;
  border-radius: 7px;
  background: #253946;
  color: #fff;
  box-shadow: 0 8px 22px rgba(22, 52, 71, 0.22);
  font-size: 10.5px;
  font-weight: 550;
  line-height: 1.4;
  pointer-events: none;
}

.mgpm-designer-floating-tooltip[hidden] {
  display: none !important;
}

.mgpm-artwork-modal.mgpm-designer .mgpm-designer-compact-section--props .mgpm-artwork-props__grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 7px;
}

.mgpm-artwork-modal.mgpm-designer .mgpm-designer-compact-section--props .mgpm-artwork-props {
  gap: 9px;
}

.mgpm-artwork-modal.mgpm-designer .mgpm-artwork-props__input {
  position: relative;
  display: block;
  min-width: 0;
}

.mgpm-artwork-modal.mgpm-designer .mgpm-artwork-props__input input {
  padding-right: 25px;
}

.mgpm-artwork-modal.mgpm-designer .mgpm-artwork-props__input i {
  position: absolute;
  top: 50%;
  right: 8px;
  color: var(--mgpm-muted, rgba(22, 52, 71, 0.68));
  font-size: 9px;
  font-style: normal;
  line-height: 1;
  transform: translateY(-50%);
  pointer-events: none;
}

.mgpm-artwork-modal.mgpm-designer .mgpm-designer-compact-panel .mgpm-artwork-props__lock {
  display: inline-flex;
  align-items: center;
  justify-content: flex-start;
  width: auto;
  gap: 7px;
  padding: 0;
}

.mgpm-artwork-modal.mgpm-designer .mgpm-designer-compact-panel .mgpm-artwork-props__lock input[type="checkbox"] {
  appearance: auto;
  flex: 0 0 auto;
  width: 14px !important;
  height: 14px !important;
  min-height: 14px !important;
  margin: 0 !important;
  padding: 0 !important;
  accent-color: var(--mgpm-blue, #0d5a7f);
}

.mgpm-artwork-modal.mgpm-designer .mgpm-designer-compact-panel .mgpm-svg-colors__list {
  display: grid;
  gap: 7px;
}

.mgpm-artwork-modal.mgpm-designer .mgpm-designer-compact-panel .mgpm-svg-colors__item {
  position: relative;
  grid-template-columns: 32px minmax(0, 1fr);
  gap: 0 8px;
  align-items: center;
  min-height: 40px;
  padding: 4px;
  border: 1px solid #d9e0e4;
  border-radius: 7px;
  background: #fff;
}

.mgpm-artwork-modal.mgpm-designer .mgpm-designer-compact-panel .mgpm-svg-colors__swatch {
  width: 32px;
  height: 32px;
  min-height: 32px;
  margin: 0;
  border-radius: 5px;
}

.mgpm-artwork-modal.mgpm-designer .mgpm-designer-compact-panel .mgpm-svg-colors__pantone {
  height: 32px;
  min-height: 32px;
  margin: 0;
  padding-right: 78px;
}

.mgpm-artwork-modal.mgpm-designer .mgpm-designer-compact-panel .mgpm-svg-colors__pms {
  position: absolute;
  top: 50%;
  right: 8px;
  grid-column: auto;
  font-size: 9px;
  transform: translateY(-50%);
  pointer-events: none;
}

.mgpm-artwork-modal.mgpm-designer .mgpm-artwork-readout {
  display: none !important;
}

.mgpm-artwork-modal.mgpm-designer .mgpm-artwork-tools--right .mgpm-artwork-warning {
  display: none !important;
}

.mgpm-artwork-modal.mgpm-designer .mgpm-designer-compact-panel .mgpm-artwork-layers {
  gap: 0;
  overflow: visible;
  border: 1px solid #cfd7dc;
  border-radius: 7px;
  background: #f7f8f9;
}

.mgpm-artwork-modal.mgpm-designer .mgpm-artwork-layer-view + .mgpm-artwork-layer-view {
  border-top: 1px solid #aebbc3;
}

.mgpm-artwork-modal.mgpm-designer .mgpm-artwork-layer-view__heading {
  margin: 0;
  padding: 5px 8px;
  border-bottom: 1px solid #cfd7dc;
  background: #f7f8f9;
  color: #536873;
  font-size: 9.5px;
  font-weight: 800;
  letter-spacing: 0.08em;
  line-height: 1.2;
  text-transform: uppercase;
}

.mgpm-artwork-modal.mgpm-designer .mgpm-artwork-layer-group {
  position: relative;
  overflow: visible;
  border: 0;
  border-bottom: 1px solid #dbe1e5;
  border-radius: 0;
  background: #f1f3f5;
  transition: background 0.14s ease, box-shadow 0.14s ease, outline-color 0.14s ease;
}

.mgpm-artwork-modal.mgpm-designer .mgpm-artwork-layer-view .mgpm-artwork-layer-group:last-child {
  border-bottom: 0;
}

.mgpm-artwork-modal.mgpm-designer .mgpm-artwork-layer-group.is-drop-target {
  z-index: 2;
  background: #edf6fa;
  box-shadow: inset 4px 0 var(--mgpm-blue, #0d5a7f);
  outline: 2px solid rgba(13, 90, 127, 0.35);
  outline-offset: -2px;
}

.mgpm-artwork-modal.mgpm-designer .mgpm-artwork-layer-group.is-drop-target .mgpm-artwork-layer-group__head {
  background: #dcecf4;
}

.mgpm-artwork-modal.mgpm-designer .mgpm-artwork-layer-group.is-drop-target .mgpm-artwork-layer-group__head::after {
  content: "Slip her";
  position: absolute;
  right: 30px;
  padding: 2px 5px;
  border-radius: 4px;
  background: var(--mgpm-blue, #0d5a7f);
  color: #fff;
  font-size: 8.5px;
  font-weight: 800;
  letter-spacing: 0.03em;
  line-height: 1.2;
  pointer-events: none;
  text-transform: uppercase;
}

.mgpm-artwork-modal.mgpm-designer .mgpm-artwork-layers.is-layer-dragging .mgpm-artwork-layer-group:not(.is-drop-target) {
  opacity: 0.76;
}

.mgpm-artwork-modal.mgpm-designer .mgpm-artwork-layer-group.is-incompatible .mgpm-artwork-layer-group__head,
.mgpm-artwork-modal.mgpm-designer .mgpm-artwork-layer-group__head {
  position: relative;
  display: grid;
  grid-template-columns: 24px minmax(0, 1fr) 20px;
  gap: 4px;
  align-items: center;
  min-height: 32px;
  padding: 0 6px 0 3px;
  border: 0;
  border-left: 3px solid #2f83cf;
  background: #e9ecef;
}

.mgpm-artwork-modal.mgpm-designer .mgpm-artwork-layer__visibility {
  display: grid;
  place-items: center;
  width: 22px;
  height: 22px;
  min-height: 22px;
  padding: 0;
  border: 0;
  border-radius: 4px;
  background: transparent;
  color: #71808a;
  font-size: 12px;
  cursor: pointer;
}

.mgpm-artwork-modal.mgpm-designer .mgpm-artwork-layer__visibility:hover {
  color: var(--mgpm-blue, #0d5a7f);
  background: rgba(255, 255, 255, 0.7);
}

.mgpm-artwork-modal.mgpm-designer .mgpm-artwork-layer-group__toggle {
  display: grid;
  grid-template-columns: 12px 18px minmax(0, 1fr);
  gap: 5px;
  align-items: center;
  min-width: 0;
  min-height: 28px;
  padding: 0;
  border: 0;
  background: transparent;
  text-align: left;
  cursor: pointer;
}

.mgpm-artwork-modal.mgpm-designer .mgpm-artwork-layer-group__chevron {
  color: #71808a;
  font-size: 10px;
  transform: rotate(0);
  transition: transform 0.15s;
}

.mgpm-artwork-modal.mgpm-designer .mgpm-artwork-layer-group.is-collapsed .mgpm-artwork-layer-group__chevron {
  transform: rotate(-90deg);
}

.mgpm-artwork-modal.mgpm-designer .mgpm-artwork-layer-group__swatch {
  width: 16px;
  height: 16px;
  border: 1px solid #717c83;
  background: linear-gradient(135deg, #cbd3d8 0 48%, #f8fafb 49%);
}

.mgpm-artwork-modal.mgpm-designer .mgpm-artwork-layer-group__label {
  display: block;
  min-width: 0;
}

.mgpm-artwork-modal.mgpm-designer .mgpm-artwork-layer-group__label strong,
.mgpm-artwork-modal.mgpm-designer .mgpm-artwork-layer-group__label small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.mgpm-artwork-modal.mgpm-designer .mgpm-artwork-layer-group__label strong {
  color: var(--mgpm-text, #1e3a4c);
  font-size: 11px;
}

.mgpm-artwork-modal.mgpm-designer .mgpm-artwork-layer-group__label small {
  color: var(--mgpm-muted, rgba(22, 52, 71, 0.68));
  font-size: 9px;
}

.mgpm-artwork-modal.mgpm-designer .mgpm-artwork-layer-group__head em {
  min-width: 18px;
  height: 18px;
  font-size: 9px;
}

.mgpm-artwork-modal.mgpm-designer .mgpm-artwork-layer-group.is-collapsed .mgpm-artwork-layer-group__items {
  display: none;
}

.mgpm-artwork-modal.mgpm-designer .mgpm-artwork-layer-group__items {
  gap: 0;
  padding: 0;
  border-top: 1px solid #d5dce1;
}

.mgpm-artwork-modal.mgpm-designer .mgpm-artwork-layer {
  position: relative;
  grid-template-columns: 22px 13px minmax(0, 1fr) 24px;
  gap: 5px;
  align-items: center;
  min-height: 31px;
  padding: 2px 5px 2px 3px;
  border: 0;
  border-left: 3px solid #2f83cf;
  border-bottom: 1px solid #e0e5e8;
  background: #f8f9fa;
}

.mgpm-artwork-modal.mgpm-designer .mgpm-artwork-layer:last-child {
  border-bottom: 0;
}

.mgpm-artwork-modal.mgpm-designer .mgpm-artwork-layer.is-active {
  background: #dcecf4;
  box-shadow: none;
}

.mgpm-artwork-modal.mgpm-designer .mgpm-artwork-layer--stored .mgpm-artwork-layer__visibility,
.mgpm-artwork-modal.mgpm-designer .mgpm-artwork-layer--stored .mgpm-artwork-layer__drag {
  cursor: default;
}

.mgpm-artwork-modal.mgpm-designer .mgpm-artwork-layer__drag {
  color: #91a0aa;
  font-size: 11px;
  letter-spacing: -2px;
  cursor: grab;
}

.mgpm-artwork-modal.mgpm-designer .mgpm-artwork-layer__select {
  grid-template-columns: 18px minmax(0, 1fr);
  gap: 6px;
}

.mgpm-artwork-modal.mgpm-designer .mgpm-artwork-layer__thumb,
.mgpm-artwork-modal.mgpm-designer .mgpm-artwork-layer__thumb--image {
  width: 18px;
  height: 18px;
  border: 1px solid #717c83;
  border-radius: 0;
  background: #eef1f5;
  font-size: 8px;
}

.mgpm-artwork-modal.mgpm-designer .mgpm-artwork-layer__text strong {
  font-size: 10.5px;
}

.mgpm-artwork-modal.mgpm-designer .mgpm-artwork-layer__text small {
  display: none;
}

.mgpm-artwork-modal.mgpm-designer .mgpm-artwork-layer__menu {
  position: relative;
}

.mgpm-artwork-modal.mgpm-designer .mgpm-artwork-layer-group:has(.mgpm-artwork-layer__menu[open]),
.mgpm-artwork-modal.mgpm-designer .mgpm-artwork-layer:has(.mgpm-artwork-layer__menu[open]) {
  z-index: 22;
}

.mgpm-artwork-modal.mgpm-designer .mgpm-artwork-layer__menu summary {
  display: grid;
  place-items: center;
  width: 24px;
  height: 24px;
  border-radius: 4px;
  color: #71808a;
  cursor: pointer;
  list-style: none;
}

.mgpm-artwork-modal.mgpm-designer .mgpm-artwork-layer__menu summary::-webkit-details-marker {
  display: none;
}

.mgpm-artwork-modal.mgpm-designer .mgpm-artwork-layer__menu summary:hover {
  color: var(--mgpm-blue, #0d5a7f);
  background: #e8eff3;
}

.mgpm-artwork-modal.mgpm-designer .mgpm-artwork-layer__menu .mgpm-artwork-layer__actions {
  position: absolute;
  top: calc(100% + 3px);
  right: 0;
  z-index: 20;
  display: grid;
  width: 132px;
  padding: 5px;
  border: 1px solid #d9dde5;
  border-radius: 7px;
  background: #fff;
  box-shadow: 0 10px 24px rgba(31, 47, 58, 0.18);
}

.mgpm-artwork-modal.mgpm-designer .mgpm-artwork-layer__menu .mgpm-artwork-layer__actions button {
  min-height: 29px;
  padding: 0 7px;
  border: 0;
  border-radius: 5px;
  text-align: left;
}

.mgpm-artwork-modal.mgpm-designer .mgpm-artwork-layer-group__empty,
.mgpm-artwork-modal.mgpm-designer .mgpm-artwork-layer--saved {
  min-height: 31px;
  padding: 7px;
  border: 0;
  border-radius: 0;
  background: #f8f9fa;
  font-size: 10.5px;
  text-align: center;
}

/* ---- contextual right column: props only when an element is selected ---- */
.mgpm-artwork-modal.mgpm-designer:not(.mgpm-designer--has-selection) .mgpm-artwork-tools--right .mgpm-artwork-readout,
.mgpm-artwork-modal.mgpm-designer:not(.mgpm-designer--has-selection) .mgpm-artwork-tools--right .mgpm-artwork-object-actions,
.mgpm-artwork-modal.mgpm-designer:not(.mgpm-designer--has-selection) .mgpm-artwork-tools--right .mgpm-designer-compact-section--props,
.mgpm-artwork-modal.mgpm-designer:not(.mgpm-designer--has-selection) .mgpm-artwork-tools--right .mgpm-artwork-props,
.mgpm-artwork-modal.mgpm-designer:not(.mgpm-designer--has-selection) .mgpm-artwork-tools--right .mgpm-svg-colors {
  display: none;
}
.mgpm-designer-props-empty { display: none; }
.mgpm-artwork-modal.mgpm-designer:not(.mgpm-designer--has-selection) .mgpm-designer-props-empty {
  display: block;
  padding: 40px 12px;
  text-align: center;
  color: var(--mgpm-muted, rgba(22, 52, 71, 0.68));
  font-size: 13px;
  line-height: 1.5;
}
.mgpm-designer-props-empty__ico {
  width: 40px;
  height: 40px;
  margin: 0 auto 12px;
  border-radius: 8px;
  background: #e0e5ec;
}
.mgpm-designer-props-empty p { margin: 0; }

/* ============================================================
   Touch pointers
   The history/zoom toolbar reveals on hover on desktop. A touch device never
   hovers, so it must be permanently visible there too.
   ============================================================ */
@media (hover: none) {
  .mgpm-artwork-modal.mgpm-designer .mgpm-designer-canvas .mgpm-artwork-view-tabs,
  .mgpm-artwork-modal.mgpm-designer .mgpm-designer-canvas .mgpm-artwork-canvas-toolbar {
    opacity: 1;
    pointer-events: auto;
  }
  /* Tooltips are hover affordances; on touch they fire on tap and cover the UI. */
  .mgpm-artwork-modal.mgpm-designer .mgpm-designer-toolbar__tip {
    display: none;
  }
}

/* The backdrop, the sheet header and the properties rail button exist only for
   the mobile bottom sheets; the media query below switches them on. */
.mgpm-designer-sheet-backdrop,
.mgpm-designer-sheet__head,
.mgpm-designer-rail__btn--props {
  display: none;
}

/* ============================================================
   Mobile shell (<= 860px)
   The rail | stage | properties grid cannot fit, so:
     rail        -> bottom toolbar under the stage
     slide-in    -> bottom sheet
     properties  -> bottom sheet, opened from the rail
   ============================================================ */
@media (max-width: 860px) {
  .mgpm-artwork-modal.mgpm-designer {
    --mgpm-designer-sheet-max: 74%;
    --mgpm-designer-safe-bottom: env(safe-area-inset-bottom, 0px);
  }

  /* --- header --- */
  .mgpm-artwork-modal.mgpm-designer .mgpm-artwork-modal__head {
    gap: 10px;
    padding: 10px 12px;
  }
  .mgpm-artwork-modal.mgpm-designer .mgpm-artwork-modal__head h3 {
    font-size: 17px;
  }
  .mgpm-artwork-modal.mgpm-designer .mgpm-artwork-modal__head p {
    margin-bottom: 2px;
    font-size: 10px;
  }
  .mgpm-artwork-modal.mgpm-designer .mgpm-artwork-modal__close {
    flex: none;
    width: 44px;
    height: 44px;
  }

  /* --- body: stage grows, rail pinned beneath it --- */
  .mgpm-artwork-modal.mgpm-designer .mgpm-artwork-modal__body {
    display: flex;
    flex-direction: column;
    overflow: hidden;
  }
  .mgpm-artwork-modal.mgpm-designer .mgpm-artwork-stage {
    order: 1;
    flex: 1 1 auto;
    min-height: 0;
    gap: 0;
  }
  .mgpm-artwork-modal.mgpm-designer .mgpm-artwork-canvas-wrap {
    flex: 1 1 auto;
    min-height: 0;
    margin: 8px 8px 0;
    border-radius: 10px;
  }

  /* --- rail becomes a bottom toolbar; it stays above the sheets and the backdrop
         so the customer can switch panels without dismissing first --- */
  .mgpm-artwork-tools.mgpm-designer-left {
    position: relative;
    z-index: 9;
    box-sizing: border-box;
    order: 2;
    flex: 0 0 auto;
    width: 100%;
    overflow: visible;
    padding: 8px;
    border-right: 0;
    border-top: 1px solid #e5e7eb;
  }
  .mgpm-designer-rail {
    flex-direction: row;
    gap: 6px;
  }
  .mgpm-designer-rail__btn {
    box-sizing: border-box;
    flex: 1 1 0;
    min-width: 0;
    min-height: 58px;
    gap: 4px;
    padding: 6px 2px;
    font-size: 10px;
  }
  .mgpm-designer-rail__label {
    overflow: hidden;
    max-width: 100%;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
  /* "Skift produkt" is a disabled placeholder — it only steals a tap target. */
  .mgpm-designer-rail__btn.is-disabled {
    display: none;
  }
  .mgpm-designer-rail__btn--props {
    display: flex;
  }

  /* --- shared bottom-sheet chrome --- */
  .mgpm-designer-sheet-backdrop {
    display: block;
    position: absolute;
    inset: 0;
    z-index: 7;
    background: rgba(15, 23, 42, 0.38);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.2s ease, visibility 0.2s;
  }
  .mgpm-artwork-modal.mgpm-designer--nav-open .mgpm-designer-sheet-backdrop,
  .mgpm-artwork-modal.mgpm-designer--props-open .mgpm-designer-sheet-backdrop {
    opacity: 1;
    visibility: visible;
  }

  .mgpm-artwork-modal.mgpm-designer .mgpm-designer-slidein,
  .mgpm-artwork-modal.mgpm-designer .mgpm-artwork-tools--right {
    position: absolute;
    top: auto;
    right: 0;
    bottom: var(--mgpm-designer-rail-h, 74px);
    left: 0;
    z-index: 8;
    display: flex;
    flex-direction: column;
    gap: 12px;
    width: auto;
    max-height: var(--mgpm-designer-sheet-max);
    margin: 0;
    padding: 0;
    border: 0;
    border-top: 1px solid #e5e7eb;
    border-radius: 16px 16px 0 0;
    background: #fff;
    box-shadow: 0 -14px 36px rgba(15, 23, 42, 0.22);
    opacity: 1;
    visibility: hidden;
    overflow-y: auto;
    overscroll-behavior: contain;
    transform: translateY(101%);
    transition: transform 0.26s ease, visibility 0.26s;
  }
  .mgpm-artwork-modal.mgpm-designer.mgpm-designer--nav-open .mgpm-designer-slidein,
  .mgpm-artwork-modal.mgpm-designer.mgpm-designer--props-open .mgpm-artwork-tools--right {
    visibility: visible;
    transform: translateY(0);
  }

  .mgpm-artwork-modal.mgpm-designer .mgpm-designer-slidein__head,
  .mgpm-artwork-modal.mgpm-designer .mgpm-designer-sheet__head {
    position: sticky;
    top: 0;
    z-index: 1;
    display: flex;
    flex: none;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 18px 14px 12px;
    border-bottom: 1px solid #e5e7eb;
    background: #fff;
  }
  /* grabber, so the panel reads as a sheet you can dismiss */
  .mgpm-artwork-modal.mgpm-designer .mgpm-designer-slidein__head::before,
  .mgpm-artwork-modal.mgpm-designer .mgpm-designer-sheet__head::before {
    content: "";
    position: absolute;
    top: 6px;
    left: 50%;
    width: 38px;
    height: 4px;
    border-radius: 999px;
    background: #d5dbe3;
    transform: translateX(-50%);
  }
  .mgpm-artwork-modal.mgpm-designer .mgpm-designer-sheet__head strong,
  .mgpm-artwork-modal.mgpm-designer .mgpm-designer-slidein__head strong {
    font-size: 15px;
  }
  .mgpm-artwork-modal.mgpm-designer .mgpm-designer-slidein__close,
  .mgpm-artwork-modal.mgpm-designer .mgpm-designer-sheet__close {
    flex: none;
    width: 44px;
    height: 44px;
    border: 1px solid #d9dde5;
    border-radius: 8px;
    background: #fff;
    color: var(--mgpm-text, #1e3a4c);
    font-size: 22px;
    line-height: 1;
    cursor: pointer;
  }

  .mgpm-artwork-modal.mgpm-designer .mgpm-designer-slidein__body {
    padding: 0 14px calc(16px + var(--mgpm-designer-safe-bottom));
  }
  /* The desktop column pins its cards to `width: 100%`; inside the sheet they are
     inset by margins instead, so they must size to the remaining space. */
  .mgpm-artwork-modal.mgpm-designer .mgpm-artwork-tools--right > *:not(.mgpm-designer-sheet__head) {
    width: auto;
    margin-right: 14px;
    margin-left: 14px;
  }
  .mgpm-artwork-modal.mgpm-designer .mgpm-artwork-tools--right > *:last-child {
    margin-bottom: calc(16px + var(--mgpm-designer-safe-bottom));
  }

  .mgpm-artwork-modal.mgpm-designer .mgpm-artwork-tools--right {
    overflow: hidden;
  }

  .mgpm-artwork-modal.mgpm-designer .mgpm-designer-compact-panel {
    flex: 1 1 auto;
    grid-template-rows: auto minmax(0, 1fr);
    height: auto;
    min-height: 0;
    margin-bottom: calc(16px + var(--mgpm-designer-safe-bottom));
  }

  .mgpm-artwork-modal.mgpm-designer .mgpm-designer-compact-tabs {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 3px;
    padding: 5px;
    border-bottom: 1px solid #dfe5e9;
    background: #f3f6f7;
  }

  .mgpm-artwork-modal.mgpm-designer .mgpm-designer-compact-tabs button {
    min-height: 40px;
    padding: 8px 10px;
    border: 1px solid transparent;
    border-radius: 7px;
    background: transparent;
    color: #536873;
    font-size: 13px;
    font-weight: 750;
    cursor: pointer;
  }

  .mgpm-artwork-modal.mgpm-designer .mgpm-designer-compact-tabs button.is-active {
    border-color: #cfd9de;
    background: #fff;
    color: var(--mgpm-blue, #0d5a7f);
    box-shadow: 0 1px 2px rgba(22, 52, 71, 0.08);
  }

  .mgpm-artwork-modal.mgpm-designer .mgpm-designer-compact-pane {
    display: none;
    min-height: 0;
    overflow: hidden;
  }

  .mgpm-artwork-modal.mgpm-designer .mgpm-designer-compact-pane.is-active {
    display: grid;
  }

  .mgpm-artwork-modal.mgpm-designer .mgpm-designer-compact-pane--properties.is-active {
    grid-template-rows: auto minmax(0, 1fr);
  }

  .mgpm-artwork-modal.mgpm-designer .mgpm-designer-compact-pane--layers.is-active {
    overflow-y: auto;
    overscroll-behavior: contain;
  }

  .mgpm-artwork-modal.mgpm-designer .mgpm-designer-compact-section--layers {
    align-self: start;
  }

  /* --- canvas overlays: always on, since a phone cannot hover to reveal them --- */
  .mgpm-artwork-modal.mgpm-designer .mgpm-designer-canvas .mgpm-artwork-view-tabs,
  .mgpm-artwork-modal.mgpm-designer .mgpm-designer-canvas .mgpm-artwork-canvas-toolbar {
    opacity: 1;
    pointer-events: auto;
  }
  .mgpm-artwork-modal.mgpm-designer .mgpm-designer-canvas .mgpm-artwork-view-tabs {
    top: 8px;
    right: 8px;
  }
  .mgpm-artwork-modal.mgpm-designer .mgpm-designer-canvas .mgpm-artwork-canvas-toolbar {
    left: 8px;
    bottom: 8px;
  }
  .mgpm-artwork-modal.mgpm-designer .mgpm-designer-canvas .mgpm-artwork-canvas-toolbar button {
    height: 40px;
  }
  .mgpm-artwork-modal.mgpm-designer .mgpm-designer-canvas .mgpm-artwork-view-tabs__nav {
    width: 44px;
    height: 44px;
  }
  .mgpm-artwork-modal.mgpm-designer .mgpm-artwork-variant-switcher__nav {
    width: 36px;
    height: 44px;
  }
  .mgpm-artwork-modal.mgpm-designer .mgpm-artwork-variant-switcher__label {
    max-width: 72px;
  }
  .mgpm-artwork-modal.mgpm-designer .mgpm-designer-canvas .mgpm-artwork-view-tabs__label {
    min-width: 68px;
  }

  /* --- floating selection toolbar: must never exceed the canvas width. The text
         fields take a full row of their own so the action icons stay on one
         tidy row rather than orphaning the last button. --- */
  .mgpm-artwork-modal.mgpm-designer .mgpm-designer-toolbar {
    flex-wrap: wrap;
    justify-content: center;
    max-width: calc(100% - 12px);
  }
  .mgpm-artwork-modal.mgpm-designer .mgpm-designer-toolbar__text:not([hidden]) {
    flex: 1 0 100%;
    justify-content: center;
    padding: 0 0 5px;
    border-bottom: 1px solid #e2e5ea;
  }
  .mgpm-artwork-modal.mgpm-designer .mgpm-designer-toolbar__btn {
    width: 40px;
    height: 40px;
  }
  .mgpm-artwork-modal.mgpm-designer .mgpm-designer-toolbar__field select {
    width: 104px;
  }
  .mgpm-artwork-modal.mgpm-designer .mgpm-designer-toolbar__field--size input {
    width: 52px;
  }

  /* --- bottom bar: stats on one row, actions full width beneath --- */
  .mgpm-artwork-modal.mgpm-designer .mgpm-artwork-footer.mgpm-designer-footer {
    /* frontend.css makes this `sticky` + `z-index: 5` below 760px, which turns it
       into a stacking context — so the price popover inside it cannot escape,
       and the rail (9) would paint straight across it. Lift the whole subtree. */
    z-index: 10;
    flex-wrap: wrap;
    gap: 8px;
    min-height: 0;
    padding: 8px 10px calc(8px + var(--mgpm-designer-safe-bottom));
  }
  .mgpm-artwork-modal.mgpm-designer .mgpm-designer-footer .mgpm-artwork-footer__right {
    flex-direction: column;
    align-items: stretch;
    width: 100%;
    margin-left: 0;
    gap: 8px;
  }
  /* The total is the widest and the least compressible stat, so it keeps its
     intrinsic width and the method label is the one that ellipsises. */
  .mgpm-artwork-modal.mgpm-designer .mgpm-artwork-footer__meta {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto auto;
    width: 100%;
    gap: 2px;
  }
  .mgpm-artwork-modal.mgpm-designer .mgpm-artwork-footer__method,
  .mgpm-artwork-modal.mgpm-designer .mgpm-artwork-footer__quantity,
  .mgpm-artwork-modal.mgpm-designer .mgpm-artwork-footer__price {
    box-sizing: border-box;
    min-width: 0;
    padding: 6px 8px;
  }
  .mgpm-artwork-modal.mgpm-designer .mgpm-artwork-footer__price-toggle strong {
    white-space: nowrap;
  }
  .mgpm-artwork-modal.mgpm-designer .mgpm-artwork-footer__meta .mgpm-artwork-footer__label {
    font-size: 9.5px;
  }
  .mgpm-artwork-modal.mgpm-designer .mgpm-artwork-footer__quantity strong,
  .mgpm-artwork-modal.mgpm-designer .mgpm-artwork-footer__method strong {
    font-size: 14px;
  }
  .mgpm-artwork-modal.mgpm-designer .mgpm-artwork-footer__method strong {
    max-width: 100%;
  }
  .mgpm-artwork-modal.mgpm-designer .mgpm-artwork-footer__price-toggle strong {
    font-size: 15px;
  }
  .mgpm-artwork-modal.mgpm-designer .mgpm-artwork-footer__price-toggle .mgpm-price-pair__label {
    font-size: 9.5px;
  }
  .mgpm-artwork-modal.mgpm-designer .mgpm-designer-footer .mgpm-artwork-footer__separator {
    display: none;
  }
  .mgpm-artwork-modal.mgpm-designer .mgpm-designer-footer .mgpm-artwork-footer__actions {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    gap: 8px;
    width: 100%;
  }
  .mgpm-artwork-modal.mgpm-designer .mgpm-designer-footer .mgpm-artwork-footer__actions .mgpm-btn,
  .mgpm-artwork-modal.mgpm-designer .mgpm-designer-footer .mgpm-artwork-footer__actions .single_add_to_cart_button {
    width: 100% !important;
    min-height: 48px;
  }

  /* The breakdown popover is wider than its anchor stat — pin it to the viewport,
     resting on top of the bottom bar so the total and the cart button stay visible. */
  .mgpm-artwork-modal.mgpm-designer .mgpm-artwork-footer__price .mgpm-artwork-price-panel {
    position: fixed;
    right: 8px;
    bottom: calc(var(--mgpm-designer-footer-h, 96px) + 6px);
    left: 8px;
    z-index: 12;
    width: auto;
    max-height: 60vh;
    overflow-y: auto;
  }

  /* --- 16px is the threshold below which iOS Safari zooms on focus --- */
  .mgpm-artwork-modal.mgpm-designer input:not([type="checkbox"]):not([type="radio"]):not([type="color"]),
  .mgpm-artwork-modal.mgpm-designer select,
  .mgpm-artwork-modal.mgpm-designer textarea,
  .mgpm-artwork-modal.mgpm-designer .mgpm-artwork-tools--right input:not([type="checkbox"]),
  .mgpm-artwork-modal.mgpm-designer .mgpm-artwork-tools--right select,
  .mgpm-artwork-modal.mgpm-designer .mgpm-artwork-tools--right textarea {
    font-size: 16px;
  }
  .mgpm-artwork-modal.mgpm-designer .mgpm-artwork-props__grid input,
  .mgpm-artwork-modal.mgpm-designer .mgpm-artwork-props__grid select,
  .mgpm-artwork-modal.mgpm-designer .mgpm-artwork-tools--right input:not([type="checkbox"]),
  .mgpm-artwork-modal.mgpm-designer .mgpm-artwork-tools--right select {
    height: 44px;
    min-height: 44px;
  }
  .mgpm-artwork-modal.mgpm-designer .mgpm-artwork-layer__actions button,
  .mgpm-artwork-modal.mgpm-designer .mgpm-artwork-object-actions button,
  .mgpm-artwork-modal.mgpm-designer .mgpm-artwork-object-actions .mgpm-btn {
    min-height: 44px;
  }
  .mgpm-artwork-modal.mgpm-designer .mgpm-artwork-layer__actions {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .mgpm-artwork-modal.mgpm-designer .mgpm-svg-colors__swatch {
    width: 40px;
    height: 40px;
    min-height: 40px;
  }

  /* --- method / quantity dialogs --- */
  .mgpm-artwork-modal.mgpm-designer .mgpm-artwork-method-modal__body .mgpm-decor-groups__options {
    grid-template-columns: 1fr;
  }
  .mgpm-artwork-modal.mgpm-designer .mgpm-artwork-quantity-row__stepper {
    grid-template-columns: 44px minmax(0, 1fr) 44px;
  }
  .mgpm-artwork-modal.mgpm-designer .mgpm-artwork-quantity-row__stepper button,
  .mgpm-artwork-modal.mgpm-designer .mgpm-artwork-quantity-row__stepper input {
    height: 44px;
    font-size: 16px;
  }
  .mgpm-artwork-modal.mgpm-designer .mgpm-artwork-quantity-row {
    grid-template-columns: minmax(0, 1fr) 132px;
  }
}

@media (max-width: 480px) {
  .mgpm-artwork-modal.mgpm-designer .mgpm-designer-canvas .mgpm-artwork-history__label {
    display: none;
  }
}

/* Landscape phones have almost no vertical room. Shrink the chrome, give the
   canvas a workable fixed height and let the stage scroll rather than clipping
   it — a square canvas simply cannot fit in ~200px of stage. */
@media (max-width: 860px) and (max-height: 520px) {
  .mgpm-artwork-modal.mgpm-designer {
    --mgpm-designer-sheet-max: 90%;
  }
  .mgpm-artwork-modal.mgpm-designer .mgpm-artwork-modal__head {
    padding: 6px 10px;
  }
  .mgpm-artwork-modal.mgpm-designer .mgpm-artwork-modal__head h3 {
    font-size: 15px;
  }
  .mgpm-artwork-modal.mgpm-designer .mgpm-artwork-modal__head p {
    display: none;
  }
  .mgpm-designer-rail__btn {
    min-height: 46px;
    font-size: 9.5px;
  }

  .mgpm-artwork-modal.mgpm-designer .mgpm-artwork-stage {
    overflow-y: auto;
    overscroll-behavior: contain;
  }
  .mgpm-artwork-modal.mgpm-designer .mgpm-artwork-canvas-wrap {
    flex: 0 0 auto;
    height: 300px;
  }

  /* There is width to spare here, so the bottom bar stays a single row. */
  .mgpm-artwork-modal.mgpm-designer .mgpm-designer-footer .mgpm-artwork-footer__right {
    flex-direction: row;
    align-items: center;
    width: auto;
    margin-left: auto;
  }
  .mgpm-artwork-modal.mgpm-designer .mgpm-artwork-footer__meta {
    display: flex;
    width: auto;
    gap: 4px;
  }
  .mgpm-artwork-modal.mgpm-designer .mgpm-designer-footer .mgpm-artwork-footer__actions {
    display: flex;
    width: auto;
  }
  .mgpm-artwork-modal.mgpm-designer .mgpm-designer-footer .mgpm-artwork-footer__actions .mgpm-btn,
  .mgpm-artwork-modal.mgpm-designer .mgpm-designer-footer .mgpm-artwork-footer__actions .single_add_to_cart_button {
    width: auto !important;
    min-height: 44px;
  }
}

/* Standalone designer entry ([mgpm_designer]) — a landing-page host for the
   designer outside a shop page. The picker/switch UI mounts inside this. */
.mgpm-designer-standalone {
  max-width: 960px;
  margin: 0 auto;
  width: 100%;
}
.mgpm-designer-standalone__prompt {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  text-align: center;
  padding: clamp(32px, 6vw, 72px) 20px;
}
.mgpm-designer-standalone__title {
  margin: 0;
  font-size: clamp(22px, 4vw, 32px);
  line-height: 1.15;
}
.mgpm-designer-standalone__lede {
  margin: 0;
  max-width: 44ch;
  opacity: 0.75;
}
.mgpm-designer-standalone__empty {
  padding: clamp(24px, 5vw, 56px) 20px;
  text-align: center;
  opacity: 0.75;
}

/* "Skift produkt" — full-screen slide-in covering the designer. */
.mgpm-product-picker {
  position: fixed;
  inset: 0;
  /* Match the fullscreen designer's top layer. The picker is appended later
     under <body>, so equal z-index places it above the open designer. */
  z-index: 2147483647;
}
.mgpm-product-picker[hidden] { display: none; }
.mgpm-product-picker__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15, 18, 24, 0.4);
  opacity: 0;
  transition: opacity 0.25s ease;
}
.mgpm-product-picker.is-open .mgpm-product-picker__backdrop { opacity: 1; }
.mgpm-product-picker__dialog {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  background: #fff;
  color: #171a21;
  transform: translateX(-100%);
  transition: transform 0.28s cubic-bezier(0.22, 1, 0.36, 1);
  will-change: transform;
}
.mgpm-product-picker.is-open .mgpm-product-picker__dialog { transform: translateX(0); }
@media (prefers-reduced-motion: reduce) {
  .mgpm-product-picker__dialog { transition: none; }
}
.mgpm-product-picker__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 72px;
  padding: 14px clamp(18px, 3vw, 40px);
  border-bottom: 1px solid #e7e9ed;
}
.mgpm-product-picker__head strong {
  font-size: 21px;
  line-height: 1.2;
  letter-spacing: -0.02em;
}
.mgpm-product-picker__head button {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  padding: 0;
  border: 1px solid transparent;
  border-radius: 10px;
  background: transparent;
  cursor: pointer;
  color: inherit;
  transition: background-color 0.15s ease, border-color 0.15s ease;
}
.mgpm-product-picker__head button:hover {
  background: #f4f6f8;
  border-color: #e1e5e9;
}
.mgpm-product-picker__head button svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-width: 1.8;
}
.mgpm-product-picker__tools {
  display: grid;
  grid-template-columns: minmax(240px, 1.25fr) minmax(600px, 3fr);
  align-items: stretch;
  gap: 12px;
  padding: 16px clamp(18px, 3vw, 40px);
  border-bottom: 1px solid #e7e9ed;
  background: #fbfcfd;
}
.mgpm-product-picker__search {
  position: relative;
  display: grid;
  grid-template-columns: 1fr;
  align-items: center;
  height: 44px;
  min-width: 0;
}
.mgpm-product-picker__search svg {
  position: relative;
  z-index: 2;
  grid-area: 1 / 1;
  align-self: center;
  justify-self: start;
  width: 18px;
  height: 18px;
  margin-left: 14px;
  fill: none;
  stroke: #747b86;
  stroke-linecap: round;
  stroke-width: 1.8;
  transform: translateY(-1px);
  pointer-events: none;
}
.mgpm-product-picker__search input[type="search"] {
  position: relative;
  z-index: 1;
  grid-area: 1 / 1;
  width: 100%;
  height: 44px;
  min-width: 0;
  margin: 0;
  padding: 0 14px 0 42px;
  border: 1px solid #ccd1d8;
  border-radius: 10px;
  background: #fff;
  color: #171a21;
  font-size: 15px;
  outline: none;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.mgpm-product-picker__search input[type="search"]:focus {
  border-color: #517083;
  box-shadow: 0 0 0 3px rgba(13, 90, 127, 0.12);
}
.mgpm-product-picker__facets {
  display: grid;
  grid-template-columns: repeat(4, minmax(120px, 1fr)) auto;
  gap: 10px;
  min-width: 0;
}
.mgpm-product-picker__facets select {
  width: 100%;
  min-width: 0;
  height: 44px;
  padding: 0 36px 0 13px;
  border: 1px solid #ccd1d8;
  border-radius: 10px;
  font-size: 14px;
  background: #fff;
  color: inherit;
  outline: none;
  cursor: pointer;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.mgpm-product-picker__facets select:hover,
.mgpm-product-picker__facets select:focus {
  border-color: #8b959f;
}
.mgpm-product-picker__facets select:focus {
  box-shadow: 0 0 0 3px rgba(13, 90, 127, 0.12);
}
.mgpm-product-picker__grid {
  flex: 1;
  padding: 24px clamp(18px, 3vw, 40px) 32px;
  overflow-y: auto;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  grid-auto-rows: max-content;
  gap: clamp(16px, 1.5vw, 24px);
  align-content: start;
  background: #f7f8fa;
}
.mgpm-product-picker__card {
  position: relative;
  display: flex;
  min-width: 0;
  overflow: hidden;
  border: 1px solid #e0e3e7;
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 2px 6px rgba(20, 31, 40, 0.03);
  transition: border-color 0.18s ease, box-shadow 0.18s ease, transform 0.18s ease;
}
.mgpm-product-picker__card:hover {
  border-color: #c7ced5;
  box-shadow: 0 14px 32px rgba(20, 31, 40, 0.11);
  transform: translateY(-3px);
}
.mgpm-product-picker__card:focus-within {
  border-color: #517083;
  box-shadow: 0 0 0 3px rgba(13, 90, 127, 0.14), 0 14px 32px rgba(20, 31, 40, 0.09);
}
.mgpm-product-picker__select {
  display: flex;
  flex: 1;
  flex-direction: column;
  width: 100%;
  text-align: left;
  border: 0;
  background: none;
  color: inherit;
  padding: 0;
  cursor: pointer;
  font: inherit;
  outline: none;
}
.mgpm-product-picker__fav {
  position: absolute;
  z-index: 1;
  top: 12px;
  right: 12px;
  width: 38px;
  height: 38px;
  padding: 0;
  border-radius: 50%;
  border: 1px solid rgba(215, 219, 224, 0.95);
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 3px 10px rgba(20, 31, 40, 0.08);
  color: #8d949d;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: color 0.15s ease, border-color 0.15s ease, background-color 0.15s ease, transform 0.15s ease;
}
.mgpm-product-picker__fav svg {
  width: 18px;
  height: 18px;
  fill: transparent;
  stroke: currentColor;
  stroke-linejoin: round;
  stroke-width: 1.7;
}
.mgpm-product-picker__fav:hover {
  color: #d1265b;
  transform: scale(1.06);
}
.mgpm-product-picker__fav.is-active {
  color: #d1265b;
  border-color: #f0b6c7;
  background: #fff7f9;
}
.mgpm-product-picker__fav.is-active svg {
  fill: currentColor;
}
.mgpm-product-picker__favtoggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  height: 44px;
  padding: 0 14px;
  border: 1px solid #ccd1d8;
  border-radius: 10px;
  background: #fff;
  color: inherit;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  white-space: nowrap;
  transition: color 0.15s ease, border-color 0.15s ease, background-color 0.15s ease, box-shadow 0.15s ease;
}
.mgpm-product-picker__favtoggle svg {
  width: 16px;
  height: 16px;
  fill: transparent;
  stroke: currentColor;
  stroke-linejoin: round;
  stroke-width: 1.7;
}
.mgpm-product-picker__favtoggle:hover,
.mgpm-product-picker__favtoggle:focus-visible {
  border-color: #8b959f;
  box-shadow: 0 0 0 3px rgba(13, 90, 127, 0.08);
}
.mgpm-product-picker__favtoggle.is-active {
  background: #fff3f6;
  border-color: #e398af;
  color: #b51f4d;
}
.mgpm-product-picker__favtoggle.is-active svg {
  fill: currentColor;
}
.mgpm-product-picker__thumb {
  position: relative;
  flex: 0 0 auto;
  width: 100%;
  aspect-ratio: 4 / 3;
  background: linear-gradient(145deg, #f8f8f6, #f0f1ef);
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}
.mgpm-product-picker__thumb::after {
  position: absolute;
  inset: 0;
  content: "";
  background: linear-gradient(180deg, transparent 48%, rgba(16, 37, 49, 0.48));
  opacity: 0;
  transition: opacity 0.2s ease;
}
.mgpm-product-picker__thumb img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  padding: 8px;
  transition: transform 0.25s ease;
}
.mgpm-product-picker__card:hover .mgpm-product-picker__thumb img {
  transform: scale(1.025);
}
.mgpm-product-picker__cta {
  position: absolute;
  z-index: 1;
  left: 50%;
  bottom: 16px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 96px;
  min-height: 40px;
  padding: 0 20px;
  border-radius: 10px;
  background: var(--mgpm-blue, #0d5a7f);
  box-shadow: 0 8px 20px rgba(13, 45, 62, 0.24);
  color: #fff;
  font-size: 14px;
  font-weight: 700;
  line-height: 1;
  opacity: 0;
  transform: translate(-50%, 8px);
  transition: opacity 0.2s ease, transform 0.2s ease;
}
.mgpm-product-picker__card:hover .mgpm-product-picker__thumb::after,
.mgpm-product-picker__select:focus-visible .mgpm-product-picker__thumb::after,
.mgpm-product-picker__card:hover .mgpm-product-picker__cta,
.mgpm-product-picker__select:focus-visible .mgpm-product-picker__cta {
  opacity: 1;
}
.mgpm-product-picker__card:hover .mgpm-product-picker__cta,
.mgpm-product-picker__select:focus-visible .mgpm-product-picker__cta {
  transform: translate(-50%, 0);
}
.mgpm-product-picker__sentinel {
  grid-column: 1 / -1;
  width: 100%;
  height: 1px;
  pointer-events: none;
}
.mgpm-product-picker__content {
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: 7px;
  min-height: 128px;
  padding: 16px 17px 17px;
}
.mgpm-product-picker__eyebrow {
  color: #68727c;
  font-size: 11px;
  font-weight: 650;
  line-height: 1.2;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.mgpm-product-picker__name {
  display: -webkit-box;
  overflow: hidden;
  font-size: 15px;
  font-weight: 650;
  line-height: 1.35;
  letter-spacing: -0.01em;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}
.mgpm-product-picker__price {
  display: flex;
  align-items: baseline;
  gap: 5px;
  margin-top: auto;
  color: #24323a;
  font-size: 14px;
  font-weight: 650;
}
.mgpm-product-picker__price small {
  color: #7a838c;
  font-size: 11px;
  font-weight: 500;
}
.mgpm-product-picker__foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 16px clamp(16px, 4vw, 40px);
  border-top: 1px solid #eee;
}
.mgpm-product-picker__foot p { margin: 0; font-size: 13px; opacity: 0.7; }
.mgpm-product-picker__foot p.is-error { color: #b23a1e; opacity: 1; }
.mgpm-product-picker__foot [hidden] { display: none !important; }
@media (max-width: 1180px) {
  .mgpm-product-picker__tools {
    grid-template-columns: 1fr;
  }
}
@media (max-width: 760px) {
  .mgpm-product-picker__head {
    min-height: 64px;
  }
  .mgpm-product-picker__facets {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .mgpm-product-picker__favtoggle {
    grid-column: span 2;
  }
  .mgpm-product-picker__grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
    padding: 16px 14px 24px;
  }
  .mgpm-product-picker__content {
    min-height: 120px;
    padding: 13px;
  }
}
@media (max-width: 440px) {
  .mgpm-product-picker__tools {
    padding: 12px 14px;
  }
  .mgpm-product-picker__grid {
    grid-template-columns: 1fr;
  }
}
/* Switching mask — keeps the slide-in opaque across the page reload. */
.mgpm-product-picker__switching {
  position: absolute;
  inset: 0;
  z-index: 2;
  background: #fff;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;
  font-size: 16px;
  color: #171a21;
}
.mgpm-product-picker__spinner {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: 3px solid #d5d9e1;
  border-top-color: #2846cf;
  animation: mgpm-spin 0.8s linear infinite;
}
@keyframes mgpm-spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) {
  .mgpm-product-picker__spinner { animation-duration: 2s; }
}

/* Toasts — non-blocking status messages. */
.mgpm-toast-host {
  position: fixed;
  left: 50%;
  bottom: 28px;
  transform: translateX(-50%);
  z-index: 100100;
  display: flex;
  flex-direction: column;
  gap: 8px;
  align-items: center;
  pointer-events: none;
}
.mgpm-artwork-modal-open .mgpm-toast-host {
  bottom: 96px;
}
.mgpm-toast {
  background: #171a21;
  color: #fff;
  padding: 11px 18px;
  border-radius: 10px;
  font-size: 14px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.28);
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 0.25s ease, transform 0.25s ease;
  max-width: min(90vw, 420px);
}
.mgpm-toast.is-visible { opacity: 1; transform: translateY(0); }
.mgpm-toast--error {
  background: #b23a1e;
  font-weight: 700;
}

/* Standalone with purchase disabled: hide the add-to-cart controls. The designer
   still works for designing and saving; the cart submit is also guarded in JS. */
.mgpm-designer-standalone--no-purchase .mgpm-native-cart-controls,
.mgpm-designer-standalone--no-purchase .single_add_to_cart_button {
  display: none !important;
}

/* Forced size selection on standalone arrival — no way out until sizes are set. */
.mgpm-artwork-quantity-modal.is-required .mgpm-artwork-quantity-modal__close,
.mgpm-artwork-quantity-modal.is-required .mgpm-artwork-quantity-modal__foot .mgpm-btn--ghost {
  display: none;
}
