/* Yarrow Studio — Image PDFs. Uses the page's own variables and the BTS page's
   shared pieces (.bts-head, .bts-toolbar, table.bts-list, .bts-thumb, .bts-drop,
   .bts-modal-*), so the two pages look like one thing. */

#pagePdfs .btn.sm, #pdfsModal .btn.sm { min-height: 34px; padding: 7px 12px; border-radius: 10px; font-size: 11.5px; gap: 7px; text-decoration: none; }
#pdfsOverlay .modal { width: min(820px, 100%); }

/* ---- the list ---- */
table.pdfs-list td { white-space: nowrap; }
table.pdfs-list td:first-child { white-space: normal; }
table.pdfs-list tr.flat { cursor: default; }
table.pdfs-list tr.flat:hover td { background: none; }
table.pdfs-list td.pdfs-acts { width: 1%; }
.pdfs-chip { display: inline-flex; align-items: center; gap: 7px; max-width: 320px; padding: 5px 10px 5px 8px; border: 1px solid var(--line); border-radius: 10px; background: var(--panel); color: var(--text); font-size: 11.5px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pdfs-same { display: inline-flex; align-items: center; gap: 7px; color: var(--muted); font-size: 11.5px; }
.pdfs-ok { display: inline-flex; padding: 4px 11px; border-radius: 999px; background: var(--good-bg); color: var(--good); font-size: 11px; font-weight: 600; white-space: nowrap; }
.pdfs-acts { display: flex; flex-wrap: wrap; gap: 8px; }
#pagePdfs .btn.pdfs-danger { color: var(--bad); }
#pagePdfs .btn.pdfs-danger:hover:not(:disabled) { background: var(--bad-bg); border-color: var(--bad); }

/* ---- one image ---- */
.pdfs-cards { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
.pdfs-cards.one { grid-template-columns: minmax(0, 720px); }
.pdfs-card { margin-bottom: 0; padding: 20px; display: flex; flex-direction: column; gap: 16px; }
.pdfs-card-head { display: flex; align-items: center; gap: 14px; min-width: 0; }
.pdfs-card-head > div { min-width: 0; flex: 1; }
.pdfs-card-head small { display: block; color: var(--muted); font-size: 10.5px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; }
.pdfs-card-head b { display: block; margin-top: 3px; font-size: 14.5px; font-weight: 600; letter-spacing: -.01em; }
.pdfs-file { display: flex; gap: 16px; padding: 16px; border-radius: 16px; background: var(--tint); border: 1px solid var(--line-2); }
.pdfs-file > div { display: flex; flex-direction: column; gap: 6px; min-width: 0; flex: 1; }
.pdfs-file b { display: flex; align-items: center; gap: 8px; font-size: 13.5px; font-weight: 600; overflow-wrap: anywhere; }
.pdfs-file small { color: var(--muted); font-size: 12px; }
.pdfs-file .pdfs-acts { margin-top: auto; padding-top: 8px; }
.pdfs-cover { position: relative; display: flex; align-items: center; justify-content: center; flex: 0 0 auto; width: 200px; aspect-ratio: 1.414 / 1; border-radius: 8px; overflow: hidden; background: var(--panel-2); color: var(--faint); }
.pdfs-cover.sm { width: 118px; }
.pdfs-cover img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: block; }
.pdfs-cover > svg { width: 22px; height: 22px; }
.pdfs-nofile { padding: 18px; border: 1.5px dashed var(--line); border-radius: 16px; color: var(--muted); font-size: 12.5px; }
.pdfs-nofile > div { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.pdfs-where { margin-top: 18px; padding: 16px 20px; display: flex; flex-wrap: wrap; gap: 6px 14px; align-items: baseline; font-size: 12.5px; color: var(--muted); }
.pdfs-where b { color: var(--text); font-weight: 600; }

/* ---- Add PDFs ---- */
.pdfs-rows { display: flex; flex-direction: column; }
.pdfs-row { display: flex; gap: 16px; padding: 16px 0; border-bottom: 1px solid var(--line-2); }
.pdfs-row:first-child { padding-top: 0; }
.pdfs-row:last-child { border-bottom: 0; padding-bottom: 0; }
.pdfs-row > div { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 10px; }
.pdfs-row-top { display: flex; align-items: baseline; gap: 10px; min-width: 0; }
.pdfs-row-top b { font-size: 13.5px; font-weight: 600; overflow-wrap: anywhere; }
.pdfs-row-top small { color: var(--muted); font-size: 12px; white-space: nowrap; }
.pdfs-row-top .modal-close { margin-left: auto; align-self: center; width: 30px; height: 30px; flex-basis: 30px; }
.pdfs-link { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.pdfs-link > span:first-child { width: 48px; color: var(--muted); font-size: 12px; }
.pdfs-link input[type="text"] { flex: 1; min-width: 220px; min-height: 40px; padding: 0 12px; border: 1px solid var(--line); border-radius: 12px; background: var(--panel); color: var(--text); font-size: 13px; font-weight: 600; }
.pdfs-link input[type="text"]:focus { outline: 0; border-color: var(--muted); }
.pdfs-link select { min-height: 40px; padding: 0 30px 0 12px; border: 1px solid var(--line); border-radius: 12px; background: var(--panel); color: var(--text); font-size: 12.5px; }
.pdfs-to { display: inline-flex; align-items: center; gap: 10px; font-size: 13px; font-weight: 600; }
.pdfs-what { color: var(--muted); font-size: 12px; line-height: 1.5; }
.pdfs-what .err, .pdfs-row .err { color: var(--bad); }
.pdfs-row .lines { margin-top: 0; }
.search-box.pdfs-wide { max-width: none; }
.pdfs-picklist { display: flex; flex-direction: column; max-height: 46vh; overflow: auto; border: 1px solid var(--line); border-radius: 16px; background: var(--panel); }
.pdfs-picklist button { display: grid; grid-template-columns: 18px 1fr; gap: 2px 10px; align-items: center; padding: 12px 16px; border: 0; border-bottom: 1px solid var(--line-2); background: none; color: var(--text); text-align: left; }
.pdfs-picklist button:last-child { border-bottom: 0; }
.pdfs-picklist button:hover { background: var(--tint); }
.pdfs-picklist b { font-size: 13px; font-weight: 600; overflow-wrap: anywhere; }
.pdfs-picklist small { grid-column: 2; color: var(--muted); font-size: 11.5px; }

@media (max-width: 900px) {
  .pdfs-cards { grid-template-columns: minmax(0, 1fr); }
  .pdfs-file { flex-direction: column; }
  .pdfs-cover { width: 100%; }
}
