/*
 * MiniLink PDF tool (MINI-003B): styles for pages/pdf.php only. Uses the tokens and
 * components of minilink.css (loaded first); nothing here changes another page.
 */
.pdf-op h4 { font: 500 12px/1.3 var(--mono); letter-spacing: .08em; text-transform: uppercase; margin: 22px 0 10px; }
.pdf-lead { max-width: 62ch; }
.pdf-nojs { padding: 12px 14px; border: 1.5px dashed var(--ink); background: var(--paper-2); }
.pdf-note { max-width: 70ch; }

.pdf-drop { padding: 16px; border: 2px dashed var(--ink); background: var(--paper-2); }
.pdf-drop.is-dragover { background: var(--lime); border-style: solid; }
.pdf-drop .field-label { margin-bottom: 8px; }
.pdf-drop .input { background: #fff; padding: 9px 12px; }
.pdf-drop .form-hint { margin-top: 10px; }

.pdf-error { margin: 16px 0 0; padding: 12px 14px; border: 1.5px solid var(--err); background: #fde8e4; color: var(--err); font-size: 15px; }
.pdf-error ul { margin: 6px 0 0; padding-left: 20px; }
.pdf-field-error { margin-top: 8px; padding: 10px 12px; border: 1.5px solid var(--err); background: #fde8e4; color: var(--err); font-size: 15px; }
.pdf-field-error ul { margin: 0; padding-left: 20px; }
.input[aria-invalid="true"] { border-color: var(--err); box-shadow: 0 0 0 2px var(--err); }

.pdf-empty { margin: 0; color: var(--muted); }
.pdf-list { list-style: none; display: grid; gap: 10px; margin: 0 0 4px; }
.pdf-item { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px 14px; padding: 12px; border: 1.5px solid var(--ink); background: #fff; }
.pdf-item-main { display: flex; align-items: center; gap: 12px; flex: 1 1 220px; min-width: 0; }
.pdf-item-main > div { min-width: 0; display: flex; flex-direction: column; }
.pdf-item-index { flex: none; display: grid; place-items: center; width: 34px; height: 34px; border: 1.5px solid var(--ink); border-radius: 50%; background: var(--lime); font: 500 12px var(--mono); }
.pdf-item-name { overflow-wrap: anywhere; }
.pdf-item-meta { font-size: 14px; color: var(--muted); }
.pdf-item-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.btn.pdf-btn-sm { min-height: 44px; padding: 0 12px; font-size: 11px; background: #fff; }
.btn.pdf-btn-sm:hover:not(:disabled) { background: var(--ink); color: var(--lime); }
.btn.pdf-btn-sm:disabled { background: var(--paper-2); color: var(--muted); }

.pdf-doc { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px 14px; margin: 16px 0 0; padding: 12px; border: 1.5px solid var(--ink); background: #fff; }
.pdf-doc-text { flex: 1 1 220px; min-width: 0; overflow-wrap: anywhere; font-weight: 700; }
.pdf-op .field { margin-top: 16px; }

.pdf-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 18px; }
.pdf-status { min-height: 1.5em; margin-top: 14px; font: 500 13px/1.5 var(--mono); }
.pdf-op [aria-busy="true"] .pdf-status { background: linear-gradient(90deg, transparent, rgba(215, 251, 86, .6), transparent); background-size: 200% 100%; animation: pdf-busy 1.4s linear infinite; }
@keyframes pdf-busy { from { background-position: 100% 0; } to { background-position: -100% 0; } }

.pdf-result { margin-top: 22px; padding: 18px; border: 1.5px solid var(--ink); background: var(--lime); box-shadow: 4px 5px 0 var(--ink); }
.pdf-result:focus-visible { outline-offset: 4px; }
.pdf-result h4 { margin-top: 0; }
.pdf-result p { margin: 0; }
.btn.btn-lime.pdf-download { background: #fff; }
.btn.btn-lime.pdf-download:hover { background: var(--ink); color: var(--lime); }

@media (max-width: 560px) {
  .pdf-actions .btn { width: 100%; }
  .pdf-item-actions { width: 100%; }
  .pdf-item-actions .btn { flex: 1 1 auto; }
  .pdf-drop { padding: 12px; }
}
