.commerce-web.commerce-creating:has(.commerce-store-host) {
  --store-space: 16px;
  --store-control-height: 44px;
}

.commerce-web.commerce-creating:has(.commerce-store-host) .gc-editor-left {
  gap: 12px;
}

.commerce-web.commerce-creating:has(.commerce-store-host) .gc-section {
  padding: var(--store-space);
}

.commerce-web.commerce-creating:has(.commerce-store-host) .gc-section-head {
  margin-bottom: 12px;
}

.commerce-web.commerce-creating:has(.commerce-store-host) .commerce-material-section:not(:has(.commerce-reference-item)) {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr);
  gap: 10px 12px;
  align-items: stretch;
}

.commerce-web.commerce-creating:has(.commerce-store-host) .commerce-material-section:not(:has(.commerce-reference-item)) > :is(.gc-section-head, .gc-note) {
  grid-column: 1 / -1;
  margin: 0;
}

.commerce-web.commerce-creating:has(.commerce-store-host) .commerce-material-section:not(:has(.commerce-reference-item)) .commerce-reference-grid {
  display: flex;
}

.commerce-web.commerce-creating:has(.commerce-store-host) .commerce-material-section .gc-upload {
  min-height: 72px;
  padding: 10px;
  border: 1px solid var(--gc-line);
  border-radius: 9px;
}

.commerce-web.commerce-creating:has(.commerce-store-host) .commerce-material-section:not(:has(.commerce-reference-item)) .gc-upload {
  display: grid;
  grid-template: "icon title" auto "icon hint" auto / 22px minmax(0, auto);
  justify-content: start;
  align-content: center;
  justify-items: start;
  column-gap: 10px;
  row-gap: 3px;
  padding-inline: 14px;
  background: var(--gc-accent-soft);
  border-color: color-mix(in srgb, var(--gc-accent) 28%, var(--gc-line));
  text-align: start;
}

.commerce-web.commerce-creating:has(.commerce-store-host) .commerce-material-section:not(:has(.commerce-reference-item)) .gc-upload > svg {
  grid-area: icon;
  align-self: center;
  width: 22px;
  height: 22px;
}

.commerce-web.commerce-creating:has(.commerce-store-host) .commerce-material-section:not(:has(.commerce-reference-item)) .gc-upload > strong {
  grid-area: title;
}

.commerce-web.commerce-creating:has(.commerce-store-host) .commerce-material-section:not(:has(.commerce-reference-item)) .gc-upload > small {
  grid-area: hint;
  line-height: 1.4;
  overflow-wrap: anywhere;
}

.commerce-web.commerce-creating:has(.commerce-store-host) .commerce-material-section .commerce-store-host {
  min-width: 0;
  gap: 8px;
  margin-top: 8px;
}

.commerce-web.commerce-creating:has(.commerce-store-host) .commerce-material-section:not(:has(.commerce-reference-item)) .commerce-store-host {
  margin: 0;
}

.commerce-web.commerce-creating:has(.commerce-store-host) .commerce-store-host > button {
  min-height: var(--store-control-height);
}

.commerce-web.commerce-creating:has(.commerce-store-host) .commerce-material-section:not(:has(.commerce-reference-item)) .commerce-store-host > .gc-secondary {
  flex: 1;
  min-width: 0;
  min-height: 72px;
  justify-content: flex-start;
  gap: 8px;
  padding: 10px 12px;
  text-align: start;
  white-space: normal;
}

.commerce-web.commerce-creating:has(.commerce-store-host) .commerce-store-host > .gc-secondary > :is(svg, img) {
  flex: 0 0 auto;
  color: var(--gc-accent);
}

.commerce-web.commerce-creating:has(.commerce-store-host) .commerce-store-host > .gc-link {
  padding-inline: 4px;
  color: var(--gc-accent-ink);
}

.commerce-web.commerce-creating:has(.commerce-store-host) .commerce-material-section:has(.commerce-reference-item) .commerce-reference-grid {
  grid-template-columns: none;
  grid-auto-flow: column;
  grid-auto-columns: clamp(100px, calc((100% - 16px) / 3), 140px);
  gap: 8px;
  padding: 4px 4px 8px;
  overflow-x: auto;
  scroll-padding-inline: 4px;
  scrollbar-width: thin;
}

.commerce-web.commerce-creating:has(.commerce-store-host) .commerce-material-section:has(.commerce-reference-item) .gc-upload {
  padding-inline: 6px;
}

.commerce-web.commerce-creating:has(.commerce-store-host) .commerce-reference-item > input {
  color: var(--gc-ink);
  background: var(--gc-surface);
}

.commerce-web.commerce-creating:has(.commerce-store-host) .commerce-content-section .gc-author-row {
  flex-wrap: nowrap;
  gap: 8px;
}

.commerce-web.commerce-creating:has(.commerce-store-host) .commerce-content-section .gc-author-row .gc-label {
  margin: 0;
}

.commerce-web.commerce-creating:has(.commerce-store-host) .commerce-content-section .gc-author-row > .gc-link {
  min-height: var(--store-control-height);
  padding-inline: 6px;
  color: var(--gc-accent-ink);
}

.commerce-web.commerce-creating:has(.commerce-store-host) .commerce-prompt-fields > textarea {
  min-height: 116px;
  background: var(--gc-soft);
}

.commerce-web.commerce-creating:has(.commerce-store-host) .gc-input-footer {
  gap: 8px;
  align-items: baseline;
}

.commerce-web.commerce-creating:has(.commerce-store-host) .gc-input-footer > span:last-child {
  flex: none;
  font-variant-numeric: tabular-nums;
}

.commerce-web.commerce-creating:has(.commerce-store-host) .gc-settings {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px 10px;
}

.commerce-web.commerce-creating:has(.commerce-store-host) .gc-setting {
  gap: 4px;
  font-size: 12px;
}

.commerce-web.commerce-creating:has(.commerce-store-host) :is(.gc-setting, .gc-author-row) select {
  min-height: var(--store-control-height);
}

@media (min-width: 1024px) {
  html:not([data-h5]) .commerce-web.commerce-creating:has(.commerce-store-host) {
    --store-space: 18px;
  }

  html:not([data-h5]) .commerce-web.commerce-creating:has(.commerce-store-host) .commerce-settings-section {
    grid-template-columns: minmax(0, 1fr) clamp(128px, 20%, 176px);
    gap: 8px 16px;
    align-items: end;
  }

  html:not([data-h5]) .commerce-web.commerce-creating:has(.commerce-store-host) .gc-settings {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 8px;
  }

  html:not([data-h5]) .commerce-web.commerce-creating:has(.commerce-store-host) .commerce-editor-submit > .gc-primary {
    min-width: 0;
    min-height: var(--store-control-height);
    font-size: 14px;
  }
}

@media (min-width: 1200px) {
  html:not([data-h5]) .commerce-web.commerce-creating:has(.commerce-store-host) .commerce-editor-surface {
    grid-template-columns: minmax(0, 1fr) clamp(248px, 27%, 320px);
    gap: 16px;
  }

  html:not([data-h5]) .commerce-web.commerce-creating:has(.commerce-store-host) .commerce-reference-card {
    padding: var(--store-space);
  }

  html:not([data-h5]) .commerce-web.commerce-creating:has(.commerce-store-host) .commerce-reference-preview {
    width: 100%;
    max-width: none;
  }

  html:not([data-h5]) .commerce-web.commerce-creating:has(.commerce-store-host) .commerce-reference-caption {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 4px 8px;
    max-width: none;
    margin-top: 12px;
    text-align: start;
  }

  html:not([data-h5]) .commerce-web.commerce-creating:has(.commerce-store-host) .commerce-reference-caption > .gc-small {
    margin: 0;
  }

  html:not([data-h5]) .commerce-web.commerce-creating:has(.commerce-store-host) .gc-reference-actions {
    justify-content: flex-start;
    margin-top: 6px;
  }

  html:not([data-h5]) .commerce-web.commerce-creating:has(.commerce-store-host) .commerce-reference-note {
    display: none;
  }
}

html[data-h5] .commerce-web.commerce-creating:has(.commerce-store-host) {
  --store-space: 14px;
}

html[data-h5] .commerce-web.commerce-creating:has(.commerce-store-host) .commerce-compact-preview {
  min-height: var(--store-control-height);
  border: 1px solid var(--gc-line);
  border-radius: 8px;
  background: var(--gc-surface);
}

html[data-h5] .commerce-web.commerce-creating:has(.commerce-store-host) .commerce-material-section:not(:has(.commerce-reference-item)) {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

html[data-h5] .commerce-web.commerce-creating:has(.commerce-store-host) .commerce-material-section:not(:has(.commerce-reference-item)) .gc-upload {
  grid-template-columns: 18px minmax(0, 1fr);
  column-gap: 7px;
  padding-inline: 9px;
}

html[data-h5] .commerce-web.commerce-creating:has(.commerce-store-host) .commerce-material-section:not(:has(.commerce-reference-item)) .gc-upload > svg {
  width: 18px;
  height: 18px;
}

html[data-h5] .commerce-web.commerce-creating:has(.commerce-store-host) .commerce-material-section:not(:has(.commerce-reference-item)) .commerce-store-host > .gc-secondary {
  padding-inline: 8px;
}

html[data-h5] .commerce-web.commerce-creating:has(.commerce-store-host) .commerce-material-section:not(:has(.commerce-reference-item)) .commerce-store-host:has(>.gc-link) {
  flex-direction: column;
  align-items: stretch;
}

html[data-h5] .commerce-web.commerce-creating:has(.commerce-store-host) .commerce-reference-item > button {
  width: 44px;
  height: 44px;
  border-radius: 8px;
}

html[data-h5] .commerce-web.commerce-creating:has(.commerce-store-host) .gc-author-row select {
  width: clamp(92px, 29vw, 144px);
}

@media (orientation: landscape) and (min-width: 640px) {
  html[data-h5] .commerce-web.commerce-creating:has(.commerce-store-host) .gc-settings {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

@media (max-width: 360px) {
  html[data-h5] .commerce-web.commerce-creating:has(.commerce-store-host) .commerce-material-section:not(:has(.commerce-reference-item)) .commerce-store-host > .gc-secondary {
    gap: 4px;
    padding-inline: 6px;
    font-size: 12px;
    white-space: nowrap;
  }

  html[data-h5] .commerce-web.commerce-creating:has(.commerce-store-host) .commerce-store-host > .gc-secondary > svg {
    width: 14px;
    height: 14px;
  }
}
