/* UI Pro Max Workflow Pass 2 — touch safety, action focus, financial hierarchy */

/* Mobile action targets: keep compact layout while meeting the 44px minimum target. */
#menuList .menu-table-actions .secondary,
#ingredientList .ib-table-row .ib-ingredient-actions .secondary,
#view-menu .entity-actions button,
#view-menu .ux-recipe-action{
  min-height:44px!important;
}

#menuList .menu-table-actions button:focus-visible,
#ingredientList .ib-table-row .ib-ingredient-actions button:focus-visible,
#view-menu .entity-actions button:focus-visible,
#view-menu .ux-recipe-action:focus-visible{
  outline:3px solid rgba(49,85,180,.32)!important;
  outline-offset:2px!important;
  box-shadow:0 0 0 2px #fff!important;
}

.ux-pass2-action-group,
.ux-pass2-entity-actions{
  scroll-margin-bottom:118px;
}

/* Direct Recipe access in expanded Menu rows, reusing the existing Edit -> Recipe flow. */
#menuList .menu-table-actions.ux-pass2-has-direct-recipe{
  grid-template-columns:minmax(0,1fr) repeat(3,auto)!important;
}

/* Unified action geometry: Recipe / Edit / Delete share the same frame; only semantic color differs. */
#menuList .menu-table-actions.ux-pass2-has-direct-recipe>.secondary{
  min-height:44px!important;
  height:44px!important;
  min-width:78px!important;
  padding:0 14px!important;
  border:1px solid #dfe5ee!important;
  border-radius:14px!important;
  box-shadow:none!important;
  display:inline-flex!important;
  align-items:center!important;
  justify-content:center!important;
  font-weight:800!important;
  line-height:1!important;
  text-align:center!important;
}
#menuList .menu-table-actions.ux-pass2-has-direct-recipe>.ux-pass2-direct-recipe{
  background:#eef3ff!important;
  color:#3155b4!important;
}
#menuList .menu-table-actions.ux-pass2-has-direct-recipe>[data-edit-menu]{
  background:#eef6f1!important;
  color:#315443!important;
}
#menuList .menu-table-actions.ux-pass2-has-direct-recipe>.secondary:last-of-type{
  background:#fff0f0!important;
  color:#b42318!important;
}

/* Recipe title should wrap naturally instead of ending in a hard single-line ellipsis. */
#view-menu .ux-recipe-panel-head{
  align-items:flex-start!important;
}
#view-menu #uxRecipeTitle{
  white-space:normal!important;
  overflow:visible!important;
  text-overflow:clip!important;
  overflow-wrap:anywhere;
  line-height:1.25;
}
#view-menu .ux-recipe-panel-copy small{
  line-height:1.35;
}

/* Make the already-approved profit result the first visual answer, without changing formulas. */
#view-pricing .pbc-grid .pbc-highlight.ux-pass2-financial-primary{
  border-width:2px!important;
  box-shadow:0 8px 22px rgba(23,99,60,.08)!important;
}
#view-pricing .pbc-grid .pbc-highlight.ux-pass2-financial-primary strong{
  font-size:1.65rem!important;
  letter-spacing:-.02em;
}
#view-pricing .pbc-grid .pbc-highlight.ux-pass2-financial-primary small{
  color:#65746d!important;
  font-weight:700;
  line-height:1.35;
}

#view-pricing #mpfCard .mpf-positive.ux-pass2-financial-primary{
  border-width:2px;
  box-shadow:0 7px 18px rgba(23,99,60,.06);
}
#view-pricing #mpfCard .mpf-positive.ux-pass2-financial-primary strong{
  font-size:1.32rem;
  letter-spacing:-.015em;
}
#view-pricing #mpfCard .mpf-monthly.ux-pass2-financial-monthly strong{
  font-size:1.42rem;
  letter-spacing:-.015em;
}

@media(max-width:430px){
  #menuList .menu-table-actions.ux-pass2-has-direct-recipe{
    grid-template-columns:repeat(3,minmax(0,1fr))!important;
    row-gap:8px!important;
  }
  #menuList .menu-table-actions.ux-pass2-has-direct-recipe>.ux-expanded-row-summary{
    grid-column:1/-1;
    padding-right:0;
  }
  #menuList .menu-table-actions.ux-pass2-has-direct-recipe>.secondary{
    width:100%!important;
    min-width:0!important;
  }
}

@media(max-width:390px){
  #menuList .menu-table-actions .secondary,
  #ingredientList .ib-table-row .ib-ingredient-actions .secondary{
    min-height:44px!important;
  }
  #view-pricing .pbc-grid .pbc-highlight.ux-pass2-financial-primary strong{
    font-size:1.52rem!important;
  }
}

@media(prefers-reduced-motion:reduce){
  #menuList .menu-table-actions button,
  #ingredientList .ib-table-row .ib-ingredient-actions button,
  #view-menu .entity-actions button{
    transition:none!important;
  }
}
