/* Compact WooCommerce inspector. Scoped to the product automation editor. */
.workflow-editor.product-only-editor,
.workflow-editor.product-only-editor .workflow-inspector {
  min-height: 0 !important;
}

.workflow-editor.product-only-editor .workflow-inspector {
  display: flex !important;
  flex-direction: column !important;
  box-sizing: border-box !important;
  height: calc(100vh - 136px) !important;
  height: calc(100dvh - 136px) !important;
  max-height: calc(100dvh - 136px) !important;
  overflow: hidden !important;
}

.workflow-editor.product-only-editor .workflow-inspector > .inspector-head {
  flex: 0 0 auto !important;
}

.workflow-editor.product-only-editor .workflow-inspector > .inspector-body {
  display: block;
  box-sizing: border-box;
  flex: 1 1 auto !important;
  height: auto !important;
  min-height: 0 !important;
  max-height: none !important;
  overflow-x: hidden !important;
  overflow-y: auto !important;
  overscroll-behavior-y: contain;
  scrollbar-width: thin;
  -webkit-overflow-scrolling: touch;
  padding-bottom: max(54px, env(safe-area-inset-bottom)) !important;
}

.workflow-editor.product-only-editor .inspector-body > * {
  min-width: 0;
}

.workflow-editor.product-only-editor .neo-publish-source {
  display: flex;
  align-items: center;
  min-width: 0;
  gap: 6px;
  margin: 8px 0 12px;
  font-size: 12px;
  color: var(--neo-muted, #676b78);
}
.workflow-editor.product-only-editor .neo-publish-source span { flex: none; }
.workflow-editor.product-only-editor .neo-publish-source a {
  min-width: 0;
  color: inherit;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.workflow-editor.product-only-editor .publish-target-divider {
  margin: 12px 0 8px;
  padding: 0;
}
.workflow-editor.product-only-editor .publish-target-divider b {
  font-size: 13px;
}
.workflow-editor.product-only-editor .publish-target-first .inspector-field {
  margin-bottom: 9px;
}
.workflow-editor.product-only-editor .neo-publish-auth {
  border-radius: 9px;
  border: 1px solid var(--neo-border, #e5e3e8);
  color: var(--neo-muted, #676b78);
  font-size: 12px;
  line-height: 1.3;
  padding: 8px 11px;
  margin: 7px 0 9px;
}
.workflow-editor.product-only-editor .neo-publish-auth.is-connected {
  color: #286a54;
  border-color: #b2d8cb;
}

.workflow-editor.product-only-editor .neo-enrich-control {
  margin: 12px 0 9px !important;
}
.workflow-editor.product-only-editor .neo-enrich-control .full-action {
  width: 100%;
}
.workflow-editor.product-only-editor .neo-enrich-status {
  font-size: 12px;
  line-height: 1.4;
  margin-top: 7px;
  min-width: 0;
}
.workflow-editor.product-only-editor .neo-scan-summary {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 3px 10px;
}
.workflow-editor.product-only-editor .neo-scan-summary b {
  color: var(--neo-text, #2b2b35);
  font-weight: 650;
}
.workflow-editor.product-only-editor .neo-scan-summary span {
  color: var(--neo-muted, #676b78);
  font-variant-numeric: tabular-nums;
}
.workflow-editor.product-only-editor .neo-scan-meta,
.workflow-editor.product-only-editor .neo-publish-extras {
  margin: 7px 0;
  border: 0;
  background: transparent;
  font-size: 12px;
}
.workflow-editor.product-only-editor .neo-scan-meta > summary,
.workflow-editor.product-only-editor .neo-publish-extras > summary {
  cursor: pointer;
  color: var(--neo-muted, #676b78);
  padding: 6px 0;
  user-select: none;
}
.workflow-editor.product-only-editor .neo-scan-meta-content {
  display: grid;
  gap: 6px;
  padding: 9px 11px;
  border: 1px solid var(--neo-border, #e5e3e8);
  border-radius: 9px;
  overflow-wrap: anywhere;
  color: var(--neo-muted, #676b78);
}
.workflow-editor.product-only-editor .neo-scan-alert {
  border-left: 3px solid #dc7467;
  color: #934436;
  background: rgba(220, 116, 103, 0.07);
  border-radius: 4px;
  padding: 7px 9px;
  margin: 7px 0;
  overflow-wrap: anywhere;
}
.workflow-editor.product-only-editor .neo-truncate {
  overflow: hidden;
  text-overflow: ellipsis;
}
.workflow-editor.product-only-editor .neo-publish-extras[open] {
  padding-bottom: 7px;
}
.workflow-editor.product-only-editor .neo-publish-extras > button {
  margin-top: 5px;
}

@media (max-width: 980px) {
  /* The inspector belongs to the natural page scroll on narrow screens. */
  #page:has(.product-only-editor) {
    min-height: 0 !important;
    height: calc(100dvh - 66px) !important;
    max-height: none !important;
    overflow-y: auto !important;
    overflow-x: hidden !important;
    overscroll-behavior-y: contain;
    -webkit-overflow-scrolling: touch;
  }
  .workflow-editor.product-only-editor {
    min-height: 0 !important;
    height: auto !important;
    overflow: visible !important;
  }
  .workflow-editor.product-only-editor .workflow-inspector {
    display: block !important;
    height: auto !important;
    max-height: none !important;
    overflow: visible !important;
  }
  .workflow-editor.product-only-editor .workflow-inspector > .inspector-body {
    flex: none !important;
    height: auto !important;
    max-height: none !important;
    overflow: visible !important;
    padding-bottom: max(80px, env(safe-area-inset-bottom)) !important;
  }
}

/* v2: constrain the grid row itself and explicitly place the inspector. */
@media (min-width: 821px) {
 .workflow-editor.product-only-editor {
   width:100% !important;box-sizing:border-box!important;
   height:max(480px,calc(100dvh - 168px))!important;
   min-height:0!important;grid-template-rows:minmax(0,1fr)!important;
   overflow:hidden!important;
 }
 .workflow-editor.product-only-editor .workflow-inspector {
   display:flex!important;min-width:0!important;min-height:0!important;
   height:100%!important;max-height:100%!important;
   grid-row:1!important;overflow:hidden!important;
 }
 .workflow-editor.product-only-editor .workflow-inspector > .inspector-body {
   flex:1 1 0!important;height:0!important;min-height:0!important;
   max-height:none!important;overflow-y:auto!important;overflow-x:hidden!important;
   overscroll-behavior-y:contain;touch-action:pan-y;scrollbar-gutter:stable;
 }
}
@media (min-width:1201px) {
 .workflow-editor.product-only-editor {grid-template-columns:minmax(145px,195px) minmax(0,1fr) minmax(320px,360px)!important}
 .workflow-editor.product-only-editor > .workflow-palette {grid-column:1!important;grid-row:1!important}
 .workflow-editor.product-only-editor > .workflow-canvas-wrap {grid-column:2!important;grid-row:1!important;min-width:0!important}
 .workflow-editor.product-only-editor > .workflow-inspector {grid-column:3!important}
}
@media (min-width:821px) and (max-width:1200px) {
 .workflow-editor.product-only-editor {grid-template-columns:minmax(0,1fr) minmax(310px,38%)!important}
 .workflow-editor.product-only-editor > .workflow-palette {display:none!important}
 .workflow-editor.product-only-editor > .workflow-canvas-wrap {grid-column:1!important;grid-row:1!important;min-width:0!important}
 .workflow-editor.product-only-editor > .workflow-inspector {grid-column:2!important;grid-row:1!important}
}
@media (max-width:820px) {
 #page:has(.product-only-editor) {height:calc(100dvh - 66px)!important;min-height:0!important;max-height:none!important;overflow-x:hidden!important;overflow-y:auto!important;overscroll-behavior-y:contain!important}
 .workflow-editor.product-only-editor {width:100%!important;display:grid!important;grid-template-columns:minmax(0,1fr)!important;grid-template-rows:auto auto!important;height:auto!important;max-height:none!important;overflow:visible!important}
 .workflow-editor.product-only-editor > .workflow-palette {display:none!important}
 .workflow-editor.product-only-editor > .workflow-canvas-wrap {grid-column:1!important;grid-row:1!important;min-width:0!important}
 .workflow-editor.product-only-editor > .workflow-inspector {grid-column:1!important;grid-row:2!important;display:block!important;width:100%!important;height:auto!important;max-height:none!important;overflow:visible!important}
 .workflow-editor.product-only-editor .workflow-inspector > .inspector-body {height:auto!important;max-height:none!important;overflow:visible!important;overscroll-behavior-y:auto!important;padding-bottom:max(100px,env(safe-area-inset-bottom))!important}
}

/* Distinguish saved source catalog size from previously completed import run. */
.workflow-editor.product-only-editor .neo-import-catalog-count{display:flex;flex-wrap:wrap;align-items:center;gap:5px;margin:8px 0 3px;font-size:11px;line-height:1.4;color:var(--neo-muted,#646579)}
.workflow-editor.product-only-editor .neo-import-catalog-count b{font-weight:750;color:var(--neo-text,#30303a)}

/* Scanner pairing is a local Windows action; do not hide its launch control
   inside technical diagnostics when a long-running catalog job is waiting. */
.workflow-editor.product-only-editor .neo-scanner-launch-actions{
  display:grid;gap:8px;padding:11px;margin:9px 0;
  border:1px solid var(--neo-border,#e1e4eb);border-radius:11px;
  background:rgba(115,132,156,.045);
}
.workflow-editor.product-only-editor .neo-scanner-launch-note{
  font-size:12px;line-height:1.45;color:var(--neo-muted,#6a6b77);
}
.workflow-editor.product-only-editor .neo-scanner-download-link{
  font-size:11px;text-align:center;text-decoration:underline;
  color:var(--neo-muted,#6a6b77);
}
