/* Word to PDF and Excel to PDF. Tokens, header, footer and the drop zone come from the site stylesheet. */
.intro h1 { font-size: 22px; margin: 0 0 12px; }
.dropzone.chosen .dz-btn { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.pw { margin: 4px 0 0; }
.pw label { display: block; font-weight: 600; margin-bottom: 6px; }
.pw label .muted { font-weight: 400; }
.pw-row { display: flex; gap: 8px; }
.pw-row input {
  flex: 1; min-width: 0; font: inherit; padding: 8px 10px;
  border: 1px solid var(--line); border-radius: 6px; background: var(--panel); color: var(--text);
}
.pw-row input:focus { outline: 2px solid var(--accent); outline-offset: 1px; border-color: transparent; }
.pw-row button { background: var(--accent); color: #fff; border-color: transparent; padding: 8px 18px; font-weight: 600; }

/* With JS the password box only appears once the file turns out to need one. */
form.js .pw[data-optional] { display: none; }

.status { min-height: 1.45em; margin: 14px 0 0; }
.status:empty { margin: 0; }
.status.ok { color: var(--ok); }
.status.error { color: var(--err); white-space: pre-wrap; }
form.busy .dropzone, form.busy .pw-row { opacity: .6; pointer-events: none; }

/* Preview of the PDF, shown in the browser's own PDF viewer. */
.preview { margin: 16px 0 20px; scroll-margin-top: 64px; }
.preview-bar { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 10px; }
.preview-name { font-weight: 600; min-width: 0; overflow-wrap: anywhere; }
.dl-btn { background: var(--accent); color: #fff; padding: 9px 18px; border-radius: 8px; font-weight: 600; text-decoration: none; white-space: nowrap; }
.dl-btn:hover { filter: brightness(1.08); }
.preview-actions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.open-btn { padding: 8px 16px; border-radius: 8px; border: 1px solid var(--line); background: var(--panel); color: var(--text); font-weight: 600; text-decoration: none; white-space: nowrap; }
.open-btn:hover { background: var(--head); }
.preview-frame { display: block; width: 100%; height: 75vh; min-height: 420px; border: 1px solid var(--line); border-radius: 8px; background: var(--panel); }
.preview-none { margin: 0; }

/* Conversion takes a few seconds: a slim indeterminate bar under the status line. */
.status.working::after {
  content: ""; display: block; height: 3px; margin-top: 8px; border-radius: 2px;
  background: linear-gradient(90deg, transparent, var(--accent), transparent) 0 0 / 40% 100% no-repeat, var(--line);
  animation: slide 1.1s linear infinite;
}
@keyframes slide { from { background-position: -40% 0, 0 0; } to { background-position: 140% 0, 0 0; } }
@media (prefers-reduced-motion: reduce) { .status.working::after { animation: none; } }
