/* Tool-specific overrides for split-pdf-into-files.
   Site-wide design lives in /assets/css/site.css — edit that file to retheme everything.
   This file should remain small; only put rules here that are genuinely unique to this tool. */

/* Default state (no encrypted PDF): pages-per-chunk takes the full row width
   so it visually matches the upload box above. The :has() selector triggers
   while #defaultPwdRow still has the `hidden` attribute (display:none, so it
   doesn't participate in the grid). When the encryption probe reveals the
   password field, the rule no longer matches and both cells return to 50/50.
   Same behavior at every viewport — on mobile the parent grid is already a
   single column, so the override is a no-op there. */
.app .step-upload .split-settings-row:has(> #defaultPwdRow[hidden]) > .output-settings-row {
  grid-column: 1 / -1;
}

/* Desktop with the password shown: pages-per-chunk on the left, password on
   the right. Source order is password-first to keep the original mobile
   stack (password above pages-per-chunk) unchanged; this rule reorders only
   above the mobile breakpoint. */
@media (min-width: 721px) {
  .app .step-upload .split-settings-row > .output-settings-row:not(#defaultPwdRow) {
    order: -1;
  }
}
