/* ============================================================================
   Barcode & Museum Label Styles
   ============================================================================ */

/* ── BARCODE DISPLAY ── */
.um-barcode { margin: 2rem 0; }
.um-barcode__heading { font-size: 0.75rem; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; color: var(--terracotta); margin-bottom: 1rem; }
.um-barcode__container { text-align: center; }
.um-barcode__canvas { display: inline-block; max-width: 100%; }
.um-barcode__btn { margin-top: 0.75rem; font-size: 0.8rem; }

/* ── PRINTABLE LABEL ── */
.um-label {
    display: none;
    background: #fff;
    border: 2px solid #000;
    padding: 8mm 12mm;
    width: 85mm;
    font-family: Arial, sans-serif;
}
.um-label__header { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 6mm; }
.um-label__institution { font-size: 8pt; font-weight: 700; text-transform: uppercase; color: #333; }
.um-label__dept { font-size: 6pt; color: #666; }
.um-label__body { display: flex; gap: 6mm; align-items: flex-end; margin-bottom: 6mm; }
.um-label__info { flex: 1; }
.um-label__title { font-size: 10pt; font-weight: 700; margin-bottom: 1mm; }
.um-label__accession { font-size: 12pt; font-weight: 700; font-family: 'Courier New', monospace; margin-bottom: 1mm; }
.um-label__meta { font-size: 7pt; color: #555; line-height: 1.4; }
.um-label__barcode { text-align: center; padding-top: 4mm; border-top: 1px solid #ddd; }
.um-label__barcode canvas { max-width: 100%; }

/* ── PRINT MODE ── */
@media print {
    body { background: #fff !important; }
    .site-header, .site-footer, .um-newsletter, .breadcrumb, .um-barcode__btn,
    .single-artefact-wrap > *:not(.um-label) { display: none !important; }
    .um-label { display: block !important; margin: 10mm auto; box-shadow: none; }
    @page { size: A4; margin: 10mm; }
}

/* ── ADMIN BARCODE COLUMN ── */
@media screen and (min-width: 783px) {
    .column-barcode code { font-size: 10px; background: #f0f0f0; padding: 2px 6px; border-radius: 2px; }
}

/* ── BARCODE TOGGLE ── */
.um-barcode-toggle { overflow: hidden; transition: max-height 0.5s ease, opacity 0.4s ease, padding 0.4s ease; max-height: 600px; opacity: 1; padding: 1rem 0; }
.um-barcode-toggle[hidden] { max-height: 0; opacity: 0; padding: 0; display: block !important; }
.um-toggle-label { transition: background 0.2s; }
.um-toggle-label[aria-expanded="true"] { background: var(--terracotta-muted); color: var(--terracotta); border-color: var(--terracotta); }
