/* Estilos de ubicaciones.html; reutilizan las variables de style.css (claro/oscuro). */
.bl { max-width: 40rem; }
.bl [hidden] { display: none !important; }
.bl-tabs { display: flex; gap: 0.5rem; margin: 1rem 0; }
.bl-tabs .bl-btn { flex: 1; }
.bl-row { display: flex; gap: 0.5rem; margin: 0.6rem 0; }
.bl-row > input, .bl-row > select { flex: 1; min-width: 0; }
.bl input, .bl select {
  font: inherit; padding: 0.55rem 0.75rem; border-radius: 6px;
  border: 1px solid var(--border-bottom); background: var(--box); color: var(--black);
}
.bl-btn {
  font: inherit; font-weight: 500; padding: 0.55rem 0.9rem; border-radius: 6px; cursor: pointer;
  border: 1px solid var(--border-bottom); background: var(--box); color: var(--black);
}
.bl-btn:hover { border-color: var(--accent); }
.bl-primary, .bl-tabs .bl-btn[aria-selected="true"] { background: var(--accent); border-color: var(--accent); color: #fff; }
.bl-card { background: var(--box); box-shadow: var(--box-shadow); border-radius: 8px; padding: 0.75rem 1rem; margin: 0.7rem 0; }
.bl-card.err { border-left: 4px solid #b91c1c; }
.bl-muted { color: var(--grey); font-size: 0.9rem; }
.bl-loc { font-weight: 600; color: var(--accent); }
.bl-err { color: #dc2626; }
.bl-token { border: 2px solid var(--accent); }
#video { width: 100%; max-height: 42vh; background: #000; border-radius: 8px; object-fit: cover; }
.bl-label { background: #fff; color: #000; text-align: center; padding: 0.6rem; border-radius: 8px; margin: 0.7rem 0; }
.bl-label svg { max-width: 100%; height: auto; }
.bl-sheet { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0.5rem; background: #fff; padding: 0.5rem; margin: 0.7rem 0; }
.bl-sheet .bl-cell { border: 1px dashed #999; color: #000; text-align: center; padding: 0.4rem; break-inside: avoid; font-weight: 600; }
.bl-sheet svg { max-width: 100%; height: auto; }
.bl-cell__key { display: none; }
@media print {
  body * { visibility: hidden; }
  body.print-sheet .bl-sheet, body.print-sheet .bl-sheet * { visibility: visible; }
  body.print-sheet .bl-sheet { display: grid !important; }
  body:not(.print-sheet) .bl-label, body:not(.print-sheet) .bl-label * { visibility: visible; }
  body:not(.print-sheet) .bl-label { position: absolute; left: 0; top: 0; width: 100%; }
}
.bl-book { display: flex; gap: 0.8rem; align-items: flex-start; }
.bl-book__body { flex: 1; min-width: 0; }
.bl-cover { width: 64px; height: auto; max-height: 96px; object-fit: cover; border-radius: 4px; flex: none; }
.bl-h2 { font-size: 1.05rem; margin: 1.2rem 0 0.4rem; color: var(--accent); }
.bl-item { padding: 0.5rem 0; border-bottom: 1px solid var(--border-bottom); }
.bl-item .bl-btn { margin-top: 0.3rem; font-size: 0.85rem; padding: 0.3rem 0.6rem; }
.bl details { margin: 0.4rem 0; }
.bl summary { cursor: pointer; }
.bl-code { font: 11px monospace; word-break: break-all; }
.bl-label svg, .bl-sheet svg { width: 70%; max-width: 220px; height: auto; }
.bl-move select { width: 100%; white-space: nowrap; text-overflow: ellipsis; overflow: hidden; }
.bl-move .bl-row { flex-wrap: wrap; }
.bl-open { cursor: pointer; }
.bl-open:hover strong { color: var(--accent); }
.bl-wide { width: 100%; margin: 0.6rem 0; }
.bl-form label { display: block; margin-top: 0.7rem; font-weight: 500; }
.bl-form input, .bl-form select, #as-loc-select { width: 100%; }
.bl-form-online { --bl-online-color: #b91c1c; }
.dark-theme .bl-form-online { --bl-online-color: #ff8585; }
.bl-form-online .bl-book__body, .bl-form-online .bl-book__body .bl-muted,
.bl-form-online label, .bl-form-online input, .bl-form-online #af-secondary-wrap .bl-muted {
  color: var(--bl-online-color);
}
#as-loc .bl-row select { flex: 1; min-width: 0; }
.bl-form .bl-row { flex-wrap: wrap; }
.bl-secondary-wrap { margin-top: 0.6rem; }
.bl-secondary-wrap label { display: block; margin: 0.3rem 0; font-weight: 500; }
.bl-secondary-wrap .bl-muted { margin: 0.2rem 0; }
.bl-total { margin: 0.2rem 0 0; color: var(--grey); }
.bl-total strong { color: var(--accent); font-size: 1.4rem; }
.bl-pick { position: relative; flex: 1; min-width: 0; width: 100%; }
.bl-pick__input { width: 100%; }
.bl-pick__list { position: absolute; z-index: 20; left: 0; right: 0; top: 100%; margin-top: 2px; max-height: 40vh; overflow-y: auto;
  background: var(--box); border: 1px solid var(--accent); border-radius: 6px; box-shadow: var(--box-shadow); }
.bl-pick__opt, .bl-author-opt { display: block; width: 100%; text-align: left; font: inherit; padding: 0.6rem 0.75rem; border: 0; border-bottom: 1px solid var(--border-bottom);
  background: transparent; color: var(--black); cursor: pointer; }
.bl-pick__opt:hover, .bl-pick__opt:focus, .bl-author-opt:hover, .bl-author-opt:focus { background: var(--accent); color: #fff; }
.bl-pick__empty { padding: 0.6rem 0.75rem; }
.bl-key { max-width: 7rem; text-transform: uppercase; }
.bl-keytag { display: inline-block; background: var(--accent); color: #fff; border-radius: 4px; padding: 0 0.4rem; font-size: 0.85rem; }

.bl-suggest { display: flex; flex-direction: column; gap: 6px; margin: 8px 0; }
.bl-sug { text-align: left; white-space: normal; }
.bl-pick__opt.is-current { font-weight: 700; }
.bl-version { margin-top: 24px; font-size: 0.8rem; text-align: center; }

/* "Imprimir todas": etiquetas de 2 cm x 2 cm con QR y solo la clave. */
@media print {
  html, html body.print-sheet { zoom: 1 !important; }
  /* Solo queda la hoja y sus ancestros: lo demás no ocupa espacio (evita páginas en blanco). */
  body.print-sheet :not(:has(#l-sheet)):not(#l-sheet):not(#l-sheet *) { display: none !important; }
  body.print-sheet, body.print-sheet * { margin-top: 0; }
  body.print-sheet .bl, body.print-sheet main, body.print-sheet .container, body.print-sheet #tab-locs { padding: 0 !important; margin: 0 !important; width: auto !important; max-width: none !important; }
  @page { margin: 8mm; }
  body.print-sheet .bl-sheet { grid-template-columns: repeat(auto-fill, 2cm); gap: 3mm; padding: 0; margin: 0; }
  body.print-sheet .bl-sheet .bl-cell { width: 2cm; height: 2cm; box-sizing: border-box; padding: 0; border: 0; overflow: hidden; display: flex; flex-direction: column; align-items: center; justify-content: center; }
  body.print-sheet .bl-cell__name, body.print-sheet .bl-cell .bl-code { display: none; }
  body.print-sheet .bl-cell [data-code] { width: 1.5cm; height: 1.5cm; }
  body.print-sheet .bl-cell svg { width: 100%; height: 100%; max-width: none; display: block; }
  body.print-sheet .bl-cell__key { display: block; font: 700 8pt/1 sans-serif; height: 0.4cm; max-width: 2cm; white-space: nowrap; overflow: hidden; text-align: center; }
}
