/* ==========================================================================
   EmbrioLife — moduł „Wyniki badań (PDF)” (pliki.css) — ETAP 2 · podgląd (18.11).
   Tylko zmienne z style.css (jasny i ciemny motyw). Animacje wyłącznie transform/opacity;
   [data-noanim] (przełącznik w aplikacji) wyłącza je w całości (reguła w style.css).
   ========================================================================== */
.pl { margin-top: 18px; container-type: inline-size; }
.cols + .pl, .cols--mods + .pl, .wg + .pl { margin-top: 18px; }
.pl [hidden] { display: none !important; }
.pl .card__title svg { width: 20px; height: 20px; color: var(--brand); flex: none; }
.pl-stage { border-style: solid; border-color: var(--brand); color: var(--brand); background: var(--brand-soft); }
.pl-lead { margin: -4px 0 10px; color: var(--muted); font-size: 14.5px; overflow-wrap: break-word; }
.pl-badges { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 12px; }

.pl-msg { display: flex; gap: 10px; align-items: flex-start; padding: 10px 12px; border-radius: var(--radius-sm); font-size: 14px; margin: 0 0 12px; overflow-wrap: break-word; animation: pl-in .28s ease both; }
.pl-msg svg { width: 18px; height: 18px; flex: none; margin-top: 1px; }
.pl-msg--ok { background: var(--ok-soft); color: var(--text); }
.pl-msg--ok svg { color: var(--ok); }
.pl-msg--err { background: var(--danger-soft); color: var(--text); }
.pl-msg--err svg { color: var(--danger); }

.pl-list { list-style: none; margin: 0 0 12px; padding: 0; display: grid; gap: 8px; }
.pl-item { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 12px; align-items: center; padding: 12px; border: 1px solid var(--border); border-radius: var(--radius-sm); background: var(--surface); min-width: 0; animation: pl-in .3s ease both; }
.pl-item.is-new { border-color: var(--accent); background: var(--accent-soft); }
.pl-ico { position: relative; width: 40px; height: 46px; display: inline-flex; align-items: center; justify-content: center; color: var(--brand); flex: none; }
.pl-ico svg { width: 40px; height: 46px; stroke-width: 1.6; }
.pl-ico b { position: absolute; bottom: 7px; left: 50%; transform: translateX(-50%); font-size: 9.5px; font-weight: 800; letter-spacing: .04em; background: var(--brand); color: var(--on-brand); border-radius: 4px; padding: 0 4px; line-height: 15px; white-space: nowrap; }
.pl-main { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.pl-name { font-weight: 700; overflow-wrap: break-word; min-width: 0; }
.pl-name .badge { margin-left: 4px; vertical-align: 1px; }
.pl-opis { font-size: 14px; overflow-wrap: break-word; }
.pl-meta { display: flex; flex-wrap: wrap; gap: 2px 12px; font-size: 13px; color: var(--muted); }
.pl-who { display: inline-block; font-size: 11.5px; font-weight: 700; padding: 0 6px; border-radius: 6px; line-height: 18px; }
.pl-who--vet { background: var(--info-soft); color: var(--info); }
.pl-who--br { background: var(--accent-soft); color: var(--accent); }
.pl-note { font-size: 12.5px; color: var(--muted); }
.pl-act { display: flex; flex-wrap: wrap; gap: 6px; justify-content: flex-end; align-items: center; }
.pl-act .btn svg { width: 16px; height: 16px; }
.pl-del { color: var(--danger); }
.pl-del:hover { background: var(--danger-soft); }
.pl-confirm { display: inline-flex; flex-wrap: wrap; gap: 6px; align-items: center; font-weight: 700; font-size: 14px; animation: pl-in .2s ease both; }

.pl-empty { display: flex; gap: 12px; align-items: center; padding: 16px; border: 1px dashed var(--border-strong); border-radius: var(--radius-sm); color: var(--muted); margin-bottom: 12px; }
.pl-empty svg { width: 28px; height: 28px; flex: none; color: var(--brand); opacity: .8; }
.pl-empty p { margin: 0; }
.pl-empty strong { color: var(--text); }

.pl-sk { height: 70px; border-radius: var(--radius-sm); background: var(--surface-2); animation: pl-pulse 1.2s ease-in-out infinite alternate; }
.pl-actions { margin: 4px 0 0; }
.pl-full { margin: 0; flex: 1 1 100%; }
.pl-foot { margin: 12px 0 0; }

.pl-form { margin-top: 12px; padding: 14px; border: 1px solid var(--border); border-radius: var(--radius-sm); background: var(--surface-2); animation: pl-in .25s ease both; min-width: 0; }
.pl-form .field { margin-bottom: 12px; }
.pl-file { padding: 9px 10px; max-width: 100%; min-width: 0; font-size: 14px; }
.pl-file::file-selector-button { font: inherit; font-weight: 700; margin-right: 10px; padding: 6px 12px; border-radius: 8px; border: 1px solid var(--border-strong); background: var(--surface); color: var(--text); cursor: pointer; }
.pl-form .err { margin: 0 0 12px; }

.pl-up { margin-top: 12px; padding: 14px; border: 1px solid var(--border); border-radius: var(--radius-sm); background: var(--surface-2); }
.pl-up__top { display: flex; justify-content: space-between; gap: 10px; font-size: 14px; margin-bottom: 8px; min-width: 0; }
.pl-up__name { font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.pl-up__pct { font-variant-numeric: tabular-nums; color: var(--muted); flex: none; }
.pl-prog { height: 8px; border-radius: 8px; background: var(--border); overflow: hidden; margin-bottom: 12px; }
.pl-prog__bar { display: block; height: 100%; width: 100%; background: var(--brand); transform-origin: left center; transition: transform .2s ease; }

@keyframes pl-in { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }
@keyframes pl-pulse { from { opacity: .55; } to { opacity: 1; } }

@media (max-width: 560px) {
  .card.pl { padding: 16px 14px; }
  .pl-item { grid-template-columns: auto minmax(0, 1fr); padding: 10px; gap: 10px; }
  .pl-act { grid-column: 1 / -1; justify-content: flex-start; }
  .pl-act .btn { flex: 1 1 auto; }
  .pl-confirm { width: 100%; }
  .pl-form, .pl-up { padding: 12px; }
}
/* wąska karta (np. boczna kolumna) — przyciski pod nazwą pliku, nie obok */
@container (max-width: 600px) {
  .pl-item { grid-template-columns: auto minmax(0, 1fr); }
  .pl-act { grid-column: 1 / -1; justify-content: flex-start; }
  .pl-act .btn { flex: 1 1 auto; }
}
.pl-act .btn { white-space: normal; text-align: center; }
@media print { .pl { display: none !important; } }
@media (max-width: 560px) { .pl .btnrow .btn { flex: 1 1 auto; white-space: normal; text-align: center; } }
.card.pl, .pl > * { min-width: 0; }
.pl-opis, .pl-msg, .pl-name { overflow-wrap: anywhere; }
