/* STL, 3MF and OBJ tool (mesh.js). Shared pieces are in tools.css. */
.tool{--mesh-ok:#1F7A3A} /* "closed: yes"; the site has an error colour (--err) but no success colour */
.mesh-input{position:absolute;width:1px;height:1px;opacity:0;pointer-events:none}
.mesh-small{font-size:13px;color:var(--gray);max-width:34ch}
.tool-drop .tool-btn{margin:2px 0}
/* The same part icon as the STEP tool's drop zone */
[data-tool=mesh] .tool-drop::before{content:"";width:32px;height:32px;margin-bottom:2px;background:var(--blue);
  --icon:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 2.5 20.5 7v10L12 21.5 3.5 17V7z M3.5 7 12 11.5 20.5 7 M12 11.5v10' fill='none' stroke='black' stroke-width='1.5' stroke-linejoin='round'/%3E%3C/svg%3E");
  -webkit-mask:var(--icon) center/contain no-repeat;mask:var(--icon) center/contain no-repeat}
/* Reset view floats on the stage, like the STEP tool's (chip material in tools.css). It is placed against the card
   (.tool), whose first child is the stage. The bar fades with opacity only, so this stays put while it fades in. In
   tab order it comes straight after the canvas, before "Open another file". */
.tool-bar [data-reset]{position:absolute;top:12px;right:12px;z-index:1;padding:0 14px;font-size:13.5px}
.mesh-save{display:flex;flex-wrap:wrap;align-items:center;gap:10px;padding:2px var(--pad) 16px;transition:opacity 240ms var(--ease-out)}
@starting-style{.mesh-save{opacity:0}}
.mesh-save[hidden],.tool-bar[hidden]{display:none}
.mesh-save-label{font-size:13.5px;color:var(--gray);margin-right:4px}
.tool-stats b.mesh-ok{color:var(--mesh-ok)}
.tool-stats b.mesh-bad{color:var(--err)}
.mesh-save:not([hidden])+.tool-note{padding-top:0}
.tool-progress i>span.mesh-indeterminate{width:100%;animation:mesh-pulse 1.2s ease-in-out infinite alternate}
@keyframes mesh-pulse{from{opacity:.35}to{opacity:1}}
@media (max-width:560px){
  /* Converter pages: the download is the main action, so "Open another file" above it is a quiet text button rather
     than a full-width one competing with it. */
  .tool:has(.mesh-save .primary) [data-open]{flex:0 0 auto;height:44px;margin-left:-8px;padding:0 8px;border-color:transparent;background:none;color:var(--blue)}
  .mesh-save .tool-btn{flex:1 1 0}
  .mesh-save .tool-btn.primary{flex-basis:100%}
  .mesh-save-label{flex-basis:100%}
}
@media (prefers-reduced-motion:reduce){.tool-progress i>span.mesh-indeterminate{animation:none}}
