/* Zenvibe layout repair. Theme typography/icons and document coordinates stay native. */
.zv-responsive-table{max-width:100%;overflow-x:auto;-webkit-overflow-scrolling:touch}
.zv-responsive-table:focus-visible{outline:2px solid var(--theme-color,#0b5fc1);outline-offset:2px}
@media(max-width:1023.98px){
 body:not(.zv-mk-admin) :is(.zv-product-info-card,.zv-gallery-card,.zv-artwork-upload,.zv-portal,.zv-main,.zv-side){min-width:0;max-width:100%;box-sizing:border-box}
 body:not(.zv-mk-admin) :is(.zv-option-block,.zv-artwork-upload,.zv-main) :is(select,textarea,input:not([type=checkbox]):not([type=radio]):not([type=hidden])){min-width:0;max-width:100%;box-sizing:border-box}
 body:not(.zv-mk-admin) :is(.zv-product-info-card,.zv-artwork-upload,.zv-main) :is(p,label,h2,h3,h4,.helptext){overflow-wrap:anywhere}
 .zv-artwork-upload>.alert-info{display:block!important;width:100%!important;max-width:none!important;box-sizing:border-box}
 .zv-artwork-upload [role=status]{overflow-wrap:anywhere}
 .zv-portal .zv-side nav a{min-width:0;overflow-wrap:anywhere}
 body.zv-mk-admin .zv-admin-content :is(fieldset,.aligned,.form-row,.flex-container,.related-widget-wrapper){min-width:0;max-width:100%;box-sizing:border-box}
 body.zv-mk-admin .zv-admin-content :is(input:not([type=checkbox]):not([type=radio]):not([type=hidden]),textarea,select){max-width:100%;box-sizing:border-box}
 body.zv-mk-admin .zv-admin-content :is(.help,.helptext,.readonly,.errornote,.errorlist){overflow-wrap:anywhere}
 body.zv-mk-admin .zv-admin-content pre{white-space:pre-wrap;overflow-wrap:anywhere;max-width:100%}
 body.zv-mk-admin .zv-admin-content :is(.results,.bulk-scroll,.tabular>fieldset,.zv-responsive-table){overflow-x:auto!important;-webkit-overflow-scrolling:touch}
 body.zv-mk-admin #zvSidebar{max-width:calc(100vw - 44px)!important;max-height:calc(100dvh - 60px);overflow-y:auto;padding-bottom:env(safe-area-inset-bottom,0px)}
}
@media(max-width:767.98px){
 /* iOS should not zoom the page when a customer focuses a form field. */
 body:not(.zv-mk-admin) :is(.zv-option-block,.zv-artwork-upload,.zv-main) :is(select,textarea,input:not([type=checkbox]):not([type=radio])){font-size:max(16px,1em)}
 body.zv-mk-admin .zv-admin-content .aligned .form-row>.flex-container{display:flex;flex-direction:column;align-items:stretch;gap:6px}
 body.zv-mk-admin .zv-admin-content .aligned .form-row>label,
 body.zv-mk-admin .zv-admin-content .aligned .flex-container>label{float:none!important;width:auto!important;flex-basis:auto!important;padding-bottom:6px}
 body.zv-mk-admin .zv-admin-content .aligned :is(.help,p.help,div.help){margin-left:0!important;padding-left:0!important}
 body.zv-mk-admin .zv-admin-content .submit-row{display:flex!important;flex-wrap:wrap!important;gap:8px!important;max-width:100%;box-sizing:border-box}
 body.zv-mk-admin .zv-admin-content .submit-row :is(input,a,button){white-space:normal!important;max-width:100%!important;margin:0!important}
 body.zv-mk-admin .zv-bulk-upload .module{padding:12px!important}
 body.zv-mk-admin .zv-bulk-upload .bulk-field{min-width:0}
 body.zv-mk-admin .zv-bulk-upload input[type=file]{width:100%;max-width:100%}
 .zv-artwork-upload .card-body{padding:16px!important}
 .zv-artwork-upload .btn{max-width:100%;white-space:normal}
 .zv-portal .zv-main,.zv-portal .zv-side{padding:16px}
 /* Only the editor shell follows viewport chrome/keyboard changes, never Fabric dimensions. */
 html.editor-document .studio-app.editor-shell{height:var(--zv-visible-height,100dvh)!important;width:100%!important;top:var(--zv-visible-top,0px)!important;bottom:auto!important}
 html.editor-document .studio-app.editor-shell .studio-topbar{
  height:auto!important;min-height:104px!important;max-height:none!important;
  grid-template-rows:minmax(36px,auto) minmax(44px,auto)!important;
  padding-top:calc(10px + env(safe-area-inset-top,0px))!important;
  padding-left:max(10px,env(safe-area-inset-left,0px))!important;
  padding-right:max(10px,env(safe-area-inset-right,0px))!important;
 }
 html.editor-document .studio-app.editor-shell .studio-topbar .studio-primary-actions{
  display:flex!important;flex-wrap:nowrap!important;overflow-x:auto!important;overflow-y:hidden!important;
  min-width:0!important;scrollbar-width:thin;gap:6px!important;
 }
 html.editor-document .studio-app.editor-shell .studio-topbar .studio-primary-actions :is(#threeDViewBtn,#downloadBtn,#saveDraftBtn,#saveBtn){
  display:flex!important;flex:1 0 auto!important;width:auto!important;min-width:58px!important;
  max-width:none!important;height:auto!important;min-height:44px!important;padding:8px!important;white-space:nowrap!important;
 }
 html.editor-document .studio-app.editor-shell .canvas-area.studio-workspace,
 html.editor-document .studio-app.editor-shell.zv-panel-collapsed .canvas-area.studio-workspace{
  top:var(--zv-editor-header,104px)!important;bottom:calc(64px + env(safe-area-inset-bottom,0px))!important;width:100%!important;
 }
 html.editor-document .studio-app.editor-shell .studio-rail{
  height:calc(64px + env(safe-area-inset-bottom,0px))!important;min-height:64px!important;
  padding-bottom:env(safe-area-inset-bottom,0px)!important;box-sizing:border-box!important;width:100%!important;
 }
 html.editor-document .studio-app.editor-shell .studio-panel.editor-sidebar{
  position:absolute!important;bottom:calc(72px + env(safe-area-inset-bottom,0px))!important;
  height:min(520px,calc(var(--zv-visible-height,100dvh) - var(--zv-editor-header,104px) - 80px - env(safe-area-inset-bottom,0px)))!important;
  max-height:calc(var(--zv-visible-height,100dvh) - var(--zv-editor-header,104px) - 80px - env(safe-area-inset-bottom,0px))!important;
 }
 html.editor-document .studio-app.editor-shell #contextToolbar .zv-text-edit-popup{top:calc(var(--zv-visible-top,0px) + var(--zv-editor-header,104px) + 52px)!important;max-height:40dvh;overflow-y:auto}
 html.editor-document .studio-app.editor-shell .studio-canvas-scroll{justify-content:flex-start!important;align-items:flex-start!important}
 html.editor-document .studio-app.editor-shell .canvas-stage{max-width:none!important;flex-shrink:0!important}
 html.editor-document .studio-app.editor-shell #contextToolbar .context-controls{min-width:0!important;flex:1 1 auto!important}
}
@media(min-width:768px) and (max-width:1023.98px){
 html.editor-document .studio-app.editor-shell .studio-topbar{height:auto!important;min-height:72px!important;max-height:none!important;flex-wrap:wrap!important;overflow:visible!important}
 html.editor-document .studio-app.editor-shell .studio-topbar .studio-primary-actions{min-width:0!important;max-width:100%!important;flex:1 1 auto!important;overflow-x:auto!important}
 html.editor-document .studio-app.editor-shell .studio-rail{top:var(--zv-editor-header,72px)!important;height:auto!important;bottom:0!important}
 html.editor-document .studio-app.editor-shell main.canvas-area.studio-workspace{top:var(--zv-editor-header,72px)!important}
 html.editor-document .studio-app.editor-shell .studio-panel.editor-sidebar{top:calc(var(--zv-editor-header,72px) + 52px)!important;max-width:calc(100vw - 88px)!important}
}
@media(max-width:479.98px){
 body.zv-mk-admin.change-list #changelist .zv-filter-item{flex-basis:100%!important;min-width:0!important}
 .zv-product-info-card .main-title{font-size:clamp(22px,6vw,30px);overflow-wrap:anywhere}
}
