/**
 * =====================================================================
 * DOCUMENT LIBRARY COMPONENT — STYLES
 * =====================================================================
 * Copied verbatim from the current static design system's ".doc-card"/
 * ".docs-modal" rules (css/style.css). The shared toolbar/pagination
 * primitives (".browse"/".docs-toolbar"/".docs-pagination"/etc.) live
 * in assets/css/global.css instead — see that file's own comment.
 * =====================================================================
 */

div.docs-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
@media (max-width: 900px) { div.docs-grid { grid-template-columns: 1fr; } }
@media (min-width: 640px) and (max-width: 900px) { div.docs-grid { grid-template-columns: repeat(2, 1fr); } }

div.doc-card {
  min-width: 0;
  border: 1px solid var(--line); border-radius: var(--radius-lg);
  padding: 30px 28px; background: var(--white);
  display: flex; flex-direction: column;
  transition: transform 0.35s var(--ease), border-color 0.3s var(--ease), box-shadow 0.35s var(--ease);
}
.doc-card:hover { border-color: var(--ink); transform: translateY(-3px); box-shadow: var(--shadow-md); }
.doc-card__category {
  display: inline-flex; align-self: flex-start;
  font-family: var(--font-sans) !important; font-weight: 600; font-size: 11px; letter-spacing: 0.16em; text-transform: uppercase;
  color: var(--ink); margin-bottom: 14px;
}
.doc-card__title {
  font-family: var(--font-display) !important; font-size: var(--step-1); font-weight: 500; line-height: 1.25;
  margin: 0 0 16px; flex-grow: 1;
}
.doc-card__meta {
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
  font-family: var(--font-mono) !important; font-size: 11px; letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--slate); margin-bottom: 22px;
}
.doc-card__meta .dot { width: 3px; height: 3px; border-radius: 50%; background: var(--line); }
.doc-card__actions { display: flex; gap: 10px; }
.doc-card__actions .btn { flex: 1; justify-content: center; padding: 12px 16px; font-size: 13px; min-width: 0; }
@media (max-width: 560px) {
  .doc-card__actions { flex-direction: column; }
}

/* ---------- Preview modal ---------- */
.docs-modal {
  position: fixed; inset: 0; z-index: 200;
  display: flex; align-items: center; justify-content: center; padding: 24px;
  opacity: 0; pointer-events: none; transition: opacity 0.3s var(--ease);
}
.docs-modal.is-open { opacity: 1; pointer-events: auto; }
.docs-modal__overlay { position: absolute; inset: 0; background: rgba(27,27,27,0.72); backdrop-filter: blur(2px); }
.docs-modal__panel {
  position: relative; z-index: 1; width: min(880px, 100%); max-height: min(86vh, 980px);
  background: var(--white); border-radius: var(--radius-lg); box-shadow: var(--shadow-lg);
  display: flex; flex-direction: column; overflow: hidden;
  transform: translateY(16px) scale(0.98); transition: transform 0.35s var(--ease);
}
.docs-modal.is-open .docs-modal__panel { transform: none; }
.docs-modal__header {
  display: flex; align-items: flex-start; justify-content: space-between; gap: 20px;
  padding: 22px 26px; border-bottom: 1px solid var(--line);
}
h3.docs-modal__heading { font-family: var(--font-display) !important; font-size: var(--step-1); font-weight: 500; margin: 0 0 4px; }
.docs-modal__subheading { font-family: var(--font-mono) !important; font-size: 11px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--slate); }
button.docs-modal__close {
  flex-shrink: 0; width: 36px; height: 36px; border-radius: 50%; border: 1px solid var(--line);
  display: inline-flex; align-items: center; justify-content: center; color: var(--ink);
  transition: background 0.25s var(--ease), color 0.25s var(--ease), border-color 0.25s var(--ease);
}
button.docs-modal__close:hover { background: var(--ink); color: var(--white); border-color: var(--ink); }
.docs-modal__body { flex: 1; min-height: 320px; background: var(--sand); position: relative; }
.docs-modal__body iframe { width: 100%; height: 100%; min-height: 320px; border: 0; display: block; }
.docs-modal__footer { display: flex; align-items: center; justify-content: flex-end; gap: 12px; padding: 18px 26px; border-top: 1px solid var(--line); }

@media (max-width: 560px) {
  .docs-modal { padding: 0; }
  .docs-modal__panel { max-height: 100vh; height: 100%; border-radius: 0; width: 100%; }
}
