/* Genuine product viewports. The frame changes the embedded page's CSS viewport. */
.ms-live-preview {
  --ms-preview-canvas-height: clamp(280px, 33vw, 440px);
  position: relative;
  min-width: 0;
  width: 100%;
  border: 1px solid var(--ms-line, #e4e5eb);
  border-radius: 16px;
  background: var(--ms-surface-raised, #fff);
  color: var(--ms-text, #16191d);
  overflow: hidden;
  isolation: isolate;
}
.ms-preview-toolbar,
.ms-preview-toolbar > div,
.ms-preview-label {
  display: flex;
  align-items: center;
}
.ms-preview-toolbar {
  justify-content: space-between;
  gap: 14px;
  min-height: 52px;
  padding: 10px 16px;
  border-bottom: 1px solid var(--ms-line, #e4e5eb);
  font-size: 13px;
  line-height: 1.4;
  background: var(--ms-surface-raised, #fff);
  color: var(--ms-text, #16191d);
}
.ms-preview-toolbar > div {
  gap: 14px;
  flex-shrink: 0;
}
.ms-preview-label {
  gap: 8px;
  min-width: 0;
  font-weight: 500;
}
.ms-preview-label i {
  width: 6px;
  height: 6px;
  flex: 0 0 6px;
  border-radius: 50%;
  background: #a6c438;
}
.ms-preview-toolbar button,
.ms-preview-toolbar a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 5px 0;
  min-height: 44px;
  border: 0;
  color: inherit;
  background: transparent;
  font: inherit;
  text-decoration: none;
  cursor: pointer;
}
.ms-preview-toolbar .ms-icon {
  width: 15px;
  height: 15px;
  flex-shrink: 0;
}
.ms-preview-canvas {
  position: relative;
  width: 100%;
  height: var(--ms-preview-canvas-height);
  overflow: hidden;
  background: var(--ms-bg, #f1f2f6);
}
.ms-preview-device {
  position: absolute;
  top: 0;
  left: 0;
  width: 1363px;
  height: 920px;
  transform-origin: 0 0;
  background: #fff;
  border-radius: 0;
  overflow: hidden;
  opacity: 0;
}
.ms-preview-device iframe {
  display: block;
  width: 1363px;
  height: 920px;
  max-width: none;
  border: 0;
  background: #fff;
}
.ms-live-preview[data-ms-preview-state="live"] .ms-preview-device {
  opacity: 1;
}
.ms-live-preview[data-ms-preview-mode="live"][data-ms-preview-state="live"]
  .ms-preview-stills {
  display: none;
}
.ms-live-preview[data-ms-preview-mode="live"]:not(
    [data-ms-preview-state="live"]
  )
  .ms-preview-stills {
  display: block;
  pointer-events: none;
}
.ms-live-preview[data-ms-preview-mode="live"]
  .ms-preview-still
  .ms-product-capture,
.ms-live-preview[data-ms-preview-mode="live"]
  .ms-preview-still
  .ms-product-capture
  img {
  width: 100%;
  height: auto;
  max-height: none;
  object-position: top center;
}
.ms-preview-start {
  position: absolute;
  z-index: 3;
  right: 14px;
  bottom: 14px;
  min-height: 44px;
  border: 1px solid var(--ms-line);
  border-radius: 999px;
  padding: 9px 15px;
  background: var(--ms-surface-raised);
  color: var(--ms-text);
  font: inherit;
  font-size: 13px;
  cursor: pointer;
}
.ms-live-preview[data-ms-preview-state="live"] .ms-preview-start,
.ms-live-preview[data-ms-preview-state="loading"] .ms-preview-start,
.ms-live-preview[data-ms-preview-state="unavailable"] .ms-preview-start {
  display: none;
}
.ms-live-preview[data-ms-preview-state="idle"] .ms-preview-loading {
  display: none;
}
.ms-stage-preview .ms-preview-canvas {
  height: var(--ms-preview-canvas-height);
  min-height: 0;
}

.ms-preview-stills,
.ms-preview-still {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
}
.ms-live-preview[data-ms-preview-mode] .ms-preview-still[hidden] {
  display: none;
}
.ms-live-preview .ms-preview-still > .ms-product-capture {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  overflow: hidden;
}
.ms-live-preview .ms-preview-still .ms-product-capture img {
  position: static;
  width: auto;
  height: auto;
  max-width: 100%;
  max-height: var(--ms-preview-canvas-height);
  object-fit: contain;
  object-position: center;
  transform: none;
}
/* The real public cover starts at the top of its frame, never at its centre. */
.ms-live-preview[data-ms-preview-mode="live"] .ms-preview-still {
  display: block;
}
.ms-live-preview[data-ms-preview-mode="live"]
  .ms-preview-still
  > .ms-product-capture {
  position: static;
  height: auto;
  overflow: visible;
}
/* Full-page protected captures scroll at their device width; their height never shrinks the text. */
.ms-live-preview[data-ms-preview-mode="capture"] .ms-preview-stills {
  inset: 0;
  display: block;
  overflow: hidden;
}
.ms-live-preview[data-ms-preview-mode="capture"] .ms-preview-still {
  position: relative;
  inset: auto;
  display: block;
  width: min(100%, var(--ms-preview-still-width, 1363px));
  height: 100%;
  margin: 0 auto;
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-gutter: stable;
  background: var(--ms-surface-raised);
}
.ms-live-preview[data-ms-preview-mode="capture"]
  .ms-preview-still
  > .ms-product-capture {
  display: block;
  height: auto;
  overflow: visible;
}
.ms-live-preview[data-ms-preview-mode="capture"]
  .ms-preview-still
  .ms-product-capture
  img {
  width: 100%;
  height: auto;
  max-width: 100%;
  max-height: none;
  object-fit: contain;
  object-position: top center;
}
.ms-preview-loading {
  position: absolute;
  left: 20px;
  right: 20px;
  top: 50%;
  transform: translateY(-50%);
  text-align: center;
  color: var(--ms-muted, #666b76);
  font-size: 14px;
  line-height: 1.6;
}
.ms-live-preview[data-ms-preview-state="live"] .ms-preview-loading,
.ms-live-preview[data-ms-preview-mode="capture"] .ms-preview-loading {
  display: none;
}
.ms-preview-note {
  margin: 0;
  padding: 12px 16px;
  border-top: 1px solid var(--ms-line, #e4e5eb);
  color: var(--ms-muted, #666b76);
  font-size: 13px;
  font-weight: 400;
  line-height: 1.55;
}
.ms-preview-note a {
  text-decoration: underline;
  text-underline-offset: 3px;
}
.ms-preview-dialog {
  width: min(1420px, calc(100vw - 40px));
  max-width: none;
  max-height: calc(100svh - 40px);
  margin: auto;
  padding: 0;
  border: 1px solid var(--ms-line, #e4e5eb);
  border-radius: 18px;
  background: var(--ms-surface-raised, #fff);
  color: var(--ms-text, #16191d);
}
.ms-preview-dialog::backdrop {
  background: rgb(16 20 24 / 60%);
}
.ms-preview-dialog .ms-preview-dialog-canvas {
  --ms-preview-canvas-height: max(280px, calc(100svh - 182px));
}
.ms-preview-dialog-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 14px;
  padding: 14px 18px;
  border-bottom: 1px solid var(--ms-line, #e4e5eb);
}
.ms-preview-dialog-header > strong {
  font-size: 15px;
  font-weight: 550;
}
.ms-preview-dialog-header > div {
  display: flex;
  align-items: center;
  gap: 8px;
}
.ms-preview-dialog button {
  min-height: 44px;
  padding: 8px 12px;
  border: 1px solid var(--ms-line, #e4e5eb);
  border-radius: 9px;
  background: transparent;
  color: inherit;
  font: inherit;
  font-size: 13px;
  line-height: 1.3;
  cursor: pointer;
}
.ms-preview-dialog button[aria-pressed="true"] {
  border-color: var(--ms-lime, #d0ff00);
  background: var(--ms-lime, #d0ff00);
  color: #14180d;
}
.ms-preview-dialog footer {
  padding: 12px 18px;
  font-size: 13px;
  line-height: 1.5;
}
.ms-device-switch button:disabled {
  opacity: 0.42;
  cursor: default;
}
.ms-gallery .ms-gallery-live-preview {
  grid-column: 1 / -1;
  --ms-preview-canvas-height: clamp(290px, 30vw, 390px);
}
.ms-gallery .ms-gallery-live-preview a {
  display: inline-flex;
  overflow: visible;
}
.ms-gallery .ms-gallery-live-preview .ms-preview-toolbar .ms-icon {
  width: 15px;
  height: 15px;
}
.msp-demo-stage .msp-live-demo {
  width: 100%;
}
@media (max-width: 680px) {
  .ms-preview-toolbar {
    gap: 8px;
    padding: 10px 12px;
    flex-wrap: wrap;
  }
  .ms-preview-toolbar > div {
    gap: 12px;
  }
  .ms-preview-toolbar button,
  .ms-preview-toolbar a,
  .ms-preview-note {
    font-size: 13px;
  }
  .ms-preview-dialog {
    width: calc(100vw - 20px);
    max-height: calc(100svh - 20px);
    border-radius: 12px;
  }
  .ms-preview-dialog-header {
    padding: 12px;
    gap: 10px;
  }
  .ms-preview-dialog-header > div {
    gap: 4px;
  }
  .ms-preview-dialog button {
    padding: 8px;
  }
  .ms-preview-dialog .ms-preview-dialog-canvas {
    --ms-preview-canvas-height: max(250px, calc(100svh - 220px));
  }
}
