.hot-edit-trigger.btn {
  color: #8b301c;
  background: #fff2e8;
  border: 1px solid #eab198;
  white-space: nowrap;
}

.hot-edit-trigger.btn::before,
.hot-edit-live::before {
  content: "";
  display: inline-block;
  height: .95em;
  width: .72em;
  margin-inline-end: .45em;
  background: currentColor;
  clip-path: polygon(53% 0, 71% 28%, 74% 46%, 90% 33%, 100% 67%, 88% 87%, 67% 100%, 32% 100%, 8% 82%, 0 60%, 13% 43%, 23% 59%, 37% 39%);
}

.hot-edit-trigger.btn:hover {
  color: #6a2316;
  background: #ffe5d6;
  border-color: #d68d70;
}

.discount-hot-edit {
  --hot-ink: #2f201c;
  --hot-muted: #61504a;
  --hot-paper: #fffaf7;
  --hot-surface: #fff;
  --hot-line: #eadbd4;
  --hot-accent: #9e331d;
  width: min(49rem, calc(100% - 2rem));
  max-height: min(53rem, calc(100dvh - 2rem));
  margin: auto;
  padding: 0;
  box-sizing: border-box;
  border: 1px solid var(--hot-line);
  border-radius: 1.25rem;
  background: var(--hot-paper);
  color: var(--hot-ink);
  font-family: inherit;
  overflow: auto;
  box-shadow: 0 1.9rem 5rem #2a100963;
}

.discount-hot-edit::backdrop {
  background: #1b130fe0;
  opacity: .67;
}

.discount-hot-edit [hidden] {
  display: none !important;
}

.hot-edit-hero {
  position: relative;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  isolation: isolate;
  overflow: hidden;
  background: linear-gradient(109deg, #381712 0%, #562116 62%, #892e19 100%);
  color: #fff6ef;
  padding: 1.4rem 1.55rem 1.45rem;
}

.hot-edit-hero-content {
  min-width: 0;
  overflow-wrap: anywhere;
}

.hot-edit-flames {
  position: absolute;
  display: flex;
  align-items: end;
  z-index: -1;
  pointer-events: none;
  inline-size: 22rem;
  max-inline-size: 76%;
  block-size: 16rem;
  inset: auto -1.9rem -5.5rem auto;
  opacity: .68;
  transform: rotate(6deg);
}

.hot-edit-flames i {
  position: relative;
  flex: 0 0 55%;
  height: 100%;
  background: linear-gradient(8deg, #ffbf74, #ec713f 56%, #c34831 100%);
  clip-path: polygon(0 100%, 4% 77%, 17% 63%, 12% 51%, 19% 37%, 29% 53%, 46% 40%, 60% 15%, 56% 0, 71% 13%, 79% 30%, 77% 49%, 89% 43%, 100% 61%, 93% 78%, 100% 100%);
}

.hot-edit-flames i:first-child {
  top: 3.1rem;
  left: 1.6rem;
  transform: scale(.79) rotate(-15deg);
  opacity: .72;
}

.hot-edit-flames i + i {
  margin-inline-start: -35%;
}

.hot-edit-flames i:last-child {
  top: 1.8rem;
  transform: scale(.87) rotate(8deg);
  opacity: .53;
}

.hot-edit-live,
.hot-edit-campaign {
  margin: 0;
  color: #ffdfd2;
}

.hot-edit-live {
  display: flex;
  align-items: center;
  font-size: .76rem;
  font-weight: 700;
  letter-spacing: .02em;
}

.hot-edit-live::before {
  background: #ffc484;
}

.discount-hot-edit h2 {
  margin: .3rem 0 .25rem;
  color: #fff6ef;
  font-size: clamp(1.45rem, 3.8vw, 2rem);
  letter-spacing: -.03em;
  line-height: 1.12;
}

.hot-edit-campaign {
  font-size: .85rem;
}

.discount-hot-edit button {
  font-family: inherit;
  cursor: pointer;
}

.hot-edit-close {
  flex: 0 0 auto;
  display: grid;
  place-content: center;
  width: 2.4rem;
  height: 2.4rem;
  margin-inline-start: .5rem;
  padding: 0;
  border: 1px solid #fff7f683;
  border-radius: .7rem;
  color: #fff6ef;
  background: #3b151177;
  font-size: 1.55rem;
  line-height: 1;
}

.hot-edit-body {
  display: grid;
  gap: 1rem;
  margin: 0;
}

.hot-edit-groups,
.hot-edit-preview {
  margin-inline: 1.35rem;
}

.hot-edit-groups {
  padding-top: 1.13rem;
}

.hot-edit-section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: .5rem;
}

.discount-hot-edit h3 {
  margin: 0;
  color: var(--hot-ink);
  font-size: 1rem;
}

.hot-edit-guidance {
  margin: .45rem 0 .8rem;
  color: var(--hot-muted);
  font-size: .81rem;
  line-height: 1.45;
}

.hot-edit-rows {
  display: grid;
  gap: .55rem;
}

.hot-edit-group {
  min-width: 0;
  margin: 0;
  padding: .35rem .65rem .66rem;
  border: 1px solid var(--hot-line);
  border-radius: .72rem;
  background: var(--hot-surface);
}

.hot-edit-group legend {
  max-width: 100%;
  padding-inline: .25rem;
  color: var(--hot-muted);
  font-size: .78rem;
  font-weight: 700;
  overflow-wrap: anywhere;
}

.hot-edit-fields {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(5.8rem, .52fr) minmax(0, 1fr);
  gap: .46rem .66rem;
}

.hot-edit-field {
  display: grid;
  min-width: 0;
  gap: .28rem;
  color: var(--hot-muted);
  font-size: .76rem;
  font-weight: 700;
}

.hot-edit-field input {
  box-sizing: border-box;
  width: 100%;
  min-width: 0;
  height: 2.35rem;
  padding: .42rem .58rem;
  border: 1px solid var(--hot-line);
  border-radius: .42rem;
  background: var(--hot-paper);
  color: var(--hot-ink);
  font: inherit;
  font-size: .85rem;
  font-weight: 500;
}

.hot-edit-locked {
  display: inline-block;
  margin-top: .45rem;
  font-size: .73rem;
  color: var(--hot-muted);
}

.hot-edit-group input:disabled {
  opacity: .73;
}

.hot-edit-add,
.hot-edit-review,
.hot-edit-apply {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .25rem;
  min-height: 2.55rem;
  padding: .48rem .72rem;
  border: 1px solid #dca992;
  border-radius: .52rem;
  font-size: .83rem;
  font-weight: 700;
}

.hot-edit-add,
.hot-edit-review {
  color: var(--hot-accent);
  background: var(--hot-surface);
}

.hot-edit-add {
  white-space: nowrap;
}

.hot-edit-apply {
  color: #fff8f2;
  border-color: #9e331d;
  background: linear-gradient(100deg, #9c341e, #ad411f);
}

.hot-edit-discard {
  margin: .4rem 0 0;
  padding: .24rem 0;
  border: 0;
  color: var(--hot-accent);
  background: transparent;
  text-decoration: underline;
  text-underline-offset: .15em;
  font-size: .77rem;
}

.discount-hot-edit button:disabled {
  opacity: .62;
  cursor: not-allowed;
}

.discount-hot-edit :is(input, button, summary):focus-visible {
  outline: 2px solid #b34b26;
  outline-offset: 3px;
}

.hot-edit-preview {
  display: grid;
  gap: .55rem;
  padding: .83rem;
  border: 1px solid var(--hot-line);
  border-radius: .78rem;
  background: var(--hot-surface);
}

.hot-edit-metrics {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: .45rem;
}

.hot-edit-metric {
  display: grid;
  gap: .12rem;
  padding: .45rem .52rem;
  border-radius: .44rem;
  background: var(--hot-paper);
}

.hot-edit-metric strong {
  color: var(--hot-ink);
  font-size: 1.05rem;
  font-variant-numeric: tabular-nums;
}

.hot-edit-metric span {
  color: var(--hot-muted);
  font-size: .74rem;
}

.hot-edit-group-changes,
.hot-edit-variants,
.hot-edit-skipped ul {
  display: grid;
  gap: .22rem;
  margin: .55rem 0;
  padding-inline-start: 1.1rem;
}

.hot-edit-group-changes,
.hot-edit-product,
.hot-edit-variants,
.hot-edit-listing,
.hot-edit-skipped {
  color: var(--hot-muted);
  font-size: .8rem;
  overflow-wrap: anywhere;
}

.hot-edit-warning,
.hot-edit-error {
  margin: .45rem 0;
  padding: .5rem .66rem;
  border: 1px solid #dfb197;
  border-radius: .42rem;
  color: var(--hot-accent);
  background: var(--hot-paper);
  font-size: .8rem;
  font-weight: 650;
}

.hot-edit-listing summary,
.hot-edit-skipped summary {
  cursor: pointer;
  color: var(--hot-ink);
}

.hot-edit-listing,
.hot-edit-skipped {
  margin-top: .55rem;
}

.hot-edit-affected {
  display: grid;
  margin-top: .35rem;
  max-height: 15rem;
  overflow: auto;
  overscroll-behavior: contain;
}

.hot-edit-product {
  padding: .4rem .2rem;
  margin: 0;
  border-top: 1px solid var(--hot-line);
}

.hot-edit-variants li {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: .35rem;
}

.hot-edit-variants li.is-increase strong {
  color: var(--hot-accent);
}

.hot-edit-consent {
  display: flex;
  align-items: start;
  gap: .43rem;
  color: var(--hot-ink);
  font-size: .84rem;
  font-weight: 675;
}

.hot-edit-consent input {
  margin: .18rem 0 0;
  accent-color: var(--hot-accent);
}

.hot-edit-footer {
  position: sticky;
  bottom: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .6rem .85rem;
  padding: .72rem 1.35rem;
  border-top: 1px solid var(--hot-line);
  background: var(--hot-paper);
}

.hot-edit-status {
  margin: 0;
  color: var(--hot-muted);
  font-size: .8rem;
  line-height: 1.35;
}

.hot-edit-status[data-tone="error"] {
  color: var(--hot-accent);
  font-weight: 650;
}

.hot-edit-status[data-tone="success"] {
  color: #175b38;
  font-weight: 650;
}

.hot-edit-controls {
  display: flex;
  flex: 0 0 auto;
  gap: .42rem;
  margin-inline-start: auto;
}

@media (max-width: 580px) {
  .discount-hot-edit {
    width: min(100% - .85rem, 29rem);
    max-height: calc(100dvh - .85rem);
    border-radius: .86rem;
  }

  .hot-edit-hero {
    padding: 1rem;
  }

  .hot-edit-groups,
  .hot-edit-preview {
    margin-inline: .65rem;
  }

  .hot-edit-fields {
    grid-template-columns: 1fr 6.3rem;
  }

  .hot-edit-fields label:last-child {
    grid-column: 1 / -1;
  }

  .hot-edit-footer {
    display: grid;
    padding: .65rem;
  }

  .hot-edit-status:empty {
    display: none;
  }

  .hot-edit-controls {
    margin: 0;
    display: grid;
    grid-template-columns: repeat(2, 1fr);
  }

  .hot-edit-add,
  .hot-edit-review,
  .hot-edit-apply,
  .hot-edit-field input {
    min-height: 2.75rem;
  }

  .hot-edit-field input {
    font-size: 1rem;
  }

  .discount-campaign-row [data-discount-hot-edit] {
    white-space: normal;
  }

  .discount-campaign-row:has([data-discount-hot-edit]) .discount-campaign-actions {
    flex-wrap: wrap;
  }
}

html[data-color-theme="dark"] .discount-hot-edit {
  --hot-ink: #fff2ec;
  --hot-muted: #e0c9bf;
  --hot-paper: #271d1a;
  --hot-surface: #332421;
  --hot-line: #664a40;
  --hot-accent: #ffb29a;
  color-scheme: dark;
}

html[data-color-theme="dark"] .hot-edit-trigger.btn {
  color: #ffc1aa;
  background: #49271f;
  border-color: #95533f;
}

html[data-color-theme="dark"] .hot-edit-trigger.btn:hover {
  color: #ffe3d7;
  background: #663526;
}

html[data-color-theme="dark"] .hot-edit-status[data-tone="success"] {
  color: #a8dfbb;
}

.discount-hot-edit :is(h2, h3)[tabindex="-1"]:focus {
  outline: none;
  scroll-margin-block: 1rem 5rem;
}
