/* Layout refinements for the designer when opened inside a BUKE product dialog. */
body.inline-embed header>a,
body.inline-embed header>span,
body.inline-embed .designer-flow{display:none!important}
body.inline-embed header{position:sticky;top:0;z-index:10;background:#fff}
body.inline-embed main{height:calc(100vh - 65px)}

/* The studio page carries a long SEO article below the app. Inside the product
   dialog it is dead weight: measured 4491px of the mobile view's 8422px. */
body.inline-embed .designer-seo{display:none!important}
/* Factory panel-splitting output and the pattern export button are production
   tooling, not something a shopper needs while choosing artwork. */
body.inline-embed #cutsSection{display:none!important}
body.inline-embed #reconPanel #exportCuts,
body.inline-embed #reconPanel p.muted{display:none!important}
/* "Upper pattern reference · 1326 × 1981 px · Not a production file" is shop-floor
   language. Shoppers need to know where their artwork lands, not the cut file specs. */
body.inline-embed .quality,
body.inline-embed .workspace-foot>a{display:none!important}

@media(max-width:850px){
  body.inline-embed{min-width:0}
  body.inline-embed main{height:auto;min-height:0;grid-template-columns:minmax(0,1fr);grid-template-rows:auto auto auto auto}
  body.inline-embed main>#tabs{grid-column:1;grid-row:1;display:flex;flex-direction:row;justify-content:space-around;border-right:0;border-bottom:1px solid #e2e6ef;padding:4px}
  /* Canvas first: the artwork board is the reason this dialog was opened. */
  body.inline-embed main>.workspace{grid-column:1;grid-row:2;min-height:56vh}
  body.inline-embed main>.library{grid-column:1;grid-row:3;max-height:32vh;border-right:0;border-bottom:1px solid #e2e6ef}
  body.inline-embed main>.library>#panel{padding:10px}
  body.inline-embed main>.library>.layer-panel{display:none}
  body.inline-embed main>.preview{grid-column:1;grid-row:4;display:block;max-height:65vh;overflow-y:auto;border-left:0;border-top:1px solid #e2e6ef}
  body.inline-embed main>.preview .preview-image{max-width:260px}
  body.inline-embed main>.preview #angles{max-width:260px}

  /* One scrollable control row instead of four stacked rows (header was 245px). */
  body.inline-embed header{height:auto;min-height:0;padding:6px 10px;flex-wrap:nowrap;overflow-x:auto;overflow-y:hidden;gap:8px;-webkit-overflow-scrolling:touch}
  body.inline-embed header .toolbar{flex-wrap:nowrap;gap:6px}
  body.inline-embed header button,
  body.inline-embed header a,
  body.inline-embed header .designer-locale{flex:0 0 auto;white-space:nowrap}
  /* The heading wrapped to three lines on a 390px screen and pushed "Save design"
     off the right edge. Give the primary actions the front of the row instead. */
  body.inline-embed header>b{display:none!important}
  body.inline-embed header button{padding:8px 10px;font-size:12.5px}
  body.inline-embed #addToCart{order:-2}
  body.inline-embed #save{order:-1}
  /* 44px minimum touch targets: undo/redo measured 27x34. */
  body.inline-embed header .toolbar button{min-width:44px;min-height:44px}
  body.inline-embed header>button{min-height:44px}
  body.inline-embed #tabs button{min-width:56px;min-height:44px}
}
