/* Library, canteen and commercial spaces: spine labels, the food wallet card, narrow slips, the policy grid. */

.doc-sheet.doc-narrow { max-width: 520px; padding: 28px 32px; }
.barcode { max-width: 100%; height: auto; display: block; }

/* copy labels: a sheet of spine / pocket labels, cut along the borders */
.label-sheet { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: .6rem; }
.spine-label { background: #fff; border: 1px dashed #b9c3c0; border-radius: 4px; padding: .45rem .55rem .5rem; text-align: center; break-inside: avoid; }
.spine-label .sl-lib { font-size: .66rem; color: var(--muted); }
.spine-label .sl-call { font-family: var(--font-title); font-weight: 700; font-size: .95rem; line-height: 1.2; min-height: 1.1rem; }
.spine-label .barcode { margin: .25rem auto; }
.spine-label .sl-title { font-size: .68rem; color: var(--ink-soft); line-height: 1.2; }

/* the food wallet card, ID-card sized when printed */
.wallet-card { width: 340px; max-width: 100%; margin: 0 auto; background: #fff; border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--raise-2);
  padding: 14px 16px 12px; border-top: 6px solid var(--slate); }
.wallet-card .wc-head { display: flex; align-items: center; gap: .6rem; }
.wallet-card .wc-head .crest { width: 34px; height: 34px; flex-basis: 34px; font-size: .75rem; }
.wallet-card .wc-school { font-family: var(--font-title); font-weight: 700; font-size: .92rem; line-height: 1.15; color: #15232a; }
.wallet-card .wc-kind { font-size: .72rem; color: var(--muted); }
.wallet-card .wc-name { margin-top: .7rem; font-weight: 700; font-size: 1.05rem; color: var(--ink); }
.wallet-card .wc-no { font-size: .8rem; color: var(--muted); }
.wallet-card .wc-code { margin-top: .5rem; display: flex; justify-content: center; }

/* the borrowing policy grid */
.pol-input { max-width: 8.5rem; }

@media print {
  .label-sheet { grid-template-columns: repeat(4, 1fr); gap: 4mm; }
  .spine-label { border-style: dotted; }
  .wallet-card { width: 85.6mm; box-shadow: none; border-radius: 3mm; }
}
@media (max-width: 575.98px) {
  .doc-sheet.doc-narrow { padding: 18px 16px; }
  .label-sheet { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* a wide statement table scrolls inside the sheet on a phone, and prints whole */
@media screen { .doc-scroll { overflow-x: auto; } .doc-scroll .doc-table { min-width: 34rem; } }
