.business-workspace .business-offer-editor {
  --offer-editor-canvas: #f5f5f7;
  --offer-editor-line: #e2e2e8;
  --offer-editor-radius: 1.125rem;
  --offer-editor-width: 77rem;
  --offer-editor-edge: clamp(.85rem, 3.25vw, 2.75rem);
  overflow: hidden;
  height: 100dvh;
  padding: 0;
  background: var(--offer-editor-canvas);
}

[data-livery-theme="midnight"] [data-discovery-only] .business-workspace .business-offer-editor {
  --offer-editor-canvas: var(--business-paper);
  --offer-editor-line: var(--business-line);
}

.business-workspace .business-offer-editor[open] {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
}

.business-offer-editor .business-editor-header,
.business-offer-editor-footer {
  position: static;
  display: block;
  min-height: 0;
  padding: 0;
  border-color: var(--offer-editor-line);
  background: var(--business-white, #fff);
}

.business-offer-editor-header-inner,
.business-offer-editor-footer-inner {
  box-sizing: border-box;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .75rem;
  width: 100%;
  max-width: var(--offer-editor-width);
  margin-inline: auto;
  padding: .8rem var(--offer-editor-edge);
}

.business-offer-editor .business-offer-editor-header-inner .business-heading {
  min-width: 0;
  overflow-wrap: anywhere;
  font-size: clamp(1.16rem, 2.25vw, 1.65rem);
}

.business-offer-editor-header-actions {
  display: flex;
  align-items: center;
  gap: .5rem;
}

.business-offer-editor-header-actions button[aria-label="Close offer editor"] {
  display: grid;
  place-content: center;
  flex: 0 0 2.75rem;
  min-width: 2.75rem;
  min-height: 2.75rem;
  padding: 0;
  border-radius: 50%;
  font-size: 1.42rem;
  line-height: 1;
  text-decoration: none;
}

.business-offer-editor-header-actions button[aria-label="Close offer editor"] svg {
  width: 1.125rem;
  height: 1.125rem;
}

.business-offer-editor-scroll {
  overflow: auto;
  overscroll-behavior: contain;
  scroll-padding-block: .75rem;
  min-width: 0;
  min-height: 0;
}

.business-offer-editor .business-editor-layout {
  box-sizing: border-box;
  width: 100%;
  max-width: var(--offer-editor-width);
  grid-template-columns: minmax(0, 1fr) minmax(18.5rem, 22.5rem);
  align-items: start;
  gap: clamp(1.125rem, 2.75vw, 2rem);
  padding: clamp(1rem, 3vw, 2rem) var(--offer-editor-edge) clamp(1.5rem, 4vw, 3rem);
}

.business-offer-editor .business-offer-form {
  min-width: 0;
  gap: 1rem;
  border: 0;
  background: transparent;
}

.business-offer-editor-section,
.business-offer-editor .business-editor-preview {
  display: grid;
  align-content: start;
  align-items: start;
  min-width: 0;
  gap: 1rem;
  padding: clamp(1rem, 2.5vw, 1.5rem);
  border: 1px solid var(--offer-editor-line);
  border-radius: var(--offer-editor-radius);
  background: var(--business-white, #fff);
}

.business-offer-editor .business-offer-editor-section > .business-heading,
.business-offer-editor .business-editor-preview > .business-heading {
  font-size: 1.125rem;
  letter-spacing: -.025em;
}

.business-offer-editor .business-offer-form label,
.business-offer-editor .business-choice-field legend {
  font-size: .865rem;
  font-weight: 680;
  line-height: 1.35;
}

.business-offer-editor .business-offer-form label {
  align-content: start;
  gap: .42rem;
}

.business-offer-editor .business-offer-form :is(input:not([type="radio"], [type="checkbox"]), select, textarea) {
  min-height: 2.75rem;
  height: auto;
  padding: .65rem .8rem;
  border-color: var(--business-field-line, #d7d8df);
  border-radius: .625rem;
  line-height: 1.4;
  scroll-margin-block: .9rem;
}

.business-offer-editor .business-offer-form textarea {
  min-height: 5.75rem;
}

.business-offer-editor-pair {
  display: grid;
  align-items: start;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 12.5rem), 1fr));
  gap: .85rem;
}

.business-offer-editor-pair:not(:has(> :not([hidden]))) {
  display: none;
}

.business-offer-editor .business-choice-field legend {
  margin-bottom: .45rem;
}

.business-offer-editor .business-choice-row {
  gap: .25rem;
  padding: .25rem;
  border-radius: .75rem;
}

.business-offer-editor .business-choice-row label {
  place-items: center;
  align-content: center;
  min-height: 2.75rem;
  padding: .42rem .3rem;
  border: 1px solid transparent;
  overflow-wrap: normal;
  word-break: normal;
}

.business-offer-editor .business-discount-presets {
  display: flex;
  flex-wrap: wrap;
  gap: .375rem;
  margin-top: -.5rem;
}

.business-offer-editor .business-discount-presets .business-button {
  min-width: 2.75rem;
  min-height: 2.75rem;
  padding: .3rem .6rem;
  font-size: .8rem;
}

.business-offer-editor .business-discount-presets [aria-pressed="true"] {
  background: var(--business-action);
  color: var(--business-on-action);
}

.business-offer-editor .business-discount-presets [aria-pressed="true"]:not(:disabled):hover {
  background: var(--business-action-hover);
}

.business-offer-editor .business-offer-form .business-open-ended {
  justify-content: flex-start;
  gap: .55rem;
  min-height: 0;
}

.business-offer-editor .business-open-ended input {
  width: 1rem;
  height: 1rem;
  margin: 0;
}

.business-offer-editor-steps {
  display: grid;
  gap: .625rem;
}

.business-offer-editor .business-offer-editor-steps > .business-heading {
  font-size: .875rem;
  letter-spacing: normal;
}

.business-offer-editor .business-repeat-rows:empty {
  display: none;
}

.business-offer-editor :is(.business-offer-editor-steps, .business-offer-photo) > .business-button {
  justify-self: start;
}

.business-offer-editor .business-entry {
  display: grid;
  align-items: end;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: .5rem .75rem;
  padding: .7rem;
  border-color: var(--offer-editor-line);
  background: var(--offer-editor-canvas);
}

.business-offer-editor .business-entry > .business-actions {
  min-width: 0;
  gap: .3rem;
}

.business-offer-editor .business-entry > .business-actions .business-button {
  justify-content: center;
  min-width: 2.75rem;
  min-height: 2.75rem;
  padding: .45rem .6rem;
  text-decoration: none;
}

.business-offer-editor .business-offer-editor-image { grid-template-columns: minmax(0, 1fr); }
.business-offer-editor .business-offer-editor-image > .business-actions { justify-content: flex-end; }

.business-offer-editor .business-editor-preview {
  position: sticky;
  top: 0;
  overflow: auto;
  max-height: calc(100dvh - 13rem);
  padding: 1rem;
}

.business-offer-editor .business-offer-preview-card {
  overflow: hidden;
  display: block;
  max-width: none;
  padding: 0;
  border-color: var(--offer-editor-line);
  background: var(--offer-editor-canvas);
}

.business-offer-editor .business-offer-preview-card > img {
  display: block;
  aspect-ratio: 1.9;
  border-radius: 0;
}

.business-offer-preview-copy {
  display: grid;
  gap: .65rem;
  min-width: 0;
  padding: 1rem;
  overflow-wrap: anywhere;
}

.business-offer-editor .business-offer-preview-copy > h3 {
  font-size: clamp(1.22rem, 2vw, 1.5rem);
  line-height: 1.18;
}

.business-offer-editor .business-offer-preview-copy h4 {
  font-size: .92rem;
}

.business-offer-preview-redemption {
  display: grid;
  gap: .55rem;
  min-width: 0;
  padding-top: .75rem;
  border-top: 1px solid var(--offer-editor-line);
}

.business-offer-preview-redemption ol {
  margin: 0;
  padding-inline-start: 1.2rem;
  font-size: .875rem;
  line-height: 1.5;
}

.business-offer-editor .business-offer-preview-redemption > .business-heading {
  font-size: .95rem;
  letter-spacing: -.01em;
}

.business-offer-preview-code {
  justify-self: start;
  max-width: 100%;
  padding: .3rem .55rem;
  border: 1px dashed var(--business-action);
  border-radius: .55rem;
  background: var(--business-action-tint);
  color: var(--business-action-hover);
  font-size: .82rem;
}

.business-offer-editor-footer {
  border-top: 1px solid var(--offer-editor-line);
}

.business-offer-editor-footer-inner {
  flex-wrap: wrap;
  justify-content: flex-end;
  padding-block-end: max(.8rem, var(--livery-dialog-safe-bottom, env(safe-area-inset-bottom)));
}

.business-offer-editor .business-editor-status {
  position: static;
  flex: 1 1 17rem;
  margin: 0;
}

.business-offer-editor-actions {
  justify-content: flex-end;
  gap: .5rem;
}

.business-offer-editor-actions .business-button {
  min-height: 2.75rem;
}

@media (min-width: 52rem) {
  .business-offer-editor .business-offer-editor-preview-toggle {
    display: none;
  }
}

@media (max-width: 51.999rem) {
  .business-offer-editor .business-editor-layout {
    grid-template-columns: minmax(0, 1fr);
  }

  .business-offer-editor .business-editor-preview {
    position: static;
    overflow: visible;
    max-height: none;
  }

  .business-offer-editor:not([data-preview-open]) .business-editor-preview,
  .business-offer-editor[data-preview-open] .business-offer-form {
    display: none;
  }
}

@media (max-width: 36rem) {
  .business-offer-editor-header-inner,
  .business-offer-editor-footer-inner {
    gap: .5rem;
    padding-block-start: .65rem;
    padding-inline: max(var(--offer-editor-edge), var(--livery-dialog-safe-inline-start, 0px))
      max(var(--offer-editor-edge), var(--livery-dialog-safe-inline-end, 0px));
  }
  .business-offer-editor-header-inner { padding-block-start: max(.65rem, var(--livery-dialog-safe-top, 0px)); }

  .business-offer-editor-pair,
  .business-offer-editor .business-entry {
    grid-template-columns: minmax(0, 1fr);
  }

  .business-offer-editor .business-discount-presets {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .business-offer-editor .business-entry > .business-actions {
    grid-column: 1 / -1;
    justify-content: flex-end;
  }

  .business-offer-editor-actions {
    width: 100%;
    justify-content: center;
  }

  .business-offer-editor-preview-toggle { min-height: 2.75rem; white-space: nowrap; }
  .business-offer-editor-actions .business-button {
    padding-inline: .75rem;
    font-size: .8rem;
  }
}
