/* ==========================================================================
   Practice Library (pages/downloads.php). Prefix pl-.

   A resource library: a toolbar of categories and search, then file rows —
   a type tile, the title and details, and the View / Download links on the
   right. Rows rather than cards, so titles, sizes and dates scan in a
   column. The links still go through /downloads/file/{slug}.
   ========================================================================== */

.pl-library { background: var(--color-ndi-panel); }

/* Toolbar: categories above the search. */
.pl-toolbar {
  margin-bottom: 1.25rem;
  padding: 1.25rem 1.4rem;
  border: 1px solid var(--color-ndi-line);
  border-radius: 20px;
  background: #fff;
  box-shadow: 0 30px 60px -50px rgb(8 23 47 / 0.6);
}
.pl-toolbar .dx-chips { margin-bottom: 1rem; }
.pl-toolbar .dx-chip { min-height: 2.5rem; border-radius: 999px; }
.pl-toolbar .dx-filters { margin: 0; padding: 1rem 0 0; border: 0; border-top: 1px solid var(--color-ndi-line); background: none; }

/* File rows. */
.pl-rows { display: grid; gap: 0.75rem; }
.pl-row {
  display: grid;
  grid-template-columns: 3.5rem minmax(0, 1fr);
  gap: 1rem 1.25rem;
  align-items: start;
  padding: 1.25rem 1.4rem;
  border-top: 1px solid var(--color-ndi-line);
  border-radius: 18px;
  transition: border-color 220ms ease, box-shadow 220ms ease, transform 220ms ease;
}
.pl-row:hover { border-color: rgb(214 174 87 / 0.7); box-shadow: 0 24px 46px -36px rgb(8 23 47 / 0.6); transform: translateY(-1px); }
.pl-type {
  position: relative;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 0.15rem;
  width: 3.5rem;
  height: 4.25rem;
  border-radius: 6px 14px 6px 6px;
  background: linear-gradient(160deg, #102746, #08172f);
  color: var(--color-ndi-gold-400);
  font-size: 0.62rem;
  font-weight: 800;
  letter-spacing: 0.12em;
}
.pl-type::after { content: ""; position: absolute; top: 0; right: 0; width: 0.9rem; height: 0.9rem; border-radius: 0 14px 0 6px; background: linear-gradient(225deg, var(--color-ndi-panel) 50%, var(--color-ndi-gold-600) 50%); }
.pl-type span { color: #fff; }
.pl-body { min-width: 0; }
.pl-row .dx-card-title { font-size: clamp(1.1rem, 1rem + 0.4vw, 1.3rem); font-weight: 800; }
.pl-row .dx-card-text { margin-top: 0.4rem; max-width: 46rem; }
.pl-row .dx-tags { margin-top: 0.75rem; }
.pl-actions { grid-column: 2; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 0.5rem; }
.pl-actions .dx-btn { min-height: 2.75rem; border-radius: 999px; }
@media (min-width: 900px) {
  .pl-row { grid-template-columns: 3.5rem minmax(0, 1fr) auto; align-items: center; }
  .pl-actions { grid-column: auto; justify-content: flex-end; }
}

@media (prefers-reduced-motion: reduce) {
  .pl-row { transition: none; }
  .pl-row:hover { transform: none; }
}
