.landing-page.conversion-workspace-mode {
  overflow: hidden;
}

.landing-page.conversion-workspace-mode .site-header,
.landing-page.conversion-workspace-mode .site-footer {
  display: none;
}

.landing-page.canvas-mode.conversion-workspace-mode .hero {
  min-height: 100dvh;
  height: 100dvh;
  padding: 0;
  background: #fff;
}

.landing-page.canvas-mode.conversion-workspace-mode .converter,
.landing-page.conversion-workspace-mode #workspace {
  width: 100%;
  max-width: none;
  height: 100dvh;
  margin: 0;
}

.conversion-workspace {
  --canvas-surface: #fff;
  position: relative;
  width: 100%;
  height: 100%;
  overflow: hidden;
  background: var(--canvas-surface);
}

.conversion-workspace-viewport {
  position: absolute;
  inset: 0;
  overflow: hidden;
  cursor: grab;
  touch-action: none;
}

.conversion-workspace-viewport.is-dragging {
  cursor: grabbing;
}

.conversion-workspace-world {
  position: absolute;
  top: 50%;
  left: 50%;
  transform-origin: 0 0;
  will-change: transform;
}

.conversion-object {
  position: absolute;
  width: 400px;
  height: auto;
  margin: 0;
  overflow: visible;
}

.conversion-object-label {
  height: 30px;
  display: flex;
  align-items: flex-start;
  color: #62616d;
  font-size: 13px;
  font-weight: 600;
  cursor: move;
  user-select: none;
}

.conversion-object-art {
  position: relative;
  height: var(--conversion-art-height, 460px);
  display: grid;
  place-items: center;
  overflow: hidden;
  border: 1px solid #dedce5;
  background: #fff;
  box-shadow: 0 8px 24px #24233214;
}

.conversion-object-art > img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  user-select: none;
  -webkit-user-drag: none;
}

.conversion-object.is-processing .conversion-object-art > img,
.conversion-object.is-error .conversion-object-art > img {
  opacity: 0.35;
}

.conversion-object-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 28px;
  color: #fff;
  text-align: center;
  background:
    linear-gradient(
        110deg,
        transparent 35%,
        #ffffff2b 50%,
        transparent 65%
      ) -80%
      0 / 55% 100% no-repeat,
    #29345dbd;
}

.conversion-object.is-processing .conversion-object-overlay {
  animation: conversion-object-sweep 2.1s ease-in-out infinite;
}

.conversion-object.is-error .conversion-object-overlay {
  background: #242332d9;
}

.conversion-object-overlay strong {
  font-size: 18px;
  font-weight: 600;
}

.conversion-object-overlay
  > span:not(.conversion-object-progress):not(.conversion-object-spinner) {
  max-width: 320px;
  line-height: 1.45;
  overflow-wrap: anywhere;
}

.conversion-object-spinner {
  width: 34px;
  height: 34px;
  border: 3px solid #ffffff80;
  border-top-color: #fff;
  border-radius: 50%;
  animation: conversion-canvas-spin 900ms linear infinite;
}

.conversion-object.is-error .conversion-object-spinner,
.conversion-object.is-error .conversion-object-progress {
  display: none;
}

.conversion-object-progress {
  width: min(240px, 100%);
  height: 4px;
  overflow: hidden;
  border-radius: 4px;
  background: #ffffff5c;
}

.conversion-object-progress i {
  display: block;
  height: 100%;
  background: linear-gradient(90deg, #fff 0 42%, #ffffff75 50%, #fff 58% 100%);
  background-size: 220% 100%;
  transition: width 350ms ease;
  animation: conversion-progress-glide 1.2s linear infinite;
}

.conversion-workspace-topbar {
  position: absolute;
  z-index: 2;
  top: 12px;
  left: 12px;
  right: 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  pointer-events: none;
}

.conversion-workspace-topbar:has(.account-controls:not([hidden])) {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  grid-template-areas: "filename actions account";
}

.conversion-workspace-topbar .account-controls {
  grid-area: account;
  pointer-events: auto;
}

.conversion-workspace-name,
.conversion-workspace-actions,
.conversion-workspace-zoom {
  display: flex;
  align-items: center;
  background: var(--canvas-surface);
  border: 1px solid var(--canvas-surface);
  pointer-events: auto;
}

.conversion-workspace-name {
  grid-area: filename;
  justify-self: start;
  min-width: 0;
  max-width: 42vw;
  gap: 9px;
  padding: 11px 14px;
  border-radius: 6px;
}

.conversion-workspace-name strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 13px;
}

.conversion-workspace-actions {
  grid-area: actions;
  justify-self: end;
  gap: 4px;
  padding: 5px;
  border-radius: 6px;
}

.conversion-workspace-actions button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 34px;
  padding: 7px 10px;
  white-space: nowrap;
  font-size: 12px;
}

.conversion-workspace-actions .primary-button {
  color: #fff;
}

.conversion-workspace-zoom {
  position: absolute;
  z-index: 2;
  bottom: 16px;
  left: 16px;
  gap: 2px;
  padding: 4px;
  border-radius: 6px;
}

.conversion-workspace-zoom button {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 4px;
}

.conversion-workspace-zoom button:hover {
  background: var(--landing-selected);
}

.conversion-workspace-zoom span {
  min-width: 45px;
  text-align: center;
  font-size: 12px;
  font-weight: 600;
}

@keyframes conversion-canvas-spin {
  to {
    transform: rotate(360deg);
  }
}

@keyframes conversion-object-sweep {
  from {
    background-position:
      -80% 0,
      0 0;
  }
  to {
    background-position:
      180% 0,
      0 0;
  }
}

@keyframes conversion-progress-glide {
  to {
    background-position: -220% 0;
  }
}

@media (max-width: 740px) {
  .conversion-workspace-topbar {
    flex-wrap: wrap;
    gap: 8px;
  }

  .conversion-workspace-topbar:has(.account-controls:not([hidden])) {
    grid-template-columns: minmax(0, 1fr) auto;
    grid-template-areas: "filename account" "actions actions";
  }

  .conversion-workspace-name {
    max-width: 100%;
  }

  .conversion-workspace-actions {
    max-width: calc(100vw - 24px);
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 2px;
  }

  .conversion-workspace-actions button {
    padding-inline: 7px;
  }

  .conversion-workspace-actions .conversion-credit {
    padding-left: 4px;
  }

  .conversion-workspace-actions [data-choose] {
    width: 36px;
    padding: 7px;
  }

  .conversion-workspace-actions [data-choose] span,
  .conversion-workspace-actions .retry-label {
    display: none;
  }

  .conversion-workspace-actions [data-download] span {
    font-size: 0;
  }

  .conversion-workspace-actions [data-download] span::after {
    content: "Download";
    font-size: 12px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .conversion-object-spinner,
  .conversion-object.is-processing .conversion-object-overlay,
  .conversion-object-progress i {
    animation: none;
  }
  .conversion-object-progress i {
    transition: none;
  }
}

.conversion-version-actions:not([hidden]) {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  padding-top: 6px;
}
.conversion-version-actions button {
  min-height: 32px;
  padding: 5px 10px;
  font-size: 13px;
}

.canvas-leave-dialog {
  width: min(420px, calc(100vw - 32px));
  max-height: calc(100dvh - 32px);
  overflow: auto;
  padding: 28px;
  text-align: left;
}
.canvas-leave-dialog h2 { margin: 0 0 10px; font-size: 24px; line-height: 1.2; }
.canvas-leave-dialog p { margin: 0 0 22px; font-size: 15px; line-height: 1.5; }
.canvas-leave-actions { display: grid; gap: 8px; }
.canvas-leave-actions button { justify-content: center; }
