@import url('/tools/zt/eng/pdf/workbench.css');

.zt-bar:not(.is-ready) + .zt-explain {
  display: none;
}

@media (min-width: 1001px) {
  #tool {
    display: grid;
    grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
    grid-template-areas: 'instruction instruction' 'error error' 'source presets';
    column-gap: 24px;
  }
  #tool > * {
    grid-column: 1 / -1;
  }
  #tool .zt-do {
    grid-area: instruction;
    margin-bottom: 4px;
  }
  #tool > .zt-error {
    grid-area: error;
  }
  #tool .pdf-source {
    grid-area: source;
  }
  #tool .zt-ux-presets {
    grid-area: presets;
    align-self: start;
  }
}

@media (max-width: 620px) {
  #tool .zt-bar.is-docked:not(.is-ready) {
    grid-template-columns: minmax(0, 1fr) auto;
    padding-block: 4px max(4px, env(safe-area-inset-bottom));
  }
  #tool .zt-bar.is-docked:not(.is-ready) .zt-summary {
    grid-area: 1 / 1 / 2 / -1;
    white-space: normal;
  }
  #tool .zt-bar.is-docked:not(.is-ready) .zt-primary { grid-area: 2 / 1; }
  #tool .zt-bar.is-docked:not(.is-ready) [data-action='inline'] { grid-area: 2 / 2; }
}

@media (max-width: 620px) {
  #tool .zt-bar.is-ready {
    position: static;
    padding: 12px;
    border-radius: var(--r-sm);
    box-shadow: none;
  }
  #tool .zt-bar.is-ready .zt-summary {
    white-space: normal;
  }
  #tool .zt-bar.is-ready .zt-primary {
    position: fixed;
    inset: auto max(12px, env(safe-area-inset-right)) max(8px, env(safe-area-inset-bottom)) max(12px, env(safe-area-inset-left));
    z-index: 3;
    width: auto;
    box-shadow: 0 0 0 8px var(--ws);
  }
}

@media (max-width: 620px) {
  #tool:not(:has(.zt-file)) { display: flex; flex-direction: column; }
  #tool:not(:has(.zt-file)) .pdf-work { display: contents; }
  #tool:not(:has(.zt-file)) .zt-bar { order: 1; padding: 8px; }
  #tool:not(:has(.zt-file)) :is(.zt-ux-presets, .pdf-settings, .zt-next-tool) { order: 2; }
}

#tool .zt-sample + .zt-hint { display: block; }

.blank-page-preview {
  width: 70%;
  height: 85%;
  max-width: 6rem;
  background: white;
  border: 1px solid var(--ws-line);
}
