/* eetZA menu-item focal point and zoom for the standard menu card. */

body.menu-item-editor-screen .mie-item-crop-editor{
  grid-template-columns:132px minmax(0,1fr)!important;
  gap:12px!important;
  align-items:start!important;
}
body.menu-item-editor-screen .mie-item-crop-preview-column{display:grid;gap:6px;min-width:0}
body.menu-item-editor-screen .mie-item-crop-preview-label{display:grid;gap:1px;color:#52636c;line-height:1.2}
body.menu-item-editor-screen .mie-item-crop-preview-label strong{font-size:10px;color:#2e1618}
body.menu-item-editor-screen .mie-item-crop-preview-label span{font-size:8.5px;font-weight:800;color:#b41921}
body.menu-item-editor-screen .mie-item-crop-frame{
  position:relative!important;
  display:grid!important;
  width:100%!important;
  min-height:0!important;
  place-items:center!important;
  overflow:hidden!important;
  border:2px solid #e9acaf!important;
  border-radius:15px!important;
  background:#eef6fa!important;
  box-shadow:0 0 0 3px rgba(185,35,47,.06)!important;
  touch-action:none;
  cursor:grab;
  user-select:none;
  -webkit-user-select:none;
}
body.menu-item-editor-screen .mie-item-crop-frame:active{cursor:grabbing}
body.menu-item-editor-screen .mie-item-crop-frame:focus-visible{outline:3px solid rgba(185,35,47,.28);outline-offset:3px}
body.menu-item-editor-screen .mie-item-crop-frame img{
  position:absolute;
  inset:0;
  display:block;
  width:100%;
  height:100%;
  max-width:none;
  object-fit:cover;
  transform:scale(var(--mie-item-image-scale,1));
  pointer-events:none;
  will-change:transform,object-position;
}
body.menu-item-editor-screen .mie-item-crop-frame img[hidden]{display:none!important}
body.menu-item-editor-screen .mie-item-crop-frame>span{position:relative;z-index:1;font-size:34px}
body.menu-item-editor-screen .mie-item-crop-frame>span[hidden]{display:none!important}
body.menu-item-editor-screen .mie-item-crop-template-standard{aspect-ratio:2/3!important}
body.menu-item-editor-screen .mie-item-crop-hint{display:block;color:#62747d;font-size:8.5px;font-weight:750;line-height:1.25}
body.menu-item-editor-screen .mie-item-crop-hint::before{content:'✥';margin-right:4px;color:var(--color-brand)}
body.menu-item-editor-screen .mie-item-crop-zoom-row{
  display:grid;
  grid-template-columns:38px minmax(0,1fr) 38px 58px;
  gap:6px;
  align-items:end;
}
body.menu-item-editor-screen .mie-item-crop-zoom-row>button{
  min-height:var(--eetza-control-height-max,34px);
  padding:0 7px;
  border:1px solid #b9dfeb;
  border-radius:11px;
  background:#fff;
  color:#a9171f;
  font:inherit;
  font-size:18px;
  font-weight:900;
  cursor:pointer;
}
body.menu-item-editor-screen .mie-item-crop-zoom-row>button:active{transform:translateY(1px)}
body.menu-item-editor-screen .mie-item-crop-zoom-row>.mie-item-crop-reset{font-size:9px}
body.menu-item-editor-screen .mie-item-crop-zoom-row label{display:grid;grid-template-columns:auto minmax(0,1fr);gap:6px;align-items:center;min-width:0}
body.menu-item-editor-screen .mie-item-crop-zoom-row label span{font-size:9px;white-space:nowrap}
body.menu-item-editor-screen .mie-item-crop-zoom-row input[type=range]{min-height:var(--eetza-control-height-max,34px);padding:0;border:0;box-shadow:none;accent-color:var(--color-brand)}
body.menu-item-editor-screen .mie-item-crop-editor[data-has-photo="0"] .mie-item-crop-hint,
body.menu-item-editor-screen .mie-item-crop-editor[data-has-photo="0"] .mie-item-crop-zoom-row{display:none!important}

/* The saved focal point and zoom are reused by the standard customer menu. */
.discovery-product-image>img[data-product-rail-image],
.eetza-product-media-v35at>img[data-product-rail-image],
html.eetza-store-detail-page body.seller-detail-page .store-menu-card .marketplace-card-image>img[data-menu-image-open]{
  object-position:var(--item-image-position,50% 50%)!important;
  transform:scale(var(--item-image-scale,1))!important;
  transform-origin:var(--item-image-origin,var(--item-image-position,50% 50%))!important;
  will-change:transform,object-position;
}
html.eetza-store-detail-page body.seller-detail-page .store-menu-card .marketplace-card-image{overflow:hidden!important}

@media(max-width:520px){
  body.menu-item-editor-screen .mie-item-crop-editor{grid-template-columns:1fr!important;gap:10px!important}
  body.menu-item-editor-screen .mie-item-crop-preview-column{width:100%!important}
  body.menu-item-editor-screen .mie-item-crop-frame{width:min(100%,220px)!important;aspect-ratio:1/1!important;justify-self:center!important}
  body.menu-item-editor-screen .mie-item-crop-editor[data-has-photo="0"] .mie-item-crop-preview-column{width:min(100%,160px)!important;justify-self:center!important}
  body.menu-item-editor-screen .mie-item-crop-editor[data-has-photo="0"] .mie-item-crop-frame{width:160px!important}
  body.menu-item-editor-screen .mie-item-crop-zoom-row{grid-template-columns:36px minmax(0,1fr) 36px 54px;gap:5px}
  body.menu-item-editor-screen .mie-item-crop-zoom-row>button{min-height:var(--eetza-control-height-max,34px)}
}
@media(max-width:350px){
  body.menu-item-editor-screen .mie-item-crop-editor{grid-template-columns:1fr!important;gap:8px!important}
  body.menu-item-editor-screen .mie-item-crop-zoom-row{grid-template-columns:34px minmax(0,1fr) 34px}
  body.menu-item-editor-screen .mie-item-crop-zoom-row>.mie-item-crop-reset{grid-column:1/-1;min-height:32px}
}
@media(prefers-reduced-motion:reduce){
  body.menu-item-editor-screen .mie-item-crop-frame img,
  .discovery-product-image>img[data-product-rail-image],
  html.eetza-store-detail-page body.seller-detail-page .store-menu-card .marketplace-card-image>img[data-menu-image-open]{will-change:auto}
}
