@import url('/tools/merge-images/workbench.css');

#tool > .zt-do { margin-bottom: 6px; }
.photo-work {
  grid-template-areas: "source layout" "source controls" "files controls";
  grid-template-rows: auto auto 1fr;
  align-items: start;
}
.photo-source { grid-area: source; }
.photo-layout { grid-area: layout; }
.photo-controls { grid-area: controls; }
.photo-work > .zt-files { grid-area: files; }
.photo-layout-chips,
#photo-limit:empty { display: none; }
#photo-limit { margin: 8px 0; }
.photo-layout select { min-height: 44px; font-size: 1rem; }
.photo-work > *,
.photo-controls,
.photo-fields {
  min-width: 0;
}
.photo-controls,
.photo-fields {
  display: grid;
  gap: 10px;
}
.photo-controls details {
  border-top: 1px solid var(--ws-line);
}
.photo-controls summary {
  cursor: pointer;
  padding: 12px 0;
  min-height: 44px;
  font-weight: 600;
}
.photo-controls .zt-field {
  margin: 0;
}
.photo-controls input,
.photo-controls select {
  font-size: 16px;
  min-height: 44px;
  max-width: 100%;
}
.photo-controls input[type='color'] {
  width: 100%;
}
.photo-controls input[type='checkbox'] {
  align-self: start;
  width: 24px;
}
.photo-work figure {
  margin: 14px 0 0;
  text-align: center;
  padding: 12px;
  background: var(--ws-2);
  border: 1px solid var(--ws-line);
  border-radius: 8px;
}
.photo-work canvas#preview {
  display: block;
  width: auto;
  height: auto;
  max-width: 100%;
  max-height: 420px;
  margin: auto;
  background: repeating-conic-gradient(#ddd 0 25%, #fff 0 50%) 0 0/16px 16px;
}
.photo-work canvas.draggable {
  touch-action: none;
  cursor: grab;
}
.photo-work figcaption {
  margin-top: 8px;
  font-size: 14px;
}
.photo-work [hidden] {
  display: none !important;
}
.photo-work .zt-file {
  grid-template-columns: auto auto minmax(0, 1fr) auto;
}
.photo-work .zt-file .actions {
  gap: 8px;
}
.photo-work .zt-file .actions button {
  min-width: 32px;
  min-height: 32px;
}
.photo-work .zt-files {
  overflow-wrap: anywhere;
}
@media (max-width: 620px) {
  .photo-work {
    grid-template-areas: "source" "layout" "files" "controls";
    grid-template-rows: auto;
  }
  .photo-layout .photo-layout-select { display: none; }
  .photo-layout-chips { display: flex; flex-wrap: wrap; gap: 6px; }
  .photo-layout-chips [aria-pressed="true"] {
    background: var(--ws-ink);
    color: var(--ws);
  }
  .photo-layout-chips button { min-height: 44px; }
  .photo-work canvas#preview { max-height: 42svh; }
  .photo-work .zt-file {
    grid-template-columns: 26px minmax(0, 1fr) auto;
  }
  .photo-work .zt-file .actions {
    gap: 8px;
  }
  .photo-work .zt-file .actions button {
    width: 32px;
  }
}
