.mugdesigner-fab {
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 9998;
  padding: 14px 22px;
  border-radius: 999px;
  border: none;
  background: #b23b2e;
  color: #fff;
  font-size: 15px;
  font-weight: 600;
  box-shadow: 0 6px 18px rgba(0,0,0,0.25);
  cursor: pointer;
}
.mugdesigner-fab.done {
  background: #2e7d32;
}
.mugdesigner-thumb-frame {
  position: fixed;
  right: 20px;
  bottom: 78px;
  z-index: 9998;
  width: min(500px, 90vw);
  max-width: 90vw;
  height: auto;
  box-sizing: border-box;
  border-radius: 12px;
  border: 3px solid #fff;
  box-shadow: 0 6px 18px rgba(0,0,0,0.25);
  background: #fff;
  object-fit: contain;
  display: none;
  cursor: default;
  pointer-events: none;
}
.mugdesigner-thumb-frame.visible {
  display: block;
}

/* Inline mode: the button + preview take the place of the native option
   field on the product page, instead of floating over the screen. */
.mugdesigner-inline-wrap {
  margin: 15px 0;
  max-width: 100%;
}
.mugdesigner-inline-wrap .mugdesigner-fab {
  position: static;
  display: inline-block;
  box-shadow: none;
}
.mugdesigner-inline-wrap .mugdesigner-thumb-frame {
  position: static;
  display: none;
  margin: 12px 0 0;
  /* Fill the product-info column instead of the fixed/floating widget's
     own width - that's what was pushing it past the page's own edge. */
  width: 100%;
  max-width: 100%;
}
.mugdesigner-inline-wrap .mugdesigner-thumb-frame.visible {
  display: block;
}
.mugdesigner-overlay {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: #111;
  display: none;
  flex-direction: column;
}
.mugdesigner-overlay.open { display: flex; }
.mugdesigner-overlay-header {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  background: #1b1b1b;
  color: #fff;
}
.mugdesigner-overlay-header h3 { margin: 0; font-size: 15px; }
.mugdesigner-overlay-close {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  border: 1px solid #444;
  background: #262626;
  color: #fff;
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
}
.mugdesigner-overlay-frame-wrap {
  flex: 1;
  position: relative;
}
.mugdesigner-overlay-frame-wrap iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: none;
}
